(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2336],{29173:(e,t,r)=>{"use strict";r.d(t,{$C:()=>R,N8:()=>O});var n,a,o,i,s="vercel.ai.error",l=Symbol.for(s),u=class e extends Error{constructor({name:e,message:t,cause:r}){super(t),this[n]=!0,this.name=e,this.cause=r}static isInstance(t){return e.hasMarker(t,s)}static hasMarker(e,t){let r=Symbol.for(t);return null!=e&&"object"==typeof e&&r in e&&"boolean"==typeof e[r]&&!0===e[r]}};n=l;var c=u;function d(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}Symbol.for("vercel.ai.error.AI_APICallError"),Symbol.for("vercel.ai.error.AI_EmptyResponseBodyError");var f="AI_InvalidArgumentError",p=`vercel.ai.error.${f}`,g=Symbol.for(p),h=class extends c{constructor({message:e,cause:t,argument:r}){super({name:f,message:e,cause:t}),this[a]=!0,this.argument=r}static isInstance(e){return c.hasMarker(e,p)}};a=g,Symbol.for("vercel.ai.error.AI_InvalidPromptError"),Symbol.for("vercel.ai.error.AI_InvalidResponseDataError");var m="AI_JSONParseError",y=`vercel.ai.error.${m}`,b=Symbol.for(y),v=class extends c{constructor({text:e,cause:t}){super({name:m,message:`JSON parsing failed: Text: ${e}. Error message: ${d(t)}`,cause:t}),this[o]=!0,this.text=e}static isInstance(e){return c.hasMarker(e,y)}};o=b,Symbol.for("vercel.ai.error.AI_LoadAPIKeyError"),Symbol.for("vercel.ai.error.AI_LoadSettingError"),Symbol.for("vercel.ai.error.AI_NoContentGeneratedError"),Symbol.for("vercel.ai.error.AI_NoSuchModelError"),Symbol.for("vercel.ai.error.AI_TooManyEmbeddingValuesForCallError");var E="AI_TypeValidationError",w=`vercel.ai.error.${E}`,S=Symbol.for(w),x=class e extends c{constructor({value:e,cause:t}){super({name:E,message:`Type validation failed: Value: ${JSON.stringify(e)}. Error message: ${d(t)}`,cause:t}),this[i]=!0,this.value=e}static isInstance(e){return c.hasMarker(e,w)}static wrap({value:t,cause:r}){return e.isInstance(r)&&r.value===t?r:new e({value:t,cause:r})}};function k(e){return null===e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e||(Array.isArray(e)?e.every(k):"object"==typeof e&&Object.entries(e).every(([e,t])=>"string"==typeof e&&k(t)))}i=S,Symbol.for("vercel.ai.error.AI_UnsupportedFunctionalityError");let A=(e,t=21)=>(r=t)=>{let n="",a=r;for(;a--;)n+=e[Math.random()*e.length|0];return n};var _=r(37190),T=r.n(_);r(73124);var R=(({prefix:e,size:t=16,alphabet:r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:n="-"}={})=>{let a=A(r,t);if(null==e)return a;if(r.includes(n))throw new h({argument:"separator",message:`The separator "${n}" must not be part of the alphabet "${r}".`});return t=>`${e}${n}${a(t)}`})(),I=Symbol.for("vercel.ai.validator");function O({text:e,schema:t}){try{let r=T().parse(e);if(null==t)return{success:!0,value:r};return function({value:e,schema:t}){let r="object"==typeof t&&null!==t&&I in t&&!0===t[I]&&"validate"in t?t:{[I]:!0,validate:e=>{let r=t.safeParse(e);return r.success?{success:!0,value:r.data}:{success:!1,error:r.error}}};try{if(null==r.validate)return{success:!0,value:e};let t=r.validate(e);if(t.success)return t;return{success:!1,error:x.wrap({value:e,cause:t.error})}}catch(t){return{success:!1,error:x.wrap({value:e,cause:t})}}}({value:r,schema:t})}catch(t){return{success:!1,error:v.isInstance(t)?t:new v({text:e,cause:t})}}}var{btoa:C,atob:N}=globalThis},96666:(e,t,r)=>{"use strict";r.d(t,{UC:()=>e4,q7:()=>e9,ZL:()=>e5,bL:()=>e6,l9:()=>e8});var n=r(20282),a=r(33885),o=r(94552),i=r(24155),s=r(95817),l=r(90348),u=r(71444),c=r(18929),d=r(27692),f=r(1912),p=r(30012),g=r(62625),h=r(27168),m=r(14247),y=r(62772),b=r(72884),v=r(94450),E="rovingFocusGroup.onEntryFocus",w={bubbles:!1,cancelable:!0},S="RovingFocusGroup",[x,k,A]=(0,s.N)(S),[_,T]=(0,o.A)(S,[A]),[R,I]=_(S),O=n.forwardRef((e,t)=>(0,v.jsx)(x.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,v.jsx)(x.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,v.jsx)(C,{...e,ref:t})})}));O.displayName=S;var C=n.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:o,loop:s=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:p,onEntryFocus:g,preventScrollOnEntryFocus:h=!1,...m}=e,S=n.useRef(null),x=(0,l.s)(t,S),A=(0,u.jH)(c),[_=null,T]=(0,b.i)({prop:d,defaultProp:f,onChange:p}),[I,O]=n.useState(!1),C=(0,y.c)(g),N=k(r),P=n.useRef(!1),[D,F]=n.useState(0);return n.useEffect(()=>{let e=S.current;if(e)return e.addEventListener(E,C),()=>e.removeEventListener(E,C)},[C]),(0,v.jsx)(R,{scope:r,orientation:o,dir:A,loop:s,currentTabStopId:_,onItemFocus:n.useCallback(e=>T(e),[T]),onItemShiftTab:n.useCallback(()=>O(!0),[]),onFocusableItemAdd:n.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:n.useCallback(()=>F(e=>e-1),[]),children:(0,v.jsx)(i.sG.div,{tabIndex:I||0===D?-1:0,"data-orientation":o,...m,ref:x,style:{outline:"none",...e.style},onMouseDown:(0,a.m)(e.onMouseDown,()=>{P.current=!0}),onFocus:(0,a.m)(e.onFocus,e=>{let t=!P.current;if(e.target===e.currentTarget&&t&&!I){let t=new CustomEvent(E,w);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=N().filter(e=>e.focusable);L([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),h)}}P.current=!1}),onBlur:(0,a.m)(e.onBlur,()=>O(!1))})})}),N="RovingFocusGroupItem",P=n.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:s=!1,tabStopId:l,...u}=e,c=(0,p.B)(),d=l||c,f=I(N,r),g=f.currentTabStopId===d,h=k(r),{onFocusableItemAdd:m,onFocusableItemRemove:y}=f;return n.useEffect(()=>{if(o)return m(),()=>y()},[o,m,y]),(0,v.jsx)(x.ItemSlot,{scope:r,id:d,focusable:o,active:s,children:(0,v.jsx)(i.sG.span,{tabIndex:g?0:-1,"data-orientation":f.orientation,...u,ref:t,onMouseDown:(0,a.m)(e.onMouseDown,e=>{o?f.onItemFocus(d):e.preventDefault()}),onFocus:(0,a.m)(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:(0,a.m)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let a=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return D[a]}(e,f.orientation,f.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let n=r.indexOf(e.currentTarget);r=f.loop?function(e,t){return e.map((r,n)=>e[(t+n)%e.length])}(r,n+1):r.slice(n+1)}setTimeout(()=>L(r))}})})})});P.displayName=N;var D={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function L(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}var F=r(65104),M=r(93850),B=r(97501),j=["Enter"," "],U=["ArrowUp","PageDown","End"],$=["ArrowDown","PageUp","Home",...U],G={ltr:[...j,"ArrowRight"],rtl:[...j,"ArrowLeft"]},Y={ltr:["ArrowLeft"],rtl:["ArrowRight"]},H="Menu",[V,z,q]=(0,s.N)(H),[W,K]=(0,o.A)(H,[q,g.Bk,T]),X=(0,g.Bk)(),J=T(),[Z,Q]=W(H),[ee,et]=W(H),er=e=>{let{__scopeMenu:t,open:r=!1,children:a,dir:o,onOpenChange:i,modal:s=!0}=e,l=X(t),[c,d]=n.useState(null),f=n.useRef(!1),p=(0,y.c)(i),h=(0,u.jH)(o);return n.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,v.jsx)(g.bL,{...l,children:(0,v.jsx)(Z,{scope:t,open:r,onOpenChange:p,content:c,onContentChange:d,children:(0,v.jsx)(ee,{scope:t,onClose:n.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:h,modal:s,children:a})})})};er.displayName=H;var en=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,a=X(r);return(0,v.jsx)(g.Mz,{...a,...n,ref:t})});en.displayName="MenuAnchor";var ea="MenuPortal",[eo,ei]=W(ea,{forceMount:void 0}),es=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:a}=e,o=Q(ea,t);return(0,v.jsx)(eo,{scope:t,forceMount:r,children:(0,v.jsx)(m.C,{present:r||o.open,children:(0,v.jsx)(h.Z,{asChild:!0,container:a,children:n})})})};es.displayName=ea;var el="MenuContent",[eu,ec]=W(el),ed=n.forwardRef((e,t)=>{let r=ei(el,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,o=Q(el,e.__scopeMenu),i=et(el,e.__scopeMenu);return(0,v.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,v.jsx)(m.C,{present:n||o.open,children:(0,v.jsx)(V.Slot,{scope:e.__scopeMenu,children:i.modal?(0,v.jsx)(ef,{...a,ref:t}):(0,v.jsx)(ep,{...a,ref:t})})})})}),ef=n.forwardRef((e,t)=>{let r=Q(el,e.__scopeMenu),o=n.useRef(null),i=(0,l.s)(t,o);return n.useEffect(()=>{let e=o.current;if(e)return(0,M.E)(e)},[]),(0,v.jsx)(eg,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:(0,a.m)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),ep=n.forwardRef((e,t)=>{let r=Q(el,e.__scopeMenu);return(0,v.jsx)(eg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),eg=n.forwardRef((e,t)=>{let{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:p,onEntryFocus:h,onEscapeKeyDown:m,onPointerDownOutside:y,onFocusOutside:b,onInteractOutside:E,onDismiss:w,disableOutsideScroll:S,...x}=e,k=Q(el,r),A=et(el,r),_=X(r),T=J(r),R=z(r),[I,C]=n.useState(null),N=n.useRef(null),P=(0,l.s)(t,N,k.onContentChange),D=n.useRef(0),L=n.useRef(""),M=n.useRef(0),j=n.useRef(null),G=n.useRef("right"),Y=n.useRef(0),H=S?B.A:n.Fragment,V=S?{as:F.DX,allowPinchZoom:!0}:void 0,q=e=>{let t=L.current+e,r=R().filter(e=>!e.disabled),n=document.activeElement,a=r.find(e=>e.ref.current===n)?.textValue,o=function(e,t,r){var n;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=(n=Math.max(r?e.indexOf(r):-1,0),e.map((t,r)=>e[(n+r)%e.length]));1===a.length&&(o=o.filter(e=>e!==r));let i=o.find(e=>e.toLowerCase().startsWith(a.toLowerCase()));return i!==r?i:void 0}(r.map(e=>e.textValue),t,a),i=r.find(e=>e.textValue===o)?.ref.current;!function e(t){L.current=t,window.clearTimeout(D.current),""!==t&&(D.current=window.setTimeout(()=>e(""),1e3))}(t),i&&setTimeout(()=>i.focus())};n.useEffect(()=>()=>window.clearTimeout(D.current),[]),(0,d.Oh)();let W=n.useCallback(e=>G.current===j.current?.side&&function(e,t){return!!t&&function(e,t){let{x:r,y:n}=e,a=!1;for(let e=0,o=t.length-1;en!=u>n&&r<(l-i)*(n-s)/(u-s)+i&&(a=!a)}return a}({x:e.clientX,y:e.clientY},t)}(e,j.current?.area),[]);return(0,v.jsx)(eu,{scope:r,searchRef:L,onItemEnter:n.useCallback(e=>{W(e)&&e.preventDefault()},[W]),onItemLeave:n.useCallback(e=>{W(e)||(N.current?.focus(),C(null))},[W]),onTriggerLeave:n.useCallback(e=>{W(e)&&e.preventDefault()},[W]),pointerGraceTimerRef:M,onPointerGraceIntentChange:n.useCallback(e=>{j.current=e},[]),children:(0,v.jsx)(H,{...V,children:(0,v.jsx)(f.n,{asChild:!0,trapped:i,onMountAutoFocus:(0,a.m)(s,e=>{e.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:(0,v.jsx)(c.qW,{asChild:!0,disableOutsidePointerEvents:p,onEscapeKeyDown:m,onPointerDownOutside:y,onFocusOutside:b,onInteractOutside:E,onDismiss:w,children:(0,v.jsx)(O,{asChild:!0,...T,dir:A.dir,orientation:"vertical",loop:o,currentTabStopId:I,onCurrentTabStopIdChange:C,onEntryFocus:(0,a.m)(h,e=>{A.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,v.jsx)(g.UC,{role:"menu","aria-orientation":"vertical","data-state":eU(k.open),"data-radix-menu-content":"",dir:A.dir,..._,...x,ref:P,style:{outline:"none",...x.style},onKeyDown:(0,a.m)(x.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!r&&n&&q(e.key));let a=N.current;if(e.target!==a||!$.includes(e.key))return;e.preventDefault();let o=R().filter(e=>!e.disabled).map(e=>e.ref.current);U.includes(e.key)&&o.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(o)}),onBlur:(0,a.m)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),L.current="")}),onPointerMove:(0,a.m)(e.onPointerMove,eY(e=>{let t=e.target,r=Y.current!==e.clientX;if(e.currentTarget.contains(t)&&r){let t=e.clientX>Y.current?"right":"left";G.current=t,Y.current=e.clientX}}))})})})})})})});ed.displayName=el;var eh=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,v.jsx)(i.sG.div,{role:"group",...n,ref:t})});eh.displayName="MenuGroup";var em=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,v.jsx)(i.sG.div,{...n,ref:t})});em.displayName="MenuLabel";var ey="MenuItem",eb="menu.itemSelect",ev=n.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:o,...s}=e,u=n.useRef(null),c=et(ey,e.__scopeMenu),d=ec(ey,e.__scopeMenu),f=(0,l.s)(t,u),p=n.useRef(!1);return(0,v.jsx)(eE,{...s,ref:f,disabled:r,onClick:(0,a.m)(e.onClick,()=>{let e=u.current;if(!r&&e){let t=new CustomEvent(eb,{bubbles:!0,cancelable:!0});e.addEventListener(eb,e=>o?.(e),{once:!0}),(0,i.hO)(e,t),t.defaultPrevented?p.current=!1:c.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),p.current=!0},onPointerUp:(0,a.m)(e.onPointerUp,e=>{p.current||e.currentTarget?.click()}),onKeyDown:(0,a.m)(e.onKeyDown,e=>{let t=""!==d.searchRef.current;!r&&(!t||" "!==e.key)&&j.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ev.displayName=ey;var eE=n.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:o=!1,textValue:s,...u}=e,c=ec(ey,r),d=J(r),f=n.useRef(null),p=(0,l.s)(t,f),[g,h]=n.useState(!1),[m,y]=n.useState("");return n.useEffect(()=>{let e=f.current;e&&y((e.textContent??"").trim())},[u.children]),(0,v.jsx)(V.ItemSlot,{scope:r,disabled:o,textValue:s??m,children:(0,v.jsx)(P,{asChild:!0,...d,focusable:!o,children:(0,v.jsx)(i.sG.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...u,ref:p,onPointerMove:(0,a.m)(e.onPointerMove,eY(e=>{o?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,a.m)(e.onPointerLeave,eY(e=>c.onItemLeave(e))),onFocus:(0,a.m)(e.onFocus,()=>h(!0)),onBlur:(0,a.m)(e.onBlur,()=>h(!1))})})})}),ew=n.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...o}=e;return(0,v.jsx)(eI,{scope:e.__scopeMenu,checked:r,children:(0,v.jsx)(ev,{role:"menuitemcheckbox","aria-checked":e$(r)?"mixed":r,...o,ref:t,"data-state":eG(r),onSelect:(0,a.m)(o.onSelect,()=>n?.(!!e$(r)||!r),{checkForDefaultPrevented:!1})})})});ew.displayName="MenuCheckboxItem";var eS="MenuRadioGroup",[ex,ek]=W(eS,{value:void 0,onValueChange:()=>{}}),eA=n.forwardRef((e,t)=>{let{value:r,onValueChange:n,...a}=e,o=(0,y.c)(n);return(0,v.jsx)(ex,{scope:e.__scopeMenu,value:r,onValueChange:o,children:(0,v.jsx)(eh,{...a,ref:t})})});eA.displayName=eS;var e_="MenuRadioItem",eT=n.forwardRef((e,t)=>{let{value:r,...n}=e,o=ek(e_,e.__scopeMenu),i=r===o.value;return(0,v.jsx)(eI,{scope:e.__scopeMenu,checked:i,children:(0,v.jsx)(ev,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":eG(i),onSelect:(0,a.m)(n.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});eT.displayName=e_;var eR="MenuItemIndicator",[eI,eO]=W(eR,{checked:!1}),eC=n.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...a}=e,o=eO(eR,r);return(0,v.jsx)(m.C,{present:n||e$(o.checked)||!0===o.checked,children:(0,v.jsx)(i.sG.span,{...a,ref:t,"data-state":eG(o.checked)})})});eC.displayName=eR;var eN=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,v.jsx)(i.sG.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});eN.displayName="MenuSeparator";var eP=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,a=X(r);return(0,v.jsx)(g.i3,{...a,...n,ref:t})});eP.displayName="MenuArrow";var[eD,eL]=W("MenuSub"),eF="MenuSubTrigger",eM=n.forwardRef((e,t)=>{let r=Q(eF,e.__scopeMenu),o=et(eF,e.__scopeMenu),i=eL(eF,e.__scopeMenu),s=ec(eF,e.__scopeMenu),u=n.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,f={__scopeMenu:e.__scopeMenu},p=n.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return n.useEffect(()=>p,[p]),n.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),d(null)}},[c,d]),(0,v.jsx)(en,{asChild:!0,...f,children:(0,v.jsx)(eE,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":eU(r.open),...e,ref:(0,l.t)(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:(0,a.m)(e.onPointerMove,eY(t=>{s.onItemEnter(t),t.defaultPrevented||e.disabled||r.open||u.current||(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{r.onOpenChange(!0),p()},100))})),onPointerLeave:(0,a.m)(e.onPointerLeave,eY(e=>{p();let t=r.content?.getBoundingClientRect();if(t){let n=r.content?.dataset.side,a="right"===n,o=t[a?"left":"right"],i=t[a?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:o,y:t.top},{x:i,y:t.top},{x:i,y:t.bottom},{x:o,y:t.bottom}],side:n}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:(0,a.m)(e.onKeyDown,t=>{let n=""!==s.searchRef.current;!e.disabled&&(!n||" "!==t.key)&&G[o.dir].includes(t.key)&&(r.onOpenChange(!0),r.content?.focus(),t.preventDefault())})})})});eM.displayName=eF;var eB="MenuSubContent",ej=n.forwardRef((e,t)=>{let r=ei(el,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=Q(el,e.__scopeMenu),u=et(el,e.__scopeMenu),c=eL(eB,e.__scopeMenu),d=n.useRef(null),f=(0,l.s)(t,d);return(0,v.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,v.jsx)(m.C,{present:o||s.open,children:(0,v.jsx)(V.Slot,{scope:e.__scopeMenu,children:(0,v.jsx)(eg,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:f,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{u.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,a.m)(e.onFocusOutside,e=>{e.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:(0,a.m)(e.onEscapeKeyDown,e=>{u.onClose(),e.preventDefault()}),onKeyDown:(0,a.m)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=Y[u.dir].includes(e.key);t&&r&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function eU(e){return e?"open":"closed"}function e$(e){return"indeterminate"===e}function eG(e){return e$(e)?"indeterminate":e?"checked":"unchecked"}function eY(e){return t=>"mouse"===t.pointerType?e(t):void 0}ej.displayName=eB;var eH="ContextMenu",[eV,ez]=(0,o.A)(eH,[K]),eq=K(),[eW,eK]=eV(eH),eX=e=>{let{__scopeContextMenu:t,children:r,onOpenChange:a,dir:o,modal:i=!0}=e,[s,l]=n.useState(!1),u=eq(t),c=(0,y.c)(a),d=n.useCallback(e=>{l(e),c(e)},[c]);return(0,v.jsx)(eW,{scope:t,open:s,onOpenChange:d,modal:i,children:(0,v.jsx)(er,{...u,dir:o,open:s,onOpenChange:d,modal:i,children:r})})};eX.displayName=eH;var eJ="ContextMenuTrigger",eZ=n.forwardRef((e,t)=>{let{__scopeContextMenu:r,disabled:o=!1,...s}=e,l=eK(eJ,r),u=eq(r),c=n.useRef({x:0,y:0}),d=n.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),f=n.useRef(0),p=n.useCallback(()=>window.clearTimeout(f.current),[]),g=e=>{c.current={x:e.clientX,y:e.clientY},l.onOpenChange(!0)};return n.useEffect(()=>p,[p]),n.useEffect(()=>void(o&&p()),[o,p]),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(en,{...u,virtualRef:d}),(0,v.jsx)(i.sG.span,{"data-state":l.open?"open":"closed","data-disabled":o?"":void 0,...s,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:o?e.onContextMenu:(0,a.m)(e.onContextMenu,e=>{p(),g(e),e.preventDefault()}),onPointerDown:o?e.onPointerDown:(0,a.m)(e.onPointerDown,e3(e=>{p(),f.current=window.setTimeout(()=>g(e),700)})),onPointerMove:o?e.onPointerMove:(0,a.m)(e.onPointerMove,e3(p)),onPointerCancel:o?e.onPointerCancel:(0,a.m)(e.onPointerCancel,e3(p)),onPointerUp:o?e.onPointerUp:(0,a.m)(e.onPointerUp,e3(p))})]})});eZ.displayName=eJ;var eQ=e=>{let{__scopeContextMenu:t,...r}=e,n=eq(t);return(0,v.jsx)(es,{...n,...r})};eQ.displayName="ContextMenuPortal";var e0="ContextMenuContent",e1=n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...a}=e,o=eK(e0,r),i=eq(r),s=n.useRef(!1);return(0,v.jsx)(ed,{...i,...a,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&s.current&&t.preventDefault(),s.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||o.modal||(s.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});e1.displayName=e0,n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=eq(r);return(0,v.jsx)(eh,{...a,...n,ref:t})}).displayName="ContextMenuGroup",n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=eq(r);return(0,v.jsx)(em,{...a,...n,ref:t})}).displayName="ContextMenuLabel";var e2=n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=eq(r);return(0,v.jsx)(ev,{...a,...n,ref:t})});function e3(e){return t=>"mouse"!==t.pointerType?e(t):void 0}e2.displayName="ContextMenuItem",n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=eq(r);return(0,v.jsx)(ew,{...a,...n,ref:t})}).displayName="ContextMenuCheckboxItem",n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=eq(r);return(0,v.jsx)(eA,{...a,...n,ref:t})}).displayName="ContextMenuRadioGroup",n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=eq(r);return(0,v.jsx)(eT,{...a,...n,ref:t})}).displayName="ContextMenuRadioItem",n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=eq(r);return(0,v.jsx)(eC,{...a,...n,ref:t})}).displayName="ContextMenuItemIndicator",n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=eq(r);return(0,v.jsx)(eN,{...a,...n,ref:t})}).displayName="ContextMenuSeparator",n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=eq(r);return(0,v.jsx)(eP,{...a,...n,ref:t})}).displayName="ContextMenuArrow",n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=eq(r);return(0,v.jsx)(eM,{...a,...n,ref:t})}).displayName="ContextMenuSubTrigger",n.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=eq(r);return(0,v.jsx)(ej,{...a,...n,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}).displayName="ContextMenuSubContent";var e6=eX,e8=eZ,e5=eQ,e4=e1,e9=e2},72202:(e,t,r)=>{"use strict";r.d(t,{WX:()=>l});var n=r(20282);function a(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var o={};a(o,"SSRProvider",()=>l),a(o,"useSSRSafeId",()=>c),a(o,"useIsSSR",()=>d);let i={prefix:String(Math.round(1e10*Math.random())),current:0},s=n.createContext(i);function l(e){let t=(0,n.useContext)(s),r=(0,n.useMemo)(()=>({prefix:t===i?"":`${t.prefix}-${++t.current}`,current:0}),[t]);return n.createElement(s.Provider,{value:r},e.children)}let u=!!("undefined"!=typeof window&&window.document&&window.document.createElement);function c(e){let t=(0,n.useContext)(s);return t!==i||u||console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server."),(0,n.useMemo)(()=>e||`react-aria${t.prefix}-${++t.current}`,[e])}function d(){let e=(0,n.useContext)(s)!==i,[t,r]=(0,n.useState)(e);return"undefined"!=typeof window&&e&&(0,n.useLayoutEffect)(()=>{r(!1)},[]),t}},67027:(e,t,r)=>{"use strict";r.d(t,{j:()=>h});var n=r(20282),a=r(8911),o=r(73124),i=()=>{window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)})};function s(){return"undefined"!=typeof window}function l(){return"production"}function u(){return"development"===((s()?window.vam:l())||"production")}function c(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}var d="NEXT_PUBLIC_WEB_ANALYTICS_BASEPATH";function f(e){return(0,n.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,n.useEffect)(()=>{!function(e={debug:!0}){var t;if(!s())return;(function(e="auto"){if("auto"===e){window.vam=l();return}window.vam=e})(e.mode),i(),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let r=e.scriptSrc||(u()?"https://va.vercel-scripts.com/v1/script.debug.js":"/_vercel/insights/script.js");if(document.head.querySelector(`script[src*="${r}"]`))return;let n=document.createElement("script");n.src=r,n.defer=!0,n.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.5.0-canary.1",e.disableAutoTrack&&(n.dataset.disableAutoTrack="1"),e.endpoint?n.dataset.endpoint=e.endpoint:o.env[d]&&(n.dataset.endpoint=`/${o.env[d]}/_vercel/insights`),e.dsn&&(n.dataset.dsn=e.dsn),n.onerror=()=>{let e=u()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${r}. ${e}`)},u()&&!1===e.debug&&(n.dataset.debug="false"),document.head.appendChild(n)}({framework:e.framework||"react",...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,n.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var r;null==(r=window.va)||r.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}var p=()=>{let e=(0,a.useParams)(),t=(0,a.useSearchParams)(),r=(0,a.usePathname)();return e?{route:function(e,t){if(!e||!t)return e;let r=e;try{let e=Object.entries(t);for(let[t,n]of e)if(!Array.isArray(n)){let e=c(n);e.test(r)&&(r=r.replace(e,`/[${t}]`))}for(let[t,n]of e)if(Array.isArray(n)){let e=c(n.join("/"));e.test(r)&&(r=r.replace(e,`/[...${t}]`))}return r}catch(t){return e}}(r,Object.keys(e).length?e:Object.fromEntries(t.entries())),path:r}:{route:null,path:r}};function g(e){let{route:t,path:r}=p();return n.createElement(f,{path:r,route:t,...e,framework:"next"})}function h(e){return n.createElement(n.Suspense,{fallback:null},n.createElement(g,{...e}))}},19496:(e,t,r)=>{"use strict";r.d(t,{b:()=>m});var n=r(20282),a=r(8911),o=r(73124),i=()=>{window.si||(window.si=function(...e){(window.siq=window.siq||[]).push(e)})};function s(){return false}function l(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}var u="https://va.vercel-scripts.com/v1/speed-insights",c=`${u}/script.js`,d=`${u}/script.debug.js`,f="NEXT_PUBLIC_SPEED_INSIGHTS_BASEPATH";function p(e){(0,n.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);let t=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(t.current)e.route&&t.current(e.route);else{let r=function(e={}){var t;if(!("undefined"!=typeof window)||null===e.route)return null;i();let r=!!e.dsn,n=e.scriptSrc||(r?c:"/_vercel/speed-insights/script.js");if(document.head.querySelector(`script[src*="${n}"]`))return null;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend));let a=document.createElement("script");return a.src=n,a.defer=!0,a.dataset.sdkn="@vercel/speed-insights"+(e.framework?`/${e.framework}`:""),a.dataset.sdkv="1.2.0-canary.1",e.sampleRate&&(a.dataset.sampleRate=e.sampleRate.toString()),e.route&&(a.dataset.route=e.route),e.endpoint?a.dataset.endpoint=e.endpoint:o.env[f]&&(a.dataset.endpoint=`/${o.env[f]}/_vercel/speed-insights/vitals`),e.dsn&&(a.dataset.dsn=e.dsn),a.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${n}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(a),{setRoute:e=>{a.dataset.route=e??void 0}}}({framework:e.framework||"react",...e});r&&(t.current=r.setRoute)}},[e.route]),null}var g=()=>{let e=(0,a.useParams)(),t=(0,a.useSearchParams)()||new URLSearchParams,r=(0,a.usePathname)();return e?function(e,t){if(!e||!t)return e;let r=e;try{let e=Object.entries(t);for(let[t,n]of e)if(!Array.isArray(n)){let e=l(n);e.test(r)&&(r=r.replace(e,`/[${t}]`))}for(let[t,n]of e)if(Array.isArray(n)){let e=l(n.join("/"));e.test(r)&&(r=r.replace(e,`/[...${t}]`))}return r}catch(t){return e}}(r,Object.keys(e).length?e:Object.fromEntries(t.entries())):null};function h(e){let t=g();return n.createElement(p,{route:t,...e,framework:"next"})}function m(e){return n.createElement(n.Suspense,{fallback:null},n.createElement(h,{...e}))}},37486:(e,t,r)=>{"use strict";var n,a;r.d(t,{LocalhostController:()=>o}),r(20282);function o(){return null}},91338:(e,t,r)=>{"use strict";r.d(t,{UnmountController:()=>l});var n,a=r(73124),o={scriptHostname:("u">typeof a?a.env.NEXT_PUBLIC_VERCEL_TOOLBAR_HOST:void 0)??"https://vercel.live",ownerId:"u">typeof a?a.env.NEXT_PUBLIC_VERCEL_TOOLBAR_OWNER_ID:void 0,projectId:"u">typeof a?a.env.NEXT_PUBLIC_VERCEL_TOOLBAR_PROJECT_ID:void 0,branch:"u">typeof a?a.env.NEXT_PUBLIC_VERCEL_TOOLBAR_BRANCH:void 0,deploymentId:"u">typeof a?"dpl_6JVwqnwdCnEyeTBQFuP5YPBEXQfA":void 0},i=r(20282),s=!1;function l({shouldMount:e}){return(0,i.useEffect)(()=>(e&&s&&function(e={}){if(!(!(typeof window>"u")&&null!==document.querySelector("vercel-live-feedback"))){Object.assign(o,e);let t=document.createElement("script");for(let[e,r]of(t.src=`${o.scriptHostname}/_next-live/feedback/feedback.js`,t.setAttribute("data-explicit-opt-in","true"),Object.entries((o.ownerId&&o.projectId?{"data-owner-id":o.ownerId,"data-project-id":o.projectId,"data-branch":n??o.branch}:o.deploymentId?{"data-deployment-id":o.deploymentId}:void 0)??{})))r&&t.setAttribute(e,r);(document.head||document.documentElement).appendChild(t)}}(),s=!0,()=>{(typeof window>"u"?void 0:window.__vercel_toolbar)?.unmount()}),[]),null}},42841:(e,t,r)=>{"use strict";let n;r.d(t,{Y_:()=>eD});var a=r(20282),o=r(29173);Symbol("Let zodToJsonSchema decide on which parser to use");let i=(e,t)=>{let r=0;for(;r{if("string"!=typeof e)throw Error('"text" parts expect a string value.');return{type:"text",value:e}}},l={code:"3",name:"error",parse:e=>{if("string"!=typeof e)throw Error('"error" parts expect a string value.');return{type:"error",value:e}}},u={code:"4",name:"assistant_message",parse:e=>{if(null==e||"object"!=typeof e||!("id"in e)||!("role"in e)||!("content"in e)||"string"!=typeof e.id||"string"!=typeof e.role||"assistant"!==e.role||!Array.isArray(e.content)||!e.content.every(e=>null!=e&&"object"==typeof e&&"type"in e&&"text"===e.type&&"text"in e&&null!=e.text&&"object"==typeof e.text&&"value"in e.text&&"string"==typeof e.text.value))throw Error('"assistant_message" parts expect an object with an "id", "role", and "content" property.');return{type:"assistant_message",value:e}}},c={code:"5",name:"assistant_control_data",parse:e=>{if(null==e||"object"!=typeof e||!("threadId"in e)||!("messageId"in e)||"string"!=typeof e.threadId||"string"!=typeof e.messageId)throw Error('"assistant_control_data" parts expect an object with a "threadId" and "messageId" property.');return{type:"assistant_control_data",value:{threadId:e.threadId,messageId:e.messageId}}}},d={code:"6",name:"data_message",parse:e=>{if(null==e||"object"!=typeof e||!("role"in e)||!("data"in e)||"string"!=typeof e.role||"data"!==e.role)throw Error('"data_message" parts expect an object with a "role" and "data" property.');return{type:"data_message",value:e}}},f=[s,l,u,c,d];s.code,l.code,u.code,c.code,d.code,s.name,s.code,l.name,l.code,u.name,u.code,c.name,c.code,d.name,d.code,f.map(e=>e.code);var p={code:"0",name:"text",parse:e=>{if("string"!=typeof e)throw Error('"text" parts expect a string value.');return{type:"text",value:e}}},g={code:"2",name:"data",parse:e=>{if(!Array.isArray(e))throw Error('"data" parts expect an array value.');return{type:"data",value:e}}},h={code:"3",name:"error",parse:e=>{if("string"!=typeof e)throw Error('"error" parts expect a string value.');return{type:"error",value:e}}},m={code:"8",name:"message_annotations",parse:e=>{if(!Array.isArray(e))throw Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:e}}},y={code:"9",name:"tool_call",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("toolName"in e)||"string"!=typeof e.toolName||!("args"in e)||"object"!=typeof e.args)throw Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:e}}},b={code:"a",name:"tool_result",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("result"in e))throw Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:e}}},v={code:"b",name:"tool_call_streaming_start",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("toolName"in e)||"string"!=typeof e.toolName)throw Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:e}}},E={code:"c",name:"tool_call_delta",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("argsTextDelta"in e)||"string"!=typeof e.argsTextDelta)throw Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:e}}},w={code:"d",name:"finish_message",parse:e=>{if(null==e||"object"!=typeof e||!("finishReason"in e)||"string"!=typeof e.finishReason)throw Error('"finish_message" parts expect an object with a "finishReason" property.');let t={finishReason:e.finishReason};return"usage"in e&&null!=e.usage&&"object"==typeof e.usage&&"promptTokens"in e.usage&&"completionTokens"in e.usage&&(t.usage={promptTokens:"number"==typeof e.usage.promptTokens?e.usage.promptTokens:Number.NaN,completionTokens:"number"==typeof e.usage.completionTokens?e.usage.completionTokens:Number.NaN}),{type:"finish_message",value:t}}},S={code:"e",name:"finish_step",parse:e=>{if(null==e||"object"!=typeof e||!("finishReason"in e)||"string"!=typeof e.finishReason)throw Error('"finish_step" parts expect an object with a "finishReason" property.');let t={finishReason:e.finishReason,isContinued:!1};return"usage"in e&&null!=e.usage&&"object"==typeof e.usage&&"promptTokens"in e.usage&&"completionTokens"in e.usage&&(t.usage={promptTokens:"number"==typeof e.usage.promptTokens?e.usage.promptTokens:Number.NaN,completionTokens:"number"==typeof e.usage.completionTokens?e.usage.completionTokens:Number.NaN}),"isContinued"in e&&"boolean"==typeof e.isContinued&&(t.isContinued=e.isContinued),{type:"finish_step",value:t}}},x=[p,g,h,m,y,b,v,E,w,S],k={[p.code]:p,[g.code]:g,[h.code]:h,[m.code]:m,[y.code]:y,[b.code]:b,[v.code]:v,[E.code]:E,[w.code]:w,[S.code]:S};p.name,p.code,g.name,g.code,h.name,h.code,m.name,m.code,y.name,y.code,b.name,b.code,v.name,v.code,E.name,E.code,w.name,w.code,S.name,S.code;var A=x.map(e=>e.code),_=e=>{let t=e.indexOf(":");if(-1===t)throw Error("Failed to parse stream string. No separator found.");let r=e.slice(0,t);if(!A.includes(r))throw Error(`Failed to parse stream string. Invalid code ${r}.`);let n=JSON.parse(e.slice(t+1));return k[r].parse(n)};async function T({stream:e,onTextPart:t,onDataPart:r,onErrorPart:n,onToolCallStreamingStartPart:a,onToolCallDeltaPart:o,onToolCallPart:i,onToolResultPart:s,onMessageAnnotationsPart:l,onFinishMessagePart:u,onFinishStepPart:c}){let d=e.getReader(),f=new TextDecoder,p=[],g=0;for(;;){let{value:e}=await d.read();if(e&&(p.push(e),g+=e.length,10!==e[e.length-1]))continue;if(0===p.length)break;let h=function(e,t){let r=new Uint8Array(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return e.length=0,r}(p,g);for(let{type:e,value:d}of(g=0,f.decode(h,{stream:!0}).split("\n").filter(e=>""!==e).map(_)))switch(e){case"text":await (null==t?void 0:t(d));break;case"data":await (null==r?void 0:r(d));break;case"error":await (null==n?void 0:n(d));break;case"message_annotations":await (null==l?void 0:l(d));break;case"tool_call_streaming_start":await (null==a?void 0:a(d));break;case"tool_call_delta":await (null==o?void 0:o(d));break;case"tool_call":await (null==i?void 0:i(d));break;case"tool_result":await (null==s?void 0:s(d));break;case"finish_message":await (null==u?void 0:u(d));break;case"finish_step":await (null==c?void 0:c(d));break;default:throw Error(`Unknown stream part type: ${e}`)}}}async function R({stream:e,update:t,onToolCall:r,onFinish:n,generateId:a=o.$C,getCurrentDate:i=()=>new Date}){let s,l;let u=i(),c=!0,d=[],f=[],p={},g={completionTokens:NaN,promptTokens:NaN,totalTokens:NaN},h="unknown";function m(){let e=[...f];if(null==s){t(d,e);return}(null==l?void 0:l.length)&&(s.annotations=l),t([...d,{...JSON.parse(JSON.stringify(s)),revisionId:a()}],e)}function y(){return(c||null==s)&&(null!=s&&d.push(s),c=!1,s={id:a(),role:"assistant",content:"",createdAt:u}),s}await T({stream:e,onTextPart(e){let t=y();s={...t,content:t.content+e},m()},onToolCallStreamingStartPart(e){let t=y();null==t.toolInvocations&&(t.toolInvocations=[]),p[e.toolCallId]={text:"",toolName:e.toolName,index:t.toolInvocations.length},t.toolInvocations.push({state:"partial-call",toolCallId:e.toolCallId,toolName:e.toolName,args:void 0}),m()},onToolCallDeltaPart(e){let t=y(),r=p[e.toolCallId];r.text+=e.argsTextDelta;let{value:n}=function(e){if(void 0===e)return{value:void 0,state:"undefined-input"};let t=(0,o.N8)({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=(0,o.N8)({text:function(e){let t=["ROOT"],r=-1,n=null;function a(e,a,o){switch(e){case'"':r=a,t.pop(),t.push(o),t.push("INSIDE_STRING");break;case"f":case"t":case"n":r=a,n=a,t.pop(),t.push(o),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(o),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r=a,t.pop(),t.push(o),t.push("INSIDE_NUMBER");break;case"{":r=a,t.pop(),t.push(o),t.push("INSIDE_OBJECT_START");break;case"[":r=a,t.pop(),t.push(o),t.push("INSIDE_ARRAY_START")}}function o(e,n){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":r=n,t.pop()}}function i(e,n){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":r=n,t.pop()}}for(let s=0;s=0;r--)switch(t[r]){case"INSIDE_STRING":s+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":s+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":s+="]";break;case"INSIDE_LITERAL":{let t=e.substring(n,e.length);"true".startsWith(t)?s+="true".slice(t.length):"false".startsWith(t)?s+="false".slice(t.length):"null".startsWith(t)&&(s+="null".slice(t.length))}}return s}(e)})).success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"}}(r.text);t.toolInvocations[r.index]={state:"partial-call",toolCallId:e.toolCallId,toolName:r.toolName,args:n},m()},async onToolCallPart(e){let t=y();if(null!=p[e.toolCallId]?t.toolInvocations[p[e.toolCallId].index]={state:"call",...e}:(null==t.toolInvocations&&(t.toolInvocations=[]),t.toolInvocations.push({state:"call",...e})),r){let n=await r({toolCall:e});null!=n&&(t.toolInvocations[t.toolInvocations.length-1]={state:"result",...e,result:n})}m()},onToolResultPart(e){let t=y().toolInvocations;if(null==t)throw Error("tool_result must be preceded by a tool_call");let r=t.findIndex(t=>t.toolCallId===e.toolCallId);if(-1===r)throw Error("tool_result must be preceded by a tool_call with the same toolCallId");t[r]={...t[r],state:"result",...e},m()},onDataPart(e){f.push(...e),m()},onMessageAnnotationsPart(e){null==l?l=[...e]:l.push(...e),m()},onFinishStepPart(e){c=!e.isContinued},onFinishMessagePart(e){h=e.finishReason,null!=e.usage&&(g=function({promptTokens:e,completionTokens:t}){return{promptTokens:e,completionTokens:t,totalTokens:e+t}}(e.usage))},onErrorPart(e){throw Error(e)}}),null==n||n({message:s,finishReason:h,usage:g})}async function I({stream:e,onTextPart:t}){let r=e.pipeThrough(new TextDecoderStream).getReader();for(;;){let{done:e,value:n}=await r.read();if(e)break;await t(n)}}var O=()=>fetch;async function C({api:e,body:t,streamProtocol:r="data",credentials:n,headers:a,abortController:o,restoreMessagesOnFailure:i,onResponse:s,onUpdate:l,onFinish:u,onToolCall:c,generateId:d,fetch:f=O()}){var p,g;let h=await f(e,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",...a},signal:null==(p=null==o?void 0:o())?void 0:p.signal,credentials:n}).catch(e=>{throw i(),e});if(s)try{await s(h)}catch(e){throw e}if(!h.ok)throw i(),Error(null!=(g=await h.text())?g:"Failed to fetch the chat response.");if(!h.body)throw Error("The response body is empty.");switch(r){case"text":{let e={id:d(),createdAt:new Date,role:"assistant",content:""};await I({stream:h.body,onTextPart:t=>{e.content+=t,l([{...e}],[])}}),null==u||u(e,{usage:{completionTokens:NaN,promptTokens:NaN,totalTokens:NaN},finishReason:"unknown"});return}case"data":await R({stream:h.body,update:l,onToolCall:c,onFinish({message:e,finishReason:t,usage:r}){u&&null!=e&&u(e,{usage:r,finishReason:t})},generateId:d});return;default:throw Error(`Unknown stream protocol: ${r}`)}}Symbol.for("vercel.ai.schema");var N=r(12434);let P=()=>{},D=P(),L=Object,F=e=>e===D,M=e=>"function"==typeof e,B=(e,t)=>({...e,...t}),j=e=>M(e.then),U=new WeakMap,$=0,G=e=>{let t,r;let n=typeof e,a=e&&e.constructor,o=a==Date;if(L(e)!==e||o||a==RegExp)t=o?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=U.get(e))return t;if(t=++$+"~",U.set(e,t),a==Array){for(r=0,t="@";rq&&typeof window.requestAnimationFrame!=z,X=(e,t)=>{let r=Y.get(e);return[()=>!F(t)&&e.get(t)||H,n=>{if(!F(t)){let a=e.get(t);t in V||(V[t]=a),r[5](t,B(a,n),a||H)}},r[6],()=>!F(t)&&t in V?V[t]:!F(t)&&e.get(t)||H]},J=!0,[Z,Q]=q&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[P,P],ee={initFocus:e=>(W&&document.addEventListener("visibilitychange",e),Z("focus",e),()=>{W&&document.removeEventListener("visibilitychange",e),Q("focus",e)}),initReconnect:e=>{let t=()=>{J=!0,e()},r=()=>{J=!1};return Z("online",t),Z("offline",r),()=>{Q("online",t),Q("offline",r)}}},et=!a.useId,er=!q||"Deno"in window,en=e=>K()?window.requestAnimationFrame(e):setTimeout(e,1),ea=er?a.useEffect:a.useLayoutEffect,eo="undefined"!=typeof navigator&&navigator.connection,ei=!er&&eo&&(["slow-2g","2g"].includes(eo.effectiveType)||eo.saveData),es=e=>{if(M(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?G(e):"",t]},el=0,eu=()=>++el;var ec={ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function ed(...e){let[t,r,n,a]=e,o=B({populateCache:!0,throwOnError:!0},"boolean"==typeof a?{revalidate:a}:a||{}),i=o.populateCache,s=o.rollbackOnError,l=o.optimisticData,u=e=>"function"==typeof s?s(e):!1!==s,c=o.throwOnError;if(M(r)){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(d))}return d(r);async function d(r){let a;let[s]=es(r);if(!s)return;let[d,f]=X(t,s),[p,g,h,m]=Y.get(t),y=()=>{let e=p[s];return(M(o.revalidate)?o.revalidate(d().data,r):!1!==o.revalidate)&&(delete h[s],delete m[s],e&&e[0])?e[0](2).then(()=>d().data):d().data};if(e.length<3)return y();let b=n,v=eu();g[s]=[v,0];let E=!F(l),w=d(),S=w.data,x=w._c,k=F(x)?S:x;if(E&&f({data:l=M(l)?l(k,S):l,_c:k}),M(b))try{b=b(k)}catch(e){a=e}if(b&&j(b)){if(b=await b.catch(e=>{a=e}),v!==g[s][0]){if(a)throw a;return b}a&&E&&u(a)&&(i=!0,f({data:k,_c:D}))}if(i&&!a&&(M(i)?f({data:i(b,k),error:D,_c:D}):f({data:b,error:D,_c:D})),g[s][1]=eu(),Promise.resolve(y()).then(()=>{f({_c:D})}),a){if(c)throw a;return}return b}}let ef=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},ep=(e,t)=>{if(!Y.has(e)){let r=B(ee,t),n={},a=ed.bind(D,e),o=P,i={},s=(e,t)=>{let r=i[e]||[];return i[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},l=(t,r,n)=>{e.set(t,r);let a=i[t];if(a)for(let e of a)e(r,n)},u=()=>{if(!Y.has(e)&&(Y.set(e,[n,{},{},{},a,l,s]),!er)){let t=r.initFocus(setTimeout.bind(D,ef.bind(D,n,0))),a=r.initReconnect(setTimeout.bind(D,ef.bind(D,n,1)));o=()=>{t&&t(),a&&a(),Y.delete(e)}}};return u(),[e,a,u,o]}return[e,Y.get(e)[4]]},[eg,eh]=ep(new Map),em=B({onLoadingSlow:P,onSuccess:P,onError:P,onErrorRetry:(e,t,r,n,a)=>{let o=r.errorRetryCount,i=a.retryCount,s=~~((Math.random()+.5)*(1<<(i<8?i:8)))*r.errorRetryInterval;(F(o)||!(i>o))&&setTimeout(n,s,a)},onDiscarded:P,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ei?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:ei?5e3:3e3,compare:(e,t)=>G(e)==G(t),isPaused:()=>!1,cache:eg,mutate:eh,fallback:{}},{isOnline:()=>J,isVisible:()=>{let e=W&&document.visibilityState;return F(e)||"hidden"!==e}}),ey=(e,t)=>{let r=B(e,t);if(t){let{use:n,fallback:a}=e,{use:o,fallback:i}=t;n&&o&&(r.use=n.concat(o)),a&&i&&(r.fallback=B(a,i))}return r},eb=(0,a.createContext)({}),ev=q&&window.__SWR_DEVTOOLS_USE__,eE=ev?window.__SWR_DEVTOOLS_USE__:[],ew=e=>M(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],eS=()=>B(em,(0,a.useContext)(eb)),ex=eE.concat(e=>(t,r,n)=>{let a=r&&((...e)=>{let[n]=es(t),[,,,a]=Y.get(eg);if(n.startsWith("$inf$"))return r(...e);let o=a[n];return F(o)?r(...e):(delete a[n],o)});return e(t,a,n)}),ek=(e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}};ev&&(window.__SWR_DEVTOOLS_REACT__=a);let eA=a.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),e_={dedupe:!0};L.defineProperty(e=>{let{value:t}=e,r=(0,a.useContext)(eb),n=M(t),o=(0,a.useMemo)(()=>n?t(r):t,[n,r,t]),i=(0,a.useMemo)(()=>n?o:ey(r,o),[n,r,o]),s=o&&o.provider,l=(0,a.useRef)(D);s&&!l.current&&(l.current=ep(s(i.cache||eg),o));let u=l.current;return u&&(i.cache=u[0],i.mutate=u[1]),ea(()=>{if(u)return u[2]&&u[2](),u[3]},[]),(0,a.createElement)(eb.Provider,B(e,{value:i}))},"defaultValue",{value:em});let eT=(n=(e,t,r)=>{let{cache:n,compare:o,suspense:i,fallbackData:s,revalidateOnMount:l,revalidateIfStale:u,refreshInterval:c,refreshWhenHidden:d,refreshWhenOffline:f,keepPreviousData:p}=r,[g,h,m,y]=Y.get(n),[b,v]=es(e),E=(0,a.useRef)(!1),w=(0,a.useRef)(!1),S=(0,a.useRef)(b),x=(0,a.useRef)(t),k=(0,a.useRef)(r),A=()=>k.current,_=()=>A().isVisible()&&A().isOnline(),[T,R,I,O]=X(n,b),C=(0,a.useRef)({}).current,P=F(s)?r.fallback[b]:s,L=(e,t)=>{for(let r in C)if("data"===r){if(!o(e[r],t[r])&&(!F(e[r])||!o(W,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},j=(0,a.useMemo)(()=>{let e=!!b&&!!t&&(F(l)?!A().isPaused()&&!i&&(!!F(u)||u):l),r=t=>{let r=B(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=T(),a=O(),o=r(n),s=n===a?o:r(a),c=o;return[()=>{let e=r(T());return L(e,c)?(c.data=e.data,c.isLoading=e.isLoading,c.isValidating=e.isValidating,c.error=e.error,c):(c=e,e)},()=>s]},[n,b]),U=(0,N.useSyncExternalStore)((0,a.useCallback)(e=>I(b,(t,r)=>{L(r,t)||e()}),[n,b]),j[0],j[1]),$=!E.current,G=g[b]&&g[b].length>0,H=U.data,V=F(H)?P:H,z=U.error,q=(0,a.useRef)(V),W=p?F(H)?q.current:H:V,K=(!G||!!F(z))&&($&&!F(l)?l:!A().isPaused()&&(i?!F(V)&&u:F(V)||u)),J=!!(b&&t&&$&&K),Z=F(U.isValidating)?J:U.isValidating,Q=F(U.isLoading)?J:U.isLoading,ee=(0,a.useCallback)(async e=>{let t,n;let a=x.current;if(!b||!a||w.current||A().isPaused())return!1;let i=!0,s=e||{},l=!m[b]||!s.dedupe,u=()=>et?!w.current&&b===S.current&&E.current:b===S.current,c={isValidating:!1,isLoading:!1},d=()=>{R(c)},f=()=>{let e=m[b];e&&e[1]===n&&delete m[b]},p={isValidating:!0};F(T().data)&&(p.isLoading=!0);try{if(l&&(R(p),r.loadingTimeout&&F(T().data)&&setTimeout(()=>{i&&u()&&A().onLoadingSlow(b,r)},r.loadingTimeout),m[b]=[a(v),eu()]),[t,n]=m[b],t=await t,l&&setTimeout(f,r.dedupingInterval),!m[b]||m[b][1]!==n)return l&&u()&&A().onDiscarded(b),!1;c.error=D;let e=h[b];if(!F(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return d(),l&&u()&&A().onDiscarded(b),!1;let s=T().data;c.data=o(s,t)?s:t,l&&u()&&A().onSuccess(t,b,r)}catch(r){f();let e=A(),{shouldRetryOnError:t}=e;!e.isPaused()&&(c.error=r,l&&u()&&(e.onError(r,b,e),(!0===t||M(t)&&t(r))&&(!A().revalidateOnFocus||!A().revalidateOnReconnect||_())&&e.onErrorRetry(r,b,e,e=>{let t=g[b];t&&t[0]&&t[0](ec.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return i=!1,d(),!0},[b,n]),eo=(0,a.useCallback)((...e)=>ed(n,S.current,...e),[]);if(ea(()=>{x.current=t,k.current=r,F(H)||(q.current=H)}),ea(()=>{if(!b)return;let e=ee.bind(D,e_),t=0,r=ek(b,g,(r,n={})=>{if(r==ec.FOCUS_EVENT){let r=Date.now();A().revalidateOnFocus&&r>t&&_()&&(t=r+A().focusThrottleInterval,e())}else if(r==ec.RECONNECT_EVENT)A().revalidateOnReconnect&&_()&&e();else if(r==ec.MUTATE_EVENT)return ee();else if(r==ec.ERROR_REVALIDATE_EVENT)return ee(n)});return w.current=!1,S.current=b,E.current=!0,R({_k:v}),K&&(F(V)||er?e():en(e)),()=>{w.current=!0,r()}},[b]),ea(()=>{let e;function t(){let t=M(c)?c(T().data):c;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!T().error&&(d||A().isVisible())&&(f||A().isOnline())?ee(e_).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[c,d,f,b]),(0,a.useDebugValue)(W),i&&F(V)&&b){if(!et&&er)throw Error("Fallback data is required when using suspense in SSR.");x.current=t,k.current=r,w.current=!1;let e=y[b];if(F(e)||eA(eo(e)),F(z)){let e=ee(e_);F(W)||(e.status="fulfilled",e.value=!0),eA(e)}else throw z}return{mutate:eo,get data(){return C.data=!0,W},get error(){return C.error=!0,z},get isValidating(){return C.isValidating=!0,Z},get isLoading(){return C.isLoading=!0,Q}}},function(...e){let t=eS(),[r,a,o]=ew(e),i=ey(t,o),s=n,{use:l}=i,u=(l||[]).concat(ex);for(let e=u.length;e--;)s=u[e](s);return s(r,a||i.fetcher||null,i)});var eR=r(16162),eI=r.n(eR);function eO(e,t){return null!=t?eI()(e,t):e}var eC=async(e,t,r,n,a,o,i,s,l,u,c,d,f,p,g,h,m)=>{var y;let b=i.current;r(t.messages,!1);let v=p?t.messages:t.messages.map(({role:e,content:t,experimental_attachments:r,data:n,annotations:a,toolInvocations:o})=>({role:e,content:t,...void 0!==r&&{experimental_attachments:r},...void 0!==n&&{data:n},...void 0!==a&&{annotations:a},...void 0!==o&&{toolInvocations:o}})),E=a.current;return await C({api:e,body:null!=(y=null==g?void 0:g({messages:t.messages,requestData:t.data,requestBody:t.body}))?y:{messages:v,data:t.data,...o.current.body,...t.body},streamProtocol:u,credentials:o.current.credentials,headers:{...o.current.headers,...t.headers},abortController:()=>s.current,restoreMessagesOnFailure(){m||r(b,!1)},onResponse:d,onUpdate(e,a){r([...t.messages,...e],!1),(null==a?void 0:a.length)&&n([...null!=E?E:[],...a],!1)},onToolCall:f,onFinish:c,generateId:l,fetch:h})};function eN(e){return"assistant"===e.role&&e.toolInvocations&&e.toolInvocations.length>0&&e.toolInvocations.every(e=>"result"in e)}async function eP(e){if(null==e)return[];if(e instanceof FileList)return Promise.all(Array.from(e).map(async e=>{let{name:t,type:r}=e;return{name:t,contentType:r,url:await new Promise((t,r)=>{let n=new FileReader;n.onload=e=>{var r;t(null==(r=e.target)?void 0:r.result)},n.onerror=e=>r(e),n.readAsDataURL(e)})}}));if(Array.isArray(e))return e;throw Error("Invalid attachments type")}var eD=function({api:e="/api/chat",id:t,initialMessages:r,initialInput:n="",sendExtraMessageFields:i,onToolCall:s,experimental_prepareRequestBody:l,maxSteps:u=1,streamProtocol:c="data",onResponse:d,onFinish:f,onError:p,credentials:g,headers:h,body:m,generateId:y=o.$C,fetch:b,keepLastMessageOnError:v=!0,experimental_throttle:E}={}){let w=(0,a.useId)(),S=null!=t?t:w,x="string"==typeof e?[e,S]:S,[k]=(0,a.useState)([]),{data:A,mutate:_}=eT([x,"messages"],null,{fallbackData:null!=r?r:k}),T=(0,a.useRef)(A||[]);(0,a.useEffect)(()=>{T.current=A||[]},[A]);let{data:R,mutate:I}=eT([x,"streamData"],null),O=(0,a.useRef)(R);(0,a.useEffect)(()=>{O.current=R},[R]);let{data:C=!1,mutate:N}=eT([x,"loading"],null),{data:P,mutate:D}=eT([x,"error"],null),L=(0,a.useRef)(null),F=(0,a.useRef)({credentials:g,headers:h,body:m});(0,a.useEffect)(()=>{F.current={credentials:g,headers:h,body:m}},[g,h,m]);let M=(0,a.useCallback)(async t=>{let r=T.current.length;try{N(!0),D(void 0);let r=new AbortController;L.current=r,await eC(e,t,eO(_,E),eO(I,E),O,F,T,L,y,c,f,d,s,i,l,b,v),L.current=null}catch(e){if("AbortError"===e.name)return L.current=null,null;p&&e instanceof Error&&p(e),D(e)}finally{N(!1)}let n=T.current,a=n[n.length-1];n.length>r&&null!=a&&u>1&&eN(a)&&function(e){let t=0;for(let r=e.length-1;r>=0;r--)if("assistant"===e[r].role)t++;else break;return t}(n){var o,i;e.id||(e.id=y());let s=await eP(a);return M({messages:T.current.concat({...e,id:null!=(o=e.id)?o:y(),createdAt:null!=(i=e.createdAt)?i:new Date,experimental_attachments:s.length>0?s:void 0}),headers:r,body:n,data:t})},[M,y]),j=(0,a.useCallback)(async({data:e,headers:t,body:r}={})=>{let n=T.current;return 0===n.length?null:M({messages:"assistant"===n[n.length-1].role?n.slice(0,-1):n,headers:t,body:r,data:e})},[M]),U=(0,a.useCallback)(()=>{L.current&&(L.current.abort(),L.current=null)},[]),$=(0,a.useCallback)(e=>{"function"==typeof e&&(e=e(T.current)),_(e,!1),T.current=e},[_]),G=(0,a.useCallback)(e=>{"function"==typeof e&&(e=e(O.current)),I(e,!1),O.current=e},[I]),[Y,H]=(0,a.useState)(n),V=(0,a.useCallback)(async(e,t={},r)=>{var n;if(null==(n=null==e?void 0:e.preventDefault)||n.call(e),!Y&&!t.allowEmptySubmit)return;r&&(F.current={...F.current,...r});let a=await eP(t.experimental_attachments);M({messages:Y||a.length||!t.allowEmptySubmit?T.current.concat({id:y(),createdAt:new Date,role:"user",content:Y,experimental_attachments:a.length>0?a:void 0}):T.current,headers:t.headers,body:t.body,data:t.data}),H("")},[Y,y,M]);return{messages:A||[],setMessages:$,data:R,setData:G,error:P,append:B,reload:j,stop:U,input:Y,setInput:H,handleInputChange:e=>{H(e.target.value)},handleSubmit:V,isLoading:C,addToolResult:({toolCallId:e,result:t})=>{let r=T.current.map((r,n,a)=>n===a.length-1&&"assistant"===r.role&&r.toolInvocations?{...r,toolInvocations:r.toolInvocations.map(r=>r.toolCallId===e?{...r,result:t,state:"result"}:r)}:r);_(r,!1),eN(r[r.length-1])&&M({messages:r})}}}},32361:function(e){var t;t=function(){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function t(t){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);var i=n(),s=a&&a.miss||function(){return Promise.resolve()};return i.then(function(e){return s(e)}).then(function(){return i})},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e,t){return t&&Object.keys(t).forEach(function(r){e[r]=t[r](e)}),e}function i(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var u={Read:1,Write:2,Any:3};function c(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t(t({},e),{},{status:r,lastUpdate:Date.now()})}function d(e){return"string"==typeof e?{protocol:"https",url:e,accept:u.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||u.Any}}var f="POST";function p(e,r,a,o){var i,s,l,u=[],f=function(e,r){if("GET"!==e.method&&(void 0!==e.data||void 0!==r.data))return JSON.stringify(Array.isArray(e.data)?e.data:t(t({},e.data),r.data))}(a,o),p=(i=t(t({},e.headers),o.headers),s={},Object.keys(i).forEach(function(e){var t=i[e];s[e.toLowerCase()]=t}),s),y=a.method,b="GET"!==a.method?{}:t(t({},a.data),o.data),v=t(t(t({"x-algolia-agent":e.userAgent.value},e.queryParameters),b),o.queryParameters),E=0,w=function t(r,n){var i,s,l,d=r.pop();if(void 0===d)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:h(u)};var b={data:f,headers:p,method:y,url:(i=a.path,s=g(v),l="".concat(d.protocol,"://").concat(d.url,"/").concat("/"===i.charAt(0)?i.substr(1):i),s.length&&(l+="?".concat(s)),l),connectTimeout:n(E,e.timeouts.connect),responseTimeout:n(E,o.timeout)},w=function(e){var t={request:b,response:e,host:d,triesLeft:r.length};return u.push(t),t},S={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw{name:"DeserializationError",message:t.message,response:e}}}(e)},onRetry:function(a){var o=w(a);return a.isTimedOut&&E++,Promise.all([e.logger.info("Retryable failure",m(o)),e.hostsCache.set(d,c(d,a.isTimedOut?3:2))]).then(function(){return t(r,n)})},onFail:function(e){throw w(e),function(e,t){var r=e.content,n=e.status,a=r;try{a=JSON.parse(r).message}catch(e){}return{name:"ApiError",message:a,status:n,transporterStackTrace:t}}(e,h(u))}};return e.requester.send(b).then(function(e){var t,r,n;return(t=e.status,e.isTimedOut||(r=e.isTimedOut,n=e.status,!r&&0==~~n)||2!=~~(t/100)&&4!=~~(t/100))?S.onRetry(e):2==~~(e.status/100)?S.onSuccess(e):S.onFail(e)})};return(l=e.hostsCache,Promise.all(r.map(function(e){return l.get(e,function(){return Promise.resolve(c(e))})})).then(function(e){var t=e.filter(function(e){return 1===e.status||Date.now()-e.lastUpdate>12e4}),a=e.filter(function(e){return 3===e.status&&Date.now()-e.lastUpdate<=12e4}),o=[].concat(n(t),n(a));return{getTimeout:function(e,t){return(0===a.length&&0===e?1:a.length+3+e)*t},statelessHosts:o.length>0?o.map(function(e){return d(e)}):r}})).then(function(e){return w(n(e.statelessHosts).reverse(),e.getTimeout)})}function g(e){return Object.keys(e).map(function(t){var r;return i("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]))}).join("&")}function h(e){return e.map(function(e){return m(e)})}function m(e){var r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return t(t({},e),{},{request:t(t({},e.request),{},{headers:t(t({},e.request.headers),r)})})}var y=function(e){var n,a,i,c,f,g,h,m,y,b,v,E,w,S=e.appId,x=(n=void 0!==e.authMode?e.authMode:s.WithinHeaders,a={"x-algolia-api-key":e.apiKey,"x-algolia-application-id":S},{headers:function(){return n===s.WithinHeaders?a:{}},queryParameters:function(){return n===s.WithinQueryParameters?a:{}}}),k=(c=(i=t(t({hosts:[{url:"".concat(S,"-dsn.algolia.net"),accept:u.Read},{url:"".concat(S,".algolia.net"),accept:u.Write}].concat(function(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}([{url:"".concat(S,"-1.algolianet.com")},{url:"".concat(S,"-2.algolianet.com")},{url:"".concat(S,"-3.algolianet.com")}]))},e),{},{headers:t(t(t({},x.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:t(t({},x.queryParameters()),e.queryParameters)})).hostsCache,f=i.logger,g=i.requester,h=i.requestsCache,m=i.responsesCache,y=i.timeouts,b=i.userAgent,v=i.hosts,E=i.queryParameters,w={hostsCache:c,logger:f,requester:g,requestsCache:h,responsesCache:m,timeouts:y,userAgent:b,headers:i.headers,queryParameters:E,hosts:v.map(function(e){return d(e)}),read:function(e,t){var n=l(t,w.timeouts.read),a=function(){return p(w,w.hosts.filter(function(e){return 0!=(e.accept&u.Read)}),e,n)};if(!0!==(void 0!==n.cacheable?n.cacheable:e.cacheable))return a();var o={request:e,mappedRequestOptions:n,transporter:{queryParameters:w.queryParameters,headers:w.headers}};return w.responsesCache.get(o,function(){return w.requestsCache.get(o,function(){return w.requestsCache.set(o,a()).then(function(e){return Promise.all([w.requestsCache.delete(o),e])},function(e){return Promise.all([w.requestsCache.delete(o),Promise.reject(e)])}).then(function(e){var t=r(e,2);return t[0],t[1]})})},{miss:function(e){return w.responsesCache.set(o,e)}})},write:function(e,t){return p(w,w.hosts.filter(function(e){return 0!=(e.accept&u.Write)}),e,l(t,w.timeouts.write))}});return o({transporter:k,appId:S,addAlgoliaAgent:function(e,t){k.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([k.requestsCache.clear(),k.responsesCache.clear()]).then(function(){})}},e.methods)},b=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},v=function(e){return function(r,n){var a=r.map(function(e){return t(t({},e),{},{params:g(e.params||{})})});return e.transporter.read({method:f,path:"1/indexes/*/queries",data:{requests:a},cacheable:!0},n)}},E=function(e){return function(r,n){return Promise.all(r.map(function(r){var a=r.params,o=a.facetName,i=a.facetQuery,s=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(a,["facetName","facetQuery"]);return b(e)(r.indexName,{methods:{searchForFacetValues:x}}).searchForFacetValues(o,i,t(t({},n),s))}))}},w=function(e){return function(t,r,n){return e.transporter.read({method:f,path:i("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},S=function(e){return function(t,r){return e.transporter.read({method:f,path:i("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},x=function(e){return function(t,r,n){return e.transporter.read({method:f,path:i("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}};function k(e,o,i){var l,u,c,d,f,p;return y(t(t(t({},{appId:e,apiKey:o,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise(function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach(function(t){return r.setRequestHeader(t,e.headers[t])});var n,a=function(e,n){return setTimeout(function(){r.abort(),t({status:0,content:n,isTimedOut:!0})},1e3*e)},o=a(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(o),n=a(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(o),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(o),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)})}},logger:{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}},responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:function e(t){var a=n(t.caches),o=a.shift();return void 0===o?{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then(function(e){return Promise.all([e,n.miss(e)])}).then(function(e){return r(e,1)[0]})},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return o.get(t,r,n).catch(function(){return e({caches:a}).get(t,r,n)})},set:function(t,r){return o.set(t,r).catch(function(){return e({caches:a}).set(t,r)})},delete:function(t){return o.delete(t).catch(function(){return e({caches:a}).delete(t)})},clear:function(){return o.clear().catch(function(){return e({caches:a}).clear()})}}}({caches:[(l={key:"".concat("4.10.5","-").concat(e)},c="algoliasearch-client-js-".concat(l.key),d=function(){return void 0===u&&(u=l.localStorage||window.localStorage),u},f=function(){return JSON.parse(d().getItem(c)||"{}")},{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var r=JSON.stringify(e),n=f()[r];return Promise.all([n||t(),void 0!==n])}).then(function(e){var t=r(e,2),a=t[0];return Promise.all([a,t[1]||n.miss(a)])}).then(function(e){return r(e,1)[0]})},set:function(e,t){return Promise.resolve().then(function(){var r=f();return r[JSON.stringify(e)]=t,d().setItem(c,JSON.stringify(r)),t})},delete:function(e){return Promise.resolve().then(function(){var t=f();delete t[JSON.stringify(e)],d().setItem(c,JSON.stringify(t))})},clear:function(){return Promise.resolve().then(function(){d().removeItem(c)})}}),a()]}),userAgent:(p={value:"Algolia for JavaScript (".concat("4.10.5",")"),add:function(e){var t="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return -1===p.value.indexOf(t)&&(p.value="".concat(p.value).concat(t)),p}}).add({segment:"Browser",version:"lite"}),authMode:s.WithinQueryParameters}),i),{},{methods:{search:v,searchForFacetValues:E,multipleQueries:v,multipleSearchForFacetValues:E,initIndex:function(e){return function(t){return b(e)(t,{methods:{search:S,searchForFacetValues:x,findAnswers:w}})}}}}))}return k.version="4.10.5",k},e.exports=t()},83824:(e,t)=>{"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=l(e),i=o[0],s=o[1],u=new a((i+s)*3/4-s),c=0,d=s>0?i-4:i;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,o=[],i=0,s=n-a;i>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}(e,i,i+16383>s?s:i+16383));return 1===a?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===a&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=o.length;i0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},83594:(e,t,r)=>{"use strict";var n=r(83824),a=r(74701),o=r(46488);function i(){return l.TYPED_ARRAY_SUPPORT?0x7fffffff:0x3fffffff}function s(e,t){if(i()=i())throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return R(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return O(e).length;default:if(n)return R(e).length;t=(""+t).toLowerCase(),n=!0}}function h(e,t,r){var a,o,i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n,a=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>a)&&(r=a);for(var o="",i=t;i0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),isNaN(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return -1;r=e.length-1}else if(r<0){if(!a)return -1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,a);if("number"==typeof t)return(t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf)?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,a);throw TypeError("val must be string, number or Buffer")}function b(e,t,r,n,a){var o,i=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;i=2,s/=2,l/=2,r/=2}function u(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var c=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){for(var d=!0,f=0;f239?4:u>223?3:u>191?2:1;if(a+d<=r)switch(d){case 1:u<128&&(c=u);break;case 2:(192&(o=e[a+1]))==128&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[a+1],i=e[a+2],(192&o)==128&&(192&i)==128&&(l=(15&u)<<12|(63&o)<<6|63&i)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[a+1],i=e[a+2],s=e[a+3],(192&o)==128&&(192&i)==128&&(192&s)==128&&(l=(15&u)<<18|(63&o)<<12|(63&i)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),a+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function w(e,t,r,n,a,o){if(!l.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw RangeError("Index out of range")}function S(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,o=Math.min(e.length-r,2);a>>(n?a:1-a)*8}function x(e,t,r,n){t<0&&(t=0xffffffff+t+1);for(var a=0,o=Math.min(e.length-r,4);a>>(n?a:3-a)*8&255}function k(e,t,r,n,a,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function A(e,t,r,n,o){return o||k(e,t,r,4,34028234663852886e22,-34028234663852886e22),a.write(e,t,r,n,23,4),r+4}function _(e,t,r,n,o){return o||k(e,t,r,8,17976931348623157e292,-17976931348623157e292),a.write(e,t,r,n,52,8),r+8}t.hp=l,t.IS=50,l.TYPED_ARRAY_SUPPORT=void 0!==r.g.TYPED_ARRAY_SUPPORT?r.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),i(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,r){return u(null,e,t,r)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,r){return(c(e),e<=0)?s(null,e):void 0!==t?"string"==typeof r?s(null,e).fill(t,r):s(null,e).fill(t):s(null,e)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!!(null!=e&&e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,a=0,o=Math.min(r,n);a0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},l.prototype.compare=function(e,t,r,n,a){if(!l.isBuffer(e))throw TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,a>>>=0,this===e)return 0;for(var o=a-n,i=r-t,s=Math.min(o,i),u=this.slice(n,a),c=e.slice(t,r),d=0;dm)&&(r=m),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var y=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;var o=t.length;if(o%2!=0)throw TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var i=0;i>8,a.push(r%256),a.push(n);return a}(e,this.length-g),this,g,h);default:if(y)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),y=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},l.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(a*=256);)n+=this[e+--t]*a;return n},l.prototype.readUInt8=function(e,t){return t||E(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||E(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||E(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||E(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||E(e,t,this.length);for(var n=this[e],a=1,o=0;++o=(a*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||E(e,t,this.length);for(var n=t,a=1,o=this[e+--n];n>0&&(a*=256);)o+=this[e+--n]*a;return o>=(a*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return(t||E(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},l.prototype.readInt16LE=function(e,t){t||E(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},l.prototype.readInt16BE=function(e,t){t||E(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},l.prototype.readInt32LE=function(e,t){return t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||E(e,4,this.length),a.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||E(e,4,this.length),a.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||E(e,8,this.length),a.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||E(e,8,this.length),a.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){var a=Math.pow(2,8*r)-1;w(this,e,t,r,a,0)}var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||w(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||w(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):S(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||w(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):S(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||w(this,e,t,4,0xffffffff,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||w(this,e,t,4,0xffffffff,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);w(this,e,t,r,a-1,-a)}var o=0,i=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);w(this,e,t,r,a-1,-a)}var o=r-1,i=1,s=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||w(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||w(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):S(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||w(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):S(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||w(this,e,t,4,0x7fffffff,-0x80000000),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||w(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,r){return A(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return A(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return _(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return _(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("sourceStart out of bounds");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--a)e[a+t]=this[a+r];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!a){if(r>56319||i+1===n){(t-=3)>-1&&o.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),a=r;continue}r=(a-55296<<10|r-56320)+65536}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function I(e){for(var t=[],r=0;r=t.length)&&!(a>=e.length);++a)t[a+r]=e[a];return a}},12183:(e,t)=>{"use strict";t.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var n={},o=e.split(a),i=(t||{}).decode||r,s=0;s{"use strict";var n=r(61922),a={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var r,o,i,s,l,u,c,d,f=!1;t||(t={}),i=t.debug||!1;try{if(l=n(),u=document.createRange(),c=document.getSelection(),(d=document.createElement("span")).textContent=e,d.style.all="unset",d.style.position="fixed",d.style.top=0,d.style.clip="rect(0, 0, 0, 0)",d.style.whiteSpace="pre",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.style.userSelect="text",d.addEventListener("copy",function(r){if(r.stopPropagation(),t.format){if(r.preventDefault(),void 0===r.clipboardData){i&&console.warn("unable to use e.clipboardData"),i&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var n=a[t.format]||a.default;window.clipboardData.setData(n,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e)}t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))}),document.body.appendChild(d),u.selectNodeContents(d),c.addRange(u),!document.execCommand("copy"))throw Error("copy command was unsuccessful");f=!0}catch(n){i&&console.error("unable to copy using execCommand: ",n),i&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(n){i&&console.error("unable to copy using clipboardData: ",n),i&&console.error("falling back to prompt"),r="message"in t?t.message:"Copy to clipboard: #{key}, Enter",o=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C",s=r.replace(/#{\s*key\s*}/g,o),window.prompt(s,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(u):c.removeAllRanges()),d&&document.body.removeChild(d),l()}return f}},18981:(e,t,r)=>{"use strict";r.d(t,{F:()=>i});var n=r(20282),a=r(23292),o=r(22886);function i({children:e,features:t,strict:r=!1}){let[,i]=(0,n.useState)(!s(t)),l=(0,n.useRef)(void 0);if(!s(t)){let{renderer:e,...r}=t;l.current=e,(0,o.Y)(r)}return(0,n.useEffect)(()=>{s(t)&&t().then(({renderer:e,...t})=>{(0,o.Y)(t),l.current=e,i(!0)})},[]),n.createElement(a.Y.Provider,{value:{renderer:l.current,strict:r}},e)}function s(e){return"function"==typeof e}},74701:(e,t)=>{t.read=function(e,t,r,n,a){var o,i,s=8*a-n-1,l=(1<>1,c=-7,d=r?a-1:0,f=r?-1:1,p=e[t+d];for(d+=f,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=f,c-=8);for(i=o&(1<<-c)-1,o>>=-c,c+=n;c>0;i=256*i+e[t+d],d+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,n),o-=u}return(p?-1:1)*i*Math.pow(2,o-n)},t.write=function(e,t,r,n,a,o){var i,s,l,u=8*o-a-1,c=(1<>1,f=23===a?5960464477539062e-23:0,p=n?0:o-1,g=n?1:-1,h=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,i=c):(i=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-i))<1&&(i--,l*=2),i+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(i++,l/=2),i+d>=c?(s=0,i=c):i+d>=1?(s=(t*l-1)*Math.pow(2,a),i+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),i=0));a>=8;e[r+p]=255&s,p+=g,s/=256,a-=8);for(i=i<0;e[r+p]=255&i,p+=g,i/=256,u-=8);e[r+p-g]|=128*h}},46488:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},75799:(e,t,r)=>{"use strict";r.d(t,{A:()=>eN});var n=r(20282);function a(){return(a=Object.assign||function(e){for(var t=1;t",lt:"<",nbsp:"\xa0",quot:"“"},l=["style","script"],u=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,c=/mailto:/i,d=/\n{2,}$/,f=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,p=/^ *> ?/gm,g=/^ {2,}\n/,h=/^(?:( *[-*_]) *){3,}(?:\n *)+\n/,m=/^\s*(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n *)+\n?/,y=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,b=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,v=/^(?:\n *)*\n/,E=/\r\n?/g,w=/^\[\^([^\]]+)](:.*)\n/,S=/^\[\^([^\]]+)]/,x=/\f/g,k=/^\s*?\[(x|\s)\]/,A=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,_=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,T=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,R=/&([a-z]+);/g,I=/^)/,O=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,C=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,N=/^\{.*\}$/,P=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,D=/^<([^ >]+@[^ >]+)>/,L=/^<([^ >]+:\/[^ >]+)>/,F=/ *\n+$/,M=/(?:^|\n)( *)$/,B=/-([a-z])?/gi,j=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,U=/^((?:[^\n]|\n(?! *\n))+)(?:\n *)+\n/,$=/^\[([^\]]*)\]:\s*(\S+)\s*("([^"]*)")?/,G=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Y=/^\[([^\]]*)\] ?\[([^\]]*)\]/,H=/(\[|\])/g,V=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,z=/\t/g,q=/^ *\| */,W=/(^ *\||\| *$)/g,K=/ *$/,X=/^ *:-+: *$/,J=/^ *:-+ *$/,Z=/^ *-+: *$/,Q=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,ee=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,et=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,er=/^\\([^0-9A-Za-z\s])/,en=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,ea=/(^\n+|\n+$|\s+$)/g,eo=/^([ \t]*)/,ei=/\\([^0-9A-Z\s])/gi,es=RegExp("^( *)((?:[*+-]|\\d+\\.)) +"),el=RegExp("( *)((?:[*+-]|\\d+\\.)) +[^\\n]*(?:\\n(?!\\1(?:[*+-]|\\d+\\.) )[^\\n]*)*(\\n|$)","gm"),eu=RegExp("^( *)((?:[*+-]|\\d+\\.)) [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1(?:[*+-]|\\d+\\.) (?!(?:[*+-]|\\d+\\.) ))\\n*|\\s*\\n*$)"),ec="(?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*",ed=RegExp("^\\[("+ec+")\\]\\(\\s*?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),ef=RegExp("^!\\[("+ec+")\\]\\(\\s*?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),ep=[f,y,m,A,_,T,I,C,el,eu,j,U];function eg(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function eh(e){return Z.test(e)?"right":X.test(e)?"center":J.test(e)?"left":null}function em(e,t,r){var n=r.inTable;r.inTable=!0;var a=t(e.trim(),r);r.inTable=n;var o=[[]];return a.forEach(function(e,t){"tableSeparator"===e.type?0!==t&&t!==a.length-1&&o.push([]):("text"!==e.type||null!=a[t+1]&&"tableSeparator"!==a[t+1].type||(e.content=e.content.replace(K,"")),o[o.length-1].push(e))}),o}function ey(e,t,r){r.inline=!0;var n=em(e[1],t,r),a=e[2].replace(W,"").split("|").map(eh),o=e[3].trim().split("\n").map(function(e){return em(e,t,r)});return r.inline=!1,{align:a,cells:o,header:n,type:"table"}}function eb(e,t){return null==e.align[t]?{}:{textAlign:e.align[t]}}function ev(e){return function(t,r){return r.inline?e.exec(t):null}}function eE(e){return function(t,r){return r.inline||r.simple?e.exec(t):null}}function ew(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function eS(e){return function(t){return e.exec(t)}}function ex(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data):/i))return null}catch(e){return null}return e}function ek(e){return e.replace(ei,"$1")}function eA(e,t,r){var n=r.inline||!1,a=r.simple||!1;r.inline=!0,r.simple=!0;var o=e(t,r);return r.inline=n,r.simple=a,o}function e_(e,t,r){return r.inline=!1,e(t+"\n\n",r)}var eT,eR=function(e,t,r){return{content:eA(t,e[1],r)}};function eI(){return{}}function eO(){return null}function eC(e,t,r){for(var n=e,a=t.split(".");a.length&&void 0!==(n=n[a[0]]);)a.shift();return n||r}function eN(e){var t=e.children,r=e.options,W=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a}(e,["children","options"]);return n.cloneElement(function(e,t){void 0===t&&(t={}),t.overrides=t.overrides||{},t.slugify=t.slugify||eg,t.namedCodesToUnicode=t.namedCodesToUnicode?a({},s,t.namedCodesToUnicode):s;var r=t.createElement||n.createElement;function W(e,n){var o,i,s=eC(t.overrides,e+".props",{});return r.apply(void 0,[(i=eC(o=t.overrides,e))?"function"==typeof i||"object"==typeof i&&"render"in i?i:eC(o,e+".component",e):e,a({},n,s,{className:function(){return[].slice.call(arguments).filter(Boolean).join(" ")}(null==n?void 0:n.className,s.className)||void 0})].concat([].slice.call(arguments,2)))}function K(e){var r=!1;t.forceInline?r=!0:t.forceBlock||(r=!1===V.test(e));var a=eN(em(r?e:e.replace(ea,"")+"\n\n",{inline:r}));if(null===t.wrapper)return a;var o,i=t.wrapper||(r?"span":"div");if(a.length>1||t.forceWrapper)o=a;else{if(1===a.length)return"string"==typeof(o=a[0])?W("span",{key:"outer"},o):o;o=null}return n.createElement(i,{key:"outer"},o)}function X(e){var t=e.match(u);return t?t.reduce(function(e,t,r){var a=t.indexOf("=");if(-1!==a){var s,l,u,c=(-1!==(s=t.slice(0,a)).indexOf("-")&&null===s.match(O)&&(s=s.replace(B,function(e,t){return t.toUpperCase()})),s).trim(),d=(l=t.slice(a+1).trim())?(o.test(l.charAt(0))&&(l=l.substr(1)),o.test(l.charAt(l.length-1))&&(l=l.substr(0,l.length-1)),l):"",f=i[c]||c,p=e[f]=(u=d,"style"===c?u.split(/;\s?/).reduce(function(e,t){var r=t.slice(0,t.indexOf(":"));return e[r.replace(/(-[a-z])/g,function(e){return e[1].toUpperCase()})]=t.slice(r.length+1).trim(),e},{}):"href"===c?ex(u):(u.match(N)&&(u=u.slice(1,u.length-1)),"true"===u||"false"!==u&&u));"string"==typeof p&&(T.test(p)||C.test(p))&&(e[f]=n.cloneElement(K(p.trim()),{key:r}))}else"style"!==t&&(e[i[t]||t]=!0);return e},{}):void 0}var J=[],Z={},ei={blockQuote:{match:ew(f),order:eT.HIGH,parse:function(e,t,r){return{content:t(e[0].replace(p,""),r)}},react:function(e,t,r){return W("blockquote",{key:r.key},t(e.content,r))}},breakLine:{match:eS(g),order:eT.HIGH,parse:eI,react:function(e,t,r){return W("br",{key:r.key})}},breakThematic:{match:ew(h),order:eT.HIGH,parse:eI,react:function(e,t,r){return W("hr",{key:r.key})}},codeBlock:{match:ew(y),order:eT.MAX,parse:function(e){return{content:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),lang:void 0}},react:function(e,t,r){return W("pre",{key:r.key},W("code",{className:e.lang?"lang-"+e.lang:""},e.content))}},codeFenced:{match:ew(m),order:eT.MAX,parse:function(e){return{content:e[3],lang:e[2]||void 0,type:"codeBlock"}}},codeInline:{match:eE(b),order:eT.LOW,parse:function(e){return{content:e[2]}},react:function(e,t,r){return W("code",{key:r.key},e.content)}},footnote:{match:ew(w),order:eT.MAX,parse:function(e){return J.push({footnote:e[2],identifier:e[1]}),{}},react:eO},footnoteReference:{match:ev(S),order:eT.HIGH,parse:function(e){return{content:e[1],target:"#"+t.slugify(e[1])}},react:function(e,t,r){return W("a",{key:r.key,href:ex(e.target)},W("sup",{key:r.key},e.content))}},gfmTask:{match:ev(k),order:eT.HIGH,parse:function(e){return{completed:"x"===e[1].toLowerCase()}},react:function(e,t,r){return W("input",{checked:e.completed,key:r.key,readOnly:!0,type:"checkbox"})}},heading:{match:ew(A),order:eT.HIGH,parse:function(e,r,n){return{content:eA(r,e[2],n),id:t.slugify(e[2]),level:e[1].length}},react:function(e,t,r){return e.tag="h"+e.level,W(e.tag,{id:e.id,key:r.key},t(e.content,r))}},headingSetext:{match:ew(_),order:eT.MAX,parse:function(e,t,r){return{content:eA(t,e[1],r),level:"="===e[2]?1:2,type:"heading"}}},htmlComment:{match:eS(I),order:eT.HIGH,parse:function(){return{}},react:eO},image:{match:eE(ef),order:eT.HIGH,parse:function(e){return{alt:e[1],target:ek(e[2]),title:e[3]}},react:function(e,t,r){return W("img",{key:r.key,alt:e.alt||void 0,title:e.title||void 0,src:ex(e.target)})}},link:{match:ev(ed),order:eT.LOW,parse:function(e,t,r){var n,a,o,i;return{content:(n=e[1],a=r.inline||!1,o=r.simple||!1,r.inline=!1,r.simple=!0,i=t(n,r),r.inline=a,r.simple=o,i),target:ek(e[2]),title:e[3]}},react:function(e,t,r){return W("a",{key:r.key,href:ex(e.target),title:e.title},t(e.content,r))}},linkAngleBraceStyleDetector:{match:ev(L),order:eT.MAX,parse:function(e){return{content:[{content:e[1],type:"text"}],target:e[1],type:"link"}}},linkBareUrlDetector:{match:function(e,t){return t.inAnchor?null:ev(P)(e,t)},order:eT.MAX,parse:function(e){return{content:[{content:e[1],type:"text"}],target:e[1],title:void 0,type:"link"}}},linkMailtoDetector:{match:ev(D),order:eT.MAX,parse:function(e){var t=e[1],r=e[1];return c.test(r)||(r="mailto:"+r),{content:[{content:t.replace("mailto:",""),type:"text"}],target:r,type:"link"}}},list:{match:function(e,t,r){var n=M.exec(r);return n&&(t._list||!t.inline)?eu.exec(e=n[1]+e):null},order:eT.HIGH,parse:function(e,t,r){var n=e[2],a=n.length>1,o=a?+n:void 0,i=e[0].replace(d,"\n").match(el),s=!1;return{items:i.map(function(e,n){var a=RegExp("^ {1,"+es.exec(e)[0].length+"}","gm"),o=e.replace(a,"").replace(es,""),l=n===i.length-1,u=-1!==o.indexOf("\n\n")||l&&s;s=u;var c,d=r.inline,f=r._list;r._list=!0,u?(r.inline=!1,c=o.replace(F,"\n\n")):(r.inline=!0,c=o.replace(F,""));var p=t(c,r);return r.inline=d,r._list=f,p}),ordered:a,start:o}},react:function(e,t,r){return W(e.ordered?"ol":"ul",{key:r.key,start:e.start},e.items.map(function(e,n){return W("li",{key:n},t(e,r))}))}},newlineCoalescer:{match:ew(v),order:eT.LOW,parse:eI,react:function(){return"\n"}},paragraph:{match:ew(U),order:eT.LOW,parse:eR,react:function(e,t,r){return W("p",{key:r.key},t(e.content,r))}},ref:{match:ev($),order:eT.MAX,parse:function(e){return Z[e[1]]={target:e[2],title:e[4]},{}},react:eO},refImage:{match:eE(G),order:eT.MAX,parse:function(e){return{alt:e[1]||void 0,ref:e[2]}},react:function(e,t,r){return W("img",{key:r.key,alt:e.alt,src:ex(Z[e.ref].target),title:Z[e.ref].title})}},refLink:{match:ev(Y),order:eT.MAX,parse:function(e,t,r){return{content:t(e[1],r),fallbackContent:t(e[0].replace(H,"\\$1"),r),ref:e[2]}},react:function(e,t,r){return Z[e.ref]?W("a",{key:r.key,href:ex(Z[e.ref].target),title:Z[e.ref].title},t(e.content,r)):W("span",{key:r.key},t(e.fallbackContent,r))}},table:{match:ew(j),order:eT.HIGH,parse:ey,react:function(e,t,r){return W("table",{key:r.key},W("thead",null,W("tr",null,e.header.map(function(n,a){return W("th",{key:a,style:eb(e,a)},t(n,r))}))),W("tbody",null,e.cells.map(function(n,a){return W("tr",{key:a},n.map(function(n,a){return W("td",{key:a,style:eb(e,a)},t(n,r))}))})))}},tableSeparator:{match:function(e,t){return t.inTable?q.exec(e):null},order:eT.HIGH,parse:function(){return{type:"tableSeparator"}},react:function(){return" | "}},text:{match:eS(en),order:eT.MIN,parse:function(e){return{content:e[0].replace(R,function(e,r){return t.namedCodesToUnicode[r]?t.namedCodesToUnicode[r]:e})}},react:function(e){return e.content}},textBolded:{match:eE(Q),order:eT.MED,parse:function(e,t,r){return{content:t(e[2],r)}},react:function(e,t,r){return W("strong",{key:r.key},t(e.content,r))}},textEmphasized:{match:eE(ee),order:eT.LOW,parse:function(e,t,r){return{content:t(e[2],r)}},react:function(e,t,r){return W("em",{key:r.key},t(e.content,r))}},textEscaped:{match:eE(er),order:eT.HIGH,parse:function(e){return{content:e[1],type:"text"}}},textStrikethroughed:{match:eE(et),order:eT.LOW,parse:eR,react:function(e,t,r){return W("del",{key:r.key},t(e.content,r))}}};!0!==t.disableParsingRawHTML&&(ei.htmlBlock={match:eS(T),order:eT.HIGH,parse:function(e,t,r){var n=RegExp("^"+e[3].match(eo)[1],"gm"),a=e[3].replace(n,""),o=ep.some(function(e){return e.test(a)})?e_:eA,i=e[1].toLowerCase(),s=-1!==l.indexOf(i);r.inAnchor=r.inAnchor||"a"===i;var u=s?e[3]:o(t,a,r);return r.inAnchor=!1,{attrs:X(e[2]),content:u,noInnerParse:s,tag:s?i:e[1]}},react:function(e,t,r){return W(e.tag,Object.assign({key:r.key},e.attrs),e.noInnerParse?e.content:t(e.content,r))}},ei.htmlSelfClosing={match:eS(C),order:eT.HIGH,parse:function(e){return{attrs:X(e[2]||""),tag:e[1]}},react:function(e,t,r){return W(e.tag,Object.assign({},e.attrs,{key:r.key}))}});var ec,eh,em=((ec=Object.keys(ei)).sort(function(e,t){var r=ei[e].order,n=ei[t].order;return r!==n?r-n:e{"use strict";r.d(t,{A:()=>n});let n=function(e,t){try{if("string"==typeof e&&e.length>0)return function(e){if((e=String(e)).length>100)throw Error("Value exceeds the maximum length of 100 characters.");let t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return NaN;let r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return 864e5*r;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*r;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*r;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:throw Error(`The unit ${n} was matched, but no matching case exists.`)}}(e);if("number"==typeof e&&isFinite(e))return t?.long?function(e){let t=Math.abs(e);return t>=864e5?a(e,t,864e5,"day"):t>=36e5?a(e,t,36e5,"hour"):t>=6e4?a(e,t,6e4,"minute"):t>=1e3?a(e,t,1e3,"second"):`${e} ms`}(e):function(e){let t=Math.abs(e);return t>=864e5?`${Math.round(e/864e5)}d`:t>=36e5?`${Math.round(e/36e5)}h`:t>=6e4?`${Math.round(e/6e4)}m`:t>=1e3?`${Math.round(e/1e3)}s`:`${e}ms`}(e);throw Error("Value is not a string or number.")}catch(t){throw Error("object"==typeof t&&null!==t&&"message"in t?`${t.message}. value=${JSON.stringify(e)}`:"An unknown error has occured.")}};function a(e,t,r,n){return`${Math.round(e/r)} ${n}${t>=1.5*r?"s":""}`}},78879:(e,t,r)=>{e.exports=r(41294)},8397:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{callServer:function(){return n.callServer},createServerReference:function(){return o},findSourceMapURL:function(){return a.findSourceMapURL}});let n=r(20718),a=r(18250),o=r(83162).createServerReference},41294:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useRouter",{enumerable:!0,get:function(){return o}});let n=r(20282),a=r(79061);function o(){return(0,n.useContext)(a.RouterContext)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4533:(e,t,r)=>{"use strict";function n(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function a(e){return e&&e.sensitive?"":"i"}r.d(t,{MM:()=>function e(t,r,o){var i;return t instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,a=r.exec(e.source);a;)t.push({name:a[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r.exec(e.source);return e}(t,r):Array.isArray(t)?(i=t.map(function(t){return e(t,r,o).source}),new RegExp("(?:".concat(i.join("|"),")"),a(o))):function(e,t,r){void 0===r&&(r={});for(var o=r.strict,i=void 0!==o&&o,s=r.start,l=r.end,u=r.encode,c=void 0===u?function(e){return e}:u,d=r.delimiter,f=r.endsWith,p="[".concat(n(void 0===f?"":f),"]|$"),g="[".concat(n(void 0===d?"/#?":d),"]"),h=void 0===s||s?"^":"",m=0;m-1:void 0===w;i||(h+="(?:".concat(g,"(?=").concat(p,"))?")),S||(h+="(?=".concat(g,"|").concat(p,")"))}return new RegExp(h,a(r))}(function(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122||95===i){a+=e[o++];continue}break}if(!a)throw TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:a}),r=o;continue}if("("===n){var s=1,l="",o=r+1;if("?"===e[o])throw TypeError('Pattern cannot start with "?" at '.concat(o));for(;o{"use strict";r.d(t,{Ay:()=>g,Gs:()=>o});var n=function(){var e=0,t={util:{encode:function(e){return e instanceof r?new r(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof l)){if(h&&v!=r.length-1){f.lastIndex=E;var S=f.exec(e);if(!S)break;for(var x=S.index+(g?S[1].length:0),k=S.index+S[0].length,A=v,_=E,T=r.length;A=(_+=r[A].length)&&(++v,E=_);if(r[v]instanceof l)continue;R=A-v,w=e.slice(E,_),S.index-=E}else{f.lastIndex=0;var S=f.exec(w),R=1}if(!S){if(i)break;continue}g&&(m=S[1]?S[1].length:0);var x=S.index+m,S=S[0].slice(m),k=x+S.length,I=w.slice(0,x),O=w.slice(k),C=[v,R];I&&(++v,E+=I.length,C.push(I));var N=new l(u,p?t.tokenize(S,p):S,y,S,h);if(C.push(N),O&&C.push(O),Array.prototype.splice.apply(r,C),1!=R&&t.matchGrammar(e,r,n,v,E,!0,u),i)break}}}}},hooks:{add:function(){},run:function(e,t){}},tokenize:function(e,r,n){var a=[e],o=r.rest;if(o){for(var i in o)r[i]=o[i];delete r.rest}return t.matchGrammar(e,a,r,0,0,!1),a}},r=t.Token=function(e,t,r,n,a){this.type=e,this.content=t,this.alias=r,this.length=0|(n||"").length,this.greedy=!!a};return r.stringify=function(e,n,a){if("string"==typeof e)return e;if("Array"===t.util.type(e))return e.map(function(t){return r.stringify(t,n,e)}).join("");var o={type:e.type,content:r.stringify(e.content,n,a),tag:"span",classes:["token",e.type],attributes:{},language:n,parent:a};if(e.alias){var i="Array"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(o.classes,i)}var s=Object.keys(o.attributes).map(function(e){return e+'="'+(o.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+(s?" "+s:"")+">"+o.content+""},t}();n.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:n.languages[t]},r.cdata=/^$/i;var a={"included-cdata":{pattern://i,inside:r}};a["language-"+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",o)}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|(?!\2)[^\\`$])*\2/,lookbehind:!0,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.c=n.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),n.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},n.languages.c.string],comment:n.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:n.languages.c}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete n.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/;e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","operator",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(n),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:e.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},r.tag))}(n),function(e){var t,r=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+r.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[r,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var n={pattern:/(\b\d+)(?:%|[a-z]+\b)/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,number:a})}(n),n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}}}),n.languages.markup&&n.languages.markup.tag.addInlined("script","javascript"),n.languages.js=n.languages.javascript,function(e){var t=e.util.clone(e.languages.javascript);e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+(?:\s+(?:[\w.:$-]+(?:=(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s{'">=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s'">]+)/i,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},e.languages.jsx.tag),e.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:e.languages.jsx},alias:"language-javascript"}},e.languages.jsx.tag);var r=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(r).join(""):""},n=function(t){for(var a=[],o=0;o0&&a[a.length-1].tagName===r(i.content[0].content[1])&&a.pop():"/>"===i.content[i.content.length-1].content||a.push({tagName:r(i.content[0].content[1]),openedBraces:0}):a.length>0&&"punctuation"===i.type&&"{"===i.content?a[a.length-1].openedBraces++:a.length>0&&a[a.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?a[a.length-1].openedBraces--:s=!0),(s||"string"==typeof i)&&a.length>0&&0===a[a.length-1].openedBraces){var l=r(i);o0&&("string"==typeof t[o-1]||"plain-text"===t[o-1].type)&&(l=r(t[o-1])+l,t.splice(o-1,1),o--),t[o]=new e.Token("plain-text",l,null,l)}i.content&&"string"!=typeof i.content&&n(i.content)}};e.hooks.add("after-tokenize",function(e){("jsx"===e.language||"tsx"===e.language)&&n(e.tokens)})}(n),function(e){function t(e,t){return RegExp(e.replace(//g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|for|finally|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var r=["function","function-variable","method","method-variable","property-access"],n=0;n",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(r){var n=t[r],a=[];/^\w+$/.test(r)||a.push(/\w+/.exec(r)[0]),"diff"===r&&a.push("bold"),e.languages.diff[r]={pattern:RegExp("^(?:["+n+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(n),n.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},n.languages.go=n.languages.extend("clike",{string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|iota|nil|true|false)\b/,number:/(?:\b0x[a-f\d]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[-+]?\d+)?)i?/i,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/}),delete n.languages.go["class-name"],n.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:n.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*)[a-zA-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,punctuation:/[!(){}\[\]:=,]/,constant:/\b(?!ID\b)[A-Z][A-Z_\d]*\b/},function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,n,a,o){if(r.language===n){var i=r.tokenStack=[];r.code=r.code.replace(a,function(e){if("function"==typeof o&&!o(e))return e;for(var a,s=i.length;-1!==r.code.indexOf(a=t(n,s));)++s;return i[s]=e,a}),r.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(r,n){if(r.language===n&&r.tokenStack){r.grammar=e.languages[n];var a=0,o=Object.keys(r.tokenStack);!function i(s){for(var l=0;l=o.length);l++){var u=s[l];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=o[a],d=r.tokenStack[c],f="string"==typeof u?u:u.content,p=t(n,c),g=f.indexOf(p);if(g>-1){++a;var h=f.substring(0,g),m=new e.Token(n,e.tokenize(d,r.grammar),"language-"+n,d),y=f.substring(g+p.length),b=[];h&&b.push.apply(b,i([h])),b.push(m),y&&b.push.apply(b,i([y])),"string"==typeof u?s.splice.apply(s,[l,1].concat(b)):u.content=b}}else u.content&&i(u.content)}return s}(r.tokens)}}}})}(n),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:true|false)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})}(n),n.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},n.languages.webmanifest=n.languages.json,n.languages.less=n.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,operator:/[+\-*\/]/}),n.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),n.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))/.source;function r(e){return e=e.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var n=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return n}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"font-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(n),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(n),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+?\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike"].forEach(function(r){t!==r&&(e.languages.markdown[t].inside.content.inside[r]=e.languages.markdown[r])})}),e.hooks.add("after-tokenize",function(e){("markdown"===e.language||"md"===e.language)&&function e(t){if(t&&"string"!=typeof t)for(var r=0,n=t.length;r]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete n.languages.objectivec["class-name"],n.languages.objc=n.languages.objectivec,n.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?[\d_]+)?)/i,directive:{pattern:/\B#\w+/,alias:"important"},label:{pattern:/\B~\w+/,alias:"function"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"variable"},module:{pattern:/\b[A-Z]\w+/,alias:"variable"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/[(){}\[\]|.,:;]|\b_\b/},n.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},n.languages.python["string-interpolation"].inside.interpolation.inside.rest=n.languages.python,n.languages.py=n.languages.python,n.languages.reason=n.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/}),n.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete n.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:t,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:r,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/,lookbehind:!0}})}(n),n.languages.scss=n.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),n.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|forward|for|each|while|import|use|extend|debug|warn|mixin|include|function|return|content)\b/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),n.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),n.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|with|show|hide)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),n.languages.scss.atrule.inside.rest=n.languages.scss,n.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},n={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/url\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};n.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:n}},n.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:n}},e.languages.stylus={"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:n}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:n}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:n}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:n.interpolation}},rest:n}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:n.interpolation,comment:n.comment,punctuation:/[{},]/}},func:n.func,string:n.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:n.interpolation,punctuation:/[{}()\[\];:.]/}}(n),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},keyword:/\b(?:abstract|as|asserts|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),delete e.languages.typescript.parameter;var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(n),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t);var r=e.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0}(n),n.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^_`|~]+/i,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},function(e){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,n="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){return t=(t||"").replace(/m/g,"")+"m",RegExp(/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return n}).replace(/<>/g,function(){return e}),t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return n})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return n}).replace(/<>/g,function(){return"(?:"+a+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/true|false/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(n);var a=r(20282),o={Prism:n,theme:{plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","at-rule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]}};function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(){return(s=Object.assign||function(e){for(var t=1;t0&&e[r-1]===t?e:e.concat(t)},d=function(e){for(var t=[[]],r=[e],n=[0],a=[e.length],o=0,i=0,s=[],d=[s];i>-1;){for(;(o=n[i]++)0?p:["plain"],f=g):(p=c(p,g.type),g.alias&&(p=c(p,g.alias)),f=g.content),"string"!=typeof f){i++,t.push(p),r.push(f),n.push(0),a.push(f.length);continue}var h=f.split(l),m=h.length;s.push({types:p,content:h[0]});for(var y=1;y{"use strict";var n=r(83594).hp;let a=void 0!==n,o=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,i=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function s(e,t,r){null==r&&null!==t&&"object"==typeof t&&(r=t,t=void 0),a&&n.isBuffer(e)&&(e=e.toString()),e&&65279===e.charCodeAt(0)&&(e=e.slice(1));let s=JSON.parse(e,t);if(null===s||"object"!=typeof s)return s;let u=r&&r.protoAction||"error",c=r&&r.constructorAction||"error";if("ignore"===u&&"ignore"===c)return s;if("ignore"!==u&&"ignore"!==c){if(!1===o.test(e)&&!1===i.test(e))return s}else if("ignore"!==u&&"ignore"===c){if(!1===o.test(e))return s}else if(!1===i.test(e))return s;return l(s,{protoAction:u,constructorAction:c,safe:r&&r.safe})}function l(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let a=[e];for(;a.length;){let e=a;for(let o of(a=[],e)){if("ignore"!==t&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(!0===n)return null;if("error"===t)throw SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if("ignore"!==r&&Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(!0===n)return null;if("error"===r)throw SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let e in o){let t=o[e];t&&"object"==typeof t&&a.push(t)}}}return e}function u(e,t,r){let n=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return s(e,t,r)}finally{Error.stackTraceLimit=n}}e.exports=u,e.exports.default=u,e.exports.parse=u,e.exports.safeParse=function(e,t){let r=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return s(e,t,{safe:!0})}catch(e){return null}finally{Error.stackTraceLimit=r}},e.exports.scan=l},68564:(e,t,r)=>{"use strict";r.d(t,{l:()=>h,o:()=>f});var n=r(20282),a=r(43137);!function(e,{insertAt:t}={}){if(!e||"undefined"==typeof document)return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}(`html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}html[dir=rtl],[data-sonner-toaster][dir=rtl]{--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translate(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[data-sonner-toast]{--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;will-change:transform,opacity,height;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-y-position=top]{top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;transition:opacity .4s,box-shadow .2s}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast] [data-cancel]{color:var(--color);background:var(--border-color)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;opacity:0;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]{opacity:1}[data-sonner-toast]:focus [data-close-button]{opacity:1}[data-sonner-toast]:focus-within [data-close-button]{opacity:1}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";position:absolute;left:0;right:0;height:100%}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y: translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y: translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success],[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error],[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}} `);var o=e=>{switch(e){case"success":return l;case"error":return u;default:return null}},i=Array(12).fill(0),s=({visible:e})=>n.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},n.createElement("div",{className:"sonner-spinner"},i.map((e,t)=>n.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),l=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},n.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),u=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},n.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),c=0,d=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,a="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:c++,o=this.toasts.find(e=>e.id===a),i=void 0===e.dismissible||e.dismissible;return o?this.toasts=this.toasts.map(t=>t.id===a?(this.publish({...t,...e,id:a,title:r}),{...t,...e,id:a,dismissible:i,title:r}):t):this.addToast({title:r,...n,dismissible:i,id:a}),a},this.dismiss=e=>(e||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{let r=this.create({...t,promise:e,type:"loading",message:t.loading});return(e instanceof Promise?e:e()).then(e=>{let n="function"==typeof t.success?t.success(e):t.success;this.create({id:r,type:"success",message:n})}).catch(e=>{let n="function"==typeof t.error?t.error(e):t.error;this.create({id:r,type:"error",message:n})}).finally(t.finally),r},this.custom=(e,t)=>{let r=(null==t?void 0:t.id)||c++;this.publish({jsx:e(r),id:r,...t})},this.subscribers=[],this.toasts=[]}},f=Object.assign((e,t)=>{let r=(null==t?void 0:t.id)||c++;return d.addToast({title:e,...t,id:r}),r},{success:d.success,error:d.error,custom:d.custom,message:d.message,promise:d.promise,dismiss:d.dismiss,loading:d.loading}),p=e=>{let{invert:t,toast:r,interacting:a,setHeights:i,visibleToasts:l,heights:u,index:c,toasts:d,expanded:f,removeToast:p,closeButton:g,style:h,className:m="",descriptionClassName:y="",duration:b,position:v,expandByDefault:E}=e,[w,S]=n.useState(!1),[x,k]=n.useState(!1),[A,_]=n.useState(!1),[T,R]=n.useState(!1),[I,O]=n.useState(0),[C,N]=n.useState(0),P=n.useRef(null),D=n.useRef(null),L=0===c,F=c+1<=l,M=r.type,B=!1!==r.dismissible,j=r.className||"",U=r.descriptionClassName||"",$=n.useMemo(()=>u.findIndex(e=>e.toastId===r.id)||0,[u,r.id]),G=n.useMemo(()=>r.duration||b||4e3,[r.duration,b]),Y=n.useRef(0),H=n.useRef(0),V=n.useRef(G),z=n.useRef(0),q=n.useRef(null),[W,K]=v.split("-"),X=n.useMemo(()=>u.reduce((e,t,r)=>r>=$?e:e+t.height,0),[u,$]),J=r.invert||t,Z="loading"===M;H.current=n.useMemo(()=>14*$+X,[$,X]),n.useEffect(()=>{S(!0)},[]),n.useLayoutEffect(()=>{if(!w)return;let e=D.current,t=e.style.height;e.style.height="auto";let n=e.getBoundingClientRect().height;e.style.height=t,N(n),i(e=>e.find(e=>e.toastId===r.id)?e.map(e=>e.toastId===r.id?{...e,height:n}:e):[{toastId:r.id,height:n},...e])},[w,r.title,r.description,i,r.id]);let Q=n.useCallback(()=>{k(!0),O(H.current),i(e=>e.filter(e=>e.toastId!==r.id)),setTimeout(()=>{p(r)},200)},[r,p,i,H]);return n.useEffect(()=>{let e;if((!r.promise||"loading"!==M)&&r.duration!==1/0)return f||a?(()=>{if(z.current{var e;null==(e=r.onAutoClose)||e.call(r,r),Q()},V.current)),()=>clearTimeout(e)},[f,a,E,r,G,Q,r.promise,M]),n.useEffect(()=>{let e=D.current;if(e){let t=e.getBoundingClientRect().height;return N(t),i(e=>[{toastId:r.id,height:t},...e]),()=>i(e=>e.filter(e=>e.toastId!==r.id))}},[i,r.id]),n.useEffect(()=>{r.delete&&Q()},[Q,r.delete]),n.createElement("li",{"aria-live":r.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:D,className:m+" "+j,"data-sonner-toast":"","data-styled":!r.jsx,"data-mounted":w,"data-promise":!!r.promise,"data-removed":x,"data-visible":F,"data-y-position":W,"data-x-position":K,"data-index":c,"data-front":L,"data-swiping":A,"data-dismissible":B,"data-type":M,"data-invert":J,"data-swipe-out":T,"data-expanded":!!(f||E&&w),style:{"--index":c,"--toasts-before":c,"--z-index":d.length-c,"--offset":`${x?I:H.current}px`,"--initial-height":E?"auto":`${C}px`,...h,...r.style},onPointerDown:e=>{Z||!B||(P.current=new Date,O(H.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(_(!0),q.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n,a;if(T||!B)return;q.current=null;let o=Number((null==(e=D.current)?void 0:e.style.getPropertyValue("--swipe-amount").replace("px",""))||0),i=Math.abs(o)/(new Date().getTime()-(null==(t=P.current)?void 0:t.getTime()));if(Math.abs(o)>=20||i>.11){O(H.current),null==(n=r.onDismiss)||n.call(r,r),Q(),R(!0);return}null==(a=D.current)||a.style.setProperty("--swipe-amount","0px"),_(!1)},onPointerMove:e=>{var t;if(!q.current||!B)return;let r=e.clientY-q.current.y,n=e.clientX-q.current.x,a=("top"===W?Math.min:Math.max)(0,r),o="touch"===e.pointerType?10:2;Math.abs(a)>o?null==(t=D.current)||t.style.setProperty("--swipe-amount",`${r}px`):Math.abs(n)>o&&(q.current=null)}},g&&!r.jsx?n.createElement("button",{"aria-label":"Close toast","data-disabled":Z,"data-close-button":!0,onClick:Z||!B?void 0:()=>{var e;Q(),null==(e=r.onDismiss)||e.call(r,r)}},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,r.jsx||n.isValidElement(r.title)?r.jsx||r.title:n.createElement(n.Fragment,null,M||r.icon||r.promise?n.createElement("div",{"data-icon":""},r.promise||"loading"===r.type?n.createElement(s,{visible:"loading"===M}):null,r.icon||o(M)):null,n.createElement("div",{"data-content":""},n.createElement("div",{"data-title":""},r.title),r.description?n.createElement("div",{"data-description":"",className:y+U},r.description):null),r.cancel?n.createElement("button",{"data-button":!0,"data-cancel":!0,onClick:()=>{var e;B&&(Q(),null!=(e=r.cancel)&&e.onClick&&r.cancel.onClick())}},r.cancel.label):null,r.action?n.createElement("button",{"data-button":"",onClick:e=>{var t;null==(t=r.action)||t.onClick(e),e.defaultPrevented||Q()}},r.action.label):null))};function g(){if("undefined"==typeof window)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}var h=e=>{var t;let{invert:r,position:o="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:l,className:u,offset:c,theme:f="light",richColors:h,duration:m,style:y,visibleToasts:b=3,toastOptions:v,dir:E=g()}=e,[w,S]=n.useState([]),[x,k]=n.useState([]),[A,_]=n.useState(!1),[T,R]=n.useState(!1),[I,O]=n.useState("system"!==f?f:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[C,N]=o.split("-"),P=n.useRef(null),D=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=n.useRef(null),F=n.useRef(!1),M=n.useCallback(e=>S(t=>t.filter(({id:t})=>t!==e.id)),[]);return n.useEffect(()=>d.subscribe(e=>{if(e.dismiss){S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t));return}setTimeout(()=>{a.flushSync(()=>{S(t=>{let r=t.findIndex(t=>t.id===e.id);return -1!==r?[...t.slice(0,r),{...t[r],...e},...t.slice(r+1)]:[e,...t]})})})}),[]),n.useEffect(()=>{if("system"!==f){O(f);return}"system"===f&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),"undefined"!=typeof window&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:e})=>{O(e?"dark":"light")})},[f]),n.useEffect(()=>{w.length<=1&&_(!1)},[w]),n.useEffect(()=>{let e=e=>{var t,r;i.every(t=>e[t]||e.code===t)&&(_(!0),null==(t=P.current)||t.focus()),"Escape"===e.code&&(document.activeElement===P.current||null!=(r=P.current)&&r.contains(document.activeElement))&&_(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i]),n.useEffect(()=>{if(P.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,F.current=!1)}},[P.current]),w.length?n.createElement("section",{"aria-label":`Notifications ${D}`,tabIndex:-1},n.createElement("ol",{dir:"auto"===E?g():E,tabIndex:-1,ref:P,className:u,"data-sonner-toaster":!0,"data-theme":I,"data-rich-colors":h,"data-y-position":C,"data-x-position":N,style:{"--front-toast-height":`${null==(t=x[0])?void 0:t.height}px`,"--offset":"number"==typeof c?`${c}px`:c||"32px","--width":"356px","--gap":"14px",...y},onBlur:e=>{F.current&&!e.currentTarget.contains(e.relatedTarget)&&(F.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||F.current||(F.current=!0,L.current=e.relatedTarget)},onMouseEnter:()=>_(!0),onMouseMove:()=>_(!0),onMouseLeave:()=>{T||_(!1)},onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||R(!0)},onPointerUp:()=>R(!1)},w.map((e,t)=>n.createElement(p,{key:e.id,index:t,toast:e,duration:m,className:null==v?void 0:v.className,descriptionClassName:null==v?void 0:v.descriptionClassName,invert:r,visibleToasts:b,closeButton:l,interacting:T,position:o,style:null==v?void 0:v.style,removeToast:M,toasts:w,heights:x,setHeights:k,expandByDefault:s,expanded:A})))):null}},73638:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>l});var n=r(20282),a=r(12434),o=r(27897);let i=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),s={dedupe:!0};o.qv.defineProperty(o.BE,"defaultValue",{value:o.sb});let l=(0,o.qm)((e,t,r)=>{let{cache:l,compare:u,suspense:c,fallbackData:d,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:g,refreshWhenHidden:h,refreshWhenOffline:m,keepPreviousData:y}=r,[b,v,E,w]=o.bZ.get(l),[S,x]=(0,o.lK)(e),k=(0,n.useRef)(!1),A=(0,n.useRef)(!1),_=(0,n.useRef)(S),T=(0,n.useRef)(t),R=(0,n.useRef)(r),I=()=>R.current,O=()=>I().isVisible()&&I().isOnline(),[C,N,P,D]=(0,o.r9)(l,S),L=(0,n.useRef)({}).current,F=(0,o.b0)(d)?r.fallback[S]:d;F&&(0,o.$X)(F)&&(F=i(F));let M=(e,t)=>{for(let r in L)if("data"===r){if(!u(e[r],t[r])&&(!(0,o.b0)(e[r])||!u(z,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},B=(0,n.useMemo)(()=>{let e=!!S&&!!t&&((0,o.b0)(f)?!I().isPaused()&&!c&&(!!(0,o.b0)(p)||p):f),r=t=>{let r=(0,o.rL)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=C(),a=D(),i=r(n),s=n===a?i:r(a),l=i;return[()=>{let e=r(C());return M(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]},[l,S]),j=(0,a.useSyncExternalStore)((0,n.useCallback)(e=>P(S,(t,r)=>{M(r,t)||e()}),[l,S]),B[0],B[1]),U=!k.current,$=b[S]&&b[S].length>0,G=j.data,Y=(0,o.b0)(G)?F:G,H=j.error,V=(0,n.useRef)(Y),z=y?(0,o.b0)(G)?V.current:G:Y,q=(!$||!!(0,o.b0)(H))&&(U&&!(0,o.b0)(f)?f:!I().isPaused()&&(c?!(0,o.b0)(Y)&&p:(0,o.b0)(Y)||p)),W=!!(S&&t&&U&&q),K=(0,o.b0)(j.isValidating)?W:j.isValidating,X=(0,o.b0)(j.isLoading)?W:j.isLoading,J=(0,n.useCallback)(async e=>{let t,n;let a=T.current;if(!S||!a||A.current||I().isPaused())return!1;let i=!0,s=e||{},l=!E[S]||!s.dedupe,c=()=>o.dO?!A.current&&S===_.current&&k.current:S===_.current,d={isValidating:!1,isLoading:!1},f=()=>{N(d)},p=()=>{let e=E[S];e&&e[1]===n&&delete E[S]},g={isValidating:!0};(0,o.b0)(C().data)&&(g.isLoading=!0);try{if(l&&(N(g),r.loadingTimeout&&(0,o.b0)(C().data)&&setTimeout(()=>{i&&c()&&I().onLoadingSlow(S,r)},r.loadingTimeout),E[S]=[a(x),(0,o.lg)()]),[t,n]=E[S],t=await t,l&&setTimeout(p,r.dedupingInterval),!E[S]||E[S][1]!==n)return l&&c()&&I().onDiscarded(S),!1;d.error=o.ZH;let e=v[S];if(!(0,o.b0)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&I().onDiscarded(S),!1;let s=C().data;d.data=u(s,t)?s:t,l&&c()&&I().onSuccess(t,S,r)}catch(r){p();let e=I(),{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&c()&&(e.onError(r,S,e),(!0===t||(0,o.Tn)(t)&&t(r))&&(!I().revalidateOnFocus||!I().revalidateOnReconnect||O())&&e.onErrorRetry(r,S,e,e=>{let t=b[S];t&&t[0]&&t[0](o.bu.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return i=!1,f(),!0},[S,l]),Z=(0,n.useCallback)((...e)=>(0,o.mF)(l,_.current,...e),[]);if((0,o.Es)(()=>{T.current=t,R.current=r,(0,o.b0)(G)||(V.current=G)}),(0,o.Es)(()=>{if(!S)return;let e=J.bind(o.ZH,s),t=0,r=(0,o.aw)(S,b,(r,n={})=>{if(r==o.bu.FOCUS_EVENT){let r=Date.now();I().revalidateOnFocus&&r>t&&O()&&(t=r+I().focusThrottleInterval,e())}else if(r==o.bu.RECONNECT_EVENT)I().revalidateOnReconnect&&O()&&e();else if(r==o.bu.MUTATE_EVENT)return J();else if(r==o.bu.ERROR_REVALIDATE_EVENT)return J(n)});return A.current=!1,_.current=S,k.current=!0,N({_k:x}),q&&((0,o.b0)(Y)||o.X3?e():(0,o.mf)(e)),()=>{A.current=!0,r()}},[S]),(0,o.Es)(()=>{let e;function t(){let t=(0,o.Tn)(g)?g(C().data):g;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!C().error&&(h||I().isVisible())&&(m||I().isOnline())?J(s).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,h,m,S]),(0,n.useDebugValue)(z),c&&(0,o.b0)(Y)&&S){if(!o.dO&&o.X3)throw Error("Fallback data is required when using suspense in SSR.");T.current=t,R.current=r,A.current=!1;let e=w[S];if((0,o.b0)(e)||i(Z(e)),(0,o.b0)(H)){let e=J(s);(0,o.b0)(z)||(e.status="fulfilled",e.value=!0),i(e)}else throw H}return{mutate:Z,get data(){return L.data=!0,z},get error(){return L.error=!0,H},get isValidating(){return L.isValidating=!0,K},get isLoading(){return L.isLoading=!0,X}}})},16162:e=>{e.exports=function(e,t){let r;if("function"!=typeof e)throw TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let n=0;return function(...a){clearTimeout(r);let o=Date.now(),i=t-(o-n);i<=0?(n=o,e.apply(this,a)):r=setTimeout(()=>{n=Date.now(),e.apply(this,a)},i)}}},61922:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n{"use strict";let n;r.d(t,{A:()=>s});let a={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},o=new Uint8Array(16),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));let s=function(e,t,r){if(a.randomUUID&&!t&&!e)return a.randomUUID();let s=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(o)})();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=s[e];return t}return function(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}(s)}}}]);