@llamaindex/workflow-debugger 0.2.34 → 0.2.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.js CHANGED
@@ -266,7 +266,7 @@ Error generating stack: `+S.message+`
266
266
  *
267
267
  * This source code is licensed under the ISC license.
268
268
  * See the LICENSE file in the root directory of this source tree.
269
- */const QG=vn("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Sx=aEe,ZG=iEe,JG=({label:t,badge:e,icon:n})=>A.jsxs("span",{className:"flex w-full items-center gap-2",children:[A.jsx("span",{className:"flex-1 truncate",children:t}),e&&A.jsx("span",{className:"flex shrink-0",children:typeof e=="string"?A.jsx(_T,{variant:"secondary",label:e}):e}),UEe(n)]}),TT=t=>{var e=t,{ref:n,placeholder:r,badge:a,value:i,icon:o}=e,s=Mn(e,["ref","placeholder","badge","value","icon"]);return A.jsxs(BG,Rr(Qt({ref:n,className:"focus:ring-ring/50 flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal outline-none transition-all hover:border-ring focus:border-ring focus:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground [&>span]:line-clamp-1 [&>span]:overflow-ellipsis [&>span]:whitespace-nowrap"},s),{children:[A.jsx("div",{className:"flex flex-1 overflow-hidden text-left [&>span]:w-full",children:i?A.jsx(ZG,{placeholder:r,children:A.jsx(JG,{label:i,badge:a,icon:o})}):A.jsx(ZG,{placeholder:r})}),A.jsx("div",{className:"flex shrink-0 items-center gap-2",children:A.jsx(oEe,{asChild:!0,children:A.jsx(bx,{className:"size-4 shrink-0 opacity-50"})})})]}))};TT.displayName=BG.displayName;var ez=t=>{var e=t,{ref:n}=e,r=Mn(e,["ref"]);return A.jsx(zG,Rr(Qt({ref:n,className:"flex cursor-default items-center justify-center py-1"},r),{children:A.jsx(SEe,{className:"size-[15px]"})}))};ez.displayName=zG.displayName;var tz=t=>{var e=t,{ref:n}=e,r=Mn(e,["ref"]);return A.jsx(qG,Rr(Qt({ref:n,className:"flex cursor-default items-center justify-center py-1"},r),{children:A.jsx(bx,{className:"size-[15px]"})}))};tz.displayName=qG.displayName;var CT=t=>{var e=t,{ref:n,children:r,position:a="popper"}=e,i=Mn(e,["ref","children","position"]);return A.jsx(sEe,{children:A.jsxs(UG,Rr(Qt({ref:n,className:a==="popper"?"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-80 relative max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1":"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-80 relative max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md",position:a},i),{children:[A.jsx(ez,{}),A.jsx(lEe,{className:a==="popper"?"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] p-1":"p-1",children:r}),A.jsx(tz,{})]}))})};CT.displayName=UG.displayName,cEe.displayName;var UEe=t=>t?N.isValidElement(t)?A.jsx("div",{className:"flex shrink-0 items-center justify-center",children:t}):typeof t=="function"||typeof t=="object"&&!N.isValidElement(t)?N.createElement(t,{className:"size-4 shrink-0 text-muted-foreground group-focus:text-foreground","aria-hidden":"true"}):null:null,Gh=t=>{var e=t,{ref:n,label:r,caption:a,badge:i,icon:o}=e,s=Mn(e,["ref","label","caption","badge","icon"]);return A.jsxs(GG,Rr(Qt({ref:n,className:"group relative flex w-full cursor-default select-none items-start gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm font-normal outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50","da-cid":Gw(r)},s),{children:[A.jsx("span",{className:"absolute left-2 flex size-5 items-center justify-center",children:A.jsx(dEe,{children:A.jsx(yT,{className:"size-4"})})}),A.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[A.jsx(uEe,{children:A.jsx(JG,{label:r,badge:i,icon:o})}),a&&A.jsx("div",{className:"text-xs text-muted-foreground",children:typeof a=="string"?A.jsx("span",{className:"truncate",children:a}):a})]})]}))};Gh.displayName=GG.displayName,pEe.displayName;function AT(){return AT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},AT.apply(null,arguments)}function nz(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var GEe=N.useLayoutEffect,zEe=function(e){var n=Oe.useRef(e);return GEe(function(){n.current=e}),n},rz=function(e,n){if(typeof e=="function"){e(n);return}e.current=n},qEe=function(e,n){var r=Oe.useRef();return Oe.useCallback(function(a){e.current=a,r.current&&rz(r.current,null),r.current=n,n&&rz(n,a)},[n])},az={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},HEe=function(e){Object.keys(az).forEach(function(n){e.style.setProperty(n,az[n],"important")})},iz=HEe,mi=null,oz=function(e,n){var r=e.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function $Ee(t,e,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),mi||(mi=document.createElement("textarea"),mi.setAttribute("tabindex","-1"),mi.setAttribute("aria-hidden","true"),iz(mi)),mi.parentNode===null&&document.body.appendChild(mi);var a=t.paddingSize,i=t.borderSize,o=t.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(m){var h=m;mi.style[h]=o[h]}),iz(mi),mi.value=e;var l=oz(mi,t);mi.value=e,l=oz(mi,t),mi.value="x";var u=mi.scrollHeight-a,d=u*n;s==="border-box"&&(d=d+a+i),l=Math.max(d,l);var f=u*r;return s==="border-box"&&(f=f+a+i),l=Math.min(f,l),[l,u]}var sz=function(){},YEe=function(e,n){return e.reduce(function(r,a){return r[a]=n[a],r},{})},VEe=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],jEe=!!document.documentElement.currentStyle,WEe=function(e){var n=window.getComputedStyle(e);if(n===null)return null;var r=YEe(VEe,n),a=r.boxSizing;if(a==="")return null;jEe&&a==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:o}},KEe=WEe;function vx(t,e,n){var r=zEe(n);N.useLayoutEffect(function(){var a=function(o){return r.current(o)};if(t)return t.addEventListener(e,a),function(){return t.removeEventListener(e,a)}},[])}var XEe=function(e,n){vx(document.body,"reset",function(r){e.current.form===r.target&&n(r)})},QEe=function(e){vx(window,"resize",e)},ZEe=function(e){vx(document.fonts,"loadingdone",e)},JEe=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],eSe=function(e,n){var r=e.cacheMeasurements,a=e.maxRows,i=e.minRows,o=e.onChange,s=o===void 0?sz:o,l=e.onHeightChange,u=l===void 0?sz:l,d=nz(e,JEe),f=d.value!==void 0,m=N.useRef(null),h=qEe(m,n),E=N.useRef(0),b=N.useRef(),v=function(){var T=m.current,w=r&&b.current?b.current:KEe(T);if(w){b.current=w;var O=$Ee(w,T.value||T.placeholder||"x",i,a),x=O[0],D=O[1];E.current!==x&&(E.current=x,T.style.setProperty("height",x+"px","important"),u(x,{rowHeight:D}))}},y=function(T){f||v(),s(T)};return N.useLayoutEffect(v),XEe(m,function(){if(!f){var C=m.current.value;requestAnimationFrame(function(){var T=m.current;T&&C!==T.value&&v()})}}),QEe(v),ZEe(v),N.createElement("textarea",AT({},d,{onChange:y,ref:h}))},tSe=N.forwardRef(eSe),nSe=Ps(["flex w-full resize-none rounded-md border border-input bg-background px-3 py-[6.5px] text-sm leading-normal shadow-xs transition-colors","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/20"],{variants:{variant:{default:"",error:"border-destructive focus-visible:ring-destructive/20"}},defaultVariants:{variant:"default"}}),RT=t=>{var e=t,{ref:n,variant:r,minRows:a=2,maxRows:i}=e,o=Mn(e,["ref","variant","minRows","maxRows"]);return A.jsx(tSe,Qt({className:Zt(nSe({variant:r}),i&&"overflow-y-auto"),ref:n,minRows:a,maxRows:i},o))};RT.displayName="Textarea";var lz=["PageUp","PageDown"],cz=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],uz={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},zh="Slider",[yx,rSe,aSe]=h0(zh),[dz]=pa(zh,[aSe]),[iSe,wT]=dz(zh),pz=N.forwardRef((t,e)=>{const{name:n,min:r=0,max:a=100,step:i=1,orientation:o="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[r],value:d,onValueChange:f=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:E,...b}=t,v=N.useRef(new Set),y=N.useRef(0),T=o==="horizontal"?oSe:sSe,[w=[],O]=Xo({prop:d,defaultProp:u,onChange:q=>{var Q;(Q=[...v.current][y.current])==null||Q.focus(),f(q)}}),x=N.useRef(w);function D(q){const j=hSe(w,q);P(q,j)}function M(q){P(q,y.current)}function F(){const q=x.current[y.current];w[y.current]!==q&&m(w)}function P(q,j,{commit:Q}={commit:!1}){const U=ESe(i),K=SSe(Math.round((q-r)/i)*i+r,U),G=m0(K,[r,a]);O((Y=[])=>{const W=fSe(Y,G,j);if(bSe(W,l*i)){y.current=W.indexOf(G);const J=String(W)!==String(Y);return J&&Q&&m(W),J?W:Y}else return Y})}return A.jsx(iSe,{scope:t.__scopeSlider,name:n,disabled:s,min:r,max:a,valueIndexToChangeRef:y,thumbs:v.current,values:w,orientation:o,form:E,children:A.jsx(yx.Provider,{scope:t.__scopeSlider,children:A.jsx(yx.Slot,{scope:t.__scopeSlider,children:A.jsx(T,{"aria-disabled":s,"data-disabled":s?"":void 0,...b,ref:e,onPointerDown:Le(b.onPointerDown,()=>{s||(x.current=w)}),min:r,max:a,inverted:h,onSlideStart:s?void 0:D,onSlideMove:s?void 0:M,onSlideEnd:s?void 0:F,onHomeKeyDown:()=>!s&&P(r,0,{commit:!0}),onEndKeyDown:()=>!s&&P(a,w.length-1,{commit:!0}),onStepKeyDown:({event:q,direction:j})=>{if(!s){const K=lz.includes(q.key)||q.shiftKey&&cz.includes(q.key)?10:1,G=y.current,Y=w[G],W=i*K*j;P(Y+W,G,{commit:!0})}}})})})})});pz.displayName=zh;var[fz,mz]=dz(zh,{startEdge:"left",endEdge:"right",size:"width",direction:1}),oSe=N.forwardRef((t,e)=>{const{min:n,max:r,dir:a,inverted:i,onSlideStart:o,onSlideMove:s,onSlideEnd:l,onStepKeyDown:u,...d}=t,[f,m]=N.useState(null),h=It(e,T=>m(T)),E=N.useRef(void 0),b=g0(a),v=b==="ltr",y=v&&!i||!v&&i;function C(T){const w=E.current||f.getBoundingClientRect(),O=[0,w.width],D=Ax(O,y?[n,r]:[r,n]);return E.current=w,D(T-w.left)}return A.jsx(fz,{scope:t.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:A.jsx(hz,{dir:b,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:T=>{const w=C(T.clientX);o==null||o(w)},onSlideMove:T=>{const w=C(T.clientX);s==null||s(w)},onSlideEnd:()=>{E.current=void 0,l==null||l()},onStepKeyDown:T=>{const O=uz[y?"from-left":"from-right"].includes(T.key);u==null||u({event:T,direction:O?-1:1})}})})}),sSe=N.forwardRef((t,e)=>{const{min:n,max:r,inverted:a,onSlideStart:i,onSlideMove:o,onSlideEnd:s,onStepKeyDown:l,...u}=t,d=N.useRef(null),f=It(e,d),m=N.useRef(void 0),h=!a;function E(b){const v=m.current||d.current.getBoundingClientRect(),y=[0,v.height],T=Ax(y,h?[r,n]:[n,r]);return m.current=v,T(b-v.top)}return A.jsx(fz,{scope:t.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:A.jsx(hz,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const v=E(b.clientY);i==null||i(v)},onSlideMove:b=>{const v=E(b.clientY);o==null||o(v)},onSlideEnd:()=>{m.current=void 0,s==null||s()},onStepKeyDown:b=>{const y=uz[h?"from-bottom":"from-top"].includes(b.key);l==null||l({event:b,direction:y?-1:1})}})})}),hz=N.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:l,...u}=t,d=wT(zh,n);return A.jsx(ft.span,{...u,ref:e,onKeyDown:Le(t.onKeyDown,f=>{f.key==="Home"?(o(f),f.preventDefault()):f.key==="End"?(s(f),f.preventDefault()):lz.concat(cz).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:Le(t.onPointerDown,f=>{const m=f.target;m.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(m)?m.focus():r(f)}),onPointerMove:Le(t.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&a(f)}),onPointerUp:Le(t.onPointerUp,f=>{const m=f.target;m.hasPointerCapture(f.pointerId)&&(m.releasePointerCapture(f.pointerId),i(f))})})}),gz="SliderTrack",lSe=N.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,a=wT(gz,n);return A.jsx(ft.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...r,ref:e})});lSe.displayName=gz;var Tx="SliderRange",cSe=N.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,a=wT(Tx,n),i=mz(Tx,n),o=N.useRef(null),s=It(e,o),l=a.values.length,u=a.values.map(m=>bz(m,a.min,a.max)),d=l>1?Math.min(...u):0,f=100-Math.max(...u);return A.jsx(ft.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...r,ref:s,style:{...t.style,[i.startEdge]:d+"%",[i.endEdge]:f+"%"}})});cSe.displayName=Tx;var Cx="SliderThumb",uSe=N.forwardRef((t,e)=>{const n=rSe(t.__scopeSlider),[r,a]=N.useState(null),i=It(e,s=>a(s)),o=N.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return A.jsx(dSe,{...t,ref:i,index:o})}),dSe=N.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:a,...i}=t,o=wT(Cx,n),s=mz(Cx,n),[l,u]=N.useState(null),d=It(e,C=>u(C)),f=l?o.form||!!l.closest("form"):!0,m=nx(l),h=o.values[r],E=h===void 0?0:bz(h,o.min,o.max),b=mSe(r,o.values.length),v=m==null?void 0:m[s.size],y=v?gSe(v,E,s.direction):0;return N.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),A.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${E}% + ${y}px)`},children:[A.jsx(yx.ItemSlot,{scope:t.__scopeSlider,children:A.jsx(ft.span,{role:"slider","aria-label":t["aria-label"]||b,"aria-valuemin":o.min,"aria-valuenow":h,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:d,style:h===void 0?{display:"none"}:t.style,onFocus:Le(t.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),f&&A.jsx(_z,{name:a??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:h},r)]})});uSe.displayName=Cx;var pSe="RadioBubbleInput",_z=N.forwardRef(({__scopeSlider:t,value:e,...n},r)=>{const a=N.useRef(null),i=It(a,r),o=dx(e);return N.useEffect(()=>{const s=a.current;if(!s)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&d){const f=new Event("input",{bubbles:!0});d.call(s,e),s.dispatchEvent(f)}},[o,e]),A.jsx(ft.input,{style:{display:"none"},...n,ref:i,defaultValue:e})});_z.displayName=pSe;function fSe(t=[],e,n){const r=[...t];return r[n]=e,r.sort((a,i)=>a-i)}function bz(t,e,n){const i=100/(n-e)*(t-e);return m0(i,[0,100])}function mSe(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function hSe(t,e){if(t.length===1)return 0;const n=t.map(a=>Math.abs(a-e)),r=Math.min(...n);return n.indexOf(r)}function gSe(t,e,n){const r=t/2,i=Ax([0,50],[0,r]);return(r-i(e)*n)*n}function _Se(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function bSe(t,e){if(e>0){const n=_Se(t);return Math.min(...n)>=e}return!0}function Ax(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function ESe(t){return(String(t).split(".")[1]||"").length}function SSe(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var vSe=pz;vSe.displayName;var[xT]=pa("Tooltip",[Tl]),NT=Tl(),Ez="TooltipProvider",ySe=700,Rx="tooltip.open",[TSe,wx]=xT(Ez),Sz=t=>{const{__scopeTooltip:e,delayDuration:n=ySe,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=t,o=N.useRef(!0),s=N.useRef(!1),l=N.useRef(0);return N.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),A.jsx(TSe,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:N.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:N.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:N.useCallback(u=>{s.current=u},[]),disableHoverableContent:a,children:i})};Sz.displayName=Ez;var b0="Tooltip",[CSe,E0]=xT(b0),vz=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:a,onOpenChange:i,disableHoverableContent:o,delayDuration:s}=t,l=wx(b0,t.__scopeTooltip),u=NT(e),[d,f]=N.useState(null),m=bl(),h=N.useRef(0),E=o??l.disableHoverableContent,b=s??l.delayDuration,v=N.useRef(!1),[y,C]=Xo({prop:r,defaultProp:a??!1,onChange:D=>{D?(l.onOpen(),document.dispatchEvent(new CustomEvent(Rx))):l.onClose(),i==null||i(D)},caller:b0}),T=N.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),w=N.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,C(!0)},[C]),O=N.useCallback(()=>{window.clearTimeout(h.current),h.current=0,C(!1)},[C]),x=N.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,C(!0),h.current=0},b)},[b,C]);return N.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),A.jsx(oT,{...u,children:A.jsx(CSe,{scope:e,contentId:m,open:y,stateAttribute:T,trigger:d,onTriggerChange:f,onTriggerEnter:N.useCallback(()=>{l.isOpenDelayedRef.current?x():w()},[l.isOpenDelayedRef,x,w]),onTriggerLeave:N.useCallback(()=>{E?O():(window.clearTimeout(h.current),h.current=0)},[O,E]),onOpen:w,onClose:O,disableHoverableContent:E,children:n})})};vz.displayName=b0;var xx="TooltipTrigger",yz=N.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,a=E0(xx,n),i=wx(xx,n),o=NT(n),s=N.useRef(null),l=It(e,s,a.onTriggerChange),u=N.useRef(!1),d=N.useRef(!1),f=N.useCallback(()=>u.current=!1,[]);return N.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),A.jsx(kh,{asChild:!0,...o,children:A.jsx(ft.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:l,onPointerMove:Le(t.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:Le(t.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:Le(t.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Le(t.onFocus,()=>{u.current||a.onOpen()}),onBlur:Le(t.onBlur,a.onClose),onClick:Le(t.onClick,a.onClose)})})});yz.displayName=xx;var Nx="TooltipPortal",[ASe,RSe]=xT(Nx,{forceMount:void 0}),Tz=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:a}=t,i=E0(Nx,e);return A.jsx(ASe,{scope:e,forceMount:n,children:A.jsx(Fa,{present:n||i.open,children:A.jsx(d0,{asChild:!0,container:a,children:r})})})};Tz.displayName=Nx;var qh="TooltipContent",Cz=N.forwardRef((t,e)=>{const n=RSe(qh,t.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...i}=t,o=E0(qh,t.__scopeTooltip);return A.jsx(Fa,{present:r||o.open,children:o.disableHoverableContent?A.jsx(Az,{side:a,...i,ref:e}):A.jsx(wSe,{side:a,...i,ref:e})})}),wSe=N.forwardRef((t,e)=>{const n=E0(qh,t.__scopeTooltip),r=wx(qh,t.__scopeTooltip),a=N.useRef(null),i=It(e,a),[o,s]=N.useState(null),{trigger:l,onClose:u}=n,d=a.current,{onPointerInTransitChange:f}=r,m=N.useCallback(()=>{s(null),f(!1)},[f]),h=N.useCallback((E,b)=>{const v=E.currentTarget,y={x:E.clientX,y:E.clientY},C=ISe(y,v.getBoundingClientRect()),T=DSe(y,C),w=kSe(b.getBoundingClientRect()),O=LSe([...T,...w]);s(O),f(!0)},[f]);return N.useEffect(()=>()=>m(),[m]),N.useEffect(()=>{if(l&&d){const E=v=>h(v,d),b=v=>h(v,l);return l.addEventListener("pointerleave",E),d.addEventListener("pointerleave",b),()=>{l.removeEventListener("pointerleave",E),d.removeEventListener("pointerleave",b)}}},[l,d,h,m]),N.useEffect(()=>{if(o){const E=b=>{const v=b.target,y={x:b.clientX,y:b.clientY},C=(l==null?void 0:l.contains(v))||(d==null?void 0:d.contains(v)),T=!MSe(y,o);C?m():T&&(m(),u())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[l,d,o,u,m]),A.jsx(Az,{...t,ref:i})}),[xSe,NSe]=xT(b0,{isInside:!1}),OSe=Y8("TooltipContent"),Az=N.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...s}=t,l=E0(qh,n),u=NT(n),{onClose:d}=l;return N.useEffect(()=>(document.addEventListener(Rx,d),()=>document.removeEventListener(Rx,d)),[d]),N.useEffect(()=>{if(l.trigger){const f=m=>{const h=m.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),A.jsx(nf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:A.jsxs(c0,{"data-state":l.stateAttribute,...u,...s,ref:e,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:[A.jsx(OSe,{children:r}),A.jsx(xSe,{scope:n,isInside:!0,children:A.jsx(P0e,{id:l.contentId,role:"tooltip",children:a||r})})]})})});Cz.displayName=qh;var Rz="TooltipArrow",wz=N.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,a=NT(n);return NSe(Rz,n).isInside?null:A.jsx(u0,{...a,...r,ref:e})});wz.displayName=Rz;function ISe(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),a=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,a,i)){case i:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function DSe(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function kSe(t){const{top:e,right:n,bottom:r,left:a}=t;return[{x:a,y:e},{x:n,y:e},{x:n,y:r},{x:a,y:r}]}function MSe(t,e){const{x:n,y:r}=t;let a=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const s=e[i],l=e[o],u=s.x,d=s.y,f=l.x,m=l.y;d>r!=m>r&&n<(f-u)*(r-d)/(m-d)+u&&(a=!a)}return a}function LSe(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),PSe(e)}function PSe(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const a=t[r];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))e.pop();else break}e.push(a)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const a=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))n.pop();else break}n.push(a)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var FSe=Sz,BSe=vz,USe=yz,GSe=Tz,zSe=Cz,qSe=wz,HSe=FSe,$Se=t=>{var e=t,{delayDuration:n=0}=e,r=Mn(e,["delayDuration"]);return A.jsx(HSe,Qt({"data-slot":"tooltip-provider",delayDuration:n},r))},YSe=({href:t,label:e="Link",external:n=!1})=>A.jsxs("a",{href:t,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,className:"inline-flex items-center gap-1 text-xs font-medium text-background underline","da-cid":Gw(e),children:[e,n&&A.jsx(CEe,{className:"size-3"})]}),Al=t=>{var e=t,{trigger:n,content:r,side:a,link:i,linkExternal:o=!1,linkLabel:s,delayDuration:l=0,sideOffset:u=6}=e,d=Mn(e,["trigger","content","side","link","linkExternal","linkLabel","delayDuration","sideOffset"]);return A.jsx($Se,{delayDuration:l,children:A.jsxs(BSe,Rr(Qt({"data-slot":"tooltip"},d),{children:[A.jsx(USe,{asChild:!0,"data-slot":"tooltip-trigger",children:n}),A.jsx(GSe,{children:A.jsxs(zSe,{"data-slot":"tooltip-content",side:a,sideOffset:u,className:Zt("animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","z-50 flex max-w-xs flex-col items-center gap-1 rounded-md bg-foreground px-3 py-2 text-center text-xs text-background","[&_code]:bg-background/20 [&_code]:break-all [&_code]:rounded [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono"),children:[r,i&&A.jsx(YSe,{href:i,label:s,external:o}),A.jsx(qSe,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})]}))})},VSe=Ps("flex flex-col gap-3 w-full",{variants:{variant:{integrated:"",standalone:""}},defaultVariants:{variant:"integrated"}}),Bs=({label:t,required:e=!1,optional:n=!1,icon:r,badge:a,tooltip:i,description:o,children:s,variant:l="integrated",htmlFor:u,"da-cid":d})=>A.jsxs("div",{className:VSe({variant:l}),"da-cid":d,children:[A.jsxs("div",{className:"flex flex-col gap-1",children:[A.jsxs("div",{className:"flex min-h-5 w-full items-center gap-2",children:[r&&A.jsx("div",{className:"flex size-4 shrink-0 items-center justify-center text-muted-foreground [&>svg]:size-full",children:r}),A.jsxs("label",{htmlFor:u,className:"flex shrink-0 items-center text-sm font-medium",children:[A.jsx("span",{className:"text-foreground",children:t}),e&&A.jsx("span",{className:"text-[rgb(225,29,72)]",children:"*"})]}),n&&A.jsx("span",{className:"shrink-0 text-sm font-normal text-muted-foreground",children:"Optional"}),a,i&&A.jsx(Al,{trigger:A.jsx("div",{className:"flex size-4 shrink-0 cursor-pointer items-center justify-center text-muted-foreground hover:text-foreground [&>svg]:size-full",children:A.jsx(yEe,{})}),content:i})]}),o&&A.jsx("p",{className:"w-full whitespace-pre-wrap text-sm font-normal text-muted-foreground",children:o})]}),l==="integrated"&&s]});Bs.displayName="Label";var xz=Ps(["flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm leading-none shadow-xs transition-colors","file:h-7 file:border-0 file:bg-transparent file:pe-2 file:text-sm file:font-medium","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/20"],{variants:{variant:{default:"",error:"border-destructive focus-visible:ring-destructive/20",warning:"border-warning focus-visible:ring-warning/20"}},defaultVariants:{variant:"default"}}),OT=t=>{var e=t,{ref:n,variant:r,type:a,icon:i}=e,o=Mn(e,["ref","variant","type","icon"]);const[s,l]=N.useState(!1),[u,d]=N.useState(""),f=()=>{l(!s)},m=C=>{var T,w;const O=C.currentTarget.files;(T=O==null?void 0:O[0])!=null&&T.name?d(O[0].name):d(""),(w=o.onChange)==null||w.call(o,C)},h=a==="password"&&s?"text":a,E=a==="password",b=a==="file",v=!!i;if(b)return A.jsxs("label",{className:Zt(xz({variant:r}),"flex h-9 w-full items-center gap-2 overflow-hidden rounded-md border border-input bg-background px-3 py-1 text-sm text-foreground transition-colors","focus-within:ring-ring/50 focus-within:outline-none focus-within:ring-[3px]","has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50"),children:[A.jsx("input",Qt({ref:n,type:"file",className:"sr-only",onChange:m},o)),A.jsx("button",{type:"button",className:"pointer-events-none flex flex-shrink-0 items-center justify-center px-1.5 py-px font-medium",tabIndex:-1,children:"Choose file"}),i&&A.jsx("div",{className:"relative flex h-4 w-4 flex-shrink-0 items-center justify-center text-muted-foreground [&>svg]:size-4",children:i}),A.jsx("span",{className:"relative line-clamp-1 flex-1 text-muted-foreground",children:u||"No file chosen"})]});const y=A.jsx("input",Qt({className:Zt(xz({variant:r}),v&&!b&&"pl-9",E&&"pr-10"),ref:n,type:h},o));return v||E?A.jsxs("div",{className:"group relative w-full",children:[i&&A.jsx("div",{className:Zt("pointer-events-none absolute top-1/2 flex size-4 -translate-y-1/2 items-center justify-center text-muted-foreground [&>svg]:size-full","left-3"),children:i}),y,E&&A.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-focus-within:opacity-100 group-hover:opacity-100",onClick:f,tabIndex:-1,children:s?A.jsx(AEe,{className:"size-4"}):A.jsx(REe,{className:"size-4"})})]}):y};OT.displayName="Input";var jSe=Ps("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 active:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",destructive:"border bg-background text-destructive shadow-xs hover:bg-accent hover:text-destructive focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",link:"text-primary underline-offset-4 hover:underline focus-visible:ring-ring/50 focus-visible:ring-[3px]"},size:{default:"h-9 px-3 py-2 gap-1.5",sm:"h-8 rounded-md gap-1.5 px-2",icon:"size-9","icon-sm":"size-8"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",size:"default"}});function Xn(t){var e=t,{variant:n,size:r,fullWidth:a,label:i,startIcon:o,endIcon:s,isLoading:l,disabled:u,type:d="button"}=e,f=Mn(e,["variant","size","fullWidth","label","startIcon","endIcon","isLoading","disabled","type"]);return A.jsxs("button",Rr(Qt({type:d,"data-slot":"button",className:Zt(jSe({variant:n,size:r,fullWidth:a})),disabled:l||u,"da-cid":i?Gw(i):void 0},f),{children:[l?A.jsx(KG,{className:"animate-spin"}):o,i&&A.jsx("span",{className:Zt(r==="icon"||r==="icon-sm"?"sr-only":void 0),children:i}),!l&&s]}))}var Nz=t=>{var e=t,{ref:n,disableOverflowWrapper:r}=e,a=Mn(e,["ref","disableOverflowWrapper"]);const i=A.jsx("table",Qt({ref:n,className:"w-full text-sm"},a));return r?i:A.jsx("div",{className:"relative w-full overflow-auto",children:i})};Nz.displayName="Table";var Oz=t=>{var e=t,{ref:n,sticky:r}=e,a=Mn(e,["ref","sticky"]);return A.jsx("thead",Qt({ref:n,className:Zt("[&_tr]:border-b [&_tr]:hover:bg-transparent",r&&"sticky top-0 z-10 bg-background")},a))};Oz.displayName="TableHeader";var Iz=t=>{var e=t,{ref:n}=e,r=Mn(e,["ref"]);return A.jsx("tbody",Qt({ref:n,className:"[&_tr:last-child]:border-0"},r))};Iz.displayName="TableBody";var WSe=Ps("border-b transition-colors data-[state=selected]:bg-muted",{variants:{state:{default:"",hover:"hover:bg-muted/50"},isDraggingOver:{true:"border-t-2 border-t-blue-600 bg-blue-50/30",false:""},isDropZone:{true:"transition-all border-t-2",false:""},isLastItemDraggingBehind:{true:"border-b-2 border-b-blue-600",false:""}},compoundVariants:[{isDraggingOver:!0,isDropZone:!1,class:"opacity-50"},{isDropZone:!0,isDraggingOver:!1,class:"border-t-transparent"},{isDropZone:!0,isDraggingOver:!0,class:"border-t-blue-600 bg-blue-50/30"}],defaultVariants:{state:"default",isDraggingOver:!1,isDropZone:!1,isLastItemDraggingBehind:!1}}),Ox=t=>{var e=t,{ref:n,state:r,isDraggingOver:a,isDropZone:i,isLastItemDraggingBehind:o,draggable:s}=e,l=Mn(e,["ref","state","isDraggingOver","isDropZone","isLastItemDraggingBehind","draggable"]);return A.jsx("tr",Qt({ref:n,draggable:s,className:Zt(WSe({state:r,isDraggingOver:a,isDropZone:i,isLastItemDraggingBehind:o}),s&&"cursor-grab transition-all duration-200 ease-in-out")},l))};Ox.displayName="TableRow";var KSe=Ps("h-11 px-3 align-middle font-medium text-foreground [&:has([role=checkbox])]:pr-0 [&>div]:flex [&>div]:items-center [&>div]:gap-2 [&_svg]:size-4 [&_svg]:shrink-0 [&_button]:-ml-2 [&_button]:px-2",{variants:{alignment:{left:"text-left [&>div]:justify-start",center:"text-center [&>div]:justify-center",right:"text-right [&>div]:justify-start [&>div]:flex-row-reverse"}},defaultVariants:{alignment:"left"}}),Ix=t=>{var e=t,{ref:n,alignment:r,label:a,icon:i,badge:o,tooltip:s}=e,l=Mn(e,["ref","alignment","label","icon","badge","tooltip"]);return A.jsx("th",Rr(Qt({ref:n,className:KSe({alignment:r})},l),{children:A.jsxs("div",{children:[i,a,typeof o=="string"?A.jsx(_T,{variant:"secondary",label:o}):o,s&&A.jsx(Al,{trigger:A.jsx(wEe,{className:"size-4 text-muted-foreground"}),content:s})]})}))};Ix.displayName="TableHead";var Dz=Ps("p-2 px-3 align-middle [&:has([role=checkbox])]:pr-0 [&>div]:flex [&>div]:items-center [&>div]:gap-2",{variants:{alignment:{left:"text-left [&>div]:justify-start",center:"text-center [&>div]:justify-center",right:"text-right [&>div]:justify-start [&>div]:flex-row-reverse"},strong:{true:"font-semibold",false:"font-normal"}},defaultVariants:{alignment:"left",strong:!1}}),kz=t=>{var e=t,{ref:n,alignment:r,strong:a,badge:i,label:o}=e,s=Mn(e,["ref","alignment","strong","badge","label"]);return A.jsx("td",Rr(Qt({ref:n,className:Dz({alignment:r,strong:a})},s),{children:A.jsxs("div",{children:[o,typeof i=="string"?A.jsx(_T,{variant:"secondary",label:i}):i]})}))};kz.displayName="TableCell";var Mz=t=>{var e=t,{ref:n,className:r,alignment:a,strong:i,children:o}=e,s=Mn(e,["ref","className","alignment","strong","children"]);return A.jsx("td",Rr(Qt({ref:n,className:Zt(Dz({alignment:a,strong:i}),r)},s),{children:A.jsx("div",{children:o})}))};Mz.displayName="CustomTableCell";function Dx(t,e,n,r,a){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}function S0(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}let Lz=function(){const{crypto:t}=globalThis;if(t!=null&&t.randomUUID)return Lz=t.randomUUID.bind(t),t.randomUUID();const e=new Uint8Array(1),n=t?()=>t.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,r=>(+r^n()&15>>+r/4).toString(16))};function XSe(t){return typeof t=="object"&&t!==null&&("name"in t&&t.name==="AbortError"||"message"in t&&String(t.message).includes("FetchRequestCanceledException"))}const kx=t=>{if(t instanceof Error)return t;if(typeof t=="object"&&t!==null){try{if(Object.prototype.toString.call(t)==="[object Error]"){const e=new Error(t.message,t.cause?{cause:t.cause}:{});return t.stack&&(e.stack=t.stack),t.cause&&!e.cause&&(e.cause=t.cause),t.name&&(e.name=t.name),e}}catch{}try{return new Error(JSON.stringify(t))}catch{}}return new Error(t)};class sf extends Error{}class hi extends sf{constructor(e,n,r,a){super(`${hi.makeMessage(e,n,r)}`),this.status=e,this.headers=a,this.error=n}static makeMessage(e,n,r){const a=n!=null&&n.message?typeof n.message=="string"?n.message:JSON.stringify(n.message):n?JSON.stringify(n):r;return e&&a?`${e} ${a}`:e?`${e} status code (no body)`:a||"(no status code or body)"}static generate(e,n,r,a){if(!e||!a)return new IT({message:r,cause:kx(n)});const i=n;return e===400?new Fz(e,i,r,a):e===401?new Bz(e,i,r,a):e===403?new Uz(e,i,r,a):e===404?new Gz(e,i,r,a):e===409?new zz(e,i,r,a):e===422?new qz(e,i,r,a):e===429?new Hz(e,i,r,a):e>=500?new $z(e,i,r,a):new hi(e,i,r,a)}}class Mx extends hi{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}}class IT extends hi{constructor({message:e,cause:n}){super(void 0,void 0,e||"Connection error.",void 0),n&&(this.cause=n)}}class Pz extends IT{constructor({message:e}={}){super({message:e??"Request timed out."})}}class Fz extends hi{}class Bz extends hi{}class Uz extends hi{}class Gz extends hi{}class zz extends hi{}class qz extends hi{}class Hz extends hi{}class $z extends hi{}const QSe=/^[a-z][a-z0-9+.-]*:/i,ZSe=t=>QSe.test(t);let Oi=t=>(Oi=Array.isArray,Oi(t)),Yz=Oi;function Hh(t){return typeof t!="object"?{}:t??{}}function JSe(t){if(!t)return!0;for(const e in t)return!1;return!0}function eve(t,e){return Object.prototype.hasOwnProperty.call(t,e)}const tve=(t,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new sf(`${t} must be an integer`);if(e<0)throw new sf(`${t} must be a positive integer`);return e},nve=t=>{try{return JSON.parse(t)}catch{return}},rve=t=>new Promise(e=>setTimeout(e,t)),$h="1.2.0";function ave(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}const ive=()=>{var n;const t=ave();if(t==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":$h,"X-Stainless-OS":jz(Deno.build.os),"X-Stainless-Arch":Vz(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:((n=Deno.version)==null?void 0:n.deno)??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":$h,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(t==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":$h,"X-Stainless-OS":jz(globalThis.process.platform??"unknown"),"X-Stainless-Arch":Vz(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};const e=ove();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":$h,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":$h,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function ove(){if(typeof navigator>"u"||!navigator)return null;const t=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(const{key:e,pattern:n}of t){const r=n.exec(navigator.userAgent);if(r){const a=r[1]||0,i=r[2]||0,o=r[3]||0;return{browser:e,version:`${a}.${i}.${o}`}}}return null}const Vz=t=>t==="x32"?"x32":t==="x86_64"||t==="x64"?"x64":t==="arm"?"arm":t==="aarch64"||t==="arm64"?"arm64":t?`other:${t}`:"unknown",jz=t=>(t=t.toLowerCase(),t.includes("ios")?"iOS":t==="android"?"Android":t==="darwin"?"MacOS":t==="win32"?"Windows":t==="freebsd"?"FreeBSD":t==="openbsd"?"OpenBSD":t==="linux"?"Linux":t?`Other:${t}`:"Unknown");let Wz;const sve=()=>Wz??(Wz=ive());function lve(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new LlamaCloud({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function cve(...t){const e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...t)}function Kz(t){let e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t[Symbol.iterator]();return cve({start(){},async pull(n){const{done:r,value:a}=await e.next();r?n.close():n.enqueue(a)},async cancel(){var n;await((n=e.return)==null?void 0:n.call(e))}})}async function uve(t){var r,a;if(t===null||typeof t!="object")return;if(t[Symbol.asyncIterator]){await((a=(r=t[Symbol.asyncIterator]()).return)==null?void 0:a.call(r));return}const e=t.getReader(),n=e.cancel();e.releaseLock(),await n}const dve=({headers:t,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)}),Xz="RFC3986",Qz=t=>String(t),Zz={RFC1738:t=>String(t).replace(/%20/g,"+"),RFC3986:Qz},pve="RFC1738";let Lx=(t,e)=>(Lx=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),Lx(t,e));const Rl=(()=>{const t=[];for(let e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t})(),Px=1024,fve=(t,e,n,r,a)=>{if(t.length===0)return t;let i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),n==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(s){return"%26%23"+parseInt(s.slice(2),16)+"%3B"});let o="";for(let s=0;s<i.length;s+=Px){const l=i.length>=Px?i.slice(s,s+Px):i,u=[];for(let d=0;d<l.length;++d){let f=l.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===pve&&(f===40||f===41)){u[u.length]=l.charAt(d);continue}if(f<128){u[u.length]=Rl[f];continue}if(f<2048){u[u.length]=Rl[192|f>>6]+Rl[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Rl[224|f>>12]+Rl[128|f>>6&63]+Rl[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|l.charCodeAt(d)&1023),u[u.length]=Rl[240|f>>18]+Rl[128|f>>12&63]+Rl[128|f>>6&63]+Rl[128|f&63]}o+=u.join("")}return o};function mve(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}function Jz(t,e){if(Oi(t)){const n=[];for(let r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)}const eq={brackets(t){return String(t)+"[]"},comma:"comma",indices(t,e){return String(t)+"["+e+"]"},repeat(t){return String(t)}},tq=function(t,e){Array.prototype.push.apply(t,Oi(e)?e:[e])};let nq;const fa={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:fve,encodeValuesOnly:!1,format:Xz,formatter:Qz,indices:!1,serializeDate(t){return(nq??(nq=Function.prototype.call.bind(Date.prototype.toISOString)))(t)},skipNulls:!1,strictNullHandling:!1};function hve(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"}const Fx={};function rq(t,e,n,r,a,i,o,s,l,u,d,f,m,h,E,b,v,y){let C=t,T=y,w=0,O=!1;for(;(T=T.get(Fx))!==void 0&&!O;){const P=T.get(t);if(w+=1,typeof P<"u"){if(P===w)throw new RangeError("Cyclic object value");O=!0}typeof T.get(Fx)>"u"&&(w=0)}if(typeof u=="function"?C=u(e,C):C instanceof Date?C=m==null?void 0:m(C):n==="comma"&&Oi(C)&&(C=Jz(C,function(P){return P instanceof Date?m==null?void 0:m(P):P})),C===null){if(i)return l&&!b?l(e,fa.encoder,v,"key",h):e;C=""}if(hve(C)||mve(C)){if(l){const P=b?e:l(e,fa.encoder,v,"key",h);return[(E==null?void 0:E(P))+"="+(E==null?void 0:E(l(C,fa.encoder,v,"value",h)))]}return[(E==null?void 0:E(e))+"="+(E==null?void 0:E(String(C)))]}const x=[];if(typeof C>"u")return x;let D;if(n==="comma"&&Oi(C))b&&l&&(C=Jz(C,l)),D=[{value:C.length>0?C.join(",")||null:void 0}];else if(Oi(u))D=u;else{const P=Object.keys(C);D=d?P.sort(d):P}const M=s?String(e).replace(/\./g,"%2E"):String(e),F=r&&Oi(C)&&C.length===1?M+"[]":M;if(a&&Oi(C)&&C.length===0)return F+"[]";for(let P=0;P<D.length;++P){const q=D[P],j=typeof q=="object"&&typeof q.value<"u"?q.value:C[q];if(o&&j===null)continue;const Q=f&&s?q.replace(/\./g,"%2E"):q,U=Oi(C)?typeof n=="function"?n(F,Q):F:F+(f?"."+Q:"["+Q+"]");y.set(t,w);const K=new WeakMap;K.set(Fx,y),tq(x,rq(j,U,n,r,a,i,o,s,n==="comma"&&b&&Oi(C)?null:l,u,d,f,m,h,E,b,v,K))}return x}function gve(t=fa){if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");const e=t.charset||fa.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let n=Xz;if(typeof t.format<"u"){if(!Lx(Zz,t.format))throw new TypeError("Unknown format option provided.");n=t.format}const r=Zz[n];let a=fa.filter;(typeof t.filter=="function"||Oi(t.filter))&&(a=t.filter);let i;if(t.arrayFormat&&t.arrayFormat in eq?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=fa.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");const o=typeof t.allowDots>"u"?t.encodeDotInKeys?!0:fa.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:fa.addQueryPrefix,allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:fa.allowEmptyArrays,arrayFormat:i,charset:e,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:fa.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?fa.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:fa.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:fa.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:fa.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:fa.encodeValuesOnly,filter:a,format:n,formatter:r,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:fa.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:fa.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:fa.strictNullHandling}}function _ve(t,e={}){let n=t;const r=gve(e);let a,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Oi(r.filter)&&(i=r.filter,a=i);const o=[];if(typeof n!="object"||n===null)return"";const s=eq[r.arrayFormat],l=s==="comma"&&r.commaRoundTrip;a||(a=Object.keys(n)),r.sort&&a.sort(r.sort);const u=new WeakMap;for(let m=0;m<a.length;++m){const h=a[m];r.skipNulls&&n[h]===null||tq(o,rq(n[h],h,s,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,u))}const d=o.join(r.delimiter);let f=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),d.length>0?f+d:""}const DT={off:0,error:200,warn:300,info:400,debug:500},aq=(t,e,n)=>{if(t){if(eve(DT,t))return t;io(n).warn(`${e} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(DT))}`)}};function v0(){}function kT(t,e,n){return!e||DT[t]>DT[n]?v0:e[t].bind(e)}const bve={error:v0,warn:v0,info:v0,debug:v0};let iq=new WeakMap;function io(t){const e=t.logger,n=t.logLevel??"off";if(!e)return bve;const r=iq.get(e);if(r&&r[0]===n)return r[1];const a={error:kT("error",e,n),warn:kT("warn",e,n),info:kT("info",e,n),debug:kT("debug",e,n)};return iq.set(e,[n,a]),a}const lf=t=>(t.options&&(t.options={...t.options},delete t.options.headers),t.headers&&(t.headers=Object.fromEntries((t.headers instanceof Headers?[...t.headers]:Object.entries(t.headers)).map(([e,n])=>[e,e.toLowerCase()==="authorization"||e.toLowerCase()==="cookie"||e.toLowerCase()==="set-cookie"?"***":n]))),"retryOfRequestLogID"in t&&(t.retryOfRequestLogID&&(t.retryOf=t.retryOfRequestLogID),delete t.retryOfRequestLogID),t);async function oq(t,e){const{response:n,requestLogID:r,retryOfRequestLogID:a,startTime:i}=e,o=await(async()=>{var f;if(n.status===204)return null;if(e.options.__binaryResponse)return n;const s=n.headers.get("content-type"),l=(f=s==null?void 0:s.split(";")[0])==null?void 0:f.trim();return(l==null?void 0:l.includes("application/json"))||(l==null?void 0:l.endsWith("+json"))?await n.json():await n.text()})();return io(t).debug(`[${r}] response parsed`,lf({retryOfRequestLogID:a,url:n.url,status:n.status,body:o,durationMs:Date.now()-i})),o}var y0;class MT extends Promise{constructor(e,n,r=oq){super(a=>{a(null)}),this.responsePromise=n,this.parseResponse=r,y0.set(this,void 0),Dx(this,y0,e)}_thenUnwrap(e){return new MT(S0(this,y0,"f"),this.responsePromise,async(n,r)=>e(await this.parseResponse(n,r),r))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){const[e,n]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:n}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(S0(this,y0,"f"),e))),this.parsedPromise}then(e,n){return this.parse().then(e,n)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}}y0=new WeakMap;var LT;class Yh{constructor(e,n,r,a){LT.set(this,void 0),Dx(this,LT,e),this.options=a,this.response=n,this.body=r}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){const e=this.nextPageRequestOptions();if(!e)throw new sf("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await S0(this,LT,"f").requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(LT=new WeakMap,Symbol.asyncIterator)](){for await(const e of this.iterPages())for(const n of e.getPaginatedItems())yield n}}class Eve extends MT{constructor(e,n,r){super(e,n,async(a,i)=>new r(a,i.response,await oq(a,i),i.options))}async*[Symbol.asyncIterator](){const e=await this;for await(const n of e)yield n}}class Sve extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.files=r.files||[],this.total_count=r.total_count||0,this.offset=r.offset||0}getPaginatedItems(){return this.files??[]}nextPageRequestOptions(){const e=this.offset??0,n=this.getPaginatedItems().length,r=e+n,a=this.total_count;return a&&r<a?{...this.options,query:{...Hh(this.options.query),offset:r}}:null}}class sq extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.items=r.items||[],this.total_size=r.total_size||0}getPaginatedItems(){return this.items??[]}nextPageRequestOptions(){const e=this.options.query.offset??0,n=this.getPaginatedItems().length,r=e+n,a=this.total_size;return a&&r<a?{...this.options,query:{...Hh(this.options.query),offset:r}}:null}}class vve extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.items=r.items||[],this.total=r.total||0,this.skip=r.skip||0}getPaginatedItems(){return this.items??[]}nextPageRequestOptions(){const e=this.skip??0,n=this.getPaginatedItems().length,r=e+n,a=this.total;return a&&r<a?{...this.options,query:{...Hh(this.options.query),skip:r}}:null}}class yve extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.documents=r.documents||[],this.total_count=r.total_count||0,this.offset=r.offset||0}getPaginatedItems(){return this.documents??[]}nextPageRequestOptions(){const e=this.offset??0,n=this.getPaginatedItems().length,r=e+n,a=this.total_count;return a&&r<a?{...this.options,query:{...Hh(this.options.query),skip:r}}:null}}class ud extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.items=r.items||[],this.next_page_token=r.next_page_token||""}getPaginatedItems(){return this.items??[]}nextPageRequestOptions(){const e=this.next_page_token;return e?{...this.options,query:{...Hh(this.options.query),page_token:e}}:null}}class lq extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.items=r.items||[],this.next_page_token=r.next_page_token||""}getPaginatedItems(){return this.items??[]}nextPageRequestOptions(){const e=this.next_page_token;return e?{...this.options,body:{...Hh(this.options.body),page_token:e}}:null}}const cq=()=>{var t;if(typeof File>"u"){const{process:e}=globalThis,n=typeof((t=e==null?void 0:e.versions)==null?void 0:t.node)=="string"&&parseInt(e.versions.node.split("."))<20;throw new Error("`File` is not defined as a global, which is required for file uploads."+(n?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};function T0(t,e,n){return cq(),new File(t,e??"unknown_file",n)}function PT(t){return(typeof t=="object"&&t!==null&&("name"in t&&t.name&&String(t.name)||"url"in t&&t.url&&String(t.url)||"filename"in t&&t.filename&&String(t.filename)||"path"in t&&t.path&&String(t.path))||"").split(/[\\/]/).pop()||void 0}const uq=t=>t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function",C0=async(t,e)=>({...t,body:await Cve(t.body,e)}),dq=new WeakMap;function Tve(t){const e=typeof t=="function"?t:t.fetch,n=dq.get(e);if(n)return n;const r=(async()=>{try{const a="Response"in e?e.Response:(await e("data:,")).constructor,i=new FormData;return i.toString()!==await new a(i).text()}catch{return!0}})();return dq.set(e,r),r}const Cve=async(t,e)=>{if(!await Tve(e))throw new TypeError("The provided fetch function does not support file uploads with the current global FormData class.");const n=new FormData;return await Promise.all(Object.entries(t||{}).map(([r,a])=>Bx(n,r,a))),n},Ave=t=>t instanceof Blob&&"name"in t,Bx=async(t,e,n)=>{if(n!==void 0){if(n==null)throw new TypeError(`Received null for "${e}"; to pass null in FormData, you must use the string 'null'`);if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")t.append(e,String(n));else if(n instanceof Response)t.append(e,T0([await n.blob()],PT(n)));else if(uq(n))t.append(e,T0([await new Response(Kz(n)).blob()],PT(n)));else if(Ave(n))t.append(e,n,PT(n));else if(Array.isArray(n))await Promise.all(n.map(r=>Bx(t,e+"[]",r)));else if(typeof n=="object")await Promise.all(Object.entries(n).map(([r,a])=>Bx(t,`${e}[${r}]`,a)));else throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${n} instead`)}},pq=t=>t!=null&&typeof t=="object"&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.text=="function"&&typeof t.slice=="function"&&typeof t.arrayBuffer=="function",Rve=t=>t!=null&&typeof t=="object"&&typeof t.name=="string"&&typeof t.lastModified=="number"&&pq(t),wve=t=>t!=null&&typeof t=="object"&&typeof t.url=="string"&&typeof t.blob=="function";async function xve(t,e,n){if(cq(),t=await t,Rve(t))return t instanceof File?t:T0([await t.arrayBuffer()],t.name);if(wve(t)){const a=await t.blob();return e||(e=new URL(t.url).pathname.split(/[\\/]/).pop()),T0(await Ux(a),e,n)}const r=await Ux(t);if(e||(e=PT(t)),!(n!=null&&n.type)){const a=r.find(i=>typeof i=="object"&&"type"in i&&i.type);typeof a=="string"&&(n={...n,type:a})}return T0(r,e,n)}async function Ux(t){var n;let e=[];if(typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer)e.push(t);else if(pq(t))e.push(t instanceof Blob?t:await t.arrayBuffer());else if(uq(t))for await(const r of t)e.push(...await Ux(r));else{const r=(n=t==null?void 0:t.constructor)==null?void 0:n.name;throw new Error(`Unexpected data type: ${typeof t}${r?`; constructor: ${r}`:""}${Nve(t)}`)}return e}function Nve(t){return typeof t!="object"||t===null?"":`; props: [${Object.getOwnPropertyNames(t).map(n=>`"${n}"`).join(", ")}]`}class Dn{constructor(e){this._client=e}}function fq(t){return t.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}const mq=Object.freeze(Object.create(null)),Ke=((t=fq)=>function(n,...r){if(n.length===1)return n[0];let a=!1;const i=[],o=n.reduce((d,f,m)=>{var b;/[?#]/.test(f)&&(a=!0);const h=r[m];let E=(a?encodeURIComponent:t)(""+h);return m!==r.length&&(h==null||typeof h=="object"&&h.toString===((b=Object.getPrototypeOf(Object.getPrototypeOf(h.hasOwnProperty??mq)??mq))==null?void 0:b.toString))&&(E=h+"",i.push({start:d.length+f.length,length:E.length,error:`Value of type ${Object.prototype.toString.call(h).slice(8,-1)} is not a valid path parameter`})),d+f+(m===r.length?"":E)},""),s=o.split(/[?#]/,1)[0],l=new RegExp("(?<=^|\\/)(?:\\.|%2e){1,2}(?=\\/|$)","gi");let u;for(;(u=l.exec(s))!==null;)i.push({start:u.index,length:u[0].length,error:`Value "${u[0]}" can't be safely passed as a path parameter`});if(i.sort((d,f)=>d.start-f.start),i.length>0){let d=0;const f=i.reduce((m,h)=>{const E=" ".repeat(h.start-d),b="^".repeat(h.length);return d=h.start+h.length,m+E+b},"");throw new sf(`Path parameters result in path with invalid segments:
269
+ */const QG=vn("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Sx=aEe,ZG=iEe,JG=({label:t,badge:e,icon:n})=>A.jsxs("span",{className:"flex w-full items-center gap-2",children:[A.jsx("span",{className:"flex-1 truncate",children:t}),e&&A.jsx("span",{className:"flex shrink-0",children:typeof e=="string"?A.jsx(_T,{variant:"secondary",label:e}):e}),UEe(n)]}),TT=t=>{var e=t,{ref:n,placeholder:r,badge:a,value:i,icon:o}=e,s=Mn(e,["ref","placeholder","badge","value","icon"]);return A.jsxs(BG,Rr(Qt({ref:n,className:"focus:ring-ring/50 flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal outline-none transition-all hover:border-ring focus:border-ring focus:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground [&>span]:line-clamp-1 [&>span]:overflow-ellipsis [&>span]:whitespace-nowrap"},s),{children:[A.jsx("div",{className:"flex flex-1 overflow-hidden text-left [&>span]:w-full",children:i?A.jsx(ZG,{placeholder:r,children:A.jsx(JG,{label:i,badge:a,icon:o})}):A.jsx(ZG,{placeholder:r})}),A.jsx("div",{className:"flex shrink-0 items-center gap-2",children:A.jsx(oEe,{asChild:!0,children:A.jsx(bx,{className:"size-4 shrink-0 opacity-50"})})})]}))};TT.displayName=BG.displayName;var ez=t=>{var e=t,{ref:n}=e,r=Mn(e,["ref"]);return A.jsx(zG,Rr(Qt({ref:n,className:"flex cursor-default items-center justify-center py-1"},r),{children:A.jsx(SEe,{className:"size-[15px]"})}))};ez.displayName=zG.displayName;var tz=t=>{var e=t,{ref:n}=e,r=Mn(e,["ref"]);return A.jsx(qG,Rr(Qt({ref:n,className:"flex cursor-default items-center justify-center py-1"},r),{children:A.jsx(bx,{className:"size-[15px]"})}))};tz.displayName=qG.displayName;var CT=t=>{var e=t,{ref:n,children:r,position:a="popper"}=e,i=Mn(e,["ref","children","position"]);return A.jsx(sEe,{children:A.jsxs(UG,Rr(Qt({ref:n,className:a==="popper"?"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-80 relative max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1":"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-80 relative max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md",position:a},i),{children:[A.jsx(ez,{}),A.jsx(lEe,{className:a==="popper"?"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] p-1":"p-1",children:r}),A.jsx(tz,{})]}))})};CT.displayName=UG.displayName,cEe.displayName;var UEe=t=>t?N.isValidElement(t)?A.jsx("div",{className:"flex shrink-0 items-center justify-center",children:t}):typeof t=="function"||typeof t=="object"&&!N.isValidElement(t)?N.createElement(t,{className:"size-4 shrink-0 text-muted-foreground group-focus:text-foreground","aria-hidden":"true"}):null:null,Gh=t=>{var e=t,{ref:n,label:r,caption:a,badge:i,icon:o}=e,s=Mn(e,["ref","label","caption","badge","icon"]);return A.jsxs(GG,Rr(Qt({ref:n,className:"group relative flex w-full cursor-default select-none items-start gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm font-normal outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50","da-cid":Gw(r)},s),{children:[A.jsx("span",{className:"absolute left-2 flex size-5 items-center justify-center",children:A.jsx(dEe,{children:A.jsx(yT,{className:"size-4"})})}),A.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[A.jsx(uEe,{children:A.jsx(JG,{label:r,badge:i,icon:o})}),a&&A.jsx("div",{className:"text-xs text-muted-foreground",children:typeof a=="string"?A.jsx("span",{className:"truncate",children:a}):a})]})]}))};Gh.displayName=GG.displayName,pEe.displayName;function AT(){return AT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},AT.apply(null,arguments)}function nz(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var GEe=N.useLayoutEffect,zEe=function(e){var n=Oe.useRef(e);return GEe(function(){n.current=e}),n},rz=function(e,n){if(typeof e=="function"){e(n);return}e.current=n},qEe=function(e,n){var r=Oe.useRef();return Oe.useCallback(function(a){e.current=a,r.current&&rz(r.current,null),r.current=n,n&&rz(n,a)},[n])},az={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},HEe=function(e){Object.keys(az).forEach(function(n){e.style.setProperty(n,az[n],"important")})},iz=HEe,mi=null,oz=function(e,n){var r=e.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function $Ee(t,e,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),mi||(mi=document.createElement("textarea"),mi.setAttribute("tabindex","-1"),mi.setAttribute("aria-hidden","true"),iz(mi)),mi.parentNode===null&&document.body.appendChild(mi);var a=t.paddingSize,i=t.borderSize,o=t.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(m){var h=m;mi.style[h]=o[h]}),iz(mi),mi.value=e;var l=oz(mi,t);mi.value=e,l=oz(mi,t),mi.value="x";var u=mi.scrollHeight-a,d=u*n;s==="border-box"&&(d=d+a+i),l=Math.max(d,l);var f=u*r;return s==="border-box"&&(f=f+a+i),l=Math.min(f,l),[l,u]}var sz=function(){},YEe=function(e,n){return e.reduce(function(r,a){return r[a]=n[a],r},{})},VEe=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],jEe=!!document.documentElement.currentStyle,WEe=function(e){var n=window.getComputedStyle(e);if(n===null)return null;var r=YEe(VEe,n),a=r.boxSizing;if(a==="")return null;jEe&&a==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:o}},KEe=WEe;function vx(t,e,n){var r=zEe(n);N.useLayoutEffect(function(){var a=function(o){return r.current(o)};if(t)return t.addEventListener(e,a),function(){return t.removeEventListener(e,a)}},[])}var XEe=function(e,n){vx(document.body,"reset",function(r){e.current.form===r.target&&n(r)})},QEe=function(e){vx(window,"resize",e)},ZEe=function(e){vx(document.fonts,"loadingdone",e)},JEe=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],eSe=function(e,n){var r=e.cacheMeasurements,a=e.maxRows,i=e.minRows,o=e.onChange,s=o===void 0?sz:o,l=e.onHeightChange,u=l===void 0?sz:l,d=nz(e,JEe),f=d.value!==void 0,m=N.useRef(null),h=qEe(m,n),E=N.useRef(0),b=N.useRef(),v=function(){var T=m.current,w=r&&b.current?b.current:KEe(T);if(w){b.current=w;var O=$Ee(w,T.value||T.placeholder||"x",i,a),x=O[0],D=O[1];E.current!==x&&(E.current=x,T.style.setProperty("height",x+"px","important"),u(x,{rowHeight:D}))}},y=function(T){f||v(),s(T)};return N.useLayoutEffect(v),XEe(m,function(){if(!f){var C=m.current.value;requestAnimationFrame(function(){var T=m.current;T&&C!==T.value&&v()})}}),QEe(v),ZEe(v),N.createElement("textarea",AT({},d,{onChange:y,ref:h}))},tSe=N.forwardRef(eSe),nSe=Ps(["flex w-full resize-none rounded-md border border-input bg-background px-3 py-[6.5px] text-sm leading-normal shadow-xs transition-colors","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/20"],{variants:{variant:{default:"",error:"border-destructive focus-visible:ring-destructive/20"}},defaultVariants:{variant:"default"}}),RT=t=>{var e=t,{ref:n,variant:r,minRows:a=2,maxRows:i}=e,o=Mn(e,["ref","variant","minRows","maxRows"]);return A.jsx(tSe,Qt({className:Zt(nSe({variant:r}),i&&"overflow-y-auto"),ref:n,minRows:a,maxRows:i},o))};RT.displayName="Textarea";var lz=["PageUp","PageDown"],cz=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],uz={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},zh="Slider",[yx,rSe,aSe]=h0(zh),[dz]=pa(zh,[aSe]),[iSe,wT]=dz(zh),pz=N.forwardRef((t,e)=>{const{name:n,min:r=0,max:a=100,step:i=1,orientation:o="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[r],value:d,onValueChange:f=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:E,...b}=t,v=N.useRef(new Set),y=N.useRef(0),T=o==="horizontal"?oSe:sSe,[w=[],O]=Xo({prop:d,defaultProp:u,onChange:q=>{var Q;(Q=[...v.current][y.current])==null||Q.focus(),f(q)}}),x=N.useRef(w);function D(q){const j=hSe(w,q);P(q,j)}function M(q){P(q,y.current)}function F(){const q=x.current[y.current];w[y.current]!==q&&m(w)}function P(q,j,{commit:Q}={commit:!1}){const U=ESe(i),K=SSe(Math.round((q-r)/i)*i+r,U),G=m0(K,[r,a]);O((Y=[])=>{const W=fSe(Y,G,j);if(bSe(W,l*i)){y.current=W.indexOf(G);const J=String(W)!==String(Y);return J&&Q&&m(W),J?W:Y}else return Y})}return A.jsx(iSe,{scope:t.__scopeSlider,name:n,disabled:s,min:r,max:a,valueIndexToChangeRef:y,thumbs:v.current,values:w,orientation:o,form:E,children:A.jsx(yx.Provider,{scope:t.__scopeSlider,children:A.jsx(yx.Slot,{scope:t.__scopeSlider,children:A.jsx(T,{"aria-disabled":s,"data-disabled":s?"":void 0,...b,ref:e,onPointerDown:Le(b.onPointerDown,()=>{s||(x.current=w)}),min:r,max:a,inverted:h,onSlideStart:s?void 0:D,onSlideMove:s?void 0:M,onSlideEnd:s?void 0:F,onHomeKeyDown:()=>!s&&P(r,0,{commit:!0}),onEndKeyDown:()=>!s&&P(a,w.length-1,{commit:!0}),onStepKeyDown:({event:q,direction:j})=>{if(!s){const K=lz.includes(q.key)||q.shiftKey&&cz.includes(q.key)?10:1,G=y.current,Y=w[G],W=i*K*j;P(Y+W,G,{commit:!0})}}})})})})});pz.displayName=zh;var[fz,mz]=dz(zh,{startEdge:"left",endEdge:"right",size:"width",direction:1}),oSe=N.forwardRef((t,e)=>{const{min:n,max:r,dir:a,inverted:i,onSlideStart:o,onSlideMove:s,onSlideEnd:l,onStepKeyDown:u,...d}=t,[f,m]=N.useState(null),h=It(e,T=>m(T)),E=N.useRef(void 0),b=g0(a),v=b==="ltr",y=v&&!i||!v&&i;function C(T){const w=E.current||f.getBoundingClientRect(),O=[0,w.width],D=Ax(O,y?[n,r]:[r,n]);return E.current=w,D(T-w.left)}return A.jsx(fz,{scope:t.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:A.jsx(hz,{dir:b,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:T=>{const w=C(T.clientX);o==null||o(w)},onSlideMove:T=>{const w=C(T.clientX);s==null||s(w)},onSlideEnd:()=>{E.current=void 0,l==null||l()},onStepKeyDown:T=>{const O=uz[y?"from-left":"from-right"].includes(T.key);u==null||u({event:T,direction:O?-1:1})}})})}),sSe=N.forwardRef((t,e)=>{const{min:n,max:r,inverted:a,onSlideStart:i,onSlideMove:o,onSlideEnd:s,onStepKeyDown:l,...u}=t,d=N.useRef(null),f=It(e,d),m=N.useRef(void 0),h=!a;function E(b){const v=m.current||d.current.getBoundingClientRect(),y=[0,v.height],T=Ax(y,h?[r,n]:[n,r]);return m.current=v,T(b-v.top)}return A.jsx(fz,{scope:t.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:A.jsx(hz,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const v=E(b.clientY);i==null||i(v)},onSlideMove:b=>{const v=E(b.clientY);o==null||o(v)},onSlideEnd:()=>{m.current=void 0,s==null||s()},onStepKeyDown:b=>{const y=uz[h?"from-bottom":"from-top"].includes(b.key);l==null||l({event:b,direction:y?-1:1})}})})}),hz=N.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:l,...u}=t,d=wT(zh,n);return A.jsx(ft.span,{...u,ref:e,onKeyDown:Le(t.onKeyDown,f=>{f.key==="Home"?(o(f),f.preventDefault()):f.key==="End"?(s(f),f.preventDefault()):lz.concat(cz).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:Le(t.onPointerDown,f=>{const m=f.target;m.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(m)?m.focus():r(f)}),onPointerMove:Le(t.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&a(f)}),onPointerUp:Le(t.onPointerUp,f=>{const m=f.target;m.hasPointerCapture(f.pointerId)&&(m.releasePointerCapture(f.pointerId),i(f))})})}),gz="SliderTrack",lSe=N.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,a=wT(gz,n);return A.jsx(ft.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...r,ref:e})});lSe.displayName=gz;var Tx="SliderRange",cSe=N.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,a=wT(Tx,n),i=mz(Tx,n),o=N.useRef(null),s=It(e,o),l=a.values.length,u=a.values.map(m=>bz(m,a.min,a.max)),d=l>1?Math.min(...u):0,f=100-Math.max(...u);return A.jsx(ft.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...r,ref:s,style:{...t.style,[i.startEdge]:d+"%",[i.endEdge]:f+"%"}})});cSe.displayName=Tx;var Cx="SliderThumb",uSe=N.forwardRef((t,e)=>{const n=rSe(t.__scopeSlider),[r,a]=N.useState(null),i=It(e,s=>a(s)),o=N.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return A.jsx(dSe,{...t,ref:i,index:o})}),dSe=N.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:a,...i}=t,o=wT(Cx,n),s=mz(Cx,n),[l,u]=N.useState(null),d=It(e,C=>u(C)),f=l?o.form||!!l.closest("form"):!0,m=nx(l),h=o.values[r],E=h===void 0?0:bz(h,o.min,o.max),b=mSe(r,o.values.length),v=m==null?void 0:m[s.size],y=v?gSe(v,E,s.direction):0;return N.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),A.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${E}% + ${y}px)`},children:[A.jsx(yx.ItemSlot,{scope:t.__scopeSlider,children:A.jsx(ft.span,{role:"slider","aria-label":t["aria-label"]||b,"aria-valuemin":o.min,"aria-valuenow":h,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:d,style:h===void 0?{display:"none"}:t.style,onFocus:Le(t.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),f&&A.jsx(_z,{name:a??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:h},r)]})});uSe.displayName=Cx;var pSe="RadioBubbleInput",_z=N.forwardRef(({__scopeSlider:t,value:e,...n},r)=>{const a=N.useRef(null),i=It(a,r),o=dx(e);return N.useEffect(()=>{const s=a.current;if(!s)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&d){const f=new Event("input",{bubbles:!0});d.call(s,e),s.dispatchEvent(f)}},[o,e]),A.jsx(ft.input,{style:{display:"none"},...n,ref:i,defaultValue:e})});_z.displayName=pSe;function fSe(t=[],e,n){const r=[...t];return r[n]=e,r.sort((a,i)=>a-i)}function bz(t,e,n){const i=100/(n-e)*(t-e);return m0(i,[0,100])}function mSe(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function hSe(t,e){if(t.length===1)return 0;const n=t.map(a=>Math.abs(a-e)),r=Math.min(...n);return n.indexOf(r)}function gSe(t,e,n){const r=t/2,i=Ax([0,50],[0,r]);return(r-i(e)*n)*n}function _Se(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function bSe(t,e){if(e>0){const n=_Se(t);return Math.min(...n)>=e}return!0}function Ax(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function ESe(t){return(String(t).split(".")[1]||"").length}function SSe(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var vSe=pz;vSe.displayName;var[xT]=pa("Tooltip",[Tl]),NT=Tl(),Ez="TooltipProvider",ySe=700,Rx="tooltip.open",[TSe,wx]=xT(Ez),Sz=t=>{const{__scopeTooltip:e,delayDuration:n=ySe,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=t,o=N.useRef(!0),s=N.useRef(!1),l=N.useRef(0);return N.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),A.jsx(TSe,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:N.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:N.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:N.useCallback(u=>{s.current=u},[]),disableHoverableContent:a,children:i})};Sz.displayName=Ez;var b0="Tooltip",[CSe,E0]=xT(b0),vz=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:a,onOpenChange:i,disableHoverableContent:o,delayDuration:s}=t,l=wx(b0,t.__scopeTooltip),u=NT(e),[d,f]=N.useState(null),m=bl(),h=N.useRef(0),E=o??l.disableHoverableContent,b=s??l.delayDuration,v=N.useRef(!1),[y,C]=Xo({prop:r,defaultProp:a??!1,onChange:D=>{D?(l.onOpen(),document.dispatchEvent(new CustomEvent(Rx))):l.onClose(),i==null||i(D)},caller:b0}),T=N.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),w=N.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,C(!0)},[C]),O=N.useCallback(()=>{window.clearTimeout(h.current),h.current=0,C(!1)},[C]),x=N.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,C(!0),h.current=0},b)},[b,C]);return N.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),A.jsx(oT,{...u,children:A.jsx(CSe,{scope:e,contentId:m,open:y,stateAttribute:T,trigger:d,onTriggerChange:f,onTriggerEnter:N.useCallback(()=>{l.isOpenDelayedRef.current?x():w()},[l.isOpenDelayedRef,x,w]),onTriggerLeave:N.useCallback(()=>{E?O():(window.clearTimeout(h.current),h.current=0)},[O,E]),onOpen:w,onClose:O,disableHoverableContent:E,children:n})})};vz.displayName=b0;var xx="TooltipTrigger",yz=N.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,a=E0(xx,n),i=wx(xx,n),o=NT(n),s=N.useRef(null),l=It(e,s,a.onTriggerChange),u=N.useRef(!1),d=N.useRef(!1),f=N.useCallback(()=>u.current=!1,[]);return N.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),A.jsx(kh,{asChild:!0,...o,children:A.jsx(ft.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:l,onPointerMove:Le(t.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:Le(t.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:Le(t.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Le(t.onFocus,()=>{u.current||a.onOpen()}),onBlur:Le(t.onBlur,a.onClose),onClick:Le(t.onClick,a.onClose)})})});yz.displayName=xx;var Nx="TooltipPortal",[ASe,RSe]=xT(Nx,{forceMount:void 0}),Tz=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:a}=t,i=E0(Nx,e);return A.jsx(ASe,{scope:e,forceMount:n,children:A.jsx(Fa,{present:n||i.open,children:A.jsx(d0,{asChild:!0,container:a,children:r})})})};Tz.displayName=Nx;var qh="TooltipContent",Cz=N.forwardRef((t,e)=>{const n=RSe(qh,t.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...i}=t,o=E0(qh,t.__scopeTooltip);return A.jsx(Fa,{present:r||o.open,children:o.disableHoverableContent?A.jsx(Az,{side:a,...i,ref:e}):A.jsx(wSe,{side:a,...i,ref:e})})}),wSe=N.forwardRef((t,e)=>{const n=E0(qh,t.__scopeTooltip),r=wx(qh,t.__scopeTooltip),a=N.useRef(null),i=It(e,a),[o,s]=N.useState(null),{trigger:l,onClose:u}=n,d=a.current,{onPointerInTransitChange:f}=r,m=N.useCallback(()=>{s(null),f(!1)},[f]),h=N.useCallback((E,b)=>{const v=E.currentTarget,y={x:E.clientX,y:E.clientY},C=ISe(y,v.getBoundingClientRect()),T=DSe(y,C),w=kSe(b.getBoundingClientRect()),O=LSe([...T,...w]);s(O),f(!0)},[f]);return N.useEffect(()=>()=>m(),[m]),N.useEffect(()=>{if(l&&d){const E=v=>h(v,d),b=v=>h(v,l);return l.addEventListener("pointerleave",E),d.addEventListener("pointerleave",b),()=>{l.removeEventListener("pointerleave",E),d.removeEventListener("pointerleave",b)}}},[l,d,h,m]),N.useEffect(()=>{if(o){const E=b=>{const v=b.target,y={x:b.clientX,y:b.clientY},C=(l==null?void 0:l.contains(v))||(d==null?void 0:d.contains(v)),T=!MSe(y,o);C?m():T&&(m(),u())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[l,d,o,u,m]),A.jsx(Az,{...t,ref:i})}),[xSe,NSe]=xT(b0,{isInside:!1}),OSe=Y8("TooltipContent"),Az=N.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...s}=t,l=E0(qh,n),u=NT(n),{onClose:d}=l;return N.useEffect(()=>(document.addEventListener(Rx,d),()=>document.removeEventListener(Rx,d)),[d]),N.useEffect(()=>{if(l.trigger){const f=m=>{const h=m.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),A.jsx(nf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:A.jsxs(c0,{"data-state":l.stateAttribute,...u,...s,ref:e,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:[A.jsx(OSe,{children:r}),A.jsx(xSe,{scope:n,isInside:!0,children:A.jsx(P0e,{id:l.contentId,role:"tooltip",children:a||r})})]})})});Cz.displayName=qh;var Rz="TooltipArrow",wz=N.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,a=NT(n);return NSe(Rz,n).isInside?null:A.jsx(u0,{...a,...r,ref:e})});wz.displayName=Rz;function ISe(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),a=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,a,i)){case i:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function DSe(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function kSe(t){const{top:e,right:n,bottom:r,left:a}=t;return[{x:a,y:e},{x:n,y:e},{x:n,y:r},{x:a,y:r}]}function MSe(t,e){const{x:n,y:r}=t;let a=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const s=e[i],l=e[o],u=s.x,d=s.y,f=l.x,m=l.y;d>r!=m>r&&n<(f-u)*(r-d)/(m-d)+u&&(a=!a)}return a}function LSe(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),PSe(e)}function PSe(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const a=t[r];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))e.pop();else break}e.push(a)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const a=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))n.pop();else break}n.push(a)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var FSe=Sz,BSe=vz,USe=yz,GSe=Tz,zSe=Cz,qSe=wz,HSe=FSe,$Se=t=>{var e=t,{delayDuration:n=0}=e,r=Mn(e,["delayDuration"]);return A.jsx(HSe,Qt({"data-slot":"tooltip-provider",delayDuration:n},r))},YSe=({href:t,label:e="Link",external:n=!1})=>A.jsxs("a",{href:t,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,className:"inline-flex items-center gap-1 text-xs font-medium text-background underline","da-cid":Gw(e),children:[e,n&&A.jsx(CEe,{className:"size-3"})]}),Al=t=>{var e=t,{trigger:n,content:r,side:a,link:i,linkExternal:o=!1,linkLabel:s,delayDuration:l=0,sideOffset:u=6}=e,d=Mn(e,["trigger","content","side","link","linkExternal","linkLabel","delayDuration","sideOffset"]);return A.jsx($Se,{delayDuration:l,children:A.jsxs(BSe,Rr(Qt({"data-slot":"tooltip"},d),{children:[A.jsx(USe,{asChild:!0,"data-slot":"tooltip-trigger",children:n}),A.jsx(GSe,{children:A.jsxs(zSe,{"data-slot":"tooltip-content",side:a,sideOffset:u,className:Zt("animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","z-50 flex max-w-xs flex-col items-center gap-1 rounded-md bg-foreground px-3 py-2 text-center text-xs text-background","[&_code]:bg-background/20 [&_code]:break-all [&_code]:rounded [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono"),children:[r,i&&A.jsx(YSe,{href:i,label:s,external:o}),A.jsx(qSe,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})]}))})},VSe=Ps("flex flex-col gap-3 w-full",{variants:{variant:{integrated:"",standalone:""}},defaultVariants:{variant:"integrated"}}),Bs=({label:t,required:e=!1,optional:n=!1,icon:r,badge:a,tooltip:i,description:o,children:s,variant:l="integrated",htmlFor:u,"da-cid":d})=>A.jsxs("div",{className:VSe({variant:l}),"da-cid":d,children:[A.jsxs("div",{className:"flex flex-col gap-1",children:[A.jsxs("div",{className:"flex min-h-5 w-full items-center gap-2",children:[r&&A.jsx("div",{className:"flex size-4 shrink-0 items-center justify-center text-muted-foreground [&>svg]:size-full",children:r}),A.jsxs("label",{htmlFor:u,className:"flex shrink-0 items-center text-sm font-medium",children:[A.jsx("span",{className:"text-foreground",children:t}),e&&A.jsx("span",{className:"text-destructive",children:"*"})]}),n&&A.jsx("span",{className:"shrink-0 text-sm font-normal text-muted-foreground",children:"Optional"}),a,i&&A.jsx(Al,{trigger:A.jsx("div",{className:"flex size-4 shrink-0 cursor-pointer items-center justify-center text-muted-foreground hover:text-foreground [&>svg]:size-full",children:A.jsx(yEe,{})}),content:i})]}),o&&A.jsx("p",{className:"w-full whitespace-pre-wrap text-sm font-normal text-muted-foreground",children:o})]}),l==="integrated"&&s]});Bs.displayName="Label";var xz=Ps(["flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm leading-none shadow-xs transition-colors","file:h-7 file:border-0 file:bg-transparent file:pe-2 file:text-sm file:font-medium","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/20"],{variants:{variant:{default:"",error:"border-destructive focus-visible:ring-destructive/20",warning:"border-warning focus-visible:ring-warning/20"}},defaultVariants:{variant:"default"}}),OT=t=>{var e=t,{ref:n,variant:r,type:a,icon:i}=e,o=Mn(e,["ref","variant","type","icon"]);const[s,l]=N.useState(!1),[u,d]=N.useState(""),f=()=>{l(!s)},m=C=>{var T,w;const O=C.currentTarget.files;(T=O==null?void 0:O[0])!=null&&T.name?d(O[0].name):d(""),(w=o.onChange)==null||w.call(o,C)},h=a==="password"&&s?"text":a,E=a==="password",b=a==="file",v=!!i;if(b)return A.jsxs("label",{className:Zt(xz({variant:r}),"flex h-9 w-full items-center gap-2 overflow-hidden rounded-md border border-input bg-background px-3 py-1 text-sm text-foreground transition-colors","focus-within:ring-ring/50 focus-within:outline-none focus-within:ring-[3px]","has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50"),children:[A.jsx("input",Qt({ref:n,type:"file",className:"sr-only",onChange:m},o)),A.jsx("span",{className:"pointer-events-none flex flex-shrink-0 items-center justify-center px-1.5 py-px font-medium",children:"Choose file"}),i&&A.jsx("div",{className:"relative flex h-4 w-4 flex-shrink-0 items-center justify-center text-muted-foreground [&>svg]:size-4",children:i}),A.jsx("span",{className:"relative line-clamp-1 flex-1 text-muted-foreground",children:u||"No file chosen"})]});const y=A.jsx("input",Qt({className:Zt(xz({variant:r}),v&&!b&&"pl-9",E&&"pr-10"),ref:n,type:h},o));return v||E?A.jsxs("div",{className:"group relative w-full",children:[i&&A.jsx("div",{className:Zt("pointer-events-none absolute top-1/2 flex size-4 -translate-y-1/2 items-center justify-center text-muted-foreground [&>svg]:size-full","left-3"),children:i}),y,E&&A.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-sm text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-ring/50 group-focus-within:opacity-100 group-hover:opacity-100",onClick:f,"aria-label":s?"Hide password":"Show password",children:s?A.jsx(AEe,{className:"size-4"}):A.jsx(REe,{className:"size-4"})})]}):y};OT.displayName="Input";var jSe=Ps("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 active:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",destructive:"border bg-background text-destructive shadow-xs hover:bg-accent hover:text-destructive focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",outline:"border bg-background text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-transparent dark:hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",link:"text-primary underline-offset-4 hover:underline focus-visible:ring-ring/50 focus-visible:ring-[3px]"},size:{default:"h-9 px-3 py-2 gap-1.5",sm:"h-8 rounded-md gap-1.5 px-2",icon:"size-9","icon-sm":"size-8"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",size:"default"}});function Xn(t){var e=t,{variant:n,size:r,fullWidth:a,label:i,startIcon:o,endIcon:s,isLoading:l,disabled:u,type:d="button"}=e,f=Mn(e,["variant","size","fullWidth","label","startIcon","endIcon","isLoading","disabled","type"]);return A.jsxs("button",Rr(Qt({type:d,"data-slot":"button",className:Zt(jSe({variant:n,size:r,fullWidth:a})),disabled:l||u,"da-cid":i?Gw(i):void 0},f),{children:[l?A.jsx(KG,{className:"animate-spin"}):o,i&&A.jsx("span",{className:Zt(r==="icon"||r==="icon-sm"?"sr-only":void 0),children:i}),!l&&s]}))}var Nz=t=>{var e=t,{ref:n,disableOverflowWrapper:r}=e,a=Mn(e,["ref","disableOverflowWrapper"]);const i=A.jsx("table",Qt({ref:n,className:"w-full text-sm"},a));return r?i:A.jsx("div",{className:"relative w-full overflow-auto",children:i})};Nz.displayName="Table";var Oz=t=>{var e=t,{ref:n,sticky:r}=e,a=Mn(e,["ref","sticky"]);return A.jsx("thead",Qt({ref:n,className:Zt("[&_tr]:border-b [&_tr]:hover:bg-transparent",r&&"sticky top-0 z-10 bg-background")},a))};Oz.displayName="TableHeader";var Iz=t=>{var e=t,{ref:n}=e,r=Mn(e,["ref"]);return A.jsx("tbody",Qt({ref:n,className:"[&_tr:last-child]:border-0"},r))};Iz.displayName="TableBody";var WSe=Ps("border-b transition-colors data-[state=selected]:bg-muted",{variants:{state:{default:"",hover:"hover:bg-muted/50"},isDraggingOver:{true:"border-t-2 border-t-primary bg-primary/10",false:""},isDropZone:{true:"transition-all border-t-2",false:""},isLastItemDraggingBehind:{true:"border-b-2 border-b-primary",false:""}},compoundVariants:[{isDraggingOver:!0,isDropZone:!1,class:"opacity-50"},{isDropZone:!0,isDraggingOver:!1,class:"border-t-transparent"},{isDropZone:!0,isDraggingOver:!0,class:"border-t-primary bg-primary/10"}],defaultVariants:{state:"default",isDraggingOver:!1,isDropZone:!1,isLastItemDraggingBehind:!1}}),Ox=t=>{var e=t,{ref:n,state:r,isDraggingOver:a,isDropZone:i,isLastItemDraggingBehind:o,draggable:s}=e,l=Mn(e,["ref","state","isDraggingOver","isDropZone","isLastItemDraggingBehind","draggable"]);return A.jsx("tr",Qt({ref:n,draggable:s,className:Zt(WSe({state:r,isDraggingOver:a,isDropZone:i,isLastItemDraggingBehind:o}),s&&"cursor-grab transition-all duration-200 ease-in-out")},l))};Ox.displayName="TableRow";var KSe=Ps("h-11 px-3 align-middle font-medium text-foreground [&:has([role=checkbox])]:pr-0 [&>div]:flex [&>div]:items-center [&>div]:gap-2 [&_svg]:size-4 [&_svg]:shrink-0 [&_button:not([role=checkbox])]:-ml-2 [&_button:not([role=checkbox])]:px-2",{variants:{alignment:{left:"text-left [&>div]:justify-start",center:"text-center [&>div]:justify-center",right:"text-right [&>div]:justify-start [&>div]:flex-row-reverse"}},defaultVariants:{alignment:"left"}}),Ix=t=>{var e=t,{ref:n,alignment:r,label:a,icon:i,badge:o,tooltip:s}=e,l=Mn(e,["ref","alignment","label","icon","badge","tooltip"]);return A.jsx("th",Rr(Qt({ref:n,className:KSe({alignment:r})},l),{children:A.jsxs("div",{children:[i,a,typeof o=="string"?A.jsx(_T,{variant:"secondary",label:o}):o,s&&A.jsx(Al,{trigger:A.jsx(wEe,{className:"size-4 text-muted-foreground"}),content:s})]})}))};Ix.displayName="TableHead";var Dz=Ps("p-2 px-3 align-middle [&:has([role=checkbox])]:pr-0 [&>div]:flex [&>div]:items-center [&>div]:gap-2",{variants:{alignment:{left:"text-left [&>div]:justify-start",center:"text-center [&>div]:justify-center",right:"text-right [&>div]:justify-start [&>div]:flex-row-reverse"},strong:{true:"font-semibold",false:"font-normal"}},defaultVariants:{alignment:"left",strong:!1}}),kz=t=>{var e=t,{ref:n,alignment:r,strong:a,badge:i,label:o}=e,s=Mn(e,["ref","alignment","strong","badge","label"]);return A.jsx("td",Rr(Qt({ref:n,className:Dz({alignment:r,strong:a})},s),{children:A.jsxs("div",{children:[o,typeof i=="string"?A.jsx(_T,{variant:"secondary",label:i}):i]})}))};kz.displayName="TableCell";var Mz=t=>{var e=t,{ref:n,className:r,alignment:a,strong:i,children:o}=e,s=Mn(e,["ref","className","alignment","strong","children"]);return A.jsx("td",Rr(Qt({ref:n,className:Zt(Dz({alignment:a,strong:i}),r)},s),{children:A.jsx("div",{children:o})}))};Mz.displayName="CustomTableCell";function Dx(t,e,n,r,a){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}function S0(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}let Lz=function(){const{crypto:t}=globalThis;if(t!=null&&t.randomUUID)return Lz=t.randomUUID.bind(t),t.randomUUID();const e=new Uint8Array(1),n=t?()=>t.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,r=>(+r^n()&15>>+r/4).toString(16))};function XSe(t){return typeof t=="object"&&t!==null&&("name"in t&&t.name==="AbortError"||"message"in t&&String(t.message).includes("FetchRequestCanceledException"))}const kx=t=>{if(t instanceof Error)return t;if(typeof t=="object"&&t!==null){try{if(Object.prototype.toString.call(t)==="[object Error]"){const e=new Error(t.message,t.cause?{cause:t.cause}:{});return t.stack&&(e.stack=t.stack),t.cause&&!e.cause&&(e.cause=t.cause),t.name&&(e.name=t.name),e}}catch{}try{return new Error(JSON.stringify(t))}catch{}}return new Error(t)};class sf extends Error{}class hi extends sf{constructor(e,n,r,a){super(`${hi.makeMessage(e,n,r)}`),this.status=e,this.headers=a,this.error=n}static makeMessage(e,n,r){const a=n!=null&&n.message?typeof n.message=="string"?n.message:JSON.stringify(n.message):n?JSON.stringify(n):r;return e&&a?`${e} ${a}`:e?`${e} status code (no body)`:a||"(no status code or body)"}static generate(e,n,r,a){if(!e||!a)return new IT({message:r,cause:kx(n)});const i=n;return e===400?new Fz(e,i,r,a):e===401?new Bz(e,i,r,a):e===403?new Uz(e,i,r,a):e===404?new Gz(e,i,r,a):e===409?new zz(e,i,r,a):e===422?new qz(e,i,r,a):e===429?new Hz(e,i,r,a):e>=500?new $z(e,i,r,a):new hi(e,i,r,a)}}class Mx extends hi{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}}class IT extends hi{constructor({message:e,cause:n}){super(void 0,void 0,e||"Connection error.",void 0),n&&(this.cause=n)}}class Pz extends IT{constructor({message:e}={}){super({message:e??"Request timed out."})}}class Fz extends hi{}class Bz extends hi{}class Uz extends hi{}class Gz extends hi{}class zz extends hi{}class qz extends hi{}class Hz extends hi{}class $z extends hi{}const QSe=/^[a-z][a-z0-9+.-]*:/i,ZSe=t=>QSe.test(t);let Oi=t=>(Oi=Array.isArray,Oi(t)),Yz=Oi;function Hh(t){return typeof t!="object"?{}:t??{}}function JSe(t){if(!t)return!0;for(const e in t)return!1;return!0}function eve(t,e){return Object.prototype.hasOwnProperty.call(t,e)}const tve=(t,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new sf(`${t} must be an integer`);if(e<0)throw new sf(`${t} must be a positive integer`);return e},nve=t=>{try{return JSON.parse(t)}catch{return}},rve=t=>new Promise(e=>setTimeout(e,t)),$h="1.2.0";function ave(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}const ive=()=>{var n;const t=ave();if(t==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":$h,"X-Stainless-OS":jz(Deno.build.os),"X-Stainless-Arch":Vz(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:((n=Deno.version)==null?void 0:n.deno)??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":$h,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(t==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":$h,"X-Stainless-OS":jz(globalThis.process.platform??"unknown"),"X-Stainless-Arch":Vz(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};const e=ove();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":$h,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":$h,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function ove(){if(typeof navigator>"u"||!navigator)return null;const t=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(const{key:e,pattern:n}of t){const r=n.exec(navigator.userAgent);if(r){const a=r[1]||0,i=r[2]||0,o=r[3]||0;return{browser:e,version:`${a}.${i}.${o}`}}}return null}const Vz=t=>t==="x32"?"x32":t==="x86_64"||t==="x64"?"x64":t==="arm"?"arm":t==="aarch64"||t==="arm64"?"arm64":t?`other:${t}`:"unknown",jz=t=>(t=t.toLowerCase(),t.includes("ios")?"iOS":t==="android"?"Android":t==="darwin"?"MacOS":t==="win32"?"Windows":t==="freebsd"?"FreeBSD":t==="openbsd"?"OpenBSD":t==="linux"?"Linux":t?`Other:${t}`:"Unknown");let Wz;const sve=()=>Wz??(Wz=ive());function lve(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new LlamaCloud({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function cve(...t){const e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...t)}function Kz(t){let e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t[Symbol.iterator]();return cve({start(){},async pull(n){const{done:r,value:a}=await e.next();r?n.close():n.enqueue(a)},async cancel(){var n;await((n=e.return)==null?void 0:n.call(e))}})}async function uve(t){var r,a;if(t===null||typeof t!="object")return;if(t[Symbol.asyncIterator]){await((a=(r=t[Symbol.asyncIterator]()).return)==null?void 0:a.call(r));return}const e=t.getReader(),n=e.cancel();e.releaseLock(),await n}const dve=({headers:t,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)}),Xz="RFC3986",Qz=t=>String(t),Zz={RFC1738:t=>String(t).replace(/%20/g,"+"),RFC3986:Qz},pve="RFC1738";let Lx=(t,e)=>(Lx=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),Lx(t,e));const Rl=(()=>{const t=[];for(let e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t})(),Px=1024,fve=(t,e,n,r,a)=>{if(t.length===0)return t;let i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),n==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(s){return"%26%23"+parseInt(s.slice(2),16)+"%3B"});let o="";for(let s=0;s<i.length;s+=Px){const l=i.length>=Px?i.slice(s,s+Px):i,u=[];for(let d=0;d<l.length;++d){let f=l.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===pve&&(f===40||f===41)){u[u.length]=l.charAt(d);continue}if(f<128){u[u.length]=Rl[f];continue}if(f<2048){u[u.length]=Rl[192|f>>6]+Rl[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Rl[224|f>>12]+Rl[128|f>>6&63]+Rl[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|l.charCodeAt(d)&1023),u[u.length]=Rl[240|f>>18]+Rl[128|f>>12&63]+Rl[128|f>>6&63]+Rl[128|f&63]}o+=u.join("")}return o};function mve(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}function Jz(t,e){if(Oi(t)){const n=[];for(let r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)}const eq={brackets(t){return String(t)+"[]"},comma:"comma",indices(t,e){return String(t)+"["+e+"]"},repeat(t){return String(t)}},tq=function(t,e){Array.prototype.push.apply(t,Oi(e)?e:[e])};let nq;const fa={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:fve,encodeValuesOnly:!1,format:Xz,formatter:Qz,indices:!1,serializeDate(t){return(nq??(nq=Function.prototype.call.bind(Date.prototype.toISOString)))(t)},skipNulls:!1,strictNullHandling:!1};function hve(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"}const Fx={};function rq(t,e,n,r,a,i,o,s,l,u,d,f,m,h,E,b,v,y){let C=t,T=y,w=0,O=!1;for(;(T=T.get(Fx))!==void 0&&!O;){const P=T.get(t);if(w+=1,typeof P<"u"){if(P===w)throw new RangeError("Cyclic object value");O=!0}typeof T.get(Fx)>"u"&&(w=0)}if(typeof u=="function"?C=u(e,C):C instanceof Date?C=m==null?void 0:m(C):n==="comma"&&Oi(C)&&(C=Jz(C,function(P){return P instanceof Date?m==null?void 0:m(P):P})),C===null){if(i)return l&&!b?l(e,fa.encoder,v,"key",h):e;C=""}if(hve(C)||mve(C)){if(l){const P=b?e:l(e,fa.encoder,v,"key",h);return[(E==null?void 0:E(P))+"="+(E==null?void 0:E(l(C,fa.encoder,v,"value",h)))]}return[(E==null?void 0:E(e))+"="+(E==null?void 0:E(String(C)))]}const x=[];if(typeof C>"u")return x;let D;if(n==="comma"&&Oi(C))b&&l&&(C=Jz(C,l)),D=[{value:C.length>0?C.join(",")||null:void 0}];else if(Oi(u))D=u;else{const P=Object.keys(C);D=d?P.sort(d):P}const M=s?String(e).replace(/\./g,"%2E"):String(e),F=r&&Oi(C)&&C.length===1?M+"[]":M;if(a&&Oi(C)&&C.length===0)return F+"[]";for(let P=0;P<D.length;++P){const q=D[P],j=typeof q=="object"&&typeof q.value<"u"?q.value:C[q];if(o&&j===null)continue;const Q=f&&s?q.replace(/\./g,"%2E"):q,U=Oi(C)?typeof n=="function"?n(F,Q):F:F+(f?"."+Q:"["+Q+"]");y.set(t,w);const K=new WeakMap;K.set(Fx,y),tq(x,rq(j,U,n,r,a,i,o,s,n==="comma"&&b&&Oi(C)?null:l,u,d,f,m,h,E,b,v,K))}return x}function gve(t=fa){if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");const e=t.charset||fa.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let n=Xz;if(typeof t.format<"u"){if(!Lx(Zz,t.format))throw new TypeError("Unknown format option provided.");n=t.format}const r=Zz[n];let a=fa.filter;(typeof t.filter=="function"||Oi(t.filter))&&(a=t.filter);let i;if(t.arrayFormat&&t.arrayFormat in eq?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=fa.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");const o=typeof t.allowDots>"u"?t.encodeDotInKeys?!0:fa.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:fa.addQueryPrefix,allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:fa.allowEmptyArrays,arrayFormat:i,charset:e,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:fa.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?fa.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:fa.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:fa.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:fa.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:fa.encodeValuesOnly,filter:a,format:n,formatter:r,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:fa.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:fa.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:fa.strictNullHandling}}function _ve(t,e={}){let n=t;const r=gve(e);let a,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Oi(r.filter)&&(i=r.filter,a=i);const o=[];if(typeof n!="object"||n===null)return"";const s=eq[r.arrayFormat],l=s==="comma"&&r.commaRoundTrip;a||(a=Object.keys(n)),r.sort&&a.sort(r.sort);const u=new WeakMap;for(let m=0;m<a.length;++m){const h=a[m];r.skipNulls&&n[h]===null||tq(o,rq(n[h],h,s,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,u))}const d=o.join(r.delimiter);let f=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),d.length>0?f+d:""}const DT={off:0,error:200,warn:300,info:400,debug:500},aq=(t,e,n)=>{if(t){if(eve(DT,t))return t;io(n).warn(`${e} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(DT))}`)}};function v0(){}function kT(t,e,n){return!e||DT[t]>DT[n]?v0:e[t].bind(e)}const bve={error:v0,warn:v0,info:v0,debug:v0};let iq=new WeakMap;function io(t){const e=t.logger,n=t.logLevel??"off";if(!e)return bve;const r=iq.get(e);if(r&&r[0]===n)return r[1];const a={error:kT("error",e,n),warn:kT("warn",e,n),info:kT("info",e,n),debug:kT("debug",e,n)};return iq.set(e,[n,a]),a}const lf=t=>(t.options&&(t.options={...t.options},delete t.options.headers),t.headers&&(t.headers=Object.fromEntries((t.headers instanceof Headers?[...t.headers]:Object.entries(t.headers)).map(([e,n])=>[e,e.toLowerCase()==="authorization"||e.toLowerCase()==="cookie"||e.toLowerCase()==="set-cookie"?"***":n]))),"retryOfRequestLogID"in t&&(t.retryOfRequestLogID&&(t.retryOf=t.retryOfRequestLogID),delete t.retryOfRequestLogID),t);async function oq(t,e){const{response:n,requestLogID:r,retryOfRequestLogID:a,startTime:i}=e,o=await(async()=>{var f;if(n.status===204)return null;if(e.options.__binaryResponse)return n;const s=n.headers.get("content-type"),l=(f=s==null?void 0:s.split(";")[0])==null?void 0:f.trim();return(l==null?void 0:l.includes("application/json"))||(l==null?void 0:l.endsWith("+json"))?await n.json():await n.text()})();return io(t).debug(`[${r}] response parsed`,lf({retryOfRequestLogID:a,url:n.url,status:n.status,body:o,durationMs:Date.now()-i})),o}var y0;class MT extends Promise{constructor(e,n,r=oq){super(a=>{a(null)}),this.responsePromise=n,this.parseResponse=r,y0.set(this,void 0),Dx(this,y0,e)}_thenUnwrap(e){return new MT(S0(this,y0,"f"),this.responsePromise,async(n,r)=>e(await this.parseResponse(n,r),r))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){const[e,n]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:n}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(S0(this,y0,"f"),e))),this.parsedPromise}then(e,n){return this.parse().then(e,n)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}}y0=new WeakMap;var LT;class Yh{constructor(e,n,r,a){LT.set(this,void 0),Dx(this,LT,e),this.options=a,this.response=n,this.body=r}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){const e=this.nextPageRequestOptions();if(!e)throw new sf("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await S0(this,LT,"f").requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(LT=new WeakMap,Symbol.asyncIterator)](){for await(const e of this.iterPages())for(const n of e.getPaginatedItems())yield n}}class Eve extends MT{constructor(e,n,r){super(e,n,async(a,i)=>new r(a,i.response,await oq(a,i),i.options))}async*[Symbol.asyncIterator](){const e=await this;for await(const n of e)yield n}}class Sve extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.files=r.files||[],this.total_count=r.total_count||0,this.offset=r.offset||0}getPaginatedItems(){return this.files??[]}nextPageRequestOptions(){const e=this.offset??0,n=this.getPaginatedItems().length,r=e+n,a=this.total_count;return a&&r<a?{...this.options,query:{...Hh(this.options.query),offset:r}}:null}}class sq extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.items=r.items||[],this.total_size=r.total_size||0}getPaginatedItems(){return this.items??[]}nextPageRequestOptions(){const e=this.options.query.offset??0,n=this.getPaginatedItems().length,r=e+n,a=this.total_size;return a&&r<a?{...this.options,query:{...Hh(this.options.query),offset:r}}:null}}class vve extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.items=r.items||[],this.total=r.total||0,this.skip=r.skip||0}getPaginatedItems(){return this.items??[]}nextPageRequestOptions(){const e=this.skip??0,n=this.getPaginatedItems().length,r=e+n,a=this.total;return a&&r<a?{...this.options,query:{...Hh(this.options.query),skip:r}}:null}}class yve extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.documents=r.documents||[],this.total_count=r.total_count||0,this.offset=r.offset||0}getPaginatedItems(){return this.documents??[]}nextPageRequestOptions(){const e=this.offset??0,n=this.getPaginatedItems().length,r=e+n,a=this.total_count;return a&&r<a?{...this.options,query:{...Hh(this.options.query),skip:r}}:null}}class ud extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.items=r.items||[],this.next_page_token=r.next_page_token||""}getPaginatedItems(){return this.items??[]}nextPageRequestOptions(){const e=this.next_page_token;return e?{...this.options,query:{...Hh(this.options.query),page_token:e}}:null}}class lq extends Yh{constructor(e,n,r,a){super(e,n,r,a),this.items=r.items||[],this.next_page_token=r.next_page_token||""}getPaginatedItems(){return this.items??[]}nextPageRequestOptions(){const e=this.next_page_token;return e?{...this.options,body:{...Hh(this.options.body),page_token:e}}:null}}const cq=()=>{var t;if(typeof File>"u"){const{process:e}=globalThis,n=typeof((t=e==null?void 0:e.versions)==null?void 0:t.node)=="string"&&parseInt(e.versions.node.split("."))<20;throw new Error("`File` is not defined as a global, which is required for file uploads."+(n?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};function T0(t,e,n){return cq(),new File(t,e??"unknown_file",n)}function PT(t){return(typeof t=="object"&&t!==null&&("name"in t&&t.name&&String(t.name)||"url"in t&&t.url&&String(t.url)||"filename"in t&&t.filename&&String(t.filename)||"path"in t&&t.path&&String(t.path))||"").split(/[\\/]/).pop()||void 0}const uq=t=>t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function",C0=async(t,e)=>({...t,body:await Cve(t.body,e)}),dq=new WeakMap;function Tve(t){const e=typeof t=="function"?t:t.fetch,n=dq.get(e);if(n)return n;const r=(async()=>{try{const a="Response"in e?e.Response:(await e("data:,")).constructor,i=new FormData;return i.toString()!==await new a(i).text()}catch{return!0}})();return dq.set(e,r),r}const Cve=async(t,e)=>{if(!await Tve(e))throw new TypeError("The provided fetch function does not support file uploads with the current global FormData class.");const n=new FormData;return await Promise.all(Object.entries(t||{}).map(([r,a])=>Bx(n,r,a))),n},Ave=t=>t instanceof Blob&&"name"in t,Bx=async(t,e,n)=>{if(n!==void 0){if(n==null)throw new TypeError(`Received null for "${e}"; to pass null in FormData, you must use the string 'null'`);if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")t.append(e,String(n));else if(n instanceof Response)t.append(e,T0([await n.blob()],PT(n)));else if(uq(n))t.append(e,T0([await new Response(Kz(n)).blob()],PT(n)));else if(Ave(n))t.append(e,n,PT(n));else if(Array.isArray(n))await Promise.all(n.map(r=>Bx(t,e+"[]",r)));else if(typeof n=="object")await Promise.all(Object.entries(n).map(([r,a])=>Bx(t,`${e}[${r}]`,a)));else throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${n} instead`)}},pq=t=>t!=null&&typeof t=="object"&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.text=="function"&&typeof t.slice=="function"&&typeof t.arrayBuffer=="function",Rve=t=>t!=null&&typeof t=="object"&&typeof t.name=="string"&&typeof t.lastModified=="number"&&pq(t),wve=t=>t!=null&&typeof t=="object"&&typeof t.url=="string"&&typeof t.blob=="function";async function xve(t,e,n){if(cq(),t=await t,Rve(t))return t instanceof File?t:T0([await t.arrayBuffer()],t.name);if(wve(t)){const a=await t.blob();return e||(e=new URL(t.url).pathname.split(/[\\/]/).pop()),T0(await Ux(a),e,n)}const r=await Ux(t);if(e||(e=PT(t)),!(n!=null&&n.type)){const a=r.find(i=>typeof i=="object"&&"type"in i&&i.type);typeof a=="string"&&(n={...n,type:a})}return T0(r,e,n)}async function Ux(t){var n;let e=[];if(typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer)e.push(t);else if(pq(t))e.push(t instanceof Blob?t:await t.arrayBuffer());else if(uq(t))for await(const r of t)e.push(...await Ux(r));else{const r=(n=t==null?void 0:t.constructor)==null?void 0:n.name;throw new Error(`Unexpected data type: ${typeof t}${r?`; constructor: ${r}`:""}${Nve(t)}`)}return e}function Nve(t){return typeof t!="object"||t===null?"":`; props: [${Object.getOwnPropertyNames(t).map(n=>`"${n}"`).join(", ")}]`}class Dn{constructor(e){this._client=e}}function fq(t){return t.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}const mq=Object.freeze(Object.create(null)),Ke=((t=fq)=>function(n,...r){if(n.length===1)return n[0];let a=!1;const i=[],o=n.reduce((d,f,m)=>{var b;/[?#]/.test(f)&&(a=!0);const h=r[m];let E=(a?encodeURIComponent:t)(""+h);return m!==r.length&&(h==null||typeof h=="object"&&h.toString===((b=Object.getPrototypeOf(Object.getPrototypeOf(h.hasOwnProperty??mq)??mq))==null?void 0:b.toString))&&(E=h+"",i.push({start:d.length+f.length,length:E.length,error:`Value of type ${Object.prototype.toString.call(h).slice(8,-1)} is not a valid path parameter`})),d+f+(m===r.length?"":E)},""),s=o.split(/[?#]/,1)[0],l=new RegExp("(?<=^|\\/)(?:\\.|%2e){1,2}(?=\\/|$)","gi");let u;for(;(u=l.exec(s))!==null;)i.push({start:u.index,length:u[0].length,error:`Value "${u[0]}" can't be safely passed as a path parameter`});if(i.sort((d,f)=>d.start-f.start),i.length>0){let d=0;const f=i.reduce((m,h)=>{const E=" ".repeat(h.start-d),b="^".repeat(h.length);return d=h.start+h.length,m+E+b},"");throw new sf(`Path parameters result in path with invalid segments:
270
270
  ${i.map(m=>m.error).join(`
271
271
  `)}
272
272
  ${o}
@@ -293,7 +293,7 @@ Defaulting to \`null\`.`}var qTe=LH;qTe.displayName;var QT="Dialog",[GH,zH]=pa(Q
293
293
 
294
294
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
295
295
 
296
- For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return N.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},QTe="DialogDescriptionWarning",ZTe=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n$(QTe).contentName}}.`;return N.useEffect(()=>{var i;const a=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&a&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},JTe=qH,r$=$H,eCe=VH,x0=jH,N0=WH,JT=XH,eC=ZH,tC=e$,tCe=JTe,nCe=r$,rCe=eCe,aCe=tC,a$=t=>{var e=t,{ref:n,className:r}=e,a=Mn(e,["ref","className"]);return A.jsx(x0,Qt({ref:n,className:Zt("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",r)},a))};a$.displayName=x0.displayName;var i$=t=>{var e=t,{ref:n,className:r,children:a,breakpoint:i="lg"}=e,o=Mn(e,["ref","className","children","breakpoint"]);return A.jsxs(rCe,{children:[A.jsx(a$,{}),A.jsxs(N0,Rr(Qt({ref:n,className:Zt("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%] fixed left-1/2 top-1/2 z-50 flex w-full max-w-[425px] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 rounded-lg border bg-background p-6 shadow-[0_10px_15px_-3px_rgba(0,0,0,0.1),0_4px_6px_-4px_rgba(0,0,0,0.1)]",r),"data-breakpoint":i},o),{children:[a,A.jsxs(tC,{className:"rounded-xs absolute right-[15px] top-[15px] opacity-70 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:[A.jsx(QG,{className:"size-4"}),A.jsx("span",{className:"sr-only",children:"Close"})]})]}))]})};i$.displayName=N0.displayName;var o$=({title:t,description:e,icon:n,breakpoint:r="lg","da-cid":a})=>!t&&!e&&!n?null:A.jsxs("div",{className:Zt("flex flex-col gap-4",r==="sm"&&"text-center"),"da-cid":a,children:[n&&A.jsx("div",{className:Zt("shadow-xs flex size-8 items-center justify-center rounded-sm border bg-background p-2 [&_svg]:size-4",r==="sm"&&"mx-auto"),children:n}),(t||e)&&A.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&A.jsx(JT,{className:"text-lg font-semibold leading-none text-foreground",children:t}),e&&A.jsx(eC,{className:"text-sm leading-5 text-muted-foreground",children:e})]})]});o$.displayName="DialogHeader";var jh=(t,e,n)=>{const r=A.jsx(Xn,{fullWidth:n,variant:t.isDestructive?"destructive":e,onClick:t.onClick,disabled:t.disabled||t.loading,label:t.label,startIcon:t.icon,type:t.type,form:t.form,isLoading:t.loading});return t.asDialogClose?A.jsx(aCe,{asChild:!0,children:r}):r},s$=({primary:t,secondary:e,tertiary:n,breakpoint:r="lg",children:a,"da-cid":i})=>!t&&!e&&!n&&!a?null:r==="lg"?A.jsxs("div",{className:"flex flex-col gap-6","da-cid":i,children:[a,(t||e||n)&&A.jsxs("div",{className:"flex items-center gap-6",children:[n&&jh(n,"ghost"),A.jsxs("div",{className:"flex flex-1 items-center justify-end gap-2",children:[e&&jh(e,"outline"),t&&jh(t,"default")]})]})]}):A.jsxs("div",{className:"flex flex-col gap-6","da-cid":i,children:[a,(t||e||n)&&A.jsxs("div",{className:"flex flex-col items-center gap-2",children:[A.jsxs("div",{className:"flex w-full items-center gap-2",children:[e&&A.jsx("div",{className:"flex-1",children:jh(e,"outline",!0)}),t&&A.jsx("div",{className:"flex-1",children:jh(t,"default",!0)})]}),n&&jh(n,"ghost")]})]});s$.displayName="DialogFooter";var l$={};function iCe(){var t;try{const e=l$==null?void 0:l$.env;if((e==null?void 0:e.DEV)===!0||(e==null?void 0:e.MODE)==="development"||(e==null?void 0:e.PROD)===!1)return!0}catch{}return typeof process<"u"&&((t=process==null?void 0:process.env)!=null&&t.NODE_ENV),!1}var oCe=class{constructor(t){Ch(this,"name"),this.name=t}debug(t,...e){console.debug(`[${this.name}] ${t}`,...e)}info(t,...e){console.info(`[${this.name}] ${t}`,...e)}warn(t,...e){console.warn(`[${this.name}] ${t}`,...e)}error(t,...e){console.error(`[${this.name}] ${t}`,...e)}},sCe=class{debug(t,...e){}info(t,...e){}warn(t,...e){}error(t,...e){}},pf=iCe()?new oCe("llama-ui"):new sCe;const Ba=[];for(let t=0;t<256;++t)Ba.push((t+256).toString(16).slice(1));function lCe(t,e=0){return(Ba[t[e+0]]+Ba[t[e+1]]+Ba[t[e+2]]+Ba[t[e+3]]+"-"+Ba[t[e+4]]+Ba[t[e+5]]+"-"+Ba[t[e+6]]+Ba[t[e+7]]+"-"+Ba[t[e+8]]+Ba[t[e+9]]+"-"+Ba[t[e+10]]+Ba[t[e+11]]+Ba[t[e+12]]+Ba[t[e+13]]+Ba[t[e+14]]+Ba[t[e+15]]).toLowerCase()}let pN;const cCe=new Uint8Array(16);function uCe(){if(!pN){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");pN=crypto.getRandomValues.bind(crypto)}return pN(cCe)}const c$={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function dCe(t,e,n){var a;t=t||{};const r=t.random??((a=t.rng)==null?void 0:a.call(t))??uCe();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,lCe(r)}function pCe(t,e,n){return c$.randomUUID&&!t?c$.randomUUID():dCe(t)}function eQe(){}function tQe(){}function u$(t){const e=[],n=String(t||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const o=n.slice(a,r).trim();(o||!i)&&e.push(o),a=r+1,r=n.indexOf(",",a)}return e}function fCe(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const mCe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hCe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gCe={};function d$(t,e){return(gCe.jsx?hCe:mCe).test(t)}const _Ce=/[ \t\n\f\r]/g;function bCe(t){return typeof t=="object"?t.type==="text"?p$(t.value):!1:p$(t)}function p$(t){return t.replace(_Ce,"")===""}class O0{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}O0.prototype.normal={},O0.prototype.property={},O0.prototype.space=void 0;function f$(t,e){const n={},r={};for(const a of t)Object.assign(n,a.property),Object.assign(r,a.normal);return new O0(n,r,e)}function I0(t){return t.toLowerCase()}class Di{constructor(e,n){this.attribute=n,this.property=e}}Di.prototype.attribute="",Di.prototype.booleanish=!1,Di.prototype.boolean=!1,Di.prototype.commaOrSpaceSeparated=!1,Di.prototype.commaSeparated=!1,Di.prototype.defined=!1,Di.prototype.mustUseProperty=!1,Di.prototype.number=!1,Di.prototype.overloadedBoolean=!1,Di.prototype.property="",Di.prototype.spaceSeparated=!1,Di.prototype.space=void 0;let ECe=0;const Yt=ff(),ta=ff(),fN=ff(),qe=ff(),lr=ff(),Wh=ff(),oo=ff();function ff(){return 2**++ECe}const mN=Object.freeze(Object.defineProperty({__proto__:null,boolean:Yt,booleanish:ta,commaOrSpaceSeparated:oo,commaSeparated:Wh,number:qe,overloadedBoolean:fN,spaceSeparated:lr},Symbol.toStringTag,{value:"Module"})),hN=Object.keys(mN);class gN extends Di{constructor(e,n,r,a){let i=-1;if(super(e,n),m$(this,"space",a),typeof r=="number")for(;++i<hN.length;){const o=hN[i];m$(this,hN[i],(r&mN[o])===mN[o])}}}gN.prototype.defined=!0;function m$(t,e,n){n&&(t[e]=n)}function Kh(t){const e={},n={};for(const[r,a]of Object.entries(t.properties)){const i=new gN(r,t.transform(t.attributes||{},r),a,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),e[r]=i,n[I0(r)]=r,n[I0(i.attribute)]=r}return new O0(e,n,t.space)}const h$=Kh({properties:{ariaActiveDescendant:null,ariaAtomic:ta,ariaAutoComplete:null,ariaBusy:ta,ariaChecked:ta,ariaColCount:qe,ariaColIndex:qe,ariaColSpan:qe,ariaControls:lr,ariaCurrent:null,ariaDescribedBy:lr,ariaDetails:null,ariaDisabled:ta,ariaDropEffect:lr,ariaErrorMessage:null,ariaExpanded:ta,ariaFlowTo:lr,ariaGrabbed:ta,ariaHasPopup:null,ariaHidden:ta,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lr,ariaLevel:qe,ariaLive:null,ariaModal:ta,ariaMultiLine:ta,ariaMultiSelectable:ta,ariaOrientation:null,ariaOwns:lr,ariaPlaceholder:null,ariaPosInSet:qe,ariaPressed:ta,ariaReadOnly:ta,ariaRelevant:null,ariaRequired:ta,ariaRoleDescription:lr,ariaRowCount:qe,ariaRowIndex:qe,ariaRowSpan:qe,ariaSelected:ta,ariaSetSize:qe,ariaSort:null,ariaValueMax:qe,ariaValueMin:qe,ariaValueNow:qe,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function g$(t,e){return e in t?t[e]:e}function _$(t,e){return g$(t,e.toLowerCase())}const SCe=Kh({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wh,acceptCharset:lr,accessKey:lr,action:null,allow:null,allowFullScreen:Yt,allowPaymentRequest:Yt,allowUserMedia:Yt,alt:null,as:null,async:Yt,autoCapitalize:null,autoComplete:lr,autoFocus:Yt,autoPlay:Yt,blocking:lr,capture:null,charSet:null,checked:Yt,cite:null,className:lr,cols:qe,colSpan:null,content:null,contentEditable:ta,controls:Yt,controlsList:lr,coords:qe|Wh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Yt,defer:Yt,dir:null,dirName:null,disabled:Yt,download:fN,draggable:ta,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Yt,formTarget:null,headers:lr,height:qe,hidden:fN,high:qe,href:null,hrefLang:null,htmlFor:lr,httpEquiv:lr,id:null,imageSizes:null,imageSrcSet:null,inert:Yt,inputMode:null,integrity:null,is:null,isMap:Yt,itemId:null,itemProp:lr,itemRef:lr,itemScope:Yt,itemType:lr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Yt,low:qe,manifest:null,max:null,maxLength:qe,media:null,method:null,min:null,minLength:qe,multiple:Yt,muted:Yt,name:null,nonce:null,noModule:Yt,noValidate:Yt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Yt,optimum:qe,pattern:null,ping:lr,placeholder:null,playsInline:Yt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Yt,referrerPolicy:null,rel:lr,required:Yt,reversed:Yt,rows:qe,rowSpan:qe,sandbox:lr,scope:null,scoped:Yt,seamless:Yt,selected:Yt,shadowRootClonable:Yt,shadowRootDelegatesFocus:Yt,shadowRootMode:null,shape:null,size:qe,sizes:null,slot:null,span:qe,spellCheck:ta,src:null,srcDoc:null,srcLang:null,srcSet:null,start:qe,step:null,style:null,tabIndex:qe,target:null,title:null,translate:null,type:null,typeMustMatch:Yt,useMap:null,value:ta,width:qe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lr,axis:null,background:null,bgColor:null,border:qe,borderColor:null,bottomMargin:qe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Yt,declare:Yt,event:null,face:null,frame:null,frameBorder:null,hSpace:qe,leftMargin:qe,link:null,longDesc:null,lowSrc:null,marginHeight:qe,marginWidth:qe,noResize:Yt,noHref:Yt,noShade:Yt,noWrap:Yt,object:null,profile:null,prompt:null,rev:null,rightMargin:qe,rules:null,scheme:null,scrolling:ta,standby:null,summary:null,text:null,topMargin:qe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:qe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Yt,disableRemotePlayback:Yt,prefix:null,property:null,results:qe,security:null,unselectable:null},space:"html",transform:_$}),vCe=Kh({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:oo,accentHeight:qe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:qe,amplitude:qe,arabicForm:null,ascent:qe,attributeName:null,attributeType:null,azimuth:qe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:qe,by:null,calcMode:null,capHeight:qe,className:lr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:qe,diffuseConstant:qe,direction:null,display:null,dur:null,divisor:qe,dominantBaseline:null,download:Yt,dx:null,dy:null,edgeMode:null,editable:null,elevation:qe,enableBackground:null,end:null,event:null,exponent:qe,externalResourcesRequired:null,fill:null,fillOpacity:qe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Wh,g2:Wh,glyphName:Wh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:qe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:qe,horizOriginX:qe,horizOriginY:qe,id:null,ideographic:qe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:qe,k:qe,k1:qe,k2:qe,k3:qe,k4:qe,kernelMatrix:oo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:qe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:qe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:qe,overlineThickness:qe,paintOrder:null,panose1:null,path:null,pathLength:qe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:qe,pointsAtY:qe,pointsAtZ:qe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oo,rev:oo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oo,requiredFeatures:oo,requiredFonts:oo,requiredFormats:oo,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:qe,specularExponent:qe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:qe,strikethroughThickness:qe,string:null,stroke:null,strokeDashArray:oo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:qe,strokeOpacity:qe,strokeWidth:null,style:null,surfaceScale:qe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oo,tabIndex:qe,tableValues:null,target:null,targetX:qe,targetY:qe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:qe,underlineThickness:qe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:qe,values:null,vAlphabetic:qe,vMathematical:qe,vectorEffect:null,vHanging:qe,vIdeographic:qe,version:null,vertAdvY:qe,vertOriginX:qe,vertOriginY:qe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:qe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:g$}),b$=Kh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),E$=Kh({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_$}),S$=Kh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),yCe={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},TCe=/[A-Z]/g,v$=/-[a-z]/g,CCe=/^data[-\w.:]+$/i;function y$(t,e){const n=I0(e);let r=e,a=Di;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&CCe.test(e)){if(e.charAt(4)==="-"){const i=e.slice(5).replace(v$,RCe);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=e.slice(4);if(!v$.test(i)){let o=i.replace(TCe,ACe);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}a=gN}return new a(r,e)}function ACe(t){return"-"+t.toLowerCase()}function RCe(t){return t.charAt(1).toUpperCase()}const T$=f$([h$,SCe,b$,E$,S$],"html"),nC=f$([h$,vCe,b$,E$,S$],"svg");function C$(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function wCe(t){return t.join(" ").trim()}var Xh={},_N,A$;function xCe(){if(A$)return _N;A$=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
296
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return N.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},QTe="DialogDescriptionWarning",ZTe=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n$(QTe).contentName}}.`;return N.useEffect(()=>{var i;const a=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&a&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},JTe=qH,r$=$H,eCe=VH,x0=jH,N0=WH,JT=XH,eC=ZH,tC=e$,tCe=JTe,nCe=r$,rCe=eCe,aCe=tC,a$=t=>{var e=t,{ref:n,className:r}=e,a=Mn(e,["ref","className"]);return A.jsx(x0,Qt({ref:n,className:Zt("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",r)},a))};a$.displayName=x0.displayName;var i$=t=>{var e=t,{ref:n,className:r,children:a,breakpoint:i="lg"}=e,o=Mn(e,["ref","className","children","breakpoint"]);return A.jsxs(rCe,{children:[A.jsx(a$,{}),A.jsxs(N0,Rr(Qt({ref:n,className:Zt("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%] fixed left-1/2 top-1/2 z-50 flex w-full max-w-[425px] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 rounded-lg border bg-background p-6 shadow-lg",r),"data-breakpoint":i},o),{children:[a,A.jsxs(tC,{className:"rounded-xs absolute right-[15px] top-[15px] opacity-70 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:[A.jsx(QG,{className:"size-4"}),A.jsx("span",{className:"sr-only",children:"Close"})]})]}))]})};i$.displayName=N0.displayName;var o$=({title:t,description:e,icon:n,breakpoint:r="lg","da-cid":a})=>!t&&!e&&!n?null:A.jsxs("div",{className:Zt("flex flex-col gap-4",r==="sm"&&"text-center"),"da-cid":a,children:[n&&A.jsx("div",{className:Zt("shadow-xs flex size-8 items-center justify-center rounded-sm border bg-background p-2 [&_svg]:size-4",r==="sm"&&"mx-auto"),children:n}),(t||e)&&A.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&A.jsx(JT,{className:"text-lg font-semibold leading-none text-foreground",children:t}),e&&A.jsx(eC,{className:"text-sm leading-5 text-muted-foreground",children:e})]})]});o$.displayName="DialogHeader";var jh=(t,e,n)=>{const r=A.jsx(Xn,{fullWidth:n,variant:t.isDestructive?"destructive":e,onClick:t.onClick,disabled:t.disabled||t.loading,label:t.label,startIcon:t.icon,type:t.type,form:t.form,isLoading:t.loading});return t.asDialogClose?A.jsx(aCe,{asChild:!0,children:r}):r},s$=({primary:t,secondary:e,tertiary:n,breakpoint:r="lg",children:a,"da-cid":i})=>!t&&!e&&!n&&!a?null:r==="lg"?A.jsxs("div",{className:"flex flex-col gap-6","da-cid":i,children:[a,(t||e||n)&&A.jsxs("div",{className:"flex items-center gap-6",children:[n&&jh(n,"ghost"),A.jsxs("div",{className:"flex flex-1 items-center justify-end gap-2",children:[e&&jh(e,"outline"),t&&jh(t,"default")]})]})]}):A.jsxs("div",{className:"flex flex-col gap-6","da-cid":i,children:[a,(t||e||n)&&A.jsxs("div",{className:"flex flex-col items-center gap-2",children:[A.jsxs("div",{className:"flex w-full items-center gap-2",children:[e&&A.jsx("div",{className:"flex-1",children:jh(e,"outline",!0)}),t&&A.jsx("div",{className:"flex-1",children:jh(t,"default",!0)})]}),n&&jh(n,"ghost")]})]});s$.displayName="DialogFooter";var l$={};function iCe(){var t;try{const e=l$==null?void 0:l$.env;if((e==null?void 0:e.DEV)===!0||(e==null?void 0:e.MODE)==="development"||(e==null?void 0:e.PROD)===!1)return!0}catch{}return typeof process<"u"&&((t=process==null?void 0:process.env)!=null&&t.NODE_ENV),!1}var oCe=class{constructor(t){Ch(this,"name"),this.name=t}debug(t,...e){console.debug(`[${this.name}] ${t}`,...e)}info(t,...e){console.info(`[${this.name}] ${t}`,...e)}warn(t,...e){console.warn(`[${this.name}] ${t}`,...e)}error(t,...e){console.error(`[${this.name}] ${t}`,...e)}},sCe=class{debug(t,...e){}info(t,...e){}warn(t,...e){}error(t,...e){}},pf=iCe()?new oCe("llama-ui"):new sCe;const Ba=[];for(let t=0;t<256;++t)Ba.push((t+256).toString(16).slice(1));function lCe(t,e=0){return(Ba[t[e+0]]+Ba[t[e+1]]+Ba[t[e+2]]+Ba[t[e+3]]+"-"+Ba[t[e+4]]+Ba[t[e+5]]+"-"+Ba[t[e+6]]+Ba[t[e+7]]+"-"+Ba[t[e+8]]+Ba[t[e+9]]+"-"+Ba[t[e+10]]+Ba[t[e+11]]+Ba[t[e+12]]+Ba[t[e+13]]+Ba[t[e+14]]+Ba[t[e+15]]).toLowerCase()}let pN;const cCe=new Uint8Array(16);function uCe(){if(!pN){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");pN=crypto.getRandomValues.bind(crypto)}return pN(cCe)}const c$={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function dCe(t,e,n){var a;t=t||{};const r=t.random??((a=t.rng)==null?void 0:a.call(t))??uCe();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,lCe(r)}function pCe(t,e,n){return c$.randomUUID&&!t?c$.randomUUID():dCe(t)}function eQe(){}function tQe(){}function u$(t){const e=[],n=String(t||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const o=n.slice(a,r).trim();(o||!i)&&e.push(o),a=r+1,r=n.indexOf(",",a)}return e}function fCe(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const mCe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hCe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gCe={};function d$(t,e){return(gCe.jsx?hCe:mCe).test(t)}const _Ce=/[ \t\n\f\r]/g;function bCe(t){return typeof t=="object"?t.type==="text"?p$(t.value):!1:p$(t)}function p$(t){return t.replace(_Ce,"")===""}class O0{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}O0.prototype.normal={},O0.prototype.property={},O0.prototype.space=void 0;function f$(t,e){const n={},r={};for(const a of t)Object.assign(n,a.property),Object.assign(r,a.normal);return new O0(n,r,e)}function I0(t){return t.toLowerCase()}class Di{constructor(e,n){this.attribute=n,this.property=e}}Di.prototype.attribute="",Di.prototype.booleanish=!1,Di.prototype.boolean=!1,Di.prototype.commaOrSpaceSeparated=!1,Di.prototype.commaSeparated=!1,Di.prototype.defined=!1,Di.prototype.mustUseProperty=!1,Di.prototype.number=!1,Di.prototype.overloadedBoolean=!1,Di.prototype.property="",Di.prototype.spaceSeparated=!1,Di.prototype.space=void 0;let ECe=0;const Yt=ff(),ta=ff(),fN=ff(),qe=ff(),lr=ff(),Wh=ff(),oo=ff();function ff(){return 2**++ECe}const mN=Object.freeze(Object.defineProperty({__proto__:null,boolean:Yt,booleanish:ta,commaOrSpaceSeparated:oo,commaSeparated:Wh,number:qe,overloadedBoolean:fN,spaceSeparated:lr},Symbol.toStringTag,{value:"Module"})),hN=Object.keys(mN);class gN extends Di{constructor(e,n,r,a){let i=-1;if(super(e,n),m$(this,"space",a),typeof r=="number")for(;++i<hN.length;){const o=hN[i];m$(this,hN[i],(r&mN[o])===mN[o])}}}gN.prototype.defined=!0;function m$(t,e,n){n&&(t[e]=n)}function Kh(t){const e={},n={};for(const[r,a]of Object.entries(t.properties)){const i=new gN(r,t.transform(t.attributes||{},r),a,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),e[r]=i,n[I0(r)]=r,n[I0(i.attribute)]=r}return new O0(e,n,t.space)}const h$=Kh({properties:{ariaActiveDescendant:null,ariaAtomic:ta,ariaAutoComplete:null,ariaBusy:ta,ariaChecked:ta,ariaColCount:qe,ariaColIndex:qe,ariaColSpan:qe,ariaControls:lr,ariaCurrent:null,ariaDescribedBy:lr,ariaDetails:null,ariaDisabled:ta,ariaDropEffect:lr,ariaErrorMessage:null,ariaExpanded:ta,ariaFlowTo:lr,ariaGrabbed:ta,ariaHasPopup:null,ariaHidden:ta,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lr,ariaLevel:qe,ariaLive:null,ariaModal:ta,ariaMultiLine:ta,ariaMultiSelectable:ta,ariaOrientation:null,ariaOwns:lr,ariaPlaceholder:null,ariaPosInSet:qe,ariaPressed:ta,ariaReadOnly:ta,ariaRelevant:null,ariaRequired:ta,ariaRoleDescription:lr,ariaRowCount:qe,ariaRowIndex:qe,ariaRowSpan:qe,ariaSelected:ta,ariaSetSize:qe,ariaSort:null,ariaValueMax:qe,ariaValueMin:qe,ariaValueNow:qe,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function g$(t,e){return e in t?t[e]:e}function _$(t,e){return g$(t,e.toLowerCase())}const SCe=Kh({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wh,acceptCharset:lr,accessKey:lr,action:null,allow:null,allowFullScreen:Yt,allowPaymentRequest:Yt,allowUserMedia:Yt,alt:null,as:null,async:Yt,autoCapitalize:null,autoComplete:lr,autoFocus:Yt,autoPlay:Yt,blocking:lr,capture:null,charSet:null,checked:Yt,cite:null,className:lr,cols:qe,colSpan:null,content:null,contentEditable:ta,controls:Yt,controlsList:lr,coords:qe|Wh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Yt,defer:Yt,dir:null,dirName:null,disabled:Yt,download:fN,draggable:ta,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Yt,formTarget:null,headers:lr,height:qe,hidden:fN,high:qe,href:null,hrefLang:null,htmlFor:lr,httpEquiv:lr,id:null,imageSizes:null,imageSrcSet:null,inert:Yt,inputMode:null,integrity:null,is:null,isMap:Yt,itemId:null,itemProp:lr,itemRef:lr,itemScope:Yt,itemType:lr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Yt,low:qe,manifest:null,max:null,maxLength:qe,media:null,method:null,min:null,minLength:qe,multiple:Yt,muted:Yt,name:null,nonce:null,noModule:Yt,noValidate:Yt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Yt,optimum:qe,pattern:null,ping:lr,placeholder:null,playsInline:Yt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Yt,referrerPolicy:null,rel:lr,required:Yt,reversed:Yt,rows:qe,rowSpan:qe,sandbox:lr,scope:null,scoped:Yt,seamless:Yt,selected:Yt,shadowRootClonable:Yt,shadowRootDelegatesFocus:Yt,shadowRootMode:null,shape:null,size:qe,sizes:null,slot:null,span:qe,spellCheck:ta,src:null,srcDoc:null,srcLang:null,srcSet:null,start:qe,step:null,style:null,tabIndex:qe,target:null,title:null,translate:null,type:null,typeMustMatch:Yt,useMap:null,value:ta,width:qe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lr,axis:null,background:null,bgColor:null,border:qe,borderColor:null,bottomMargin:qe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Yt,declare:Yt,event:null,face:null,frame:null,frameBorder:null,hSpace:qe,leftMargin:qe,link:null,longDesc:null,lowSrc:null,marginHeight:qe,marginWidth:qe,noResize:Yt,noHref:Yt,noShade:Yt,noWrap:Yt,object:null,profile:null,prompt:null,rev:null,rightMargin:qe,rules:null,scheme:null,scrolling:ta,standby:null,summary:null,text:null,topMargin:qe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:qe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Yt,disableRemotePlayback:Yt,prefix:null,property:null,results:qe,security:null,unselectable:null},space:"html",transform:_$}),vCe=Kh({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:oo,accentHeight:qe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:qe,amplitude:qe,arabicForm:null,ascent:qe,attributeName:null,attributeType:null,azimuth:qe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:qe,by:null,calcMode:null,capHeight:qe,className:lr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:qe,diffuseConstant:qe,direction:null,display:null,dur:null,divisor:qe,dominantBaseline:null,download:Yt,dx:null,dy:null,edgeMode:null,editable:null,elevation:qe,enableBackground:null,end:null,event:null,exponent:qe,externalResourcesRequired:null,fill:null,fillOpacity:qe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Wh,g2:Wh,glyphName:Wh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:qe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:qe,horizOriginX:qe,horizOriginY:qe,id:null,ideographic:qe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:qe,k:qe,k1:qe,k2:qe,k3:qe,k4:qe,kernelMatrix:oo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:qe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:qe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:qe,overlineThickness:qe,paintOrder:null,panose1:null,path:null,pathLength:qe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:qe,pointsAtY:qe,pointsAtZ:qe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oo,rev:oo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oo,requiredFeatures:oo,requiredFonts:oo,requiredFormats:oo,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:qe,specularExponent:qe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:qe,strikethroughThickness:qe,string:null,stroke:null,strokeDashArray:oo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:qe,strokeOpacity:qe,strokeWidth:null,style:null,surfaceScale:qe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oo,tabIndex:qe,tableValues:null,target:null,targetX:qe,targetY:qe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:qe,underlineThickness:qe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:qe,values:null,vAlphabetic:qe,vMathematical:qe,vectorEffect:null,vHanging:qe,vIdeographic:qe,version:null,vertAdvY:qe,vertOriginX:qe,vertOriginY:qe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:qe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:g$}),b$=Kh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),E$=Kh({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_$}),S$=Kh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),yCe={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},TCe=/[A-Z]/g,v$=/-[a-z]/g,CCe=/^data[-\w.:]+$/i;function y$(t,e){const n=I0(e);let r=e,a=Di;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&CCe.test(e)){if(e.charAt(4)==="-"){const i=e.slice(5).replace(v$,RCe);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=e.slice(4);if(!v$.test(i)){let o=i.replace(TCe,ACe);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}a=gN}return new a(r,e)}function ACe(t){return"-"+t.toLowerCase()}function RCe(t){return t.charAt(1).toUpperCase()}const T$=f$([h$,SCe,b$,E$,S$],"html"),nC=f$([h$,vCe,b$,E$,S$],"svg");function C$(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function wCe(t){return t.join(" ").trim()}var Xh={},_N,A$;function xCe(){if(A$)return _N;A$=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
297
297
  `,u="/",d="*",f="",m="comment",h="declaration";_N=function(b,v){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];v=v||{};var y=1,C=1;function T(Q){var U=Q.match(e);U&&(y+=U.length);var K=Q.lastIndexOf(l);C=~K?Q.length-K:C+Q.length}function w(){var Q={line:y,column:C};return function(U){return U.position=new O(Q),M(),U}}function O(Q){this.start=Q,this.end={line:y,column:C},this.source=v.source}O.prototype.content=b;function x(Q){var U=new Error(v.source+":"+y+":"+C+": "+Q);if(U.reason=Q,U.filename=v.source,U.line=y,U.column=C,U.source=b,!v.silent)throw U}function D(Q){var U=Q.exec(b);if(U){var K=U[0];return T(K),b=b.slice(K.length),U}}function M(){D(n)}function F(Q){var U;for(Q=Q||[];U=P();)U!==!1&&Q.push(U);return Q}function P(){var Q=w();if(!(u!=b.charAt(0)||d!=b.charAt(1))){for(var U=2;f!=b.charAt(U)&&(d!=b.charAt(U)||u!=b.charAt(U+1));)++U;if(U+=2,f===b.charAt(U-1))return x("End of comment missing");var K=b.slice(2,U-2);return C+=2,T(K),b=b.slice(U),C+=2,Q({type:m,comment:K})}}function q(){var Q=w(),U=D(r);if(U){if(P(),!D(a))return x("property missing ':'");var K=D(i),G=Q({type:h,property:E(U[0].replace(t,f)),value:K?E(K[0].replace(t,f)):f});return D(o),G}}function j(){var Q=[];F(Q);for(var U;U=q();)U!==!1&&(Q.push(U),F(Q));return Q}return M(),j()};function E(b){return b?b.replace(s,f):f}return _N}var R$;function NCe(){if(R$)return Xh;R$=1;var t=Xh&&Xh.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xh,"__esModule",{value:!0}),Xh.default=n;const e=t(xCe());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const o=(0,e.default)(r),s=typeof a=="function";return o.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:d}=l;s?a(u,d,l):d&&(i=i||{},i[u]=d)}),i}return Xh}var D0={},w$;function OCe(){if(w$)return D0;w$=1,Object.defineProperty(D0,"__esModule",{value:!0}),D0.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(u){return!u||n.test(u)||t.test(u)},o=function(u,d){return d.toUpperCase()},s=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),i(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(a,s):u=u.replace(r,s),u.replace(e,o))};return D0.camelCase=l,D0}var k0,x$;function ICe(){if(x$)return k0;x$=1;var t=k0&&k0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},e=t(NCe()),n=OCe();function r(a,i){var o={};return!a||typeof a!="string"||(0,e.default)(a,function(s,l){s&&l&&(o[(0,n.camelCase)(s,i)]=l)}),o}return r.default=r,k0=r,k0}var DCe=ICe();const kCe=no(DCe),N$=O$("end"),bN=O$("start");function O$(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function MCe(t){const e=bN(t),n=N$(t);if(e&&n)return{start:e,end:n}}function M0(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?I$(t.position):"start"in t||"end"in t?I$(t):"line"in t||"column"in t?EN(t):""}function EN(t){return D$(t&&t.line)+":"+D$(t&&t.column)}function I$(t){return EN(t&&t.start)+"-"+EN(t&&t.end)}function D$(t){return t&&typeof t=="number"?t:1}class ti extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},o=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof e=="string"?a=e:!i.cause&&e&&(o=!0,a=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=s?s.line:void 0,this.name=M0(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ti.prototype.file="",ti.prototype.name="",ti.prototype.reason="",ti.prototype.message="",ti.prototype.stack="",ti.prototype.column=void 0,ti.prototype.line=void 0,ti.prototype.ancestors=void 0,ti.prototype.cause=void 0,ti.prototype.fatal=void 0,ti.prototype.place=void 0,ti.prototype.ruleId=void 0,ti.prototype.source=void 0;const SN={}.hasOwnProperty,LCe=new Map,PCe=/[A-Z]/g,FCe=new Set(["table","tbody","thead","tfoot","tr"]),BCe=new Set(["td","th"]),k$="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function UCe(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=jCe(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=VCe(n,e.jsx,e.jsxs)}const a={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?nC:T$,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},i=M$(a,t,void 0);return i&&typeof i!="string"?i:a.create(t,a.Fragment,{children:i||void 0},void 0)}function M$(t,e,n){if(e.type==="element")return GCe(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return zCe(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return HCe(t,e,n);if(e.type==="mdxjsEsm")return qCe(t,e);if(e.type==="root")return $Ce(t,e,n);if(e.type==="text")return YCe(t,e)}function GCe(t,e,n){const r=t.schema;let a=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=nC,t.schema=a),t.ancestors.push(e);const i=P$(t,e.tagName,!1),o=WCe(t,e);let s=yN(t,e);return FCe.has(e.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!bCe(l):!0})),L$(t,o,i,e),vN(o,s),t.ancestors.pop(),t.schema=r,t.create(e,i,o,n)}function zCe(t,e){if(e.data&&e.data.estree&&t.evaluater){const r=e.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}L0(t,e.position)}function qCe(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);L0(t,e.position)}function HCe(t,e,n){const r=t.schema;let a=r;e.name==="svg"&&r.space==="html"&&(a=nC,t.schema=a),t.ancestors.push(e);const i=e.name===null?t.Fragment:P$(t,e.name,!0),o=KCe(t,e),s=yN(t,e);return L$(t,o,i,e),vN(o,s),t.ancestors.pop(),t.schema=r,t.create(e,i,o,n)}function $Ce(t,e,n){const r={};return vN(r,yN(t,e)),t.create(e,t.Fragment,r,n)}function YCe(t,e){return e.value}function L$(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function vN(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function VCe(t,e,n){return r;function r(a,i,o,s){const u=Array.isArray(o.children)?n:e;return s?u(i,o,s):u(i,o)}}function jCe(t,e){return n;function n(r,a,i,o){const s=Array.isArray(i.children),l=bN(r);return e(a,i,o,s,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function WCe(t,e){const n={};let r,a;for(a in e.properties)if(a!=="children"&&SN.call(e.properties,a)){const i=XCe(t,a,e.properties[a]);if(i){const[o,s]=i;t.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&BCe.has(e.tagName)?r=s:n[o]=s}}if(r){const i=n.style||(n.style={});i[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function KCe(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const i=r.data.estree.body[0];i.type;const o=i.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,t.evaluater.evaluateExpression(s.argument))}else L0(t,e.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const s=r.value.data.estree.body[0];s.type,i=t.evaluater.evaluateExpression(s.expression)}else L0(t,e.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function yN(t,e){const n=[];let r=-1;const a=t.passKeys?new Map:LCe;for(;++r<e.children.length;){const i=e.children[r];let o;if(t.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const u=a.get(l)||0;o=l+"-"+u,a.set(l,u+1)}}const s=M$(t,i,o);s!==void 0&&n.push(s)}return n}function XCe(t,e,n){const r=y$(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?fCe(n):wCe(n)),r.property==="style"){let a=typeof n=="object"?n:QCe(t,String(n));return t.stylePropertyNameCase==="css"&&(a=ZCe(a)),["style",a]}return[t.elementAttributeNameCase==="react"&&r.space?yCe[r.property]||r.property:r.attribute,n]}}function QCe(t,e){try{return kCe(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const r=n,a=new ti("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=t.filePath||void 0,a.url=k$+"#cannot-parse-style-attribute",a}}function P$(t,e,n){let r;if(!n)r={type:"Literal",value:e};else if(e.includes(".")){const a=e.split(".");let i=-1,o;for(;++i<a.length;){const s=d$(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=o}else r=d$(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const a=r.value;return SN.call(t.components,a)?t.components[a]:a}if(t.evaluater)return t.evaluater.evaluateExpression(r);L0(t)}function L0(t,e){const n=new ti("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=k$+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ZCe(t){const e={};let n;for(n in t)SN.call(t,n)&&(e[JCe(n)]=t[n]);return e}function JCe(t){let e=t.replace(PCe,eAe);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function eAe(t){return"-"+t.toLowerCase()}const TN={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},tAe={};function CN(t,e){const n=tAe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return F$(t,r,a)}function F$(t,e,n){if(nAe(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return B$(t.children,e,n)}return Array.isArray(t)?B$(t,e,n):""}function B$(t,e,n){const r=[];let a=-1;for(;++a<t.length;)r[a]=F$(t[a],e,n);return r.join("")}function nAe(t){return!!(t&&typeof t=="object")}const U$=document.createElement("i");function AN(t){const e="&"+t+";";U$.innerHTML=e;const n=U$.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function so(t,e,n,r){const a=t.length;let i=0,o;if(e<0?e=-e>a?0:a+e:e=e>a?a:e,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(e,n),t.splice(...o);else for(n&&t.splice(e,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(e,0),t.splice(...o),i+=1e4,e+=1e4}function Zo(t,e){return t.length>0?(so(t,t.length,0,e),t):e}const G$={}.hasOwnProperty;function z$(t){const e={};let n=-1;for(;++n<t.length;)rAe(e,t[n]);return e}function rAe(t,e){let n;for(n in e){const a=(G$.call(t,n)?t[n]:void 0)||(t[n]={}),i=e[n];let o;if(i)for(o in i){G$.call(a,o)||(a[o]=[]);const s=i[o];aAe(a[o],Array.isArray(s)?s:s?[s]:[])}}}function aAe(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);so(t,0,0,r)}function q$(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function qs(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gi=fd(/[A-Za-z]/),ni=fd(/[\dA-Za-z]/),iAe=fd(/[#-'*+\--9=?A-Z^-~]/);function rC(t){return t!==null&&(t<32||t===127)}const RN=fd(/\d/),oAe=fd(/[\dA-Fa-f]/),sAe=fd(/[!-/:-@[-`{-~]/);function bt(t){return t!==null&&t<-2}function Zn(t){return t!==null&&(t<0||t===32)}function on(t){return t===-2||t===-1||t===32}const aC=fd(new RegExp("\\p{P}|\\p{S}","u")),mf=fd(/\s/);function fd(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Qh(t){const e=[];let n=-1,r=0,a=0;for(;++n<t.length;){const i=t.charCodeAt(n);let o="";if(i===37&&ni(t.charCodeAt(n+1))&&ni(t.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){const s=t.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(o=String.fromCharCode(i,s),a=1):o="�"}else o=String.fromCharCode(i);o&&(e.push(t.slice(r,n),encodeURIComponent(o)),r=n+a+1,o=""),a&&(n+=a,a=0)}return e.join("")+t.slice(r)}function rn(t,e,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return o;function o(l){return on(l)?(t.enter(n),s(l)):e(l)}function s(l){return on(l)&&i++<a?(t.consume(l),s):(t.exit(n),e(l))}}const lAe={tokenize:cAe};function cAe(t){const e=t.attempt(this.parser.constructs.contentInitial,r,a);let n;return e;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),rn(t,e,"linePrefix")}function a(s){return t.enter("paragraph"),i(s)}function i(s){const l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(s)}function o(s){if(s===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(s);return}return bt(s)?(t.consume(s),t.exit("chunkText"),i):(t.consume(s),o)}}const uAe={tokenize:dAe},H$={tokenize:pAe};function dAe(t){const e=this,n=[];let r=0,a,i,o;return s;function s(T){if(r<n.length){const w=n[r];return e.containerState=w[1],t.attempt(w[0].continuation,l,u)(T)}return u(T)}function l(T){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,a&&C();const w=e.events.length;let O=w,x;for(;O--;)if(e.events[O][0]==="exit"&&e.events[O][1].type==="chunkFlow"){x=e.events[O][1].end;break}y(r);let D=w;for(;D<e.events.length;)e.events[D][1].end={...x},D++;return so(e.events,O+1,0,e.events.slice(w)),e.events.length=D,u(T)}return s(T)}function u(T){if(r===n.length){if(!a)return m(T);if(a.currentConstruct&&a.currentConstruct.concrete)return E(T);e.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(H$,d,f)(T)}function d(T){return a&&C(),y(r),m(T)}function f(T){return e.parser.lazy[e.now().line]=r!==n.length,o=e.now().offset,E(T)}function m(T){return e.containerState={},t.attempt(H$,h,E)(T)}function h(T){return r++,n.push([e.currentConstruct,e.containerState]),m(T)}function E(T){if(T===null){a&&C(),y(0),t.consume(T);return}return a=a||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),b(T)}function b(T){if(T===null){v(t.exit("chunkFlow"),!0),y(0),t.consume(T);return}return bt(T)?(t.consume(T),v(t.exit("chunkFlow")),r=0,e.interrupt=void 0,s):(t.consume(T),b)}function v(T,w){const O=e.sliceStream(T);if(w&&O.push(null),T.previous=i,i&&(i.next=T),i=T,a.defineSkip(T.start),a.write(O),e.parser.lazy[T.start.line]){let x=a.events.length;for(;x--;)if(a.events[x][1].start.offset<o&&(!a.events[x][1].end||a.events[x][1].end.offset>o))return;const D=e.events.length;let M=D,F,P;for(;M--;)if(e.events[M][0]==="exit"&&e.events[M][1].type==="chunkFlow"){if(F){P=e.events[M][1].end;break}F=!0}for(y(r),x=D;x<e.events.length;)e.events[x][1].end={...P},x++;so(e.events,M+1,0,e.events.slice(D)),e.events.length=x}}function y(T){let w=n.length;for(;w-- >T;){const O=n[w];e.containerState=O[1],O[0].exit.call(e,t)}n.length=T}function C(){a.write([null]),i=void 0,a=void 0,e.containerState._closeFlow=void 0}}function pAe(t,e,n){return rn(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zh(t){if(t===null||Zn(t)||mf(t))return 1;if(aC(t))return 2}function iC(t,e,n){const r=[];let a=-1;for(;++a<t.length;){const i=t[a].resolveAll;i&&!r.includes(i)&&(e=i(e,n),r.push(i))}return e}const wN={name:"attention",resolveAll:fAe,tokenize:mAe};function fAe(t,e){let n=-1,r,a,i,o,s,l,u,d;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f={...t[r][1].end},m={...t[n][1].start};$$(f,-l),$$(m,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:m},i={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},a={type:l>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},t[r][1].end={...o.start},t[n][1].start={...s.end},u=[],t[r][1].end.offset-t[r][1].start.offset&&(u=Zo(u,[["enter",t[r][1],e],["exit",t[r][1],e]])),u=Zo(u,[["enter",a,e],["enter",o,e],["exit",o,e],["enter",i,e]]),u=Zo(u,iC(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),u=Zo(u,[["exit",i,e],["enter",s,e],["exit",s,e],["exit",a,e]]),t[n][1].end.offset-t[n][1].start.offset?(d=2,u=Zo(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):d=0,so(t,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function mAe(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Zh(r);let i;return o;function o(l){return i=l,t.enter("attentionSequence"),s(l)}function s(l){if(l===i)return t.consume(l),s;const u=t.exit("attentionSequence"),d=Zh(l),f=!d||d===2&&a||n.includes(l),m=!a||a===2&&d||n.includes(r);return u._open=!!(i===42?f:f&&(a||!m)),u._close=!!(i===42?m:m&&(d||!f)),e(l)}}function $$(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const hAe={name:"autolink",tokenize:gAe};function gAe(t,e,n){let r=0;return a;function a(h){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),i}function i(h){return gi(h)?(t.consume(h),o):h===64?n(h):u(h)}function o(h){return h===43||h===45||h===46||ni(h)?(r=1,s(h)):u(h)}function s(h){return h===58?(t.consume(h),r=0,l):(h===43||h===45||h===46||ni(h))&&r++<32?(t.consume(h),s):(r=0,u(h))}function l(h){return h===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):h===null||h===32||h===60||rC(h)?n(h):(t.consume(h),l)}function u(h){return h===64?(t.consume(h),d):iAe(h)?(t.consume(h),u):n(h)}function d(h){return ni(h)?f(h):n(h)}function f(h){return h===46?(t.consume(h),r=0,d):h===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):m(h)}function m(h){if((h===45||ni(h))&&r++<63){const E=h===45?m:f;return t.consume(h),E}return n(h)}}const P0={partial:!0,tokenize:_Ae};function _Ae(t,e,n){return r;function r(i){return on(i)?rn(t,a,"linePrefix")(i):a(i)}function a(i){return i===null||bt(i)?e(i):n(i)}}const Y$={continuation:{tokenize:EAe},exit:SAe,name:"blockQuote",tokenize:bAe};function bAe(t,e,n){const r=this;return a;function a(o){if(o===62){const s=r.containerState;return s.open||(t.enter("blockQuote",{_container:!0}),s.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(o),t.exit("blockQuoteMarker"),i}return n(o)}function i(o){return on(o)?(t.enter("blockQuotePrefixWhitespace"),t.consume(o),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(o))}}function EAe(t,e,n){const r=this;return a;function a(o){return on(o)?rn(t,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):i(o)}function i(o){return t.attempt(Y$,e,n)(o)}}function SAe(t){t.exit("blockQuote")}const V$={name:"characterEscape",tokenize:vAe};function vAe(t,e,n){return r;function r(i){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(i),t.exit("escapeMarker"),a}function a(i){return sAe(i)?(t.enter("characterEscapeValue"),t.consume(i),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(i)}}const j$={name:"characterReference",tokenize:yAe};function yAe(t,e,n){const r=this;let a=0,i,o;return s;function s(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),l}function l(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),u):(t.enter("characterReferenceValue"),i=31,o=ni,d(f))}function u(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),i=6,o=oAe,d):(t.enter("characterReferenceValue"),i=7,o=RN,d(f))}function d(f){if(f===59&&a){const m=t.exit("characterReferenceValue");return o===ni&&!AN(r.sliceSerialize(m))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return o(f)&&a++<i?(t.consume(f),d):n(f)}}const W$={partial:!0,tokenize:CAe},K$={concrete:!0,name:"codeFenced",tokenize:TAe};function TAe(t,e,n){const r=this,a={partial:!0,tokenize:O};let i=0,o=0,s;return l;function l(x){return u(x)}function u(x){const D=r.events[r.events.length-1];return i=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,s=x,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),d(x)}function d(x){return x===s?(o++,t.consume(x),d):o<3?n(x):(t.exit("codeFencedFenceSequence"),on(x)?rn(t,f,"whitespace")(x):f(x))}function f(x){return x===null||bt(x)?(t.exit("codeFencedFence"),r.interrupt?e(x):t.check(W$,b,w)(x)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||bt(x)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(x)):on(x)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),rn(t,h,"whitespace")(x)):x===96&&x===s?n(x):(t.consume(x),m)}function h(x){return x===null||bt(x)?f(x):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),E(x))}function E(x){return x===null||bt(x)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(x)):x===96&&x===s?n(x):(t.consume(x),E)}function b(x){return t.attempt(a,w,v)(x)}function v(x){return t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),y}function y(x){return i>0&&on(x)?rn(t,C,"linePrefix",i+1)(x):C(x)}function C(x){return x===null||bt(x)?t.check(W$,b,w)(x):(t.enter("codeFlowValue"),T(x))}function T(x){return x===null||bt(x)?(t.exit("codeFlowValue"),C(x)):(t.consume(x),T)}function w(x){return t.exit("codeFenced"),e(x)}function O(x,D,M){let F=0;return P;function P(K){return x.enter("lineEnding"),x.consume(K),x.exit("lineEnding"),q}function q(K){return x.enter("codeFencedFence"),on(K)?rn(x,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):j(K)}function j(K){return K===s?(x.enter("codeFencedFenceSequence"),Q(K)):M(K)}function Q(K){return K===s?(F++,x.consume(K),Q):F>=o?(x.exit("codeFencedFenceSequence"),on(K)?rn(x,U,"whitespace")(K):U(K)):M(K)}function U(K){return K===null||bt(K)?(x.exit("codeFencedFence"),D(K)):M(K)}}}function CAe(t,e,n){const r=this;return a;function a(o){return o===null?n(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i)}function i(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}const xN={name:"codeIndented",tokenize:RAe},AAe={partial:!0,tokenize:wAe};function RAe(t,e,n){const r=this;return a;function a(u){return t.enter("codeIndented"),rn(t,i,"linePrefix",5)(u)}function i(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):bt(u)?t.attempt(AAe,o,l)(u):(t.enter("codeFlowValue"),s(u))}function s(u){return u===null||bt(u)?(t.exit("codeFlowValue"),o(u)):(t.consume(u),s)}function l(u){return t.exit("codeIndented"),e(u)}}function wAe(t,e,n){const r=this;return a;function a(o){return r.parser.lazy[r.now().line]?n(o):bt(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),a):rn(t,i,"linePrefix",5)(o)}function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(o):bt(o)?a(o):n(o)}}const xAe={name:"codeText",previous:OAe,resolve:NAe,tokenize:IAe};function NAe(t){let e=t.length-4,n=3,r,a;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)a===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(a=r):(r===e||t[r][1].type==="lineEnding")&&(t[a][1].type="codeTextData",r!==a+2&&(t[a][1].end=t[r-1][1].end,t.splice(a+2,r-a-2),e-=r-a-2,r=a+2),a=void 0);return t}function OAe(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function IAe(t,e,n){let r=0,a,i;return o;function o(f){return t.enter("codeText"),t.enter("codeTextSequence"),s(f)}function s(f){return f===96?(t.consume(f),r++,s):(t.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),l):f===96?(i=t.enter("codeTextSequence"),a=0,d(f)):bt(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),l):(t.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||bt(f)?(t.exit("codeTextData"),l(f)):(t.consume(f),u)}function d(f){return f===96?(t.consume(f),a++,d):a===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(i.type="codeTextData",u(f))}}class DAe{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const a=n||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&F0(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),F0(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),F0(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);F0(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);F0(this.left,n.reverse())}}}function F0(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function X$(t){const e={};let n=-1,r,a,i,o,s,l,u;const d=new DAe(t);for(;++n<d.length;){for(;n in e;)n=e[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,kAe(d,n)),n=e[n],u=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(o=d.get(i),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(a&&(d.get(a)[1].type="lineEndingBlank"),o[1].type="lineEnding",a=i);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;a&&(r[1].end={...d.get(a)[1].start},s=d.slice(a,n),s.unshift(r),d.splice(a,n-a+1,s))}}return so(t,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function kAe(t,e){const n=t.get(e)[1],r=t.get(e)[2];let a=e-1;const i=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,l=[],u={};let d,f,m=-1,h=n,E=0,b=0;const v=[b];for(;h;){for(;t.get(++a)[1]!==h;);i.push(a),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),f&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++m<s.length;)s[m][0]==="exit"&&s[m-1][0]==="enter"&&s[m][1].type===s[m-1][1].type&&s[m][1].start.line!==s[m][1].end.line&&(b=m+1,v.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):v.pop(),m=v.length;m--;){const y=s.slice(v[m],v[m+1]),C=i.pop();l.push([C,C+y.length-1]),t.splice(C,2,y)}for(l.reverse(),m=-1;++m<l.length;)u[E+l[m][0]]=E+l[m][1],E+=l[m][1]-l[m][0]-1;return u}const MAe={resolve:PAe,tokenize:FAe},LAe={partial:!0,tokenize:BAe};function PAe(t){return X$(t),t}function FAe(t,e){let n;return r;function r(s){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),a(s)}function a(s){return s===null?i(s):bt(s)?t.check(LAe,o,i)(s):(t.consume(s),a)}function i(s){return t.exit("chunkContent"),t.exit("content"),e(s)}function o(s){return t.consume(s),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function BAe(t,e,n){const r=this;return a;function a(o){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),rn(t,i,"linePrefix")}function i(o){if(o===null||bt(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(o):t.interrupt(r.parser.constructs.flow,n,e)(o)}}function Q$(t,e,n,r,a,i,o,s,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return f;function f(y){return y===60?(t.enter(r),t.enter(a),t.enter(i),t.consume(y),t.exit(i),m):y===null||y===32||y===41||rC(y)?n(y):(t.enter(r),t.enter(o),t.enter(s),t.enter("chunkString",{contentType:"string"}),b(y))}function m(y){return y===62?(t.enter(i),t.consume(y),t.exit(i),t.exit(a),t.exit(r),e):(t.enter(s),t.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(t.exit("chunkString"),t.exit(s),m(y)):y===null||y===60||bt(y)?n(y):(t.consume(y),y===92?E:h)}function E(y){return y===60||y===62||y===92?(t.consume(y),h):h(y)}function b(y){return!d&&(y===null||y===41||Zn(y))?(t.exit("chunkString"),t.exit(s),t.exit(o),t.exit(r),e(y)):d<u&&y===40?(t.consume(y),d++,b):y===41?(t.consume(y),d--,b):y===null||y===32||y===40||rC(y)?n(y):(t.consume(y),y===92?v:b)}function v(y){return y===40||y===41||y===92?(t.consume(y),b):b(y)}}function Z$(t,e,n,r,a,i){const o=this;let s=0,l;return u;function u(h){return t.enter(r),t.enter(a),t.consume(h),t.exit(a),t.enter(i),d}function d(h){return s>999||h===null||h===91||h===93&&!l||h===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):h===93?(t.exit(i),t.enter(a),t.consume(h),t.exit(a),t.exit(r),e):bt(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),d):(t.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||bt(h)||s++>999?(t.exit("chunkString"),d(h)):(t.consume(h),l||(l=!on(h)),h===92?m:f)}function m(h){return h===91||h===92||h===93?(t.consume(h),s++,f):f(h)}}function J$(t,e,n,r,a,i){let o;return s;function s(m){return m===34||m===39||m===40?(t.enter(r),t.enter(a),t.consume(m),t.exit(a),o=m===40?41:m,l):n(m)}function l(m){return m===o?(t.enter(a),t.consume(m),t.exit(a),t.exit(r),e):(t.enter(i),u(m))}function u(m){return m===o?(t.exit(i),l(o)):m===null?n(m):bt(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),rn(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===o||m===null||bt(m)?(t.exit("chunkString"),u(m)):(t.consume(m),m===92?f:d)}function f(m){return m===o||m===92?(t.consume(m),d):d(m)}}function B0(t,e){let n;return r;function r(a){return bt(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),n=!0,r):on(a)?rn(t,r,n?"linePrefix":"lineSuffix")(a):e(a)}}const UAe={name:"definition",tokenize:zAe},GAe={partial:!0,tokenize:qAe};function zAe(t,e,n){const r=this;let a;return i;function i(h){return t.enter("definition"),o(h)}function o(h){return Z$.call(r,t,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return a=qs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),l):n(h)}function l(h){return Zn(h)?B0(t,u)(h):u(h)}function u(h){return Q$(t,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return t.attempt(GAe,f,f)(h)}function f(h){return on(h)?rn(t,m,"whitespace")(h):m(h)}function m(h){return h===null||bt(h)?(t.exit("definition"),r.parser.defined.push(a),e(h)):n(h)}}function qAe(t,e,n){return r;function r(s){return Zn(s)?B0(t,a)(s):n(s)}function a(s){return J$(t,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return on(s)?rn(t,o,"whitespace")(s):o(s)}function o(s){return s===null||bt(s)?e(s):n(s)}}const HAe={name:"hardBreakEscape",tokenize:$Ae};function $Ae(t,e,n){return r;function r(i){return t.enter("hardBreakEscape"),t.consume(i),a}function a(i){return bt(i)?(t.exit("hardBreakEscape"),e(i)):n(i)}}const YAe={name:"headingAtx",resolve:VAe,tokenize:jAe};function VAe(t,e){let n=t.length-2,r=3,a,i;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},i={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},so(t,r,n-r+1,[["enter",a,e],["enter",i,e],["exit",i,e],["exit",a,e]])),t}function jAe(t,e,n){let r=0;return a;function a(d){return t.enter("atxHeading"),i(d)}function i(d){return t.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(t.consume(d),o):d===null||Zn(d)?(t.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(t.enter("atxHeadingSequence"),l(d)):d===null||bt(d)?(t.exit("atxHeading"),e(d)):on(d)?rn(t,s,"whitespace")(d):(t.enter("atxHeadingText"),u(d))}function l(d){return d===35?(t.consume(d),l):(t.exit("atxHeadingSequence"),s(d))}function u(d){return d===null||d===35||Zn(d)?(t.exit("atxHeadingText"),s(d)):(t.consume(d),u)}}const WAe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],eY=["pre","script","style","textarea"],KAe={concrete:!0,name:"htmlFlow",resolveTo:ZAe,tokenize:JAe},XAe={partial:!0,tokenize:tRe},QAe={partial:!0,tokenize:eRe};function ZAe(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function JAe(t,e,n){const r=this;let a,i,o,s,l;return u;function u(B){return d(B)}function d(B){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(B),f}function f(B){return B===33?(t.consume(B),m):B===47?(t.consume(B),i=!0,b):B===63?(t.consume(B),a=3,r.interrupt?e:$):gi(B)?(t.consume(B),o=String.fromCharCode(B),v):n(B)}function m(B){return B===45?(t.consume(B),a=2,h):B===91?(t.consume(B),a=5,s=0,E):gi(B)?(t.consume(B),a=4,r.interrupt?e:$):n(B)}function h(B){return B===45?(t.consume(B),r.interrupt?e:$):n(B)}function E(B){const ae="CDATA[";return B===ae.charCodeAt(s++)?(t.consume(B),s===ae.length?r.interrupt?e:j:E):n(B)}function b(B){return gi(B)?(t.consume(B),o=String.fromCharCode(B),v):n(B)}function v(B){if(B===null||B===47||B===62||Zn(B)){const ae=B===47,se=o.toLowerCase();return!ae&&!i&&eY.includes(se)?(a=1,r.interrupt?e(B):j(B)):WAe.includes(o.toLowerCase())?(a=6,ae?(t.consume(B),y):r.interrupt?e(B):j(B)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(B):i?C(B):T(B))}return B===45||ni(B)?(t.consume(B),o+=String.fromCharCode(B),v):n(B)}function y(B){return B===62?(t.consume(B),r.interrupt?e:j):n(B)}function C(B){return on(B)?(t.consume(B),C):P(B)}function T(B){return B===47?(t.consume(B),P):B===58||B===95||gi(B)?(t.consume(B),w):on(B)?(t.consume(B),T):P(B)}function w(B){return B===45||B===46||B===58||B===95||ni(B)?(t.consume(B),w):O(B)}function O(B){return B===61?(t.consume(B),x):on(B)?(t.consume(B),O):T(B)}function x(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(t.consume(B),l=B,D):on(B)?(t.consume(B),x):M(B)}function D(B){return B===l?(t.consume(B),l=null,F):B===null||bt(B)?n(B):(t.consume(B),D)}function M(B){return B===null||B===34||B===39||B===47||B===60||B===61||B===62||B===96||Zn(B)?O(B):(t.consume(B),M)}function F(B){return B===47||B===62||on(B)?T(B):n(B)}function P(B){return B===62?(t.consume(B),q):n(B)}function q(B){return B===null||bt(B)?j(B):on(B)?(t.consume(B),q):n(B)}function j(B){return B===45&&a===2?(t.consume(B),G):B===60&&a===1?(t.consume(B),Y):B===62&&a===4?(t.consume(B),Z):B===63&&a===3?(t.consume(B),$):B===93&&a===5?(t.consume(B),J):bt(B)&&(a===6||a===7)?(t.exit("htmlFlowData"),t.check(XAe,te,Q)(B)):B===null||bt(B)?(t.exit("htmlFlowData"),Q(B)):(t.consume(B),j)}function Q(B){return t.check(QAe,U,te)(B)}function U(B){return t.enter("lineEnding"),t.consume(B),t.exit("lineEnding"),K}function K(B){return B===null||bt(B)?Q(B):(t.enter("htmlFlowData"),j(B))}function G(B){return B===45?(t.consume(B),$):j(B)}function Y(B){return B===47?(t.consume(B),o="",W):j(B)}function W(B){if(B===62){const ae=o.toLowerCase();return eY.includes(ae)?(t.consume(B),Z):j(B)}return gi(B)&&o.length<8?(t.consume(B),o+=String.fromCharCode(B),W):j(B)}function J(B){return B===93?(t.consume(B),$):j(B)}function $(B){return B===62?(t.consume(B),Z):B===45&&a===2?(t.consume(B),$):j(B)}function Z(B){return B===null||bt(B)?(t.exit("htmlFlowData"),te(B)):(t.consume(B),Z)}function te(B){return t.exit("htmlFlow"),e(B)}}function eRe(t,e,n){const r=this;return a;function a(o){return bt(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i):n(o)}function i(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}function tRe(t,e,n){return r;function r(a){return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),t.attempt(P0,e,n)}}const nRe={name:"htmlText",tokenize:rRe};function rRe(t,e,n){const r=this;let a,i,o;return s;function s($){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume($),l}function l($){return $===33?(t.consume($),u):$===47?(t.consume($),O):$===63?(t.consume($),T):gi($)?(t.consume($),M):n($)}function u($){return $===45?(t.consume($),d):$===91?(t.consume($),i=0,E):gi($)?(t.consume($),C):n($)}function d($){return $===45?(t.consume($),h):n($)}function f($){return $===null?n($):$===45?(t.consume($),m):bt($)?(o=f,Y($)):(t.consume($),f)}function m($){return $===45?(t.consume($),h):f($)}function h($){return $===62?G($):$===45?m($):f($)}function E($){const Z="CDATA[";return $===Z.charCodeAt(i++)?(t.consume($),i===Z.length?b:E):n($)}function b($){return $===null?n($):$===93?(t.consume($),v):bt($)?(o=b,Y($)):(t.consume($),b)}function v($){return $===93?(t.consume($),y):b($)}function y($){return $===62?G($):$===93?(t.consume($),y):b($)}function C($){return $===null||$===62?G($):bt($)?(o=C,Y($)):(t.consume($),C)}function T($){return $===null?n($):$===63?(t.consume($),w):bt($)?(o=T,Y($)):(t.consume($),T)}function w($){return $===62?G($):T($)}function O($){return gi($)?(t.consume($),x):n($)}function x($){return $===45||ni($)?(t.consume($),x):D($)}function D($){return bt($)?(o=D,Y($)):on($)?(t.consume($),D):G($)}function M($){return $===45||ni($)?(t.consume($),M):$===47||$===62||Zn($)?F($):n($)}function F($){return $===47?(t.consume($),G):$===58||$===95||gi($)?(t.consume($),P):bt($)?(o=F,Y($)):on($)?(t.consume($),F):G($)}function P($){return $===45||$===46||$===58||$===95||ni($)?(t.consume($),P):q($)}function q($){return $===61?(t.consume($),j):bt($)?(o=q,Y($)):on($)?(t.consume($),q):F($)}function j($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(t.consume($),a=$,Q):bt($)?(o=j,Y($)):on($)?(t.consume($),j):(t.consume($),U)}function Q($){return $===a?(t.consume($),a=void 0,K):$===null?n($):bt($)?(o=Q,Y($)):(t.consume($),Q)}function U($){return $===null||$===34||$===39||$===60||$===61||$===96?n($):$===47||$===62||Zn($)?F($):(t.consume($),U)}function K($){return $===47||$===62||Zn($)?F($):n($)}function G($){return $===62?(t.consume($),t.exit("htmlTextData"),t.exit("htmlText"),e):n($)}function Y($){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume($),t.exit("lineEnding"),W}function W($){return on($)?rn(t,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):J($)}function J($){return t.enter("htmlTextData"),o($)}}const NN={name:"labelEnd",resolveAll:sRe,resolveTo:lRe,tokenize:cRe},aRe={tokenize:uRe},iRe={tokenize:dRe},oRe={tokenize:pRe};function sRe(t){let e=-1;const n=[];for(;++e<t.length;){const r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",e+=a}}return t.length!==n.length&&so(t,0,t.length,n),t}function lRe(t,e){let n=t.length,r=0,a,i,o,s;for(;n--;)if(a=t[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;t[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(o){if(t[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(o=n);const l={type:t[i][1].type==="labelLink"?"link":"image",start:{...t[i][1].start},end:{...t[t.length-1][1].end}},u={type:"label",start:{...t[i][1].start},end:{...t[o][1].end}},d={type:"labelText",start:{...t[i+r+2][1].end},end:{...t[o-2][1].start}};return s=[["enter",l,e],["enter",u,e]],s=Zo(s,t.slice(i+1,i+r+3)),s=Zo(s,[["enter",d,e]]),s=Zo(s,iC(e.parser.constructs.insideSpan.null,t.slice(i+r+4,o-3),e)),s=Zo(s,[["exit",d,e],t[o-2],t[o-1],["exit",u,e]]),s=Zo(s,t.slice(o+1)),s=Zo(s,[["exit",l,e]]),so(t,i,t.length,s),t}function cRe(t,e,n){const r=this;let a=r.events.length,i,o;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return s;function s(m){return i?i._inactive?f(m):(o=r.parser.defined.includes(qs(r.sliceSerialize({start:i.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(m),t.exit("labelMarker"),t.exit("labelEnd"),l):n(m)}function l(m){return m===40?t.attempt(aRe,d,o?d:f)(m):m===91?t.attempt(iRe,d,o?u:f)(m):o?d(m):f(m)}function u(m){return t.attempt(oRe,d,f)(m)}function d(m){return e(m)}function f(m){return i._balanced=!0,n(m)}}function uRe(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),a}function a(f){return Zn(f)?B0(t,i)(f):i(f)}function i(f){return f===41?d(f):Q$(t,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return Zn(f)?B0(t,l)(f):d(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?J$(t,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function u(f){return Zn(f)?B0(t,d)(f):d(f)}function d(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function dRe(t,e,n){const r=this;return a;function a(s){return Z$.call(r,t,i,o,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(qs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(s):n(s)}function o(s){return n(s)}}function pRe(t,e,n){return r;function r(i){return t.enter("reference"),t.enter("referenceMarker"),t.consume(i),t.exit("referenceMarker"),a}function a(i){return i===93?(t.enter("referenceMarker"),t.consume(i),t.exit("referenceMarker"),t.exit("reference"),e):n(i)}}const fRe={name:"labelStartImage",resolveAll:NN.resolveAll,tokenize:mRe};function mRe(t,e,n){const r=this;return a;function a(s){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(s),t.exit("labelImageMarker"),i}function i(s){return s===91?(t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):e(s)}}const hRe={name:"labelStartLink",resolveAll:NN.resolveAll,tokenize:gRe};function gRe(t,e,n){const r=this;return a;function a(o){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelLink"),i}function i(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):e(o)}}const ON={name:"lineEnding",tokenize:_Re};function _Re(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),rn(t,e,"linePrefix")}}const oC={name:"thematicBreak",tokenize:bRe};function bRe(t,e,n){let r=0,a;return i;function i(u){return t.enter("thematicBreak"),o(u)}function o(u){return a=u,s(u)}function s(u){return u===a?(t.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||bt(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===a?(t.consume(u),r++,l):(t.exit("thematicBreakSequence"),on(u)?rn(t,s,"whitespace")(u):s(u))}}const ki={continuation:{tokenize:yRe},exit:CRe,name:"list",tokenize:vRe},ERe={partial:!0,tokenize:ARe},SRe={partial:!0,tokenize:TRe};function vRe(t,e,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return s;function s(h){const E=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:RN(h)){if(r.containerState.type||(r.containerState.type=E,t.enter(E,{_container:!0})),E==="listUnordered")return t.enter("listItemPrefix"),h===42||h===45?t.check(oC,n,u)(h):u(h);if(!r.interrupt||h===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(h)}return n(h)}function l(h){return RN(h)&&++o<10?(t.consume(h),l):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(t.exit("listItemValue"),u(h)):n(h)}function u(h){return t.enter("listItemMarker"),t.consume(h),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,t.check(P0,r.interrupt?n:d,t.attempt(ERe,m,f))}function d(h){return r.containerState.initialBlankLine=!0,i++,m(h)}function f(h){return on(h)?(t.enter("listItemPrefixWhitespace"),t.consume(h),t.exit("listItemPrefixWhitespace"),m):n(h)}function m(h){return r.containerState.size=i+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(h)}}function yRe(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(P0,a,i);function a(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,rn(t,e,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!on(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(SRe,e,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,rn(t,t.attempt(ki,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function TRe(t,e,n){const r=this;return rn(t,a,"listItemIndent",r.containerState.size+1);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?e(i):n(i)}}function CRe(t){t.exit(this.containerState.type)}function ARe(t,e,n){const r=this;return rn(t,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const o=r.events[r.events.length-1];return!on(i)&&o&&o[1].type==="listItemPrefixWhitespace"?e(i):n(i)}}const tY={name:"setextUnderline",resolveTo:RRe,tokenize:wRe};function RRe(t,e){let n=t.length,r,a,i;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(a=n)}else t[n][1].type==="content"&&t.splice(n,1),!i&&t[n][1].type==="definition"&&(i=n);const o={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[a][1].type="setextHeadingText",i?(t.splice(a,0,["enter",o,e]),t.splice(i+1,0,["exit",t[r][1],e]),t[r][1].end={...t[i][1].end}):t[r][1]=o,t.push(["exit",o,e]),t}function wRe(t,e,n){const r=this;let a;return i;function i(u){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),a=u,o(u)):n(u)}function o(u){return t.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===a?(t.consume(u),s):(t.exit("setextHeadingLineSequence"),on(u)?rn(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||bt(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const xRe={tokenize:NRe};function NRe(t){const e=this,n=t.attempt(P0,r,t.attempt(this.parser.constructs.flowInitial,a,rn(t,t.attempt(this.parser.constructs.flow,a,t.attempt(MAe,a)),"linePrefix")));return n;function r(i){if(i===null){t.consume(i);return}return t.enter("lineEndingBlank"),t.consume(i),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function a(i){if(i===null){t.consume(i);return}return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const ORe={resolveAll:rY()},IRe=nY("string"),DRe=nY("text");function nY(t){return{resolveAll:rY(t==="text"?kRe:void 0),tokenize:e};function e(n){const r=this,a=this.parser.constructs[t],i=n.attempt(a,o,s);return o;function o(d){return u(d)?i(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return u(d)?(n.exit("data"),i(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const f=a[d];let m=-1;if(f)for(;++m<f.length;){const h=f[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function rY(t){return e;function e(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return t?t(n,r):n}}function kRe(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],a=e.sliceStream(r);let i=a.length,o=-1,s=0,l;for(;i--;){const u=a[i];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)l=!0,s++;else if(u!==-1){i++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(s=0),s){const u={type:n===t.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?o:r.start._bufferIndex+o,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(t.splice(n,0,["enter",u,e],["exit",u,e]),n+=2)}n++}return t}const MRe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:UAe},disable:{null:[]},document:{42:ki,43:ki,45:ki,48:ki,49:ki,50:ki,51:ki,52:ki,53:ki,54:ki,55:ki,56:ki,57:ki,62:Y$},flow:{35:YAe,42:oC,45:[tY,oC],60:KAe,61:tY,95:oC,96:K$,126:K$},flowInitial:{[-2]:xN,[-1]:xN,32:xN},insideSpan:{null:[wN,ORe]},string:{38:j$,92:V$},text:{[-5]:ON,[-4]:ON,[-3]:ON,33:fRe,38:j$,42:wN,60:[hAe,nRe],91:hRe,92:[HAe,V$],93:NN,95:wN,96:xAe}},Symbol.toStringTag,{value:"Module"}));function LRe(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let o=[],s=[];const l={attempt:D(O),check:D(x),consume:C,enter:T,exit:w,interrupt:D(x,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:E,parser:t,previous:null,sliceSerialize:m,sliceStream:h,write:f};let d=e.tokenize.call(u,l);return e.resolveAll&&i.push(e),u;function f(q){return o=Zo(o,q),v(),o[o.length-1]!==null?[]:(M(e,0),u.events=iC(i,u.events,u),u.events)}function m(q,j){return FRe(h(q),j)}function h(q){return PRe(o,q)}function E(){const{_bufferIndex:q,_index:j,line:Q,column:U,offset:K}=r;return{_bufferIndex:q,_index:j,line:Q,column:U,offset:K}}function b(q){a[q.line]=q.column,P()}function v(){let q;for(;r._index<o.length;){const j=o[r._index];if(typeof j=="string")for(q=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===q&&r._bufferIndex<j.length;)y(j.charCodeAt(r._bufferIndex));else y(j)}}function y(q){d=d(q)}function C(q){bt(q)?(r.line++,r.column=1,r.offset+=q===-3?2:1,P()):q!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=q}function T(q,j){const Q=j||{};return Q.type=q,Q.start=E(),u.events.push(["enter",Q,u]),s.push(Q),Q}function w(q){const j=s.pop();return j.end=E(),u.events.push(["exit",j,u]),j}function O(q,j){M(q,j.from)}function x(q,j){j.restore()}function D(q,j){return Q;function Q(U,K,G){let Y,W,J,$;return Array.isArray(U)?te(U):"tokenize"in U?te([U]):Z(U);function Z(de){return ie;function ie(ce){const me=ce!==null&&de[ce],be=ce!==null&&de.null,Ae=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(be)?be:be?[be]:[]];return te(Ae)(ce)}}function te(de){return Y=de,W=0,de.length===0?G:B(de[W])}function B(de){return ie;function ie(ce){return $=F(),J=de,de.partial||(u.currentConstruct=de),de.name&&u.parser.constructs.disable.null.includes(de.name)?se():de.tokenize.call(j?Object.assign(Object.create(u),j):u,l,ae,se)(ce)}}function ae(de){return q(J,$),K}function se(de){return $.restore(),++W<Y.length?B(Y[W]):G}}}function M(q,j){q.resolveAll&&!i.includes(q)&&i.push(q),q.resolve&&so(u.events,j,u.events.length-j,q.resolve(u.events.slice(j),u)),q.resolveTo&&(u.events=q.resolveTo(u.events,u))}function F(){const q=E(),j=u.previous,Q=u.currentConstruct,U=u.events.length,K=Array.from(s);return{from:U,restore:G};function G(){r=q,u.previous=j,u.currentConstruct=Q,u.events.length=U,s=K,P()}}function P(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function PRe(t,e){const n=e.start._index,r=e.start._bufferIndex,a=e.end._index,i=e.end._bufferIndex;let o;if(n===a)o=[t[n].slice(r,i)];else{if(o=t.slice(n,a),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}i>0&&o.push(t[a].slice(0,i))}return o}function FRe(t,e){let n=-1;const r=[];let a;for(;++n<t.length;){const i=t[n];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
298
298
  `;break}case-3:{o=`\r
299
299
  `;break}case-2:{o=e?" ":" ";break}case-1:{if(!e&&a)continue;o=" ";break}default:o=String.fromCharCode(i)}a=i===-2,r.push(o)}return r.join("")}function BRe(t){const r={constructs:z$([MRe,...(t||{}).extensions||[]]),content:a(lAe),defined:[],document:a(uAe),flow:a(xRe),lazy:{},string:a(IRe),text:a(DRe)};return r;function a(i){return o;function o(s){return LRe(r,i,s)}}}function URe(t){for(;!X$(t););return t}const aY=/[\0\t\n\r]/g;function GRe(){let t=1,e="",n=!0,r;return a;function a(i,o,s){const l=[];let u,d,f,m,h;for(i=e+(typeof i=="string"?i.toString():new TextDecoder(o||void 0).decode(i)),f=0,e="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(aY.lastIndex=f,u=aY.exec(i),m=u&&u.index!==void 0?u.index:i.length,h=i.charCodeAt(m),!u){e=i.slice(f);break}if(h===10&&f===m&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<m&&(l.push(i.slice(f,m)),t+=m-f),h){case 0:{l.push(65533),t++;break}case 9:{for(d=Math.ceil(t/4)*4,l.push(-2);t++<d;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:r=!0,t=1}f=m+1}return s&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}const zRe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qRe(t){return t.replace(zRe,HRe)}function HRe(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return q$(n.slice(i?2:1),i?16:10)}return AN(n)||t}const iY={}.hasOwnProperty;function $Re(t,e,n){return typeof e!="string"&&(n=e,e=void 0),YRe(n)(URe(BRe(n).document().write(GRe()(t,e,!0))))}function YRe(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Jt),autolinkProtocol:F,autolinkEmail:F,atxHeading:i(We),blockQuote:i(be),characterEscape:F,characterReference:F,codeFenced:i(Ae),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:i(Ae,o),codeText:i(we,o),codeTextData:F,data:F,codeFlowValue:F,definition:i(Te),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:i(De),hardBreakEscape:i(Ye),hardBreakTrailing:i(Ye),htmlFlow:i(Tt,o),htmlFlowData:F,htmlText:i(Tt,o),htmlTextData:F,image:i(_t),label:o,link:i(Jt),listItem:i(Ve),listItemValue:m,listOrdered:i(Ge,f),listUnordered:i(Ge),paragraph:i(Xe),reference:B,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:i(We),strong:i(mt),thematicBreak:i(Dt)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:me,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:de,characterReference:ie,codeFenced:l(v),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:E,codeFlowValue:P,codeIndented:l(y),codeText:l(K),codeTextData:P,data:P,definition:l(),definitionDestinationString:w,definitionLabelString:C,definitionTitleString:T,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(Q),htmlFlowData:P,htmlText:l(U),htmlTextData:P,image:l(Y),label:J,labelText:W,lineEnding:q,link:l(G),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:$,resourceTitleString:Z,resource:te,setextHeading:l(M),setextHeadingLineSequence:D,setextHeadingText:x,strong:l(),thematicBreak:l()}};oY(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(ge){let xe={type:"root",children:[]};const He={stack:[xe],tokenStack:[],config:e,enter:s,exit:u,buffer:o,resume:d,data:n},ot=[];let Ct=-1;for(;++Ct<ge.length;)if(ge[Ct][1].type==="listOrdered"||ge[Ct][1].type==="listUnordered")if(ge[Ct][0]==="enter")ot.push(Ct);else{const pr=ot.pop();Ct=a(ge,pr,Ct)}for(Ct=-1;++Ct<ge.length;){const pr=e[ge[Ct][0]];iY.call(pr,ge[Ct][1].type)&&pr[ge[Ct][1].type].call(Object.assign({sliceSerialize:ge[Ct][2].sliceSerialize},He),ge[Ct][1])}if(He.tokenStack.length>0){const pr=He.tokenStack[He.tokenStack.length-1];(pr[1]||sY).call(He,void 0,pr[0])}for(xe.position={start:md(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:md(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},Ct=-1;++Ct<e.transforms.length;)xe=e.transforms[Ct](xe)||xe;return xe}function a(ge,xe,He){let ot=xe-1,Ct=-1,pr=!1,Yn,Tn,zt,hn;for(;++ot<=He;){const Bt=ge[ot];switch(Bt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Bt[0]==="enter"?Ct++:Ct--,hn=void 0;break}case"lineEndingBlank":{Bt[0]==="enter"&&(Yn&&!hn&&!Ct&&!zt&&(zt=ot),hn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:hn=void 0}if(!Ct&&Bt[0]==="enter"&&Bt[1].type==="listItemPrefix"||Ct===-1&&Bt[0]==="exit"&&(Bt[1].type==="listUnordered"||Bt[1].type==="listOrdered")){if(Yn){let Mr=ot;for(Tn=void 0;Mr--;){const ir=ge[Mr];if(ir[1].type==="lineEnding"||ir[1].type==="lineEndingBlank"){if(ir[0]==="exit")continue;Tn&&(ge[Tn][1].type="lineEndingBlank",pr=!0),ir[1].type="lineEnding",Tn=Mr}else if(!(ir[1].type==="linePrefix"||ir[1].type==="blockQuotePrefix"||ir[1].type==="blockQuotePrefixWhitespace"||ir[1].type==="blockQuoteMarker"||ir[1].type==="listItemIndent"))break}zt&&(!Tn||zt<Tn)&&(Yn._spread=!0),Yn.end=Object.assign({},Tn?ge[Tn][1].start:Bt[1].end),ge.splice(Tn||ot,0,["exit",Yn,Bt[2]]),ot++,He++}if(Bt[1].type==="listItemPrefix"){const Mr={type:"listItem",_spread:!1,start:Object.assign({},Bt[1].start),end:void 0};Yn=Mr,ge.splice(ot,0,["enter",Mr,Bt[2]]),ot++,He++,zt=void 0,hn=!0}}}return ge[xe][1]._spread=pr,He}function i(ge,xe){return He;function He(ot){s.call(this,ge(ot),ot),xe&&xe.call(this,ot)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(ge,xe,He){this.stack[this.stack.length-1].children.push(ge),this.stack.push(ge),this.tokenStack.push([xe,He||void 0]),ge.position={start:md(xe.start),end:void 0}}function l(ge){return xe;function xe(He){ge&&ge.call(this,He),u.call(this,He)}}function u(ge,xe){const He=this.stack.pop(),ot=this.tokenStack.pop();if(ot)ot[0].type!==ge.type&&(xe?xe.call(this,ge,ot[0]):(ot[1]||sY).call(this,ge,ot[0]));else throw new Error("Cannot close `"+ge.type+"` ("+M0({start:ge.start,end:ge.end})+"): it’s not open");He.position.end=md(ge.end)}function d(){return CN(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(ge){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(ge),10),this.data.expectingFirstListItemValue=void 0}}function h(){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=ge}function E(){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=ge}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ge.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ge.replace(/(\r?\n|\r)$/g,"")}function C(ge){const xe=this.resume(),He=this.stack[this.stack.length-1];He.label=xe,He.identifier=qs(this.sliceSerialize(ge)).toLowerCase()}function T(){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ge}function w(){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ge}function O(ge){const xe=this.stack[this.stack.length-1];if(!xe.depth){const He=this.sliceSerialize(ge).length;xe.depth=He}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function D(ge){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(ge).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function F(ge){const He=this.stack[this.stack.length-1].children;let ot=He[He.length-1];(!ot||ot.type!=="text")&&(ot=yt(),ot.position={start:md(ge.start),end:void 0},He.push(ot)),this.stack.push(ot)}function P(ge){const xe=this.stack.pop();xe.value+=this.sliceSerialize(ge),xe.position.end=md(ge.end)}function q(ge){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const He=xe.children[xe.children.length-1];He.position.end=md(ge.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(xe.type)&&(F.call(this,ge),P.call(this,ge))}function j(){this.data.atHardBreak=!0}function Q(){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ge}function U(){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ge}function K(){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ge}function G(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=xe,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function Y(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=xe,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function W(ge){const xe=this.sliceSerialize(ge),He=this.stack[this.stack.length-2];He.label=qRe(xe),He.identifier=qs(xe).toLowerCase()}function J(){const ge=this.stack[this.stack.length-1],xe=this.resume(),He=this.stack[this.stack.length-1];if(this.data.inReference=!0,He.type==="link"){const ot=ge.children;He.children=ot}else He.alt=xe}function $(){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ge}function Z(){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ge}function te(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function ae(ge){const xe=this.resume(),He=this.stack[this.stack.length-1];He.label=xe,He.identifier=qs(this.sliceSerialize(ge)).toLowerCase(),this.data.referenceType="full"}function se(ge){this.data.characterReferenceType=ge.type}function de(ge){const xe=this.sliceSerialize(ge),He=this.data.characterReferenceType;let ot;He?(ot=q$(xe,He==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ot=AN(xe);const Ct=this.stack[this.stack.length-1];Ct.value+=ot}function ie(ge){const xe=this.stack.pop();xe.position.end=md(ge.end)}function ce(ge){P.call(this,ge);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(ge)}function me(ge){P.call(this,ge);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(ge)}function be(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function we(){return{type:"inlineCode",value:""}}function Te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function De(){return{type:"emphasis",children:[]}}function We(){return{type:"heading",depth:0,children:[]}}function Ye(){return{type:"break"}}function Tt(){return{type:"html",value:""}}function _t(){return{type:"image",title:null,url:"",alt:null}}function Jt(){return{type:"link",title:null,url:"",children:[]}}function Ge(ge){return{type:"list",ordered:ge.type==="listOrdered",start:null,spread:ge._spread,children:[]}}function Ve(ge){return{type:"listItem",spread:ge._spread,checked:null,children:[]}}function Xe(){return{type:"paragraph",children:[]}}function mt(){return{type:"strong",children:[]}}function yt(){return{type:"text",value:""}}function Dt(){return{type:"thematicBreak"}}}function md(t){return{line:t.line,column:t.column,offset:t.offset}}function oY(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?oY(t,r):VRe(t,r)}}function VRe(t,e){let n;for(n in e)if(iY.call(e,n))switch(n){case"canContainEols":{const r=e[n];r&&t[n].push(...r);break}case"transforms":{const r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{const r=e[n];r&&Object.assign(t[n],r);break}}}function sY(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+M0({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+M0({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+M0({start:e.start,end:e.end})+") is still open")}function jRe(t){const e=this;e.parser=n;function n(r){return $Re(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function WRe(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function KRe(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`