Files
nimbus/resources/dist/assets/Main-ChqJeGTY.js
Mazen Touati 7b6e0f89f4 chore(base): release 0.4.1-alpha (#57)
* chore(base): release 0.4.1-alpha

* build: update production artifacts for v0.4.1-alpha
2026-02-02 02:34:48 +01:00

444 lines
1.3 MiB
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var fI=Object.defineProperty;var dI=(t,e,n)=>e in t?fI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var X=(t,e,n)=>dI(t,typeof e!="symbol"?e+"":e,n);import{d as z,u as _a,t as cr,c as Ir,a as Ye,b as L,o as T,w as D,r as Q,e as v,P as lt,f as Wi,g as Z,h as q,i as nt,j as gn,k as G1,l as k,m as Ce,n as we,p as Yl,q as kr,s as Jl,v as qy,x as zC,E as hI,y as pI,z as wo,A as mI,B as gI,C as Yn,D as Pr,F as bI,G as yI,H as vI,I as xI,J as SI,K as EI,L as wI,M as _I,N as CI,O as Yr,Q as eo,T as AI,R as _l,S as DI,U as Gy,V as _o,W as co,X as Wy,Y as kI,Z as la,_ as jC,$ as K,a0 as M,a1 as ne,a2 as Qe,a3 as OI,a4 as TI,a5 as II,a6 as Se,a7 as ke,a8 as Ca,a9 as rt,aa as kc,ab as PI,ac as RI,ad as NI,ae as Or,af as T0,ag as Dx,ah as MI,ai as FI,aj as Je,ak as Ky,al as I0,am as ua,an as LI,ao as BI,ap as VC,aq as Aa,ar as $I,as as zI,at as jI,au as VI,av as de,aw as P0,ax as UI,ay as UC,az as HI,aA as Xy,aB as _n,aC as fo,aD as Yy,aE as Da,aF as Ki,aG as kx,aH as sg,aI as Co,aJ as og,aK as ag,aL as Jy,aM as qI,aN as GI,aO as WI,aP as HC,aQ as Eh,aR as Cl,aS as qC,aT as Al,aU as GC,aV as Ox,aW as KI,aX as XI,aY as md,aZ as YI,a_ as ac,a$ as ms,b0 as on,b1 as gd,b2 as Zy,b3 as JI,b4 as WC,b5 as to,b6 as ZI,b7 as KC,b8 as QI,b9 as qs,ba as XC,bb as Tx,bc as eP,bd as tP,be as nP,bf as rP,bg as iP,bh as R0,bi as sP,bj as oP,bk as aP,bl as YC,bm as JC,bn as W1,bo as lp,bp as lP,bq as uP,br as cP,bs as fP,bt as dP,bu as hP}from"./app-9y4VsaPU.js";import{i as pP,u as mP,a as gP,g as bP,F as yP,b as vP,c as xP,L as SP,f as EP,d as K1,S as wP,I as _P,e as CP,h as AP,j as ZC,k as Xi,D as DP,_ as gt,l as Zl,m as Ql,n as eu,o as Es,p as tu,q as Qy,r as Cf,s as Af,t as Df,v as kf,w as N0,x as nu,y as ev,C as QC,z as eA,A as kP,B as OP,E as TP,X as IP}from"./AppPopoverTrigger.vue_vue_type_script_setup_true_lang-nBfag7CV.js";/* empty css */var jt=(t=>(t.Object="object",t.Array="array",t.String="string",t.Constant="constant",t.Uninitialized="uninitialized",t.Number="number",t.Closure="closure",t.Unknown="unknown",t))(jt||{}),wh=(t=>(t.Uuid="UUID",t.Email="Email",t.String="String",t))(wh||{});const lg={DELETION_CONFIRMATION_TIMEOUT:1200,SYNC_DEBOUNCE_DELAY:300},Of=typeof document<"u",PP=["INPUT","TEXTAREA"];function RP(t,e,n,r={}){if(!e||r.enableIgnoredElement&&PP.includes(e.nodeName))return null;const{arrowKeyOptions:i="both",attributeName:s="[data-reka-collection-item]",itemsArray:o=[],loop:a=!0,dir:l="ltr",preventScroll:u=!0,focus:c=!1}=r,[f,d,h,p,m,g]=[t.key==="ArrowRight",t.key==="ArrowLeft",t.key==="ArrowUp",t.key==="ArrowDown",t.key==="Home",t.key==="End"],b=h||p,y=f||d;if(!m&&!g&&(!b&&!y||i==="vertical"&&y||i==="horizontal"&&b))return null;const x=n?Array.from(n.querySelectorAll(s)):o;if(!x.length)return null;u&&t.preventDefault();let S=null;return y||b?S=tA(x,e,{goForward:b?p:l==="ltr"?f:d,loop:a}):m?S=x.at(0)||null:g&&(S=x.at(-1)||null),c&&(S==null||S.focus()),S}function tA(t,e,n,r=t.length){if(--r===0)return null;const i=t.indexOf(e),s=n.goForward?i+1:i-1;if(!n.loop&&(s<0||s>=t.length))return null;const o=(s+t.length)%t.length,a=t[o];return a?a.hasAttribute("disabled")&&a.getAttribute("disabled")!=="false"?tA(t,a,n,r):a:null}const[nA,NP]=Ir("CollapsibleRoot");var MP=z({__name:"CollapsibleRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:open"],setup(t,{expose:e,emit:n}){const r=t,s=_a(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),{disabled:o,unmountOnHide:a}=cr(r);return NP({contentId:"",disabled:o,open:s,unmountOnHide:a,onOpenToggle:()=>{o.value||(s.value=!s.value)}}),e({open:s}),Ye(),(l,u)=>(T(),L(v(lt),{as:l.as,"as-child":r.asChild,"data-state":v(s)?"open":"closed","data-disabled":v(o)?"":void 0},{default:D(()=>[Q(l.$slots,"default",{open:v(s)})]),_:3},8,["as","as-child","data-state","data-disabled"]))}}),FP=MP,LP=z({inheritAttrs:!1,__name:"CollapsibleContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["contentFound"],setup(t,{emit:e}){const n=t,r=e,i=nA();i.contentId||(i.contentId=Wi(void 0,"reka-collapsible-content"));const s=Z(),{forwardRef:o,currentElement:a}=Ye(),l=Z(0),u=Z(0),c=q(()=>i.open.value),f=Z(c.value),d=Z();nt(()=>{var p;return[c.value,(p=s.value)==null?void 0:p.present]},async()=>{await kr();const p=a.value;if(!p)return;d.value=d.value||{transitionDuration:p.style.transitionDuration,animationName:p.style.animationName},p.style.transitionDuration="0s",p.style.animationName="none";const m=p.getBoundingClientRect();u.value=m.height,l.value=m.width,f.value||(p.style.transitionDuration=d.value.transitionDuration,p.style.animationName=d.value.animationName)},{immediate:!0});const h=q(()=>f.value&&i.open.value);return gn(()=>{requestAnimationFrame(()=>{f.value=!1})}),G1(a,"beforematch",p=>{requestAnimationFrame(()=>{i.onOpenToggle(),r("contentFound")})}),(p,m)=>(T(),L(v(Yl),{ref_key:"presentRef",ref:s,present:p.forceMount||v(i).open.value,"force-mount":!0},{default:D(({present:g})=>{var b;return[k(v(lt),Ce(p.$attrs,{id:v(i).contentId,ref:v(o),"as-child":n.asChild,as:p.as,hidden:g?void 0:v(i).unmountOnHide.value?"":"until-found","data-state":h.value?void 0:v(i).open.value?"open":"closed","data-disabled":(b=v(i).disabled)!=null&&b.value?"":void 0,style:{"--reka-collapsible-content-height":`${u.value}px`,"--reka-collapsible-content-width":`${l.value}px`}}),{default:D(()=>[!v(i).unmountOnHide.value||g?Q(p.$slots,"default",{key:0}):we("v-if",!0)]),_:2},1040,["id","as-child","as","hidden","data-state","data-disabled","style"])]}),_:3},8,["present"]))}}),BP=LP,$P=z({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Ye();const n=nA();return(r,i)=>{var s,o;return T(),L(v(lt),{type:r.as==="button"?"button":void 0,as:r.as,"as-child":e.asChild,"aria-controls":v(n).contentId,"aria-expanded":v(n).open.value,"data-state":v(n).open.value?"open":"closed","data-disabled":(s=v(n).disabled)!=null&&s.value?"":void 0,disabled:(o=v(n).disabled)==null?void 0:o.value,onClick:v(n).onOpenToggle},{default:D(()=>[Q(r.$slots,"default")]),_:3},8,["type","as","as-child","aria-controls","aria-expanded","data-state","data-disabled","disabled","onClick"])}}}),zP=$P,jP=z({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=pP(),{forwardRef:r,currentElement:i}=Ye();return n.contentId||(n.contentId=Wi(void 0,"reka-dialog-content")),gn(()=>{n.triggerElement.value=i.value}),(s,o)=>(T(),L(v(lt),Ce(e,{ref:v(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":v(n).open.value||!1,"aria-controls":v(n).open.value?v(n).contentId:void 0,"data-state":v(n).open.value?"open":"closed",onClick:v(n).onOpenToggle}),{default:D(()=>[Q(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),VP=jP;const[UP,HP]=Ir("RovingFocusGroup");var qP=z({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const r=t,i=n,{loop:s,orientation:o,dir:a}=cr(r),l=Jl(a),u=_a(r,"currentTabStopId",i,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),c=Z(!1),f=Z(!1),d=Z(0),{getItems:h,CollectionSlot:p}=qy({isProvider:!0});function m(b){const y=!f.value;if(b.currentTarget&&b.target===b.currentTarget&&y&&!c.value){const x=new CustomEvent(hI,pI);if(b.currentTarget.dispatchEvent(x),i("entryFocus",x),!x.defaultPrevented){const S=h().map(_=>_.ref).filter(_=>_.dataset.disabled!==""),E=S.find(_=>_.getAttribute("data-active")===""),C=S.find(_=>_.getAttribute("data-highlighted")===""),w=S.find(_=>_.id===u.value),A=[E,C,w,...S].filter(Boolean);zC(A,r.preventScrollOnEntryFocus)}}f.value=!1}function g(){setTimeout(()=>{f.value=!1},1)}return e({getItems:h}),HP({loop:s,dir:l,orientation:o,currentTabStopId:u,onItemFocus:b=>{u.value=b},onItemShiftTab:()=>{c.value=!0},onFocusableItemAdd:()=>{d.value++},onFocusableItemRemove:()=>{d.value--}}),(b,y)=>(T(),L(v(p),null,{default:D(()=>[k(v(lt),{tabindex:c.value||d.value===0?-1:0,"data-orientation":v(o),as:b.as,"as-child":b.asChild,dir:v(l),style:{outline:"none"},onMousedown:y[0]||(y[0]=x=>f.value=!0),onMouseup:g,onFocus:m,onBlur:y[1]||(y[1]=x=>c.value=!1)},{default:D(()=>[Q(b.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),rA=qP,GP=z({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=UP(),r=Wi(),i=q(()=>e.tabStopId||r),s=q(()=>n.currentTabStopId.value===i.value),{getItems:o,CollectionItem:a}=qy();gn(()=>{e.focusable&&n.onFocusableItemAdd()}),wo(()=>{e.focusable&&n.onFocusableItemRemove()});function l(u){if(u.key==="Tab"&&u.shiftKey){n.onItemShiftTab();return}if(u.target!==u.currentTarget)return;const c=mI(u,n.orientation.value,n.dir.value);if(c!==void 0){if(u.metaKey||u.ctrlKey||u.altKey||!e.allowShiftKey&&u.shiftKey)return;u.preventDefault();let f=[...o().map(d=>d.ref).filter(d=>d.dataset.disabled!=="")];if(c==="last")f.reverse();else if(c==="prev"||c==="next"){c==="prev"&&f.reverse();const d=f.indexOf(u.currentTarget);f=n.loop.value?gI(f,d+1):f.slice(d+1)}kr(()=>zC(f))}}return(u,c)=>(T(),L(v(a),null,{default:D(()=>[k(v(lt),{tabindex:s.value?0:-1,"data-orientation":v(n).orientation.value,"data-active":u.active?"":void 0,"data-disabled":u.focusable?void 0:"",as:u.as,"as-child":u.asChild,onMousedown:c[0]||(c[0]=f=>{u.focusable?v(n).onItemFocus(i.value):f.preventDefault()}),onFocus:c[1]||(c[1]=f=>v(n).onItemFocus(i.value)),onKeydown:l},{default:D(()=>[Q(u.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),WP=GP,KP=z({__name:"MenuAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,r)=>(T(),L(v(bI),Yn(Pr(e)),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),XP=KP;function YP(){const t=Z(!1);return gn(()=>{G1("keydown",()=>{t.value=!0},{capture:!0,passive:!0}),G1(["pointerdown","pointermove"],()=>{t.value=!1},{capture:!0,passive:!0})}),t}const JP=yI(YP),[M0,ZP]=Ir(["MenuRoot","MenuSub"],"MenuContext"),[tv,QP]=Ir("MenuRoot");var e5=z({__name:"MenuRoot",props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{modal:i,dir:s}=cr(n),o=Jl(s),a=_a(n,"open",r),l=Z(),u=JP();return ZP({open:a,onOpenChange:c=>{a.value=c},content:l,onContentChange:c=>{l.value=c}}),QP({onClose:()=>{a.value=!1},isUsingKeyboardRef:u,dir:o,modal:i}),(c,f)=>(T(),L(v(vI),null,{default:D(()=>[Q(c.$slots,"default")]),_:3}))}}),t5=e5;const[iA,n5]=Ir("MenuContent");var r5=z({__name:"MenuContentImpl",props:xI({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{..._I}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(t,{emit:e}){const n=t,r=e,i=M0(),s=tv(),{trapFocus:o,disableOutsidePointerEvents:a,loop:l}=cr(n);mP(),gP(a.value);const u=Z(""),c=Z(0),f=Z(0),d=Z(null),h=Z("right"),p=Z(0),m=Z(null),g=Z(),{forwardRef:b,currentElement:y}=Ye(),{handleTypeaheadSearch:x}=SI();nt(y,_=>{i.onContentChange(_)}),wo(()=>{window.clearTimeout(c.value)});function S(_){var I,N;return h.value===((I=d.value)==null?void 0:I.side)&&vP(_,(N=d.value)==null?void 0:N.area)}async function E(_){var O;r("openAutoFocus",_),!_.defaultPrevented&&(_.preventDefault(),(O=y.value)==null||O.focus({preventScroll:!0}))}function C(_){var B;if(_.defaultPrevented)return;const I=_.target.closest("[data-reka-menu-content]")===_.currentTarget,N=_.ctrlKey||_.altKey||_.metaKey,P=_.key.length===1,R=RP(_,CI(),y.value,{loop:l.value,arrowKeyOptions:"vertical",dir:s==null?void 0:s.dir.value,focus:!0,attributeName:"[data-reka-collection-item]:not([data-disabled])"});if(R)return R==null?void 0:R.focus();if(_.code==="Space")return;const F=((B=g.value)==null?void 0:B.getItems())??[];if(I&&(_.key==="Tab"&&_.preventDefault(),!N&&P&&x(_.key,F)),_.target!==y.value||!xP.includes(_.key))return;_.preventDefault();const V=[...F.map(G=>G.ref)];SP.includes(_.key)&&V.reverse(),EP(V)}function w(_){var O,I;(I=(O=_==null?void 0:_.currentTarget)==null?void 0:O.contains)!=null&&I.call(O,_.target)||(window.clearTimeout(c.value),u.value="")}function A(_){var N;if(!K1(_))return;const O=_.target,I=p.value!==_.clientX;if((N=_==null?void 0:_.currentTarget)!=null&&N.contains(O)&&I){const P=_.clientX>p.value?"right":"left";h.value=P,p.value=_.clientX}}return n5({onItemEnter:_=>!!S(_),onItemLeave:_=>{var O;S(_)||((O=y.value)==null||O.focus(),m.value=null)},onTriggerLeave:_=>!!S(_),searchRef:u,pointerGraceTimerRef:f,onPointerGraceIntentChange:_=>{d.value=_}}),(_,O)=>(T(),L(v(yP),{"as-child":"",trapped:v(o),onMountAutoFocus:E,onUnmountAutoFocus:O[7]||(O[7]=I=>r("closeAutoFocus",I))},{default:D(()=>[k(v(EI),{"as-child":"","disable-outside-pointer-events":v(a),onEscapeKeyDown:O[2]||(O[2]=I=>r("escapeKeyDown",I)),onPointerDownOutside:O[3]||(O[3]=I=>r("pointerDownOutside",I)),onFocusOutside:O[4]||(O[4]=I=>r("focusOutside",I)),onInteractOutside:O[5]||(O[5]=I=>r("interactOutside",I)),onDismiss:O[6]||(O[6]=I=>r("dismiss"))},{default:D(()=>[k(v(rA),{ref_key:"rovingFocusGroupRef",ref:g,"current-tab-stop-id":m.value,"onUpdate:currentTabStopId":O[0]||(O[0]=I=>m.value=I),"as-child":"",orientation:"vertical",dir:v(s).dir.value,loop:v(l),onEntryFocus:O[1]||(O[1]=I=>{r("entryFocus",I),v(s).isUsingKeyboardRef.value||I.preventDefault()})},{default:D(()=>[k(v(wI),{ref:v(b),role:"menu",as:_.as,"as-child":_.asChild,"aria-orientation":"vertical","data-reka-menu-content":"","data-state":v(bP)(v(i).open.value),dir:v(s).dir.value,side:_.side,"side-offset":_.sideOffset,align:_.align,"align-offset":_.alignOffset,"avoid-collisions":_.avoidCollisions,"collision-boundary":_.collisionBoundary,"collision-padding":_.collisionPadding,"arrow-padding":_.arrowPadding,"prioritize-position":_.prioritizePosition,"position-strategy":_.positionStrategy,"update-position-strategy":_.updatePositionStrategy,sticky:_.sticky,"hide-when-detached":_.hideWhenDetached,reference:_.reference,onKeydown:C,onBlur:w,onPointermove:A},{default:D(()=>[Q(_.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","position-strategy","update-position-strategy","sticky","hide-when-detached","reference"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),sA=r5,i5=z({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=iA(),{forwardRef:r}=Ye(),{CollectionItem:i}=qy(),s=Z(!1);async function o(l){if(!l.defaultPrevented&&K1(l)){if(e.disabled)n.onItemLeave(l);else if(!n.onItemEnter(l)){const c=l.currentTarget;c==null||c.focus({preventScroll:!0})}}}async function a(l){await kr(),!l.defaultPrevented&&K1(l)&&n.onItemLeave(l)}return(l,u)=>(T(),L(v(i),{value:{textValue:l.textValue}},{default:D(()=>[k(v(lt),Ce({ref:v(r),role:"menuitem",tabindex:"-1"},l.$attrs,{as:l.as,"as-child":l.asChild,"aria-disabled":l.disabled||void 0,"data-disabled":l.disabled?"":void 0,"data-highlighted":s.value?"":void 0,onPointermove:o,onPointerleave:a,onFocus:u[0]||(u[0]=async c=>{await kr(),!(c.defaultPrevented||l.disabled)&&(s.value=!0)}),onBlur:u[1]||(u[1]=async c=>{await kr(),!c.defaultPrevented&&(s.value=!1)})}),{default:D(()=>[Q(l.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),s5=i5,o5=z({__name:"MenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,{forwardRef:i,currentElement:s}=Ye(),o=tv(),a=iA(),l=Z(!1);async function u(){const c=s.value;if(!n.disabled&&c){const f=new CustomEvent(_P,{bubbles:!0,cancelable:!0});r("select",f),await kr(),f.defaultPrevented?l.value=!1:o.onClose()}}return(c,f)=>(T(),L(s5,Ce(n,{ref:v(i),onClick:u,onPointerdown:f[0]||(f[0]=()=>{l.value=!0}),onPointerup:f[1]||(f[1]=async d=>{var h;await kr(),!d.defaultPrevented&&(l.value||(h=d.currentTarget)==null||h.click())}),onKeydown:f[2]||(f[2]=async d=>{const h=v(a).searchRef.value!=="";c.disabled||h&&d.key===" "||v(wP).includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}),{default:D(()=>[Q(c.$slots,"default")]),_:3},16))}}),a5=o5,l5=z({__name:"MenuRootContentModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Yr(n,r),s=M0(),{forwardRef:o,currentElement:a}=Ye();return CP(a),(l,u)=>(T(),L(sA,Ce(v(i),{ref:v(o),"trap-focus":v(s).open.value,"disable-outside-pointer-events":v(s).open.value,"disable-outside-scroll":!0,onDismiss:u[0]||(u[0]=c=>v(s).onOpenChange(!1)),onFocusOutside:u[1]||(u[1]=eo(c=>r("focusOutside",c),["prevent"]))}),{default:D(()=>[Q(l.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),u5=l5,c5=z({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const i=Yr(t,e),s=M0();return(o,a)=>(T(),L(sA,Ce(v(i),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:a[0]||(a[0]=l=>v(s).onOpenChange(!1))}),{default:D(()=>[Q(o.$slots,"default")]),_:3},16))}}),f5=c5,d5=z({__name:"MenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const i=Yr(t,e),s=M0(),o=tv();return(a,l)=>(T(),L(v(Yl),{present:a.forceMount||v(s).open.value},{default:D(()=>[v(o).modal.value?(T(),L(u5,Yn(Ce({key:0},{...a.$attrs,...v(i)})),{default:D(()=>[Q(a.$slots,"default")]),_:3},16)):(T(),L(f5,Yn(Ce({key:1},{...a.$attrs,...v(i)})),{default:D(()=>[Q(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),h5=d5,p5=z({__name:"MenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,r)=>(T(),L(v(lt),Ce({role:"group"},e),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),m5=p5,g5=z({__name:"MenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(t){const e=t;return(n,r)=>(T(),L(v(lt),Yn(Pr(e)),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),b5=g5,y5=z({__name:"MenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,r)=>(T(),L(v(AI),Yn(Pr(e)),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),v5=y5,x5=z({__name:"MenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,r)=>(T(),L(v(lt),Ce(e,{role:"separator","aria-orientation":"horizontal"}),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),S5=x5;const[oA,E5]=Ir("DropdownMenuRoot");var w5=z({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e;Ye();const i=_a(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=Z(),{modal:o,dir:a}=cr(n),l=Jl(a);return E5({open:i,onOpenChange:u=>{i.value=u},onOpenToggle:()=>{i.value=!i.value},triggerId:"",triggerElement:s,contentId:"",modal:o,dir:l}),(u,c)=>(T(),L(v(t5),{open:v(i),"onUpdate:open":c[0]||(c[0]=f=>_l(i)?i.value=f:null),dir:v(l),modal:v(o)},{default:D(()=>[Q(u.$slots,"default",{open:v(i)})]),_:3},8,["open","dir","modal"]))}}),_5=w5,C5=z({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const i=Yr(t,e);Ye();const s=oA(),o=Z(!1);function a(l){l.defaultPrevented||(o.value||setTimeout(()=>{var u;(u=s.triggerElement.value)==null||u.focus()},0),o.value=!1,l.preventDefault())}return s.contentId||(s.contentId=Wi(void 0,"reka-dropdown-menu-content")),(l,u)=>{var c;return T(),L(v(h5),Ce(v(i),{id:v(s).contentId,"aria-labelledby":(c=v(s))==null?void 0:c.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-dropdown-menu-content-available-width":"var(--reka-popper-available-width)","--reka-dropdown-menu-content-available-height":"var(--reka-popper-available-height)","--reka-dropdown-menu-trigger-width":"var(--reka-popper-anchor-width)","--reka-dropdown-menu-trigger-height":"var(--reka-popper-anchor-height)"},onCloseAutoFocus:a,onInteractOutside:u[0]||(u[0]=f=>{var m;if(f.defaultPrevented)return;const d=f.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,p=d.button===2||h;(!v(s).modal.value||p)&&(o.value=!0),(m=v(s).triggerElement.value)!=null&&m.contains(f.target)&&f.preventDefault()})}),{default:D(()=>[Q(l.$slots,"default")]),_:3},16,["id","aria-labelledby"])}}}),A5=C5,D5=z({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return Ye(),(n,r)=>(T(),L(v(m5),Yn(Pr(e)),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),k5=D5,O5=z({__name:"DropdownMenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(t,{emit:e}){const n=t,i=DI(e);return Ye(),(s,o)=>(T(),L(v(a5),Yn(Pr({...n,...v(i)})),{default:D(()=>[Q(s.$slots,"default")]),_:3},16))}}),T5=O5,I5=z({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return Ye(),(n,r)=>(T(),L(v(b5),Yn(Pr(e)),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),P5=I5,R5=z({__name:"DropdownMenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,r)=>(T(),L(v(v5),Yn(Pr(e)),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),N5=R5,M5=z({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return Ye(),(n,r)=>(T(),L(v(S5),Yn(Pr(e)),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),F5=M5,L5=z({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=oA(),{forwardRef:r,currentElement:i}=Ye();return gn(()=>{n.triggerElement=i}),n.triggerId||(n.triggerId=Wi(void 0,"reka-dropdown-menu-trigger")),(s,o)=>(T(),L(v(XP),{"as-child":""},{default:D(()=>[k(v(lt),{id:v(n).triggerId,ref:v(r),type:s.as==="button"?"button":void 0,"as-child":e.asChild,as:s.as,"aria-haspopup":"menu","aria-expanded":v(n).open.value,"aria-controls":v(n).open.value?v(n).contentId:void 0,"data-disabled":s.disabled?"":void 0,disabled:s.disabled,"data-state":v(n).open.value?"open":"closed",onClick:o[0]||(o[0]=async a=>{var l;!s.disabled&&a.button===0&&a.ctrlKey===!1&&((l=v(n))==null||l.onOpenToggle(),await kr(),v(n).open.value&&a.preventDefault())}),onKeydown:o[1]||(o[1]=Gy(a=>{s.disabled||(["Enter"," "].includes(a.key)&&v(n).onOpenToggle(),a.key==="ArrowDown"&&v(n).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())},["enter","space","arrow-down"]))},{default:D(()=>[Q(s.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),B5=L5;const[Jr,$5]=Ir("ScrollAreaRoot");var z5=z({__name:"ScrollAreaRoot",props:{type:{type:String,required:!1,default:"hover"},dir:{type:String,required:!1},scrollHideDelay:{type:Number,required:!1,default:600},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t,{expose:e}){const n=t,r=Z(0),i=Z(0),s=Z(),o=Z(),a=Z(),l=Z(),u=Z(!1),c=Z(!1),{type:f,dir:d,scrollHideDelay:h}=cr(n),p=Jl(d);function m(){var x;(x=s.value)==null||x.scrollTo({top:0})}function g(){var x;(x=s.value)==null||x.scrollTo({top:0,left:0})}e({viewport:s,scrollTop:m,scrollTopLeft:g});const{forwardRef:b,currentElement:y}=Ye();return $5({type:f,dir:p,scrollHideDelay:h,scrollArea:y,viewport:s,onViewportChange:x=>{s.value=x||void 0},content:o,onContentChange:x=>{o.value=x},scrollbarX:a,scrollbarXEnabled:u,scrollbarY:l,scrollbarYEnabled:c,onScrollbarXChange:x=>{a.value=x||void 0},onScrollbarYChange:x=>{l.value=x||void 0},onScrollbarXEnabledChange:x=>{u.value=x},onScrollbarYEnabledChange:x=>{c.value=x},onCornerWidthChange:x=>{r.value=x},onCornerHeightChange:x=>{i.value=x}}),(x,S)=>(T(),L(v(lt),{ref:v(b),"as-child":n.asChild,as:x.as,dir:v(p),style:_o({position:"relative","--reka-scroll-area-corner-width":`${r.value}px`,"--reka-scroll-area-corner-height":`${i.value}px`})},{default:D(()=>[Q(x.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),j5=z5,V5=z({__name:"ScrollAreaCornerImpl",setup(t){const e=Jr(),n=Z(0),r=Z(0),i=q(()=>!!n.value&&!!r.value);function s(){var l;const a=((l=e.scrollbarX.value)==null?void 0:l.offsetHeight)||0;e.onCornerHeightChange(a),r.value=a}function o(){var l;const a=((l=e.scrollbarY.value)==null?void 0:l.offsetWidth)||0;e.onCornerWidthChange(a),n.value=a}return co(e.scrollbarX.value,s),co(e.scrollbarY.value,o),nt(()=>e.scrollbarX.value,s),nt(()=>e.scrollbarY.value,o),(a,l)=>{var u;return i.value?(T(),L(v(lt),Ce({key:0,style:{width:`${n.value}px`,height:`${r.value}px`,position:"absolute",right:v(e).dir.value==="ltr"?0:void 0,left:v(e).dir.value==="rtl"?0:void 0,bottom:0}},(u=a.$parent)==null?void 0:u.$props),{default:D(()=>[Q(a.$slots,"default")]),_:3},16,["style"])):we("v-if",!0)}}}),U5=V5,H5=z({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n}=Ye(),r=Jr(),i=q(()=>!!r.scrollbarX.value&&!!r.scrollbarY.value),s=q(()=>r.type.value!=="scroll"&&i.value);return(o,a)=>s.value?(T(),L(U5,Ce({key:0},e,{ref:v(n)}),{default:D(()=>[Q(o.$slots,"default")]),_:3},16)):we("v-if",!0)}}),q5=H5;function aA(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function F0(t){const e=lA(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function lA(t,e){const n=t/e;return Number.isNaN(n)?0:n}function G5(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},r=0;return(function i(){const s={left:t.scrollLeft,top:t.scrollTop},o=n.left!==s.left,a=n.top!==s.top;(o||a)&&e(),n=s,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function Ix(t,e,n="ltr"){const r=F0(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-i,o=e.content-e.viewport,a=s-r,l=n==="ltr"?[0,o]:[o*-1,0],u=AP(t,l[0],l[1]);return aA([0,o],[0,a])(u)}function bd(t){return t?Number.parseInt(t,10):0}function W5(t,e,n,r="ltr"){const i=F0(n),s=i/2,o=e||s,a=i-o,l=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,c=n.content-n.viewport,f=r==="ltr"?[0,c]:[c*-1,0];return aA([l,u],f)(t)}function Px(t,e){return t>0&&t<e}var K5=z({__name:"ScrollAreaScrollbarX",setup(t){const e=Jr(),n=B0(),{forwardRef:r,currentElement:i}=Ye();gn(()=>{i.value&&e.onScrollbarXChange(i.value)});const s=q(()=>n.sizes.value);return(o,a)=>(T(),L(cA,{ref:v(r),"is-horizontal":!0,"data-orientation":"horizontal",style:_o({bottom:0,left:v(e).dir.value==="rtl"?"var(--reka-scroll-area-corner-width)":0,right:v(e).dir.value==="ltr"?"var(--reka-scroll-area-corner-width)":0,"--reka-scroll-area-thumb-width":s.value?`${v(F0)(s.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>v(n).onDragScroll(l.x))},{default:D(()=>[Q(o.$slots,"default")]),_:3},8,["style"]))}}),X5=K5,Y5=z({__name:"ScrollAreaScrollbarY",setup(t){const e=Jr(),n=B0(),{forwardRef:r,currentElement:i}=Ye();gn(()=>{i.value&&e.onScrollbarYChange(i.value)});const s=q(()=>n.sizes.value);return(o,a)=>(T(),L(cA,{ref:v(r),"is-horizontal":!1,"data-orientation":"vertical",style:_o({top:0,right:v(e).dir.value==="ltr"?0:void 0,left:v(e).dir.value==="rtl"?0:void 0,bottom:"var(--reka-scroll-area-corner-height)","--reka-scroll-area-thumb-height":s.value?`${v(F0)(s.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>v(n).onDragScroll(l.y))},{default:D(()=>[Q(o.$slots,"default")]),_:3},8,["style"]))}}),J5=Y5,Z5=z({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(t){const e=Jr(),n=L0(),{forwardRef:r}=Ye(),i=Z(!1),s=Wy(()=>{if(e.viewport.value){const o=e.viewport.value.offsetWidth<e.viewport.value.scrollWidth,a=e.viewport.value.offsetHeight<e.viewport.value.scrollHeight;i.value=n.isHorizontal.value?o:a}},10);return gn(()=>s()),co(e.viewport,s),co(e.content,s),(o,a)=>(T(),L(v(Yl),{present:o.forceMount||i.value},{default:D(()=>[k(nv,Ce(o.$attrs,{ref:v(r),"data-state":i.value?"visible":"hidden"}),{default:D(()=>[Q(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),uA=Z5,Q5=z({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(t){const e=Jr(),{forwardRef:n}=Ye();let r;const i=Z(!1);function s(){window.clearTimeout(r),i.value=!0}function o(){r=window.setTimeout(()=>{i.value=!1},e.scrollHideDelay.value)}return gn(()=>{const a=e.scrollArea.value;a&&(a.addEventListener("pointerenter",s),a.addEventListener("pointerleave",o))}),wo(()=>{const a=e.scrollArea.value;a&&(window.clearTimeout(r),a.removeEventListener("pointerenter",s),a.removeEventListener("pointerleave",o))}),(a,l)=>(T(),L(v(Yl),{present:a.forceMount||i.value},{default:D(()=>[k(uA,Ce(a.$attrs,{ref:v(n),"data-state":i.value?"visible":"hidden"}),{default:D(()=>[Q(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),eR=Q5,tR=z({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(t){const e=Jr(),n=L0(),{forwardRef:r}=Ye(),{state:i,dispatch:s}=kI("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=q(()=>i.value!=="hidden");la(l=>{if(i.value==="idle"){const u=window.setTimeout(()=>s("HIDE"),e.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=Wy(()=>s("SCROLL_END"),100);return la(l=>{const u=e.viewport.value,c=n.isHorizontal.value?"scrollLeft":"scrollTop";if(u){let f=u[c];const d=()=>{const h=u[c];f!==h&&(s("SCROLL"),a()),f=h};u.addEventListener("scroll",d),l(()=>{u.removeEventListener("scroll",d)})}}),(l,u)=>(T(),L(v(Yl),{present:l.forceMount||o.value},{default:D(()=>[k(nv,Ce(l.$attrs,{ref:v(r),"data-state":o.value?"visible":"hidden"}),{default:D(()=>[Q(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),nR=tR;const[L0,rR]=Ir("ScrollAreaScrollbar");var iR=z({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{type:String,required:!1,default:"vertical"},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(t){const e=t,{forwardRef:n}=Ye(),r=Jr(),i=q(()=>e.orientation==="horizontal");nt(i,()=>{i.value?r.onScrollbarXEnabledChange(!0):r.onScrollbarYEnabledChange(!0)},{immediate:!0}),wo(()=>{r.onScrollbarXEnabledChange(!1),r.onScrollbarYEnabledChange(!1)});const{orientation:s,forceMount:o,asChild:a,as:l}=cr(e);return rR({orientation:s,forceMount:o,isHorizontal:i,as:l,asChild:a}),(u,c)=>v(r).type.value==="hover"?(T(),L(eR,Ce({key:0},u.$attrs,{ref:v(n),"force-mount":v(o)}),{default:D(()=>[Q(u.$slots,"default")]),_:3},16,["force-mount"])):v(r).type.value==="scroll"?(T(),L(nR,Ce({key:1},u.$attrs,{ref:v(n),"force-mount":v(o)}),{default:D(()=>[Q(u.$slots,"default")]),_:3},16,["force-mount"])):v(r).type.value==="auto"?(T(),L(uA,Ce({key:2},u.$attrs,{ref:v(n),"force-mount":v(o)}),{default:D(()=>[Q(u.$slots,"default")]),_:3},16,["force-mount"])):v(r).type.value==="always"?(T(),L(nv,Ce({key:3},u.$attrs,{ref:v(n),"data-state":"visible"}),{default:D(()=>[Q(u.$slots,"default")]),_:3},16)):we("v-if",!0)}}),sR=iR;const[B0,oR]=Ir("ScrollAreaScrollbarVisible");var aR=z({__name:"ScrollAreaScrollbarVisible",setup(t){const e=Jr(),n=L0(),{forwardRef:r}=Ye(),i=Z({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),s=q(()=>{const b=lA(i.value.viewport,i.value.content);return b>0&&b<1}),o=Z(),a=Z(0);function l(b,y){if(h.value){const x=e.viewport.value.scrollLeft+b.deltaY;e.viewport.value.scrollLeft=x,Px(x,y)&&b.preventDefault()}else{const x=e.viewport.value.scrollTop+b.deltaY;e.viewport.value.scrollTop=x,Px(x,y)&&b.preventDefault()}}function u(b,y){h.value?a.value=y.x:a.value=y.y}function c(b){a.value=0}function f(b){i.value=b}function d(b,y){return W5(b,a.value,i.value,y)}const h=q(()=>n.isHorizontal.value);function p(b){h.value?e.viewport.value.scrollLeft=d(b,e.dir.value):e.viewport.value.scrollTop=d(b)}function m(){if(h.value){if(e.viewport.value&&o.value){const b=e.viewport.value.scrollLeft,y=Ix(b,i.value,e.dir.value);o.value.style.transform=`translate3d(${y}px, 0, 0)`}}else if(e.viewport.value&&o.value){const b=e.viewport.value.scrollTop,y=Ix(b,i.value);o.value.style.transform=`translate3d(0, ${y}px, 0)`}}function g(b){o.value=b}return oR({sizes:i,hasThumb:s,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:f,onThumbPositionChange:m,onThumbChange:g,onDragScroll:p}),(b,y)=>h.value?(T(),L(X5,Ce({key:0},b.$attrs,{ref:v(r)}),{default:D(()=>[Q(b.$slots,"default")]),_:3},16)):(T(),L(J5,Ce({key:1},b.$attrs,{ref:v(r)}),{default:D(()=>[Q(b.$slots,"default")]),_:3},16))}}),nv=aR,lR=z({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(t,{emit:e}){const n=t,r=e,i=Jr(),s=B0(),o=L0(),{forwardRef:a,currentElement:l}=Ye(),u=Z(""),c=Z();function f(b){var y,x;if(c.value){const S=b.clientX-((y=c.value)==null?void 0:y.left),E=b.clientY-((x=c.value)==null?void 0:x.top);r("onDragScroll",{x:S,y:E})}}function d(b){b.button===0&&(b.target.setPointerCapture(b.pointerId),c.value=l.value.getBoundingClientRect(),u.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",i.viewport&&(i.viewport.value.style.scrollBehavior="auto"),f(b))}function h(b){f(b)}function p(b){const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),document.body.style.webkitUserSelect=u.value,i.viewport&&(i.viewport.value.style.scrollBehavior=""),c.value=void 0}function m(b){var E;const y=b.target,x=(E=l.value)==null?void 0:E.contains(y),S=s.sizes.value.content-s.sizes.value.viewport;x&&s.handleWheelScroll(b,S)}gn(()=>{document.addEventListener("wheel",m,{passive:!1})}),wo(()=>{document.removeEventListener("wheel",m)});function g(){var b,y,x,S,E;l.value&&(n.isHorizontal?s.handleSizeChange({content:((b=i.viewport.value)==null?void 0:b.scrollWidth)??0,viewport:((y=i.viewport.value)==null?void 0:y.offsetWidth)??0,scrollbar:{size:l.value.clientWidth??0,paddingStart:bd(getComputedStyle(l.value).paddingLeft),paddingEnd:bd(getComputedStyle(l.value).paddingRight)}}):s.handleSizeChange({content:((x=i.viewport.value)==null?void 0:x.scrollHeight)??0,viewport:((S=i.viewport.value)==null?void 0:S.offsetHeight)??0,scrollbar:{size:((E=l.value)==null?void 0:E.clientHeight)??0,paddingStart:bd(getComputedStyle(l.value).paddingTop),paddingEnd:bd(getComputedStyle(l.value).paddingBottom)}}),s.onThumbPositionChange())}return co(l,g),co(i.content,g),(b,y)=>(T(),L(v(lt),{ref:v(a),style:{position:"absolute"},"data-scrollbarimpl":"",as:v(o).as.value,"as-child":v(o).asChild.value,onPointerdown:d,onPointermove:h,onPointerup:p},{default:D(()=>[Q(b.$slots,"default")]),_:3},8,["as","as-child"]))}}),cA=lR,uR=z({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=Jr(),r=B0();function i(d){const p=d.target.getBoundingClientRect(),m=d.clientX-p.left,g=d.clientY-p.top;r.handleThumbDown(d,{x:m,y:g})}function s(d){r.handleThumbUp(d)}const{forwardRef:o,currentElement:a}=Ye(),l=Z(),u=q(()=>n.viewport.value);function c(){if(!l.value){const d=G5(u.value,r.onThumbPositionChange);l.value=d,r.onThumbPositionChange()}}const f=q(()=>r.sizes.value);return jC(f,()=>{r.onThumbChange(a.value),u.value&&(r.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),wo(()=>{var d;u.value.removeEventListener("scroll",c),(d=n.viewport.value)==null||d.removeEventListener("scroll",c)}),(d,h)=>(T(),L(v(lt),{ref:v(o),"data-state":v(r).hasThumb?"visible":"hidden",style:{width:"var(--reka-scroll-area-thumb-width)",height:"var(--reka-scroll-area-thumb-height)"},"as-child":e.asChild,as:d.as,onPointerdown:i,onPointerup:s},{default:D(()=>[Q(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),cR=uR,fR=z({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t,{expose:e}){const n=t,{nonce:r}=cr(n),i=ZC(r),s=Jr(),o=Z();gn(()=>{s.onViewportChange(o.value),s.onContentChange(l.value)}),e({viewportElement:o});const{forwardRef:a,currentElement:l}=Ye();return(u,c)=>(T(),K(Qe,null,[M("div",Ce({ref_key:"viewportElement",ref:o,"data-reka-scroll-area-viewport":"",style:{overflowX:v(s).scrollbarXEnabled.value?"scroll":"hidden",overflowY:v(s).scrollbarYEnabled.value?"scroll":"hidden"}},u.$attrs,{tabindex:0}),[k(v(lt),{ref:v(a),style:_o({minWidth:v(s).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":n.asChild,as:u.as},{default:D(()=>[Q(u.$slots,"default")]),_:3},8,["style","as-child","as"])],16),k(v(lt),{as:"style",nonce:v(i)},{default:D(()=>c[0]||(c[0]=[ne(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-reka-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),dR=fR;const[hR,pR]=Ir("SelectGroup");var mR=z({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=Wi(void 0,"reka-select-group");return pR({id:n}),(r,i)=>(T(),L(v(lt),Ce({role:"group"},e,{"aria-labelledby":v(n)}),{default:D(()=>[Q(r.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),gR=mR,bR=z({__name:"SelectLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(t){const e=t,n=hR({id:""});return(r,i)=>(T(),L(v(lt),Ce(e,{id:v(n).id}),{default:D(()=>[Q(r.$slots,"default")]),_:3},16,["id"]))}}),yR=bR,vR=z({__name:"SelectSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,r)=>(T(),L(v(lt),Ce({"aria-hidden":"true"},e),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),xR=vR;function ze(t,e="Assertion failed!"){if(!t)throw console.error(e),new Error(e)}function fA(t,e=document){var r;if(!Of)return null;if(e instanceof HTMLElement&&((r=e==null?void 0:e.dataset)==null?void 0:r.panelGroupId)===t)return e;const n=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return n||null}function $0(t,e=document){if(!Of)return null;const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function dA(t,e,n=document){return Of?Oc(t,n).findIndex(s=>s.getAttribute("data-panel-resize-handle-id")===e)??null:null}function Oc(t,e=document){return Of?Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`)):[]}function SR(t,e,n,r=document){var u,c;const i=$0(e,r),s=Oc(t,r),o=i?s.indexOf(i):-1,a=((u=n[o])==null?void 0:u.id)??null,l=((c=n[o+1])==null?void 0:c.id)??null;return[a,l]}function hA(t){return t.type==="keydown"}function pA(t){return t.type.startsWith("mouse")}function mA(t){return t.type.startsWith("touch")}function z0(t){if(pA(t))return{x:t.clientX,y:t.clientY};if(mA(t)){const e=t.touches[0];if(e&&e.clientX&&e.clientY)return{x:e.clientX,y:e.clientY}}return{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY}}function gA(t,e){const n=t==="horizontal",{x:r,y:i}=z0(e);return n?r:i}function ER(t,e,n,r,i){const s=n==="horizontal",o=$0(e,i);ze(o);const a=o.getAttribute("data-panel-group-id");ze(a);const{initialCursorPosition:l}=r,u=gA(n,t),c=fA(a,i);ze(c);const f=c.getBoundingClientRect(),d=s?f.width:f.height;return(u-l)/d*100}function wR(t,e,n,r,i,s){if(hA(t)){const o=n==="horizontal";let a=0;t.shiftKey?a=100:a=i??10;let l=0;switch(t.key){case"ArrowDown":l=o?0:a;break;case"ArrowLeft":l=o?-a:0;break;case"ArrowRight":l=o?a:0;break;case"ArrowUp":l=o?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:ER(t,e,n,r,s)}function _R({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,s=0,o=0;const a=n[0];ze(a!=null),e.forEach((f,d)=>{const{constraints:h}=f,{maxSize:p=100,minSize:m=0}=h;d===a?(r=m,i=p):(s+=m,o+=p)});const l=Math.min(i,100-s),u=Math.max(r,100-o),c=t[a];return{valueMax:l,valueMin:u,valueNow:c}}function CR({panelDataArray:t}){const e=Array.from({length:t.length}),n=t.map(s=>s.constraints);let r=0,i=100;for(let s=0;s<t.length;s++){const o=n[s];ze(o);const{defaultSize:a}=o;a!=null&&(r++,e[s]=a,i-=a)}for(let s=0;s<t.length;s++){const o=n[s];ze(o);const{defaultSize:a}=o;if(a!=null)continue;const l=t.length-r,u=i/l;r++,e[s]=u,i-=u}return e}function ku(t,e,n){e.forEach((r,i)=>{const s=t[i];ze(s);const{callbacks:o,constraints:a,id:l}=s,{collapsedSize:u=0,collapsible:c}=a,f=n[l];if(f==null||r!==f){n[l]=r;const{onCollapse:d,onExpand:h,onResize:p}=o;p&&p(r,f),c&&(d||h)&&(h&&(f==null||f===u)&&r!==u&&h(),d&&(f==null||f!==u)&&r===u&&d())}})}function AR(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}const rv=10;function Tc(t,e,n=rv){t=Number.parseFloat(t.toFixed(n)),e=Number.parseFloat(e.toFixed(n));const r=t-e;return r===0?0:r>0?1:-1}function xr(t,e,n){return Tc(t,e,n)===0}function Za({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];ze(r!=null);const{collapsedSize:i=0,collapsible:s,maxSize:o=100,minSize:a=0}=r;if(Tc(n,a)<0)if(s){const l=(i+a)/2;Tc(n,l)<0?n=i:n=a}else n=a;return n=Math.min(o,n),n=Number.parseFloat(n.toFixed(rv)),n}function yd(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function qu({delta:t,layout:e,panelConstraints:n,pivotIndices:r,trigger:i}){if(xr(t,0))return e;const s=[...e],[o,a]=r;ze(o!=null),ze(a!=null);let l=0;if(i==="keyboard"){{const c=t<0?a:o,f=n[c];if(ze(f),f.collapsible){const d=e[c];ze(d!=null);const h=n[c];ze(h);const{collapsedSize:p=0,minSize:m=0}=h;if(xr(d,p)){const g=m-d;Tc(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}{const c=t<0?o:a,f=n[c];ze(f);const{collapsible:d}=f;if(d){const h=e[c];ze(h!=null);const p=n[c];ze(p);const{collapsedSize:m=0,minSize:g=0}=p;if(xr(h,g)){const b=h-m;Tc(b,Math.abs(t))>0&&(t=t<0?0-b:b)}}}}{const c=t<0?1:-1;let f=t<0?a:o,d=0;for(;;){const p=e[f];ze(p!=null);const g=Za({panelConstraints:n,panelIndex:f,size:100})-p;if(d+=g,f+=c,f<0||f>=n.length)break}const h=Math.min(Math.abs(t),Math.abs(d));t=t<0?0-h:h}{let f=t<0?o:a;for(;f>=0&&f<n.length;){const d=Math.abs(t)-Math.abs(l),h=e[f];ze(h!=null);const p=h-d,m=Za({panelConstraints:n,panelIndex:f,size:p});if(!xr(h,m)&&(l+=h-m,s[f]=m,l.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?f--:f++}}if(xr(l,0))return e;{const c=t<0?a:o,f=e[c];ze(f!=null);const d=f+l,h=Za({panelConstraints:n,panelIndex:c,size:d});if(s[c]=h,!xr(h,d)){let p=d-h,g=t<0?a:o;for(;g>=0&&g<n.length;){const b=s[g];ze(b!=null);const y=b+p,x=Za({panelConstraints:n,panelIndex:g,size:y});if(xr(b,x)||(p-=x-b,s[g]=x),xr(p,0))break;t>0?g--:g++}}}const u=s.reduce((c,f)=>f+c,0);return xr(u,100)?s:e}function bA(t,e,n){const r=dA(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function DR(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function kR(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Mx(t),b:Mx(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;ze(r);const i={a:Nx(Rx(n.a)),b:Nx(Rx(n.b))};if(i.a===i.b){const s=r.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let a=s.length;for(;a--;){const l=s[a];if(l===o.a)return 1;if(l===o.b)return-1}}return Math.sign(i.a-i.b)}const OR=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function TR(t){const e=getComputedStyle(yA(t)).display;return e==="flex"||e==="inline-flex"}function IR(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||TR(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||OR.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Rx(t){let e=t.length;for(;e--;){const n=t[e];if(ze(n),IR(n))return n}return null}function Nx(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Mx(t){const e=[];for(;t;)e.push(t),t=yA(t);return e}function yA(t){var e;return t.parentNode instanceof DocumentFragment&&((e=t.parentNode)==null?void 0:e.host)||t.parentNode}const vA=1,xA=2,SA=4,EA=8;function PR(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}const RR=PR()==="coarse",ho=[];let j0=!1;const $s=new Map,V0=new Map,Ic=new Set;function NR(t,e,n,r,i,s){const{ownerDocument:o}=e,a={direction:n,element:e,hitAreaMargins:r,nonce:i,setResizeHandlerState:s},l=$s.get(o)??0;return $s.set(o,l+1),Ic.add(a),up(),function(){V0.delete(t),Ic.delete(a);const c=$s.get(o)??1;$s.set(o,c-1),up(),_A(),c===1&&$s.delete(o)}}function vd(t){const{target:e}=t,{x:n,y:r}=z0(t);j0=!0,iv({target:e,x:n,y:r}),up(),ho.length>0&&(sv("down",t),t.preventDefault())}function Os(t){const{x:e,y:n}=z0(t);if(!j0){const{target:r}=t;iv({target:r,x:e,y:n})}sv("move",t),wA(),ho.length>0&&t.preventDefault()}function Ts(t){const{target:e}=t,{x:n,y:r}=z0(t);V0.clear(),j0=!1,ho.length>0&&t.preventDefault(),sv("up",t),iv({target:e,x:n,y:r}),wA(),up()}function iv({target:t,x:e,y:n}){ho.splice(0);let r=null;t instanceof HTMLElement&&(r=t),Ic.forEach(i=>{const{element:s,hitAreaMargins:o}=i,a=s.getBoundingClientRect(),{bottom:l,left:u,right:c,top:f}=a,d=RR?o.coarse:o.fine;if(e>=u-d&&e<=c+d&&n>=f-d&&n<=l+d){if(r!==null&&s!==r&&!s.contains(r)&&!r.contains(s)&&kR(r,s)>0){let p=r,m=!1;for(;p&&!p.contains(s);){if(DR(p.getBoundingClientRect(),a)){m=!0;break}p=p.parentElement}if(m)return}ho.push(i)}})}function ug(t,e){V0.set(t,e)}function wA(){let t=!1,e=!1,n;ho.forEach(i=>{const{direction:s,nonce:o}=i;s.value==="horizontal"?t=!0:e=!0,n=o.value});let r=0;V0.forEach(i=>{r|=i}),t&&e?cg("intersection",r,n):t?cg("horizontal",r,n):e?cg("vertical",r,n):_A()}function up(){$s.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Ts),n.removeEventListener("mousedown",vd),n.removeEventListener("mouseleave",Os),n.removeEventListener("mousemove",Os),n.removeEventListener("touchmove",Os),n.removeEventListener("touchstart",vd)}),window.removeEventListener("mouseup",Ts),window.removeEventListener("touchcancel",Ts),window.removeEventListener("touchend",Ts),Ic.size>0&&(j0?(ho.length>0&&$s.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Ts),n.addEventListener("mouseleave",Os),n.addEventListener("mousemove",Os),n.addEventListener("touchmove",Os,{passive:!1}))}),window.addEventListener("mouseup",Ts),window.addEventListener("touchcancel",Ts),window.addEventListener("touchend",Ts)):$s.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("mousedown",vd),n.addEventListener("mousemove",Os),n.addEventListener("touchmove",Os,{passive:!1}),n.addEventListener("touchstart",vd))}))}function sv(t,e){Ic.forEach(n=>{const{setResizeHandlerState:r}=n,i=ho.includes(n);r(t,i,e)})}let X1=null,zs=null;function MR(t,e){if(e){const n=(e&vA)!==0,r=(e&xA)!==0,i=(e&SA)!==0,s=(e&EA)!==0;if(n)return i?"se-resize":s?"ne-resize":"e-resize";if(r)return i?"sw-resize":s?"nw-resize":"w-resize";if(i)return"s-resize";if(s)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function _A(){zs!==null&&(document.head.removeChild(zs),X1=null,zs=null)}function cg(t,e,n){const r=MR(t,e);X1!==r&&(X1=r,zs===null&&(zs=document.createElement("style"),n&&(zs.nonce=n),document.head.appendChild(zs)),zs.innerHTML=`*{cursor: ${r}!important;}`)}function FR({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:s=3}){const o=n[i];let a;return o==null?a=t!==void 0?t.toPrecision(s):"1":r.length===1?a="1":a=o.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function LR({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((s,o)=>s+o,0);if(n.length!==e.length)throw new Error(`Invalid ${e.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!xr(r,100)){console.warn(`WARNING: Invalid layout total size: ${n.map(s=>`${s}%`).join(", ")}. Layout normalization will be applied.`);for(let s=0;s<e.length;s++){const o=n[s];ze(o!=null);const a=100/r*o;n[s]=a}}let i=0;for(let s=0;s<e.length;s++){const o=n[s];ze(o!=null);const a=Za({panelConstraints:e,panelIndex:s,size:o});o!==a&&(i+=o-a,n[s]=a)}if(!xr(i,0))for(let s=0;s<e.length;s++){const o=n[s];ze(o!=null);const a=o+i,l=Za({panelConstraints:e,panelIndex:s,size:a});if(o!==l&&(i-=l-o,n[s]=l,xr(i,0)))break}return n}function BR({eagerValuesRef:t,groupId:e,layout:n,panelDataArray:r,panelGroupElement:i,setLayout:s}){la(o=>{const a=i.value;if(!a)return;const l=Oc(e,a);for(let u=0;u<r.length-1;u++){const{valueMax:c,valueMin:f,valueNow:d}=_R({layout:n.value,panelsArray:r,pivotIndices:[u,u+1]}),h=l[u];if(h!=null){const p=r[u];ze(p),h.setAttribute("aria-controls",p.id),h.setAttribute("aria-valuemax",`${Math.round(c)}`),h.setAttribute("aria-valuemin",`${Math.round(f)}`),h.setAttribute("aria-valuenow",d!=null?`${Math.round(d)}`:"")}}o(()=>{l.forEach(u=>{u.removeAttribute("aria-controls"),u.removeAttribute("aria-valuemax"),u.removeAttribute("aria-valuemin"),u.removeAttribute("aria-valuenow")})})}),la(o=>{const a=i.value;if(!a)return;const l=t.value;ze(l);const{panelDataArray:u}=l,c=fA(e,a);ze(c!=null,`No group found for id "${e}"`);const f=Oc(e,a);ze(f);const d=f.map(h=>{const p=h.getAttribute("data-panel-resize-handle-id");ze(p);const[m,g]=SR(e,p,u,a);if(m==null||g==null)return()=>{};const b=y=>{if(!y.defaultPrevented)switch(y.key){case"Enter":{y.preventDefault();const x=u.findIndex(S=>S.id===m);if(x>=0){const S=u[x];ze(S);const E=n.value[x],{collapsedSize:C=0,collapsible:w,minSize:A=0}=S.constraints;if(E!=null&&w){const _=qu({delta:xr(E,C)?A-C:C-E,layout:n.value,panelConstraints:u.map(O=>O.constraints),pivotIndices:bA(e,p,a),trigger:"keyboard"});n.value!==_&&s(_)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});o(()=>{d.forEach(h=>h())})})}function Fx(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new TypeError("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function CA(t){return`reka:${t}`}function AA(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:s}=e;return i?r:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function DA(t,e){try{const n=CA(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function $R(t,e,n){const r=DA(t,n)??{},i=AA(e);return r[i]??null}function zR(t,e,n,r,i){const s=CA(t),o=AA(e),a=DA(t,i)??{};a[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(s,JSON.stringify(a))}catch(l){console.error(l)}}const jR=100,Gu={getItem:t=>(Fx(Gu),Gu.getItem(t)),setItem:(t,e)=>{Fx(Gu),Gu.setItem(t,e)}},[kA,VR]=Ir("PanelGroup");var UR=z({__name:"SplitterGroup",props:{id:{type:[String,null],required:!1},autoSaveId:{type:[String,null],required:!1,default:null},direction:{type:String,required:!0},keyboardResizeBy:{type:[Number,null],required:!1,default:10},storage:{type:Object,required:!1,default:()=>Gu},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["layout"],setup(t,{emit:e}){const n=t,r=e,i={},{direction:s}=cr(n),o=Wi(n.id,"reka-splitter-group"),a=Jl(),{forwardRef:l,currentElement:u}=Ye(),c=Z(null),f=Z([]),d=Z({}),h=Z(new Map),p=Z(0),m=q(()=>({autoSaveId:n.autoSaveId,direction:n.direction,dragState:c.value,id:o,keyboardResizeBy:n.keyboardResizeBy,storage:n.storage})),g=Z({layout:f.value,panelDataArray:[],panelDataArrayChanged:!1}),b=B=>f.value=B;BR({eagerValuesRef:g,groupId:o,layout:f,panelDataArray:g.value.panelDataArray,setLayout:b,panelGroupElement:u}),la(()=>{const{panelDataArray:B}=g.value,{autoSaveId:G}=n;if(G){if(f.value.length===0||f.value.length!==B.length)return;let H=i[G];H||(H=AR(zR,jR),i[G]=H);const ie=[...B],se=new Map(h.value);H(G,ie,se,f.value,n.storage)}});function y(B,G){const{panelDataArray:H}=g.value,ie=F(H,B);return FR({defaultSize:G,dragState:c.value,layout:f.value,panelData:H,panelIndex:ie})}function x(B){const{panelDataArray:G}=g.value;G.push(B),G.sort((H,ie)=>{const se=H.order,$=ie.order;return se==null&&$==null?0:se==null?-1:$==null?1:se-$}),g.value.panelDataArrayChanged=!0}nt(()=>g.value.panelDataArrayChanged,()=>{if(g.value.panelDataArrayChanged){g.value.panelDataArrayChanged=!1;const{autoSaveId:B,storage:G}=m.value,{layout:H,panelDataArray:ie}=g.value;let se=null;if(B){const ee=$R(B,ie,G);ee&&(h.value=new Map(Object.entries(ee.expandToSizes)),se=ee.layout)}se===null&&(se=CR({panelDataArray:ie}));const $=LR({layout:se,panelConstraints:ie.map(ee=>ee.constraints)});OI(H,$)||(b($),g.value.layout=$,r("layout",$),ku(ie,$,d.value))}});function S(B){return function(H){H.preventDefault();const ie=u.value;if(!ie)return()=>null;const{direction:se,dragState:$,id:ee,keyboardResizeBy:pe}=m.value,{layout:fe,panelDataArray:me}=g.value,{initialLayout:Me}=$??{},Nt=bA(ee,B,ie);let at=wR(H,B,se,$,pe,ie);if(at===0)return;const Qr=se==="horizontal";a.value==="rtl"&&Qr&&(at=-at);const Qi=me.map(nn=>nn.constraints),Jn=qu({delta:at,layout:Me??fe,panelConstraints:Qi,pivotIndices:Nt,trigger:hA(H)?"keyboard":"mouse-or-touch"}),Kt=!yd(fe,Jn);(pA(H)||mA(H))&&p.value!==at&&(p.value=at,Kt?ug(B,0):Qr?ug(B,at<0?vA:xA):ug(B,at<0?SA:EA)),Kt&&(b(Jn),g.value.layout=Jn,r("layout",Jn),ku(me,Jn,d.value))}}function E(B,G){const{layout:H,panelDataArray:ie}=g.value,se=ie.map(Me=>Me.constraints),{panelSize:$,pivotIndices:ee}=V(ie,B,H);ze($!=null);const fe=F(ie,B)===ie.length-1?$-G:G-$,me=qu({delta:fe,layout:H,panelConstraints:se,pivotIndices:ee,trigger:"imperative-api"});yd(H,me)||(b(me),g.value.layout=me,r("layout",me),ku(ie,me,d.value))}function C(B,G){const{layout:H,panelDataArray:ie}=g.value,se=F(ie,B);ie[se]=B,g.value.panelDataArrayChanged=!0;const{collapsedSize:$=0,collapsible:ee}=G,{collapsedSize:pe=0,collapsible:fe,maxSize:me=100,minSize:Me=0}=B.constraints,{panelSize:Nt}=V(ie,B,H);Nt!==null&&(ee&&fe&&Nt===$?$!==pe&&E(B,pe):Nt<Me?E(B,Me):Nt>me&&E(B,me))}function w(B,G){const{direction:H}=m.value,{layout:ie}=g.value;if(!u.value)return;const se=$0(B,u.value);ze(se);const $=gA(H,G);c.value={dragHandleId:B,dragHandleRect:se.getBoundingClientRect(),initialCursorPosition:$,initialLayout:ie}}function A(){c.value=null}function _(B){const{panelDataArray:G}=g.value,H=F(G,B);H>=0&&(G.splice(H,1),delete d.value[B.id],g.value.panelDataArrayChanged=!0)}function O(B){const{layout:G,panelDataArray:H}=g.value;if(B.constraints.collapsible){const ie=H.map(pe=>pe.constraints),{collapsedSize:se=0,panelSize:$,pivotIndices:ee}=V(H,B,G);if(ze($!=null,`Panel size not found for panel "${B.id}"`),$!==se){h.value.set(B.id,$);const fe=F(H,B)===H.length-1?$-se:se-$,me=qu({delta:fe,layout:G,panelConstraints:ie,pivotIndices:ee,trigger:"imperative-api"});yd(G,me)||(b(me),g.value.layout=me,r("layout",me),ku(H,me,d.value))}}}function I(B){const{layout:G,panelDataArray:H}=g.value;if(B.constraints.collapsible){const ie=H.map(fe=>fe.constraints),{collapsedSize:se=0,panelSize:$,minSize:ee=0,pivotIndices:pe}=V(H,B,G);if($===se){const fe=h.value.get(B.id),me=fe!=null&&fe>=ee?fe:ee,Nt=F(H,B)===H.length-1?$-me:me-$,at=qu({delta:Nt,layout:G,panelConstraints:ie,pivotIndices:pe,trigger:"imperative-api"});yd(G,at)||(b(at),g.value.layout=at,r("layout",at),ku(H,at,d.value))}}}function N(B){const{layout:G,panelDataArray:H}=g.value,{panelSize:ie}=V(H,B,G);return ze(ie!=null,`Panel size not found for panel "${B.id}"`),ie}function P(B){const{layout:G,panelDataArray:H}=g.value,{collapsedSize:ie=0,collapsible:se,panelSize:$}=V(H,B,G);return se?$===void 0?B.constraints.defaultSize===B.constraints.collapsedSize:$===ie:!1}function R(B){const{layout:G,panelDataArray:H}=g.value,{collapsedSize:ie=0,collapsible:se,panelSize:$}=V(H,B,G);return ze($!=null,`Panel size not found for panel "${B.id}"`),!se||$>ie}VR({direction:s,dragState:c.value,groupId:o,reevaluatePanelConstraints:C,registerPanel:x,registerResizeHandle:S,resizePanel:E,startDragging:w,stopDragging:A,unregisterPanel:_,panelGroupElement:u,collapsePanel:O,expandPanel:I,isPanelCollapsed:P,isPanelExpanded:R,getPanelSize:N,getPanelStyle:y});function F(B,G){return B.findIndex(H=>H===G||H.id===G.id)}function V(B,G,H){const ie=F(B,G),$=ie===B.length-1?[ie-1,ie]:[ie,ie+1],ee=H[ie];return{...G.constraints,panelSize:ee,pivotIndices:$}}return(B,G)=>(T(),L(v(lt),{ref:v(l),as:B.as,"as-child":B.asChild,style:_o({display:"flex",flexDirection:v(s)==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"}),"data-panel-group":"","data-orientation":v(s),"data-panel-group-id":v(o)},{default:D(()=>[Q(B.$slots,"default",{layout:f.value})]),_:3},8,["as","as-child","style","data-orientation","data-panel-group-id"]))}}),HR=UR,qR=z({__name:"SplitterPanel",props:{collapsedSize:{type:Number,required:!1},collapsible:{type:Boolean,required:!1},defaultSize:{type:Number,required:!1},id:{type:String,required:!1},maxSize:{type:Number,required:!1},minSize:{type:Number,required:!1},order:{type:Number,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["collapse","expand","resize"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=kA();if(s===null)throw new Error("SplitterPanel components must be rendered within a SplitterGroup container");const{collapsePanel:o,expandPanel:a,getPanelSize:l,getPanelStyle:u,isPanelCollapsed:c,resizePanel:f,groupId:d,reevaluatePanelConstraints:h,registerPanel:p,unregisterPanel:m}=s,g=Wi(r.id,"reka-splitter-panel"),b=q(()=>({callbacks:{onCollapse:()=>i("collapse"),onExpand:()=>i("expand"),onResize:(...A)=>i("resize",...A)},constraints:{collapsedSize:r.collapsedSize&&Number.parseFloat(r.collapsedSize.toFixed(rv)),collapsible:r.collapsible,defaultSize:r.defaultSize,maxSize:r.maxSize,minSize:r.minSize},id:g,idIsFromProps:r.id!==void 0,order:r.order}));nt(()=>b.value.constraints,(A,_)=>{(_.collapsedSize!==A.collapsedSize||_.collapsible!==A.collapsible||_.maxSize!==A.maxSize||_.minSize!==A.minSize)&&h(b.value,_)},{deep:!0}),gn(()=>{p(b.value)}),wo(()=>{m(b.value)});const y=q(()=>u(b.value,r.defaultSize)),x=q(()=>c(b.value)),S=q(()=>!x.value);function E(){o(b.value)}function C(){a(b.value)}function w(A){f(b.value,A)}return e({collapse:E,expand:C,getSize(){return l(b.value)},resize:w,isCollapsed:x,isExpanded:S}),(A,_)=>(T(),L(v(lt),{id:v(g),style:_o(y.value),as:A.as,"as-child":A.asChild,"data-panel":"","data-panel-collapsible":A.collapsible||void 0,"data-panel-group-id":v(d),"data-panel-id":v(g),"data-panel-size":Number.parseFloat(`${y.value.flexGrow}`).toFixed(1),"data-state":A.collapsible?x.value?"collapsed":"expanded":void 0},{default:D(()=>[Q(A.$slots,"default",{isCollapsed:x.value,isExpanded:S.value,expand:C,collapse:E,resize:w})]),_:3},8,["id","style","as","as-child","data-panel-collapsible","data-panel-group-id","data-panel-id","data-panel-size","data-state"]))}}),GR=qR;function WR({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){la(i=>{const s=r.value;if(t.value||n.value===null||s===null)return;const o=$0(e,s);if(o==null)return;const a=l=>{var u;if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),(u=n.value)==null||u.call(n,l);break}case"F6":{l.preventDefault();const c=o.getAttribute("data-panel-group-id");ze(c);const f=Oc(c,s),d=dA(c,e,s);ze(d!==null);const h=l.shiftKey?d>0?d-1:f.length-1:d+1<f.length?d+1:0;f[h].focus();break}}};o.addEventListener("keydown",a),i(()=>{o.removeEventListener("keydown",a)})})}var KR=z({__name:"SplitterResizeHandle",props:{id:{type:String,required:!1},hitAreaMargins:{type:Object,required:!1},tabindex:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["dragging"],setup(t,{emit:e}){const n=t,r=e,{forwardRef:i,currentElement:s}=Ye(),{disabled:o}=cr(n),a=kA();if(a===null)throw new Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:l,groupId:u,registerResizeHandle:c,startDragging:f,stopDragging:d,panelGroupElement:h}=a,p=Wi(n.id,"reka-splitter-resize-handle"),m=Z("inactive"),g=Z(!1),b=Z(null),{nonce:y}=cr(n),x=ZC(y);return nt(o,()=>{Of&&(o.value?b.value=null:b.value=c(p))},{immediate:!0}),la(S=>{var w,A;if(o.value||b.value===null)return;const E=s.value;if(!E)return;ze(E);const C=(_,O,I)=>{var N;if(O)switch(_){case"down":{m.value="drag",f(p,I),r("dragging",!0);break}case"move":{m.value!=="drag"&&(m.value="hover"),(N=b.value)==null||N.call(b,I);break}case"up":{m.value="hover",d(),r("dragging",!1);break}}else m.value="inactive"};S(NR(p,E,l,{coarse:((w=n.hitAreaMargins)==null?void 0:w.coarse)??15,fine:((A=n.hitAreaMargins)==null?void 0:A.fine)??5},x,C))}),WR({disabled:o,resizeHandler:b,handleId:p,panelGroupElement:h}),(S,E)=>(T(),L(v(lt),{id:v(p),ref:v(i),style:{touchAction:"none",userSelect:"none"},as:S.as,"as-child":S.asChild,role:"separator","data-resize-handle":"",tabindex:S.tabindex,"data-state":m.value,"data-disabled":v(o)?"":void 0,"data-orientation":v(l),"data-panel-group-id":v(u),"data-resize-handle-active":m.value==="drag"?"pointer":g.value?"keyboard":void 0,"data-resize-handle-state":m.value,"data-panel-resize-handle-enabled":!v(o),"data-panel-resize-handle-id":v(p),onBlur:E[0]||(E[0]=C=>g.value=!1),onFocus:E[1]||(E[1]=C=>g.value=!1)},{default:D(()=>[Q(S.$slots,"default")]),_:3},8,["id","as","as-child","tabindex","data-state","data-disabled","data-orientation","data-panel-group-id","data-resize-handle-active","data-resize-handle-state","data-panel-resize-handle-enabled","data-panel-resize-handle-id"]))}}),XR=KR;const[YR,JR]=Ir("SwitchRoot");var ZR=z({__name:"SwitchRoot",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:"on"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,{disabled:i}=cr(n),s=_a(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function o(){i.value||(s.value=!s.value)}const{forwardRef:a,currentElement:l}=Ye(),u=TI(l),c=q(()=>{var f;return n.id&&l.value?(f=document.querySelector(`[for="${n.id}"]`))==null?void 0:f.innerText:void 0});return JR({modelValue:s,toggleCheck:o,disabled:i}),(f,d)=>(T(),L(v(lt),Ce(f.$attrs,{id:f.id,ref:v(a),role:"switch",type:f.as==="button"?"button":void 0,value:f.value,"aria-label":f.$attrs["aria-label"]||c.value,"aria-checked":v(s),"aria-required":f.required,"data-state":v(s)?"checked":"unchecked","data-disabled":v(i)?"":void 0,"as-child":f.asChild,as:f.as,disabled:v(i),onClick:o,onKeydown:Gy(eo(o,["prevent"]),["enter"])}),{default:D(()=>[Q(f.$slots,"default",{modelValue:v(s)}),v(u)&&f.name?(T(),L(v(II),{key:0,type:"checkbox",name:f.name,disabled:v(i),required:f.required,value:f.value,checked:!!v(s)},null,8,["name","disabled","required","value","checked"])):we("v-if",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),QR=ZR,eN=z({__name:"SwitchThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=YR();return Ye(),(n,r)=>{var i;return T(),L(v(lt),{"data-state":(i=v(e).modelValue)!=null&&i.value?"checked":"unchecked","data-disabled":v(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:D(()=>[Q(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),tN=eN;const[ov,nN]=Ir("TabsRoot");var rN=z({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,{orientation:i,unmountOnHide:s,dir:o}=cr(n),a=Jl(o);Ye();const l=_a(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),u=Z();return nN({modelValue:l,changeModelValue:c=>{l.value=c},orientation:i,dir:a,unmountOnHide:s,activationMode:n.activationMode,baseId:Wi(void 0,"reka-tabs"),tabsList:u}),(c,f)=>(T(),L(v(lt),{dir:v(a),"data-orientation":v(i),"as-child":c.asChild,as:c.as},{default:D(()=>[Q(c.$slots,"default",{modelValue:v(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),iN=rN;function OA(t,e){return`${t}-trigger-${e}`}function TA(t,e){return`${t}-content-${e}`}var sN=z({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n}=Ye(),r=ov(),i=q(()=>OA(r.baseId,e.value)),s=q(()=>TA(r.baseId,e.value)),o=q(()=>e.value===r.modelValue.value),a=Z(o.value);return gn(()=>{requestAnimationFrame(()=>{a.value=!1})}),(l,u)=>(T(),L(v(Yl),{present:l.forceMount||o.value,"force-mount":""},{default:D(({present:c})=>[k(v(lt),{id:s.value,ref:v(n),"as-child":l.asChild,as:l.as,role:"tabpanel","data-state":o.value?"active":"inactive","data-orientation":v(r).orientation.value,"aria-labelledby":i.value,hidden:!c,tabindex:"0",style:_o({animationDuration:a.value?"0s":void 0})},{default:D(()=>[!v(r).unmountOnHide.value||c?Q(l.$slots,"default",{key:0}):we("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),oN=sN,aN=z({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{loop:n}=cr(e),{forwardRef:r,currentElement:i}=Ye(),s=ov();return s.tabsList=i,(o,a)=>(T(),L(v(rA),{"as-child":"",orientation:v(s).orientation.value,dir:v(s).dir.value,loop:v(n)},{default:D(()=>[k(v(lt),{ref:v(r),role:"tablist","as-child":o.asChild,as:o.as,"aria-orientation":v(s).orientation.value},{default:D(()=>[Q(o.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),lN=aN,uN=z({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,{forwardRef:n}=Ye(),r=ov(),i=q(()=>OA(r.baseId,e.value)),s=q(()=>TA(r.baseId,e.value)),o=q(()=>e.value===r.modelValue.value);return(a,l)=>(T(),L(v(WP),{"as-child":"",focusable:!a.disabled,active:o.value},{default:D(()=>[k(v(lt),{id:i.value,ref:v(n),role:"tab",type:a.as==="button"?"button":void 0,as:a.as,"as-child":a.asChild,"aria-selected":o.value?"true":"false","aria-controls":s.value,"data-state":o.value?"active":"inactive",disabled:a.disabled,"data-disabled":a.disabled?"":void 0,"data-orientation":v(r).orientation.value,onMousedown:l[0]||(l[0]=eo(u=>{!a.disabled&&u.ctrlKey===!1?v(r).changeModelValue(a.value):u.preventDefault()},["left"])),onKeydown:l[1]||(l[1]=Gy(u=>v(r).changeModelValue(a.value),["enter","space"])),onFocus:l[2]||(l[2]=()=>{const u=v(r).activationMode!=="manual";!o.value&&!a.disabled&&u&&v(r).changeModelValue(a.value)})},{default:D(()=>[Q(a.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),cN=uN;const fN=z({__name:"AppSidebarGroupLabel",props:{class:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(T(),L(v(lt),{"data-sidebar":"group-label",as:t.as,"as-child":t.asChild,class:Se(v(ke)("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium transition-[margin,opa] duration-200 ease-linear outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e.class))},{default:D(()=>[Q(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}});var _r=(t=>(t.Text="text",t.File="file",t))(_r||{});function dN(t){if(typeof t!="string")return null;try{return JSON.parse(t)}catch{return null}}const hN=Ca("errors",()=>{const t=Z(null),e=()=>{var i;t.value=dN(((i=window.Nimbus)==null?void 0:i.globalException)??null)},n=()=>{t.value=null},r=q(()=>t.value!==null);return{globalError:t,initializeGlobalErrors:e,clearGlobalError:n,hasGlobalError:r}}),pN=Ca("sharedState",()=>{const t=Z(null),e=Z(!1),n=q(()=>t.value!==null),r=q(()=>e.value),i=q(()=>{var c;return((c=t.value)==null?void 0:c.routeExists)??!0}),s=q(()=>{var c;return(c=t.value)==null?void 0:c.payload}),o=q(()=>{var c;return(c=t.value)==null?void 0:c.error});return{sharedState:t,isRestoredFromShare:e,hasSharedState:n,wasImportedFromShare:r,routeExists:i,sharedPayload:s,sharedError:o,initializeFromWindow:()=>{var f;const c=(f=window.Nimbus)==null?void 0:f.sharedState;c&&(t.value=c,e.value=!0)},markAsConsumed:()=>{e.value=!0},clearSharedState:()=>{t.value=null,e.value=!1}}});/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mN=rt("ChevronLeftIcon",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U0=rt("ChevronRightIcon",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const av=rt("ChevronsLeftRightIcon",[["path",{d:"m9 7-5 5 5 5",key:"j5w590"}],["path",{d:"m15 7 5 5-5 5",key:"1bl6da"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gN=rt("CircleAlertIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bN=rt("CircleHelpIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yN=rt("CircleSlash2Icon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vN=rt("CodeXmlIcon",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xN=rt("CornerDownLeftIcon",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const SN=rt("DatabaseBackupIcon",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 12a9 3 0 0 0 5 2.69",key:"1ui2ym"}],["path",{d:"M21 9.3V5",key:"6k6cib"}],["path",{d:"M3 5v14a9 3 0 0 0 6.47 2.88",key:"i62tjy"}],["path",{d:"M12 12v4h4",key:"1bxaet"}],["path",{d:"M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16",key:"1f4ei9"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const EN=rt("ExternalLinkIcon",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wN=rt("EyeClosedIcon",[["path",{d:"m15 18-.722-3.25",key:"1j64jw"}],["path",{d:"M2 8a10.645 10.645 0 0 0 20 0",key:"1e7gxb"}],["path",{d:"m20 15-1.726-2.05",key:"1cnuld"}],["path",{d:"m4 15 1.726-2.05",key:"1dsqqd"}],["path",{d:"m9 18 .722-3.25",key:"ypw2yx"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _N=rt("EyeIcon",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const CN=rt("FolderIcon",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AN=rt("GripVerticalIcon",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const DN=rt("HistoryIcon",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kN=rt("ImportIcon",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m8 11 4 4 4-4",key:"1dohi6"}],["path",{d:"M8 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-4",key:"1ywtjm"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const IA=rt("InfoIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ON=rt("LayersIcon",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const TN=rt("LightbulbIcon",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const PA=rt("Link2Icon",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const IN=rt("LoaderCircleIcon",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const PN=rt("LockKeyholeOpenIcon",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}],["path",{d:"M7 10V7a5 5 0 0 1 9.33-2.5",key:"car5b7"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lx=rt("LockOpenIcon",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RN=rt("LockIcon",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const NN=rt("PlusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RA=rt("RefreshCcwIcon",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const MN=rt("RefreshCwOffIcon",[["path",{d:"M21 8L18.74 5.74A9.75 9.75 0 0 0 12 3C11 3 10.03 3.16 9.13 3.47",key:"1krf6h"}],["path",{d:"M8 16H3v5",key:"1cv678"}],["path",{d:"M3 12C3 9.51 4 7.26 5.64 5.64",key:"ruvoct"}],["path",{d:"m3 16 2.26 2.26A9.75 9.75 0 0 0 12 21c2.49 0 4.74-1 6.36-2.64",key:"19q130"}],["path",{d:"M21 12c0 1-.16 1.97-.47 2.87",key:"4w8emr"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M22 22 2 2",key:"1r8tn9"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const FN=rt("SkipForwardIcon",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cp=rt("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H0=rt("TriangleAlertIcon",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const LN=rt("UserRoundIcon",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
* @license lucide-vue-next v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const BN=rt("WandSparklesIcon",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]),NA=t=>{const e=new FormData;return Object.entries(t).forEach(([n,r])=>{Y1(e,n,r)}),e},Y1=(t,e,n)=>{if(Array.isArray(n)){n.forEach((r,i)=>{Y1(t,`${e}[${i}]`,r)});return}if(n instanceof Blob){t.append(e,n);return}if(n&&typeof n=="object"){(n instanceof FormData?n.entries():Object.entries(n)).forEach(([i,s])=>{Y1(t,`${e}[${i}]`,s)});return}t.append(e,n===null?"":String(n))};var xt=(t=>(t.INFORMATION="Information",t.SUCCESS="Success",t.SERVER_ERROR="Server Error",t.CLIENT_ERROR="Client Error",t.REDIRECT="Redirect",t.EMPTY="No request yet",t.PENDING="Pending",t.OTHER="Other",t.DUMP_AND_DIE="Dump & Die",t))(xt||{});const $N=t=>t>=100&&t<200?xt.INFORMATION:t>=200&&t<300?xt.SUCCESS:t>=300&&t<400?xt.REDIRECT:t>=400&&t<500?xt.CLIENT_ERROR:t>=500&&t<600?xt.SERVER_ERROR:t===999?xt.DUMP_AND_DIE:xt.OTHER;function zN(){const t=Xi(),e=Z(null),n=Z(!1),r=c=>{const f=t.apiUrl,d=c.endpoint.replace(/^\/+/,""),h=new URL(`${f}/${d}`);return c.queryParameters.filter(p=>p.enabled&&p.key.trim()).forEach(p=>{h.searchParams.append(p.key,p.value)}),h.toString()},i=c=>{const f=c.body[c.method]??null;return f?f[c.payloadType]??null:null},s=c=>{const f=NI(c.payloadType,c.headers.filter(d=>d.enabled&&d.key.trim()!=="").map(d=>({key:d.key,value:d.value})));return{endpoint:r(c),method:c.method,headers:f,authorization:c.authorization,body:i(c)}},o=c=>{const f=c.headers,d=c.statusCode,h=c.headers.find(p=>p.key.toLowerCase()==="content-length");return{status:$N(d),statusCode:d,statusText:c.statusText,body:c.body,sizeInBytes:h?Number(h.value):c.body.length,headers:f,cookies:c.cookies.map(p=>({key:p.key,value:{raw:p.value.raw,decrypted:p.value.decrypted}})),timestamp:c.timestamp}},a=c=>new Promise((f,d)=>{var b;const h=t.appBasePath+"/api/relay",p=s(c),m=NA(p),g={"Content-Type":"multipart/form-data"};c.transactionMode&&(g["X-Nimbus-Transaction-Mode"]="1"),RI.post(h,m,{headers:g,transformResponse:y=>y,signal:(b=e.value)==null?void 0:b.signal}).then(y=>{const x=JSON.parse(y.data),S=o(x);f({response:S,duration:x.duration})}).catch(y=>{if(y.code==="ERR_CANCELED"){f(null);return}if(y.response){let x=y.message;try{x=JSON.parse(y.response.data).message??y.message}catch(S){console.error(S)}d({message:x,status:y.response.status,body:y.response.data});return}d({message:y.message})})});return{executeRequest:async c=>{if(n.value)throw new Error("Request already in progress");n.value=!0,e.value=new AbortController;try{const f=new Promise((d,h)=>setTimeout(()=>h(new Error("Request timeout")),PI.TIMEOUT));return await Promise.race([a(c),f])}finally{n.value=!1,e.value=null}},cancelCurrentRequest:()=>{e.value&&e.value.abort()},buildRequestUrl:r,isExecuting:kc(n)}}const jN=t=>JSON.stringify(t,null,3),VN=t=>Object.entries(t).map(([e,n])=>`${e}=${n};`).join(`
`),Bx=(t,e)=>{switch(e){case Or.JSON:return jN(t);case Or.PLAIN_TEXT:return VN(t);case Or.FORM_DATA:return NA(t);default:return null}},ll={EMPTY_FIELD_PROBABILITY:.3,MAX_ARRAY_ITEMS:5,MIN_ARRAY_ITEMS:1,NUMBER_RANGE:{min:1,max:9999},STRING_LENGTH:{minLength:5,maxLength:20}};var Vo=(t=>(t.STRING="string",t.INTEGER="integer",t.NUMBER="number",t.BOOLEAN="boolean",t.ARRAY="array",t.OBJECT="object",t))(Vo||{});function UN(t){return t==="string"||t==="integer"||t==="number"||t==="boolean"}function HN(t){return t==="array"||t==="object"}function qN(t){return q0(t,!1)}function GN(t){return q0(t,!0)}function WN(t,e){if(!t.enum||t.enum.length===0)throw new Error("Enum values are required for enum type");return e?t.enum[0]:T0.helpers.arrayElement(t.enum)}function KN(t,e,n,r){switch(t.type){case Vo.STRING:return QN(t,e,n,r);case Vo.NUMBER:case Vo.INTEGER:return eM(t,e,n);case Vo.BOOLEAN:return e?!1:T0.datatype.boolean();default:throw new Error(`Unsupported primitive type: ${t.type}`)}}function XN(t,e){switch(t.type){case Vo.ARRAY:return ZN(t,e);case Vo.OBJECT:return t.properties?q0(t,e):{};default:throw new Error(`Unsupported complex type: ${t.type}`)}}function MA(t,e,n,r){return t.enum&&t.enum.length>0?WN(t,e):t.type&&UN(t.type)?KN(t,e,n,r):t.type&&HN(t.type)?XN(t,e):null}function YN(t,e,n){return Array.from({length:n},()=>q0(t,e))}function JN(t,e,n){return Array.from({length:n},()=>MA(t,e,"item",!1)).filter(i=>i!==null&&i.toString().length)}function ZN(t,e){const n=t.items;if(n===void 0||typeof n!="object"||n===null||Array.isArray(n))return[];const r=e?ll.MIN_ARRAY_ITEMS:ll.MIN_ARRAY_ITEMS+Math.floor(Math.random()*ll.MAX_ARRAY_ITEMS);return n.properties!==void 0?YN(n,e,r):JN(n,e,r)}function q0(t,e=!1){const n={};if(t.properties&&typeof t.properties=="object"){const r=t.required||[];for(const i in t.properties){const s=t.properties[i];if(typeof s!="object"||s===null||Array.isArray(s))continue;const o=r.includes(i);n[i]=MA(s,e,i,o)}}return n}function QN(t,e,n,r){if(e)return"<placeholder>";if(!r&&Math.random()<ll.EMPTY_FIELD_PROBABILITY)return"";const i={...ll.STRING_LENGTH};t.minLength&&(i.minLength=t.minLength),t.maxLength&&(i.maxLength=t.maxLength);const s=FA(t,i,n);return s!==null?typeof s!="string"?s.toString():s:T0.string.alpha({length:{min:i.minLength,max:i.maxLength}})}function eM(t,e,n){if(e)return 0;const r={...ll.NUMBER_RANGE};t.minimum&&(r.min=t.minimum),t.maximum&&(r.max=t.maximum);const i=FA(t,r,n,!0);return i!==null&&typeof i=="number"?i:T0.number.int(r)}const $x={uuid:"uuid",email:"email","date-time":"datetime",url:"url",date:"date",time:"time",uri:"url"};function FA(t,e={},n,r=!1){var i;if(t.format&&$x[t.format]){const s=$x[t.format];return((i=Dx.find(o=>o.id===s))==null?void 0:i.generate())??null}for(const s of MI){if(r&&!s.isInteger||!s.pattern.test(n))continue;const o=Dx.find(a=>a.id===s.generatorId);if(o)return o.generate({...s.generatorConfig,...e})??null}return null}async function tM(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n],i=[];Object.keys(r).forEach(s=>{const o=r[s];i.push({resource:s,routes:o.flatMap(a=>a.methods.map(l=>({method:l,endpoint:a.uri,shortEndpoint:a.shortUri,schema:{shape:a.schema,extractionErrors:a.extractionError},metadata:a.metadata}))).sort((a,l)=>a.shortEndpoint.localeCompare(l.shortEndpoint))})}),e[n]=i.sort((s,o)=>s.resource.localeCompare(o.resource))}),e}function nM(t){if(typeof t!="string")return null;try{return JSON.parse(t)}catch{return null}}function rM(t,e){if(!t||!e.trim())return[];const n=[],r=e.toLowerCase();return Object.entries(t).forEach(([i,s])=>{s.forEach(o=>{o.routes.forEach(a=>{(a.endpoint.toLowerCase().includes(r)||a.shortEndpoint.toLowerCase().includes(r)||a.method.toLowerCase().includes(r)||o.resource.toLowerCase().includes(r))&&n.push({version:i,resource:o.resource,route:a})})})}),n}function iM(t){return t?Object.values(t).reduce((e,n)=>e+n.reduce((r,i)=>r+i.routes.length,0),0):0}const fp=[],LA=t=>`nimbus:${t}`,BA=t=>{if(fp.includes(t)){const e=t+"-duplicate";return console.warn(`Key ${t} must be unique. '${e}' will be used instead.`),BA(e)}return fp.push(t),LA(t)},Tf=t=>(fp.includes(t)||fp.push(t),LA(t));function sM(t,e){const{queryParameters:n,requestBody:r}=oM(t),i=aM(t.method),s=zA(e,t.endpoint,n),o=lM(t),a=uM(t.authorization),l=mM(r);return{command:["curl"].concat(i?[i]:[]).concat([`"${s}"`]).concat(o).concat(a?[a]:[]).concat(l).join(` \\
`),hasSpecialAuth:vM(t.authorization)}}function oM(t){const e=pM(t);if(t.method.toLowerCase()==="get"){const r=gM(e,t.payloadType);return{queryParameters:[...t.queryParameters.filter($A),...cM(r)],requestBody:null}}return{queryParameters:t.queryParameters,requestBody:e}}function aM(t){const e=t.toUpperCase();return e==="GET"?null:`-X ${e}`}function lM(t){const e=fM(t),n=e.map(i=>`-H "${i.key}: ${i.value}"`),r=FI(t.payloadType);return r&&(e.some(s=>s.key.toLowerCase()==="content-type")||n.push(`-H "Content-Type: ${r}"`)),n}function uM(t){const e=dM(t);return e?`-H "${e}"`:null}function cM(t){return Object.entries(t).map(([e,n])=>({type:_r.Text,enabled:!0,key:e,value:n}))}function fM(t){return t.headers.filter($A)}function $A(t){return t.enabled&&t.key.trim()!==""}function dM(t){if(!t)return null;switch(t.type){case Je.Bearer:return`Authorization: Bearer ${t.value}`;case Je.Basic:return hM(t.value);case Je.None:case Je.CurrentUser:case Je.Impersonate:return null;default:return null}}function hM(t){return`Authorization: Basic ${btoa(`${t.username}:${t.password}`)}`}function pM(t){const n=t.body[t.method];if(n===void 0)return null;const r=n[t.payloadType];return r===void 0?null:r}function mM(t){return t===null?[]:bM(t)}function gM(t,e){return t===null?{}:typeof t=="string"&&e===Or.JSON?JSON.parse(t):t instanceof FormData?Object.fromEntries(Array.from(t.entries()).map(([n,r])=>[n,r instanceof File?`@${r}`:r])):t.split(`
`).reduce(function(n,r){const{0:i,1:s}=r.split("=");return n[i]=s,n},{})}function bM(t){return typeof t=="string"?[`-d '${t}'`]:yM(t)}function yM(t){return Array.from(t.entries()).map(([e,n])=>n instanceof File?`-F ${e}=@${n.name}`:`-F ${e}=${n}`)}function vM(t){return t.type===Je.CurrentUser?!0:t.type===Je.Impersonate}function xM(t){return t.key.trim()!==""}function zA(t,e,n){const r=new URL(`${t}/${e}`);return n.forEach(i=>{xM(i)&&J1(r.searchParams,i.key,i.value)}),r.toString()}function J1(t,e,n){n!=null&&(Array.isArray(n)?n.forEach(r=>J1(t,`${e}[]`,r)):typeof n=="object"?Object.entries(n).forEach(([r,i])=>{J1(t,`${e}[${r}]`,i)}):t.append(e,String(n)))}function zx(t){return Object.keys(t.schema.shape.properties??{}).length>0?Or.JSON:Or.EMPTY}function SM(t,e,n){return{durationInMs:e,isProcessing:!1,request:jA(t),response:n}}function EM(t,e){return{durationInMs:0,isProcessing:!1,request:jA(t),error:e}}const jA=function(t){const e=t.body[t.method]??null,n=e?e[t.payloadType]??null:null;return{method:t.method,endpoint:t.endpoint,headers:t.headers.map(r=>({...r})),body:n,queryParameters:t.queryParameters.map(r=>({...r})),payloadType:t.payloadType,authorization:{...t.authorization},routeDefinition:{...t.routeDefinition},transactionMode:t.transactionMode}};function wM(t){const e=performance.now();let r=window.setInterval(()=>{const i=Math.floor(performance.now()-e);t(i)},86);return{stop:()=>(r&&(clearInterval(r),r=null),Math.floor(performance.now()-e))}}const _M=Ca("_requestExecutor",()=>{const t=G0(),e=ka(),{executeRequest:n,cancelCurrentRequest:r}=zN(),i=Z(!1),s=Z(0),o=q(()=>l=>l!==null&&!l.isProcessing&&l.endpoint.trim()!=="");return{isProcessing:i,duration:s,canExecute:o,executeRequestWithTiming:async l=>{if(!o.value(l))return;let u=null;const c=()=>{u&&u.stop(),l.isProcessing=!1,l.wasExecuted=!0};try{l.isProcessing=!0,l.durationInMs=0,u=wM(h=>{l.isProcessing&&(l.durationInMs=h)});const f=await n(l);if(f===null){c(),l.durationInMs=0;return}const d=SM(l,f.duration,f.response);t.addLog(d),e.updateActiveTabResponse(d)}catch(f){const d=EM(l,f);t.addLog(d),e.updateActiveTabResponse(d),console.error("Request failed:",f)}finally{c()}},cancelCurrentRequest:r}}),G0=Ca("requestHistory",()=>{const t=Ky(),e=Z([]),n=Z(null),r=q(()=>t.preferences.maxHistoryLogs),i=q(()=>e.value),s=q(()=>n.value!==null&&e.value[n.value]?e.value[n.value]:e.value[e.value.length-1]??null);return{logs:e,maxLogs:r,activeLogIndex:n,allLogs:i,lastLog:s,addLog:u=>{e.value.push(u),e.value.length>r.value&&(e.value=e.value.slice(-r.value)),n.value=null},clearLogs:()=>{e.value=[]},setActiveLog:u=>{n.value=u}}},{persist:!0}),Rr=Ca("request",()=>{const t=ka(),e=_M(),n=q(()=>t.hasActiveRequest),r=q(()=>t.pendingRequestData),i=q(()=>e.canExecute(t.pendingRequestData)),s=(o,a)=>{var l,u;o.endpoint===((l=r.value)==null?void 0:l.endpoint)&&o.method===((u=r.value)==null?void 0:u.method)||(e.cancelCurrentRequest(),t.openTab(o,a))};return{isProcessing:q(()=>e.isProcessing),hasActiveRequest:n,pendingRequestData:r,canExecute:i,updateRequestMethod:t.updateRequestMethod,updateRequestEndpoint:t.updateRequestEndpoint,updateRequestHeaders:t.updateRequestHeaders,updateRequestBody:t.updateRequestBody,updateQueryParameters:t.updateQueryParameters,updateAuthorization:t.updateAuthorization,updateTransactionMode:t.updateTransactionMode,getRequestUrl:t.getRequestUrl,resetRequest:t.resetRequest,restoreFromHistory:t.restoreFromHistory,executeCurrentRequest:()=>{if(t.pendingRequestData)return e.executeRequestWithTiming(t.pendingRequestData)},cancelCurrentRequest:e.cancelCurrentRequest,initializeRequest:s}});function VA(t,e){switch(t){case wh.Uuid:return e.generateValue("uuid");case wh.Email:return e.generateValue("email");case wh.String:return e.generateValue("word");default:return e.generateValue("word")}}const ka=Ca("tabs",()=>{const t=Ky(),e=Xi(),n=I0(),r=Z([]),i=Z(null),s=Z(null),o=Z([]),a=q(()=>r.value.find($=>$.id===i.value)??null),l=q(()=>{var $;return(($=a.value)==null?void 0:$.request)??null}),u=q(()=>{var $;return(($=a.value)==null?void 0:$.response)??null}),c=q(()=>l.value),f=q(()=>l.value!==null),d=()=>e.headers.map($=>({type:_r.Text,key:$.header,value:$.type==="generator"?VA($.value,n):String($.value),enabled:!0}));function h(){if(!l.value)return;const $=o.value.map(fe=>fe.key),ee=l.value.headers.filter(fe=>!$.includes(fe.key)),pe=d();l.value.headers=[...pe,...ee],o.value=pe}const p=()=>l.value!==null?l.value.authorization:t.preferences.defaultAuthorizationType===Je.CurrentUser?{type:Je.CurrentUser}:t.preferences.defaultAuthorizationType===Je.Impersonate?{type:Je.Impersonate,value:1}:t.preferences.defaultAuthorizationType===Je.Bearer?{type:Je.Bearer,value:""}:t.preferences.defaultAuthorizationType===Je.Basic?{type:Je.Basic,value:{username:"",password:""}}:{type:Je.None},m=$=>t.preferences.defaultRequestBodyType===-1?zx($):t.preferences.defaultRequestBodyType;function g($){const ee=d(),pe=ee.map(me=>me.key),fe=$.headers.filter(me=>!pe.includes(me.key));$.headers=[...ee,...fe],o.value=ee}function b($,ee){var fe,me,Me;const pe={method:$.method,endpoint:$.endpoint,headers:(fe=l.value)!=null&&fe.headers?F(l.value.headers):[],body:{},payloadType:m($),schema:$.schema,queryParameters:[],authorization:((me=l.value)==null?void 0:me.authorization)??p(),supportedRoutes:ee,routeDefinition:$,isProcessing:!1,wasExecuted:!1,durationInMs:0,transactionMode:((Me=l.value)==null?void 0:Me.transactionMode)??!1};return g(pe),pe}function y($,ee){const pe=r.value.find(Me=>Me.method.toUpperCase()===$.method.toUpperCase()&&Me.request.endpoint===$.endpoint);if(pe){i.value=pe.id;return}const fe=crypto.randomUUID(),me={id:fe,title:$.shortEndpoint||$.endpoint,method:$.method,request:b($,ee),response:null};r.value.push(me),i.value=fe}function x($){const ee=r.value.findIndex(pe=>pe.id===$);if(ee!==-1&&(r.value.splice(ee,1),i.value===$))if(r.value.length>0){const pe=Math.min(ee,r.value.length-1);i.value=r.value[pe].id}else i.value=null}function S($){r.value.some(ee=>ee.id===$)&&(i.value=$)}function E($,ee){if($<0||$>=r.value.length||ee<0||ee>=r.value.length)return;const pe=r.value.splice($,1)[0];r.value.splice(ee,0,pe)}function C($){a.value&&(a.value.response=$)}function w($){if(!l.value)return;const ee=$.toUpperCase();if(ee===l.value.method)return;l.value.method=ee;const pe=l.value.supportedRoutes.find(fe=>fe.method.toUpperCase()===ee);if(!pe){l.value.payloadType=Or.EMPTY,l.value.schema={shape:{},extractionErrors:null};return}l.value.payloadType=zx(pe),l.value.schema=pe.schema}function A($){l.value&&(l.value.endpoint=$)}function _($){l.value&&(l.value.headers=$)}function O($){l.value&&(l.value.body=$)}function I($){l.value&&(l.value.queryParameters=$)}function N($){l.value&&(l.value.authorization=$)}function P($){l.value&&(l.value.transactionMode=$)}const R=()=>{i.value&&x(i.value)},F=$=>$.map(ee=>({...ee})),V=($,ee,pe,fe)=>{const me={...$},Me=me[ee]??{};return me[ee]={...Me,[pe]:fe},me},B=$=>{var pe;const ee=$.response!==void 0&&$.response.durationInMs!==void 0;return{method:$.method.toUpperCase(),endpoint:$.endpoint,headers:$.headers.map(fe=>({key:fe.key,value:String(fe.value??""),type:_r.Text,enabled:!0})),body:$.body,payloadType:$.payloadType,schema:{shape:{},extractionErrors:null},queryParameters:$.queryParameters.map(fe=>({key:fe.key,value:fe.value,type:fe.type==="file"?_r.File:_r.Text,enabled:!0})),authorization:{type:$.authorization.type,value:$.authorization.value},supportedRoutes:[],routeDefinition:{endpoint:$.endpoint,method:$.method.toUpperCase(),schema:{shape:{},extractionErrors:null},shortEndpoint:$.endpoint},isProcessing:!1,wasExecuted:ee,durationInMs:((pe=$.response)==null?void 0:pe.durationInMs)??0,transactionMode:!1}};return{tabs:r,activeTabId:i,activeApplication:s,lastSyncedGlobalHeaders:o,pendingRequestData:c,activeTab:a,activeRequest:l,activeResponse:u,hasActiveRequest:f,openTab:y,closeTab:x,setActiveTab:S,moveTab:E,updateActiveTabResponse:C,updateRequestMethod:w,updateRequestEndpoint:A,updateRequestHeaders:_,updateRequestBody:O,updateQueryParameters:I,updateAuthorization:N,updateTransactionMode:P,resetRequest:R,restoreFromHistory:$=>{if(!l.value)return;const ee=$.request.method.toUpperCase(),pe=$.request.payloadType,fe=l.value.supportedRoutes.find(me=>me.method.toUpperCase()===ee&&me.endpoint===$.request.endpoint);a.value.request={...l.value,method:ee,endpoint:$.request.endpoint,headers:F($.request.headers),queryParameters:F($.request.queryParameters),payloadType:pe,body:V(l.value.body,ee,pe,$.request.body),authorization:{...$.request.authorization},...fe?{routeDefinition:fe,schema:fe.schema}:{},wasExecuted:!0,transactionMode:l.value.transactionMode??!1},a.value.response=$},restoreFromSharedPayload:$=>{var me;const ee=B($),pe=crypto.randomUUID(),fe={id:pe,title:$.endpoint,method:$.method,request:ee,response:ee.wasExecuted&&$.response?{durationInMs:$.response.durationInMs,isProcessing:!1,request:{...ee,headers:F(ee.headers),queryParameters:F(ee.queryParameters),body:ee.body?((me=ee.body[ee.method])==null?void 0:me[ee.payloadType])??null:null},response:$.response,importedFromShare:!0}:null};r.value.push(fe),i.value=pe},syncGlobalHeadersWhenApplicable:()=>{s.value!==e.activeApplication&&(h(),s.value=e.activeApplication)},getRequestUrl:$=>zA(e.apiUrl,$.endpoint,$.queryParameters.filter(ee=>ee.enabled&&ee.key.trim()!==""))}},{persist:{pick:["tabs","activeTabId","activeApplication","lastSyncedGlobalHeaders"],afterHydrate:t=>{t.store.syncGlobalHeadersWhenApplicable()}}}),lv=Ca("routes",()=>{const t=Z(null),e=Z(null),n=Z(!1),r=Z(null),i=async()=>{var g;n.value=!0,r.value=null;try{const b=((g=window.Nimbus)==null?void 0:g.routes)??"[]";if(typeof b!="string"){t.value=null;return}const y=JSON.parse(b);t.value=await tM(y)}catch(b){r.value=b instanceof Error?b.message:"Failed to load routes",t.value=null}finally{n.value=!1}},s=async()=>{var g;e.value=nM(((g=window.Nimbus)==null?void 0:g.routeExtractorException)??null),await i()},o=g=>{var b;return((b=g.metadata)==null?void 0:b.isMissingImplementation)??!1},a=g=>{var b;return((b=g.metadata)==null?void 0:b.isUndocumented)??!1},l=()=>{t.value=null,e.value=null,r.value=null},u=q(()=>t.value!==null&&Object.keys(t.value).length>0),c=q(()=>e.value!==null),f=q(()=>c.value),d=q(()=>t.value?Object.keys(t.value):[]),h=q(()=>iM(t.value)),p=q(()=>g=>{var b;return((b=t.value)==null?void 0:b[g])||[]}),m=q(()=>g=>rM(t.value,g));return{routes:t,routeExtractorException:e,isLoading:n,error:r,fetchAvailableRoutes:i,initializeRoutes:s,resetRoutesState:l,isMissingImplementation:o,isUndocumented:a,hasRoutes:u,hasExtractionError:c,hasAnyError:f,routeVersions:d,totalRouteCount:h,getRoutesByVersion:p,searchRoutes:m}}),CM=["type","placeholder","disabled"],AM=500,ws=z({__name:"AppInput",props:{defaultValue:{},modelValue:{},class:{},type:{},placeholder:{},disabled:{type:Boolean},variant:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=_a(n,"modelValue",e,{passive:!0,defaultValue:n.defaultValue}),{openCommand:s}=I0(),o=Z(),a=Z(0),l=u=>{if(u.key==="Shift"){const c=Date.now();c-a.value<AM&&(u.preventDefault(),s(o.value,BI.SHIFT_SHIFT)),a.value=c}};return(u,c)=>ua((T(),K("input",{ref_key:"inputRef",ref:o,"onUpdate:modelValue":c[0]||(c[0]=f=>_l(i)?i.value=f:null),type:t.type??"text",class:Se(v(ke)(v(DM)({variant:t.variant}),n.class)),placeholder:t.placeholder,disabled:t.disabled,onKeydown:l},null,42,CM)),[[LI,v(i)]])}}),DM=VC("flex h-9 w-full bg-transparent px-3 py-1 text-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-zinc-500 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-zinc-400",{variants:{variant:{default:"rounded-md border border-zinc-200 shadow-sm focus-visible:ring-1 focus-visible:ring-zinc-950 dark:border-zinc-800 dark:focus-visible:ring-zinc-300",toolbar:"rounded-none border-0 shadow-none focus-visible:ring-0"}},defaultVariants:{variant:"default"}}),kM=z({__name:"AppSidebarInput",props:{class:{},variant:{}},setup(t){const e=t,n=Aa(e,"class");return(r,i)=>(T(),L(v(ws),Ce({"data-sidebar":"input"},v(n),{class:v(ke)("h-8 w-full bg-white shadow-none focus-visible:ring-0 dark:bg-zinc-950",e.class)}),{default:D(()=>[Q(r.$slots,"default")]),_:3},16,["class"]))}}),OM=z({__name:"AppTooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(t){const e=t;return(n,r)=>(T(),L(v($I),Yn(Pr(e)),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),dp=z({__name:"AppTooltipWrapper",props:{value:{},delay:{default:300},as:{default:"button"},onClick:{type:Function,default:()=>{}}},setup(t){const e=t;return(n,r)=>(T(),L(v(OM),{"delay-duration":t.delay},{default:D(()=>[k(v(zI),null,{default:D(()=>[k(v(jI),{as:t.as,onClick:t.onClick},{default:D(()=>[M("span",null,[Q(n.$slots,"default")])]),_:3},8,["as","onClick"]),k(v(VI),null,{default:D(()=>[ne(de(e.value),1)]),_:1})]),_:3})]),_:3},8,["delay-duration"]))}}),TM=z({__name:"AppSidebarMenuSub",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("ul",{"data-sidebar":"menu-badge",class:Se(v(ke)("border-sidebar-border ml-2.5 flex min-w-0 translate-x-px flex-col gap-1 border-l py-0.5 pl-0.5","group-data-[collapsible=icon]:hidden",e.class))},[Q(n.$slots,"default")],2))}}),uv=z({__name:"AppDialogClose",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(T(),L(v(DP),Ce({"data-slot":"dialog-close"},e),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),cv=z({__name:"AppDialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(T(),L(v(VP),Ce({"data-slot":"dialog-trigger"},e),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),IM={key:0,class:"z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-zinc-200 dark:bg-zinc-800"},Z1=z({__name:"AppResizableHandle",props:{class:{},withHandle:{type:Boolean},id:{},hitAreaMargins:{},tabindex:{},disabled:{type:Boolean},nonce:{},asChild:{type:Boolean},as:{}},emits:["dragging"],setup(t,{emit:e}){const n=t,r=e,i=Aa(n,"class","withHandle"),s=Yr(i,r);return(o,a)=>(T(),L(v(XR),Ce({"data-slot":"resizable-handle"},v(s),{class:v(ke)("relative flex w-px items-center justify-center bg-zinc-200 after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-zinc-950 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:translate-x-0 data-[orientation=vertical]:after:-translate-y-1/2 dark:bg-zinc-800 dark:focus-visible:ring-zinc-300 [&[data-orientation=vertical]>div]:rotate-90",n.class)}),{default:D(()=>[n.withHandle?(T(),K("div",IM,[k(v(AN),{class:"size-2.5"})])):we("",!0)]),_:1},16,["class"]))}}),Ps=z({__name:"AppResizablePanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{}},emits:["collapse","expand","resize"],setup(t,{expose:e,emit:n}){const s=Yr(t,n),o=Z(null);return e({collapse:()=>{var a;return(a=o.value)==null?void 0:a.collapse()},expand:()=>{var a;return(a=o.value)==null?void 0:a.expand()}}),(a,l)=>(T(),L(v(GR),Ce({ref_key:"splitterPanelRef",ref:o,"data-slot":"resizable-panel"},v(s)),{default:D(()=>[Q(a.$slots,"default")]),_:3},16))}}),Q1=z({__name:"AppResizablePanelGroup",props:{class:{},id:{},autoSaveId:{},direction:{},keyboardResizeBy:{},storage:{},asChild:{type:Boolean},as:{}},emits:["layout"],setup(t,{emit:e}){const n=t,r=e,i=Aa(n,"class"),s=Yr(i,r);return(o,a)=>(T(),L(v(HR),Ce({"data-slot":"resizable-panel-group"},v(s),{class:v(ke)("flex h-full w-full data-[orientation=vertical]:flex-col",n.class)}),{default:D(()=>[Q(o.$slots,"default")]),_:3},16,["class"]))}}),UA=z({__name:"AppTabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const i=Yr(t,e);return(s,o)=>(T(),L(v(iN),Ce(v(i),{"unmount-on-hide":!1}),{default:D(()=>[Q(s.$slots,"default")]),_:3},16))}}),Uo=z({__name:"AppTabsContent",props:{class:{},value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=q(()=>{const{class:r,...i}=e;return i});return(r,i)=>(T(),L(v(oN),Ce({class:v(ke)("mt-2 ring-offset-white focus-visible:outline-none",e.class)},n.value),{default:D(()=>[Q(r.$slots,"default")]),_:3},16,["class"]))}}),HA=z({__name:"AppTabsList",props:{class:{},loop:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=q(()=>{const{class:r,...i}=e;return i});return(r,i)=>(T(),L(v(lN),Ce(n.value,{class:v(ke)("text-subtle-foreground inline-flex items-center justify-center rounded-sm p-1",e.class)}),{default:D(()=>[Q(r.$slots,"default")]),_:3},16,["class"]))}}),PM={class:"truncate"},Ho=z({__name:"AppTabsTrigger",props:{label:{},class:{},value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=q(()=>{const{class:i,...s}=e;return s}),r=P0(n);return(i,s)=>(T(),L(v(cN),Ce(v(r),{class:v(ke)("inline-flex items-center justify-center rounded-sm px-2.5 py-1 text-sm font-medium whitespace-nowrap ring-offset-white transition-all focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-zinc-950 data-[state=active]:shadow-sm dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300 dark:data-[state=active]:bg-zinc-950 dark:data-[state=active]:text-zinc-50",e.class)}),{default:D(()=>[M("span",PM,[t.label?(T(),K(Qe,{key:0},[ne(de(t.label),1)],64)):Q(i.$slots,"default",{key:1})])]),_:3},16,["class"]))}}),Pc=z({__name:"AppSelectGroup",props:{class:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=Aa(e,"class");return(r,i)=>(T(),L(v(gR),Ce({class:v(ke)("w-full",e.class)},v(n)),{default:D(()=>[Q(r.$slots,"default")]),_:3},16,["class"]))}}),Rc=z({__name:"AppSelectLabel",props:{class:{},for:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(T(),L(v(yR),{class:Se(v(ke)("p-1 text-xs font-semibold",e.class))},{default:D(()=>[Q(n.$slots,"default")]),_:3},8,["class"]))}}),RM=z({__name:"AppSelectSeparator",props:{class:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=Aa(e,"class");return(r,i)=>(T(),L(v(xR),Ce(v(n),{class:v(ke)("-mx-1 my-1 h-px bg-zinc-100 dark:bg-zinc-800",e.class)}),null,16,["class"]))}}),qA=z({__name:"AppSwitch",props:{class:{},variant:{},defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean},id:{},value:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=q(()=>{const{class:o,...a}=n;return a}),s=Yr(i,r);return(o,a)=>{var l;return T(),L(v(QR),Ce(v(s),{class:v(ke)(((l=n.variant)==null?void 0:l.type)==="default"?"h-5 w-9":"h-4 w-8","peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-zinc-900 data-[state=unchecked]:bg-zinc-200 dark:focus-visible:ring-zinc-300 dark:focus-visible:ring-offset-zinc-950 dark:data-[state=checked]:bg-zinc-50 dark:data-[state=unchecked]:bg-zinc-800",n.class)}),{default:D(()=>{var u;return[k(v(tN),{class:Se(v(ke)(((u=n.variant)==null?void 0:u.type)==="default"?"h-4 w-4":"h-3 w-3","pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 dark:bg-zinc-950"))},{default:D(()=>[Q(o.$slots,"thumb")]),_:3},8,["class"])]}),_:3},16,["class"])}}});function NM(t,e){const{count:n,inc:r}=UI(),i=Z([]),s=UC(new Map),o=Z({deleting:!1}),a=_=>({type:_r.Text,id:_,key:"",value:"",enabled:!0}),l=_=>{const O=s.get(_);return O!=null&&O.deleting?(c(_),!0):(f(_),!1)},u=_=>{var O;return((O=s.get(_))==null?void 0:O.deleting)??!1},c=_=>{const O=s.get(_);O!=null&&O.timeoutId&&clearTimeout(O.timeoutId),s.delete(_)},f=_=>{const O=window.setTimeout(()=>{s.delete(_)},lg.DELETION_CONFIRMATION_TIMEOUT);s.set(_,{deleting:!0,timeoutId:O})},d=()=>o.value.deleting?(p(),!0):(m(),!1),h=()=>o.value.deleting,p=()=>{o.value.timeoutId&&clearTimeout(o.value.timeoutId),o.value={deleting:!1}},m=()=>{const _=window.setTimeout(()=>{o.value={deleting:!1}},lg.DELETION_CONFIRMATION_TIMEOUT);o.value={deleting:!0,timeoutId:_}},g=()=>{s.forEach((_,O)=>c(O)),p()},b=()=>{const _=t.value??[],O=new Map(i.value.map(N=>[N.id,N])),I=_.map(N=>{const P=O.get(N.id);return P?{...P,id:N.id,key:N.key,value:N.value,type:N.type,enabled:N.enabled}:(r(),{id:n.value,...N})});I.length===0&&(r(),I.push(a(n.value))),JSON.stringify(i.value)!==JSON.stringify(_)&&(i.value=I)},y=()=>{const _=i.value.map(O=>({id:O.id,type:O.type,key:O.key,value:O.value,enabled:O.enabled}));e(_)},x=q(()=>i.value.every(_=>!_.enabled)),S=q(()=>h()),E=()=>{r();const _=a(n.value);i.value.push(_)},C=()=>{const _=x.value;i.value.forEach(O=>O.enabled=_)},w=_=>{!i.value[_]||!l(_)||i.value.splice(_,1)},A=()=>{d()&&(i.value=[])};return HI(i,()=>{y()},{deep:!0,debounce:lg.SYNC_DEBOUNCE_DELAY}),nt(t,()=>{b()},{deep:!0}),Xy(()=>{b(),i.value.length===0&&E()}),{parameters:i,deletingAll:S,areAllParametersDisabled:x,addNewEmptyParameter:E,toggleAllParametersEnabledState:C,triggerParameterDeletion:w,deleteAllParameters:A,updateParametersFromParentModel:b,isParameterMarkedForDeletion:u,clearAllDeletionStates:g}}const MM={class:"flex h-8 items-center overflow-hidden border-b p-0"},FM={class:"flex-1 overflow-y-auto"},LM={class:"flex flex-1"},BM={class:"flex items-center justify-center border-r px-2"},$M={key:1,class:"flex items-center justify-center px-2","data-testid":"delete-button"},fv=z({__name:"KeyValueParameters",props:{modelValue:{default:()=>[]},freeFormTypes:{type:Boolean,default:!1},class:{default:void 0}},emits:["update:parameters"],setup(t,{emit:e}){const n=t,r=e,{openCommand:i,closeCommand:s}=I0(),o=Z(null),a=Z(null),l=q(()=>n.modelValue),u=w=>{r("update:parameters",w)},{parameters:c,deletingAll:f,isParameterMarkedForDeletion:d,areAllParametersDisabled:h,addNewEmptyParameter:p,toggleAllParametersEnabledState:m,triggerParameterDeletion:g,deleteAllParameters:b}=NM(l,u),y=(w,A)=>o.value===w&&A.enabled,x=(w,A)=>{o.value=w,a.value=A},S=w=>{const A=w.relatedTarget;A!=null&&A.closest("[data-ValueGenerator-focus-hook]")||(o.value=null,a.value=null,setTimeout(s,100))},E=()=>{a.value&&i(a.value)},C=w=>{g(w)};return(w,A)=>(T(),K("div",{class:Se(v(ke)("flex h-full flex-col overflow-hidden",n.class)),"data-testid":"kv-container"},[M("div",MM,[k(v(gt),{variant:"ghost",size:"xs",class:"px-panel h-full -translate-x-0.5 rounded-none text-xs","data-testid":"add-button",onClick:v(p)},{default:D(()=>[k(v(NN)),A[0]||(A[0]=ne(" Add ",-1))]),_:1},8,["onClick"]),k(v(gt),{variant:"ghost",size:"xs",class:"px-panel h-full -translate-x-0.5 rounded-none text-xs",disabled:v(c).length===0,"data-testid":"enable-all-button",onClick:v(m)},{default:D(()=>[v(h)?(T(),L(v(_N),{key:0})):(T(),L(v(wN),{key:1})),ne(" "+de(v(h)?"Enable All":"Disable All"),1)]),_:1},8,["disabled","onClick"]),k(v(gt),{variant:"ghost",size:"xs",class:Se(["px-panel h-full -translate-x-0.5 rounded-none text-xs",{"!text-destructive hover:text-destructive/90":v(f)}]),disabled:v(c).length===0,"data-testid":"delete-all-button",onClick:v(b)},{default:D(()=>[k(v(cp)),A[1]||(A[1]=ne(" Delete All ",-1))]),_:1},8,["class","disabled","onClick"])]),M("div",FM,[(T(!0),K(Qe,null,_n(v(c),(_,O)=>(T(),K("div",{key:_.id,class:"flex h-8 border-b","data-testid":"parameter-row"},[M("div",LM,[t.freeFormTypes?(T(),L(v(tu),{key:0,modelValue:_.type,"onUpdate:modelValue":I=>_.type=I,"default-value":"text"},{default:D(()=>[k(v(Zl),{class:"pl-panel h-full w-[80px] rounded-none border-0 border-r p-0 text-xs shadow-none focus:ring-0","data-testid":"type-selector"},{default:D(()=>[k(v(Ql),{placeholder:"Select a Type"})]),_:1}),k(v(eu),null,{default:D(()=>[k(v(Es),{value:"text"},{default:D(()=>[...A[2]||(A[2]=[ne("Text",-1)])]),_:1}),k(v(Es),{value:"file",disabled:""},{default:D(()=>[A[4]||(A[4]=ne(" File ",-1)),k(v(fo),{variant:"outline",class:"ml-0.5 px-1 py-0"},{default:D(()=>[...A[3]||(A[3]=[ne(" soon ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"])):we("",!0),k(v(ws),{modelValue:_.key,"onUpdate:modelValue":I=>_.key=I,placeholder:"Key",class:"selector-key h-full flex-1 rounded-none border-0 border-r shadow-none focus:ring-0 focus-visible:ring-0",disabled:!_.enabled,name:"kv-key","data-testid":"kv-key",autocomplete:"off"},null,8,["modelValue","onUpdate:modelValue","disabled"]),k(v(ws),{modelValue:_.value,"onUpdate:modelValue":I=>_.value=I,placeholder:"Value",class:"pl-panel h-full flex-1 rounded-none border-0 border-r shadow-none focus:ring-0 focus-visible:ring-0",disabled:!_.enabled,name:"kv-value","data-testid":"kv-value",autocomplete:"off",onFocus:I=>x(O,I.target),onBlur:S},null,8,["modelValue","onUpdate:modelValue","disabled","onFocus"])]),M("div",BM,[k(v(dp),{value:"Enable/Disable"},{default:D(()=>[k(v(qA),{modelValue:_.enabled,"onUpdate:modelValue":I=>_.enabled=I,class:"h-4 w-8"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),y(O,_)?(T(),K("div",{key:0,class:"flex cursor-pointer items-center justify-center p-2",title:"Generate Value","data-testid":"generator-button",onMousedown:eo(E,["prevent"])},[k(v(Yy),{class:"text-subtle-foreground hover:text-foreground size-4 transition-colors"})],32)):(T(),K("div",$M,[k(v(dp),{value:"Delete","on-click":()=>C(O)},{default:D(()=>[k(v(cp),{class:Se(["size-4",{"text-destructive":v(d)(O)}])},null,8,["class"])]),_:2},1032,["on-click"])]))]))),128))])],2))}}),zM={class:"text-subtle-foreground text-xs"},Oa=z({__name:"PanelSubHeader",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("div",{class:Se(v(ke)("px-panel h-sub-toolbar flex items-center justify-between",e.class))},[M("span",zM,[Q(n.$slots,"default")]),Q(n.$slots,"toolbox")],2))}}),jM=z({__name:"RequestHeaders",setup(t){const e=Rr(),n=Xi(),r=I0(),i=Z([]),s=q(()=>e.pendingRequestData),o=c=>{e.updateRequestHeaders(c)},a=q(()=>{var c;return((c=s.value)==null?void 0:c.headers)??[]}),l=q(()=>{const c=a.value;return c.length===0?i.value:c}),u=c=>{o(c)};return Xy(()=>{i.value=n.headers.map(c=>({type:_r.Text,key:c.header,value:c.type==="generator"?VA(c.value,r):String(c.value),enabled:!0}))}),(c,f)=>(T(),K(Qe,null,[k(Oa,{class:"border-b"},{default:D(()=>[...f[0]||(f[0]=[ne("Request Headers",-1)])]),_:1}),k(fv,{ref:"parametersBuilder","model-value":l.value,"onUpdate:parameters":u},null,8,["model-value"])],64))}}),VM={class:"grid h-8 grid-cols-3 border-b"},UM={class:"grid h-8 grid-cols-3 border-b"},HM=z({__name:"RequestAuthorizationBasicAuth",props:{modelValue:{default:()=>({username:"",password:""})},modelModifiers:{}},emits:Da(["update:modelValue"],["update:modelValue"]),setup(t,{emit:e}){const n=e,r=Ki(t,"modelValue"),i=Z(r.value.username),s=Z(r.value.password);return nt(i,o=>{r.value.username=o,n("update:modelValue",r.value)}),nt(s,o=>{r.value.password=o,n("update:modelValue",r.value)}),(o,a)=>(T(),K(Qe,null,[M("div",VM,[a[2]||(a[2]=M("label",{class:"px-panel flex h-8 items-center border-r py-1 text-xs",for:"username"}," Username ",-1)),k(v(ws),{id:"username",modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=l=>i.value=l),placeholder:"-",class:"col-span-2 h-full rounded-none border-0 text-xs shadow-none focus:ring-0 focus-visible:ring-0"},null,8,["modelValue"])]),M("div",UM,[a[3]||(a[3]=M("label",{class:"px-panel flex h-8 items-center border-r py-1 text-xs",for:"password"}," Password ",-1)),k(v(ws),{id:"password",modelValue:s.value,"onUpdate:modelValue":a[1]||(a[1]=l=>s.value=l),placeholder:"-",class:"col-span-2 h-full rounded-none border-0 text-xs shadow-none focus:ring-0 focus-visible:ring-0"},null,8,["modelValue"])])],64))}}),qM={class:"grid h-8 grid-cols-3 border-b"},GM=z({__name:"RequestAuthorizationBearer",props:{modelValue:{default:()=>""},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=Ki(t,"modelValue");return(n,r)=>(T(),K("div",qM,[r[1]||(r[1]=M("label",{class:"px-panel flex h-8 items-center border-r py-1 text-xs",for:"bearer"}," Bearer Token ",-1)),k(v(ws),{id:"bearer",modelValue:e.value,"onUpdate:modelValue":r[0]||(r[0]=i=>e.value=i),placeholder:"Token",class:"col-span-2 h-full rounded-none border-0 text-xs shadow-none focus:ring-0 focus-visible:ring-0"},null,8,["modelValue"])]))}}),hp=z({__name:"AppPanelDescription",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("p",{class:Se(v(ke)("text-subtle-foreground text-sm",e.class))},[Q(n.$slots,"default")],2))}}),dv=z({__name:"AppPanelHeader",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("div",{class:Se(v(ke)("px-panel flex items-center gap-2 py-2.5",e.class))},[Q(n.$slots,"default")],2))}}),pp=z({__name:"AppPanelTitle",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("h3",{class:Se(v(ke)("text-sm leading-none font-semibold tracking-tight",e.class))},[Q(n.$slots,"default")],2))}}),WM={class:"flex flex-col"},KM={class:"whitespace-nowrap"},XM=z({__name:"RequestAuthorizationCurrentUser",setup(t){const e=Xi();return(n,r)=>(T(),L(v(Qy),{class:"border-b shadow-none"},{default:D(()=>[k(v(dv),{class:"items-start"},{default:D(()=>[v(e).isLoggedIn?(T(),L(v(LN),{key:0,class:"size-5 min-w-5"})):(T(),L(v(gN),{key:1,class:"text-destructive size-5 min-w-5"})),M("div",WM,[v(e).isLoggedIn?(T(),L(v(pp),{key:0},{default:D(()=>[...r[0]||(r[0]=[ne(" You're logged in! ",-1)])]),_:1})):(T(),L(v(pp),{key:1},{default:D(()=>[...r[1]||(r[1]=[ne("Please log in first",-1)])]),_:1})),v(e).isLoggedIn?(T(),L(v(hp),{key:2},{default:D(()=>[r[2]||(r[2]=ne(" You're performing the request acting as the currently logged-in user ",-1)),M("span",KM,"(ID: "+de(v(e).userId)+")",1),r[3]||(r[3]=ne(" . ",-1))]),_:1})):(T(),L(v(hp),{key:3},{default:D(()=>[...r[4]||(r[4]=[ne(" You need to be logged in to make requests as the currently logged-in user. ",-1)])]),_:1}))])]),_:1})]),_:1}))}}),YM={class:"grid h-8 grid-cols-3 border-b"},JM=z({__name:"RequestAuthorizationImpersonateUser",props:{modelValue:{default:()=>0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=Ki(t,"modelValue");return(n,r)=>(T(),K("div",YM,[r[1]||(r[1]=M("label",{class:"px-panel flex h-8 items-center border-r py-1 text-xs",for:"user-id"}," User ID ",-1)),k(v(ws),{id:"user-id",modelValue:e.value,"onUpdate:modelValue":r[0]||(r[0]=i=>e.value=i),placeholder:"Pick a user ID to impersonate it.",class:"col-span-2 h-full rounded-none border-0 text-xs shadow-none focus:ring-0 focus-visible:ring-0",type:"numeric"},null,8,["modelValue"])]))}}),ZM={class:"flex flex-col"},QM=z({__name:"RequestAuthorizationNone",setup(t){return(e,n)=>(T(),L(v(Qy),{class:"border-b shadow-none"},{default:D(()=>[k(v(dv),{class:"items-start"},{default:D(()=>[k(v(PN),{class:"size-5 min-w-5"}),M("div",ZM,[k(v(pp),null,{default:D(()=>[...n[0]||(n[0]=[ne("No Authorization",-1)])]),_:1}),k(v(hp),null,{default:D(()=>[...n[1]||(n[1]=[ne(" You're performing the request as a guest. ",-1)])]),_:1})])]),_:1})]),_:1}))}}),eF={class:"flex items-center"},tF={class:"flex items-center"},nF=z({__name:"RequestAuthorizationSelector",props:Da({types:{}},{modelValue:{default:()=>Je.CurrentUser},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=Ki(t,"modelValue"),r=Rr(),i=Ky(),s=q(()=>r.pendingRequestData);return jC(s,o=>{n.value=(o==null?void 0:o.authorization.type)??i.preferences.defaultAuthorizationType},{deep:!0}),(o,a)=>(T(),K("div",eF,[a[3]||(a[3]=M("span",{class:"text-subtle-foreground w-[120px] text-xs"},"Authorization Type:",-1)),k(v(tu),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l)},{default:D(()=>[k(v(Zl),{class:"min-w-[120px] rounded-none border-0 text-xs shadow-none focus:ring-0"},{default:D(()=>[k(v(Ql))]),_:1}),k(v(eu),null,{default:D(()=>[k(v(Pc),null,{default:D(()=>[k(v(Rc),null,{default:D(()=>[M("div",tF,[k(v(Yy),{size:14,class:"mr-2"}),a[1]||(a[1]=ne(" Special ",-1))])]),_:1}),(T(!0),K(Qe,null,_n(e.types.special,l=>(T(),L(v(Es),{key:l.id,value:l.id},{default:D(()=>[ne(de(l.label),1)]),_:2},1032,["value"]))),128))]),_:1}),k(v(Pc),null,{default:D(()=>[k(v(Rc),null,{default:D(()=>[...a[2]||(a[2]=[ne("Other",-1)])]),_:1}),(T(!0),K(Qe,null,_n(e.types.traditional,l=>(T(),L(v(Es),{key:l.id,value:l.id},{default:D(()=>[ne(de(l.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}});function rF(){const t=Rr(),e={[Je.None]:{type:Je.None},[Je.Bearer]:{type:Je.Bearer,value:""},[Je.Basic]:{type:Je.Basic,value:{username:"",password:""}},[Je.CurrentUser]:{type:Je.CurrentUser},[Je.Impersonate]:{type:Je.Impersonate,value:0}},n=new Map;Object.entries(e).forEach(([l,u])=>{n.set(l,u)});const r=q(()=>{var l;return((l=t.pendingRequestData)==null?void 0:l.authorization)??{type:Je.CurrentUser}}),i=q({get:()=>r.value.type,set:l=>{l!==r.value.type&&s(l)}}),s=l=>{n.set(r.value.type,{...r.value});const u=n.get(l),c=u?{...u}:e[l];(c.type!==r.value.type||JSON.stringify(c.value)!==JSON.stringify(r.value.value))&&t.updateAuthorization(c)},o=l=>{var c;const u=((c=t.pendingRequestData)==null?void 0:c.authorization)??{type:Je.CurrentUser};JSON.stringify(l)!==JSON.stringify(u.value)&&t.updateAuthorization({...u,value:l})},a=()=>{n.set(r.value.type,{...r.value})};return nt(r,a,{deep:!0}),{authorization:kc(r),selectedType:i,types:{special:kx.TYPES.SPECIAL,traditional:kx.TYPES.TRADITIONAL},updateAuthorizationType:s,updateCurrentAuthorizationValue:o,saveAuthorizationToStore:a}}const iF={class:"flex h-full flex-col"},sF={class:"relative w-full flex-1 overflow-hidden"},oF=z({__name:"RequestAuthorization",setup(t){const{authorization:e,selectedType:n,types:r,updateCurrentAuthorizationValue:i}=rF();return(s,o)=>(T(),K("div",iF,[k(Oa,{class:"border-b"},{default:D(()=>[k(nF,{modelValue:v(n),"onUpdate:modelValue":o[0]||(o[0]=a=>_l(n)?n.value=a:null),types:v(r)},null,8,["modelValue","types"])]),_:1}),M("div",sF,[!v(e)||v(e).type===v(Je).None?(T(),L(QM,{key:0})):v(e).type===v(Je).CurrentUser?(T(),L(XM,{key:1})):v(e).type===v(Je).Impersonate?(T(),L(JM,{key:2,"model-value":v(e).value,"onUpdate:modelValue":o[1]||(o[1]=a=>v(i)(a))},null,8,["model-value"])):v(e).type===v(Je).Bearer?(T(),L(GM,{key:3,"model-value":v(e).value,"onUpdate:modelValue":o[2]||(o[2]=a=>v(i)(a))},null,8,["model-value"])):v(e).type===v(Je).Basic?(T(),L(HM,{key:4,"model-value":{username:v(e).value.username,password:v(e).value.password},"onUpdate:modelValue":o[3]||(o[3]=a=>v(i)(a))},null,8,["model-value"])):we("",!0)])]))}});function aF(){const t=Rr(),e=qN,n=GN,r=Z(Or.EMPTY),i=Z(null),s=q(()=>t.pendingRequestData),o=q(()=>{var c,f,d;return((c=sg.find(h=>h.id===r.value))==null?void 0:c.autoFillable)===!0&&((d=(f=s.value)==null?void 0:f.schema)==null?void 0:d.shape)!==void 0}),a=()=>{var m,g,b;if(!s.value||r.value===Or.EMPTY)return null;const c=s.value.method,f=s.value.body,d=((m=f==null?void 0:f[c])==null?void 0:m[r.value])??null;if(d)return d;const h=(b=(g=s.value)==null?void 0:g.schema)==null?void 0:b.shape;if(!h)return null;const p=n(h);return Bx(p,r.value)},l=()=>{var d;const c=(d=s.value)==null?void 0:d.headers.find(h=>h.key==="Content-Type");if(!c)return;const f=sg.find(h=>h.mimeType===c.value);f&&(r.value=f.id)},u=()=>{var h;if(!s.value)return;const c=(h=s.value.schema)==null?void 0:h.shape;if(!c)return;const f=e(c),d=Bx(f,r.value);i.value=d};return nt(s,c=>{r.value=(c==null?void 0:c.payloadType)??Or.EMPTY,i.value=a()},{deep:!0,immediate:!0}),nt(r,c=>{if(s.value===null){i.value=a();return}i.value=a(),s.value.payloadType=c}),nt(i,()=>{if(!s.value)return;const c=s.value.method;s.value.body||(s.value.body={});const f=s.value.body;f[c]||(f[c]={}),f[c][r.value]=i.value},{deep:!0}),gn(()=>{l(),i.value=a()}),{payloadType:r,payload:i,pendingRequestData:s,supportsAutoFill:o,autofill:u,generateCurrentPayload:a,initializePayloadTypeFromHeaders:l,types:sg}}const lF={class:"px-panel from-warning/5 dark:from-warning/15 flex items-center justify-between border-b bg-gradient-to-tr to-transparent to-50% py-0.5"},uF={class:"flex items-center gap-2 text-xs"},cF={class:"px-1 py-2"},fF={class:"leading-3.5"},dF={class:"text-subtle-foreground mb-0"},hF={class:"to-background from-warning/10 dark:from-warning/15 flex h-full w-full flex-col gap-4 bg-gradient-to-bl to-40% p-3.5"},pF={class:"flex flex-col gap-3.5 text-sm wrap-anywhere"},mF={class:"border-b pb-3.5"},gF={class:"px-panel inline-flex items-center space-x-2 rounded border bg-white font-mono text-xs"},bF=z({__name:"ImplementationMissingWarning",setup(t){const e=Xi(),{copy:n,copied:r}=Co();return(i,s)=>(T(),K("div",lF,[M("div",uF,[M("div",cF,[k(v(H0),{class:"text-warning size-4"})]),M("div",fF,[s[0]||(s[0]=M("span",{class:"mb-0 flex items-center gap-1 font-bold"}," Route not found ",-1)),M("p",dF," This route is defined in the "+de(v(e).primaryProcessorName)+", but it is not found in your application ",1)])]),k(v(Cf),null,{default:D(()=>[k(v(cv),null,{default:D(()=>[k(v(gt),{size:"xs",variant:"ghost"},{default:D(()=>[k(v(av)),s[1]||(s[1]=ne(" Info ",-1))]),_:1})]),_:1}),k(v(Af),{class:"bg-background max-h-[90dvh] flex-col p-0 sm:max-w-[600px]"},{default:D(()=>[M("div",hF,[k(v(Df),null,{default:D(()=>[k(v(kf),null,{default:D(()=>[...s[2]||(s[2]=[ne("Route Not Found",-1)])]),_:1}),k(v(N0),null,{default:D(()=>[ne(" This route is defined in "+de(v(e).primaryProcessorName)+" but it cannot be found in the currently selected application's laravel routes. ",1)]),_:1})]),_:1}),M("div",pF,[s[6]||(s[6]=M("span",null,"Possible Solutions:",-1)),M("div",mF,[s[4]||(s[4]=M("h3",{class:"text-base font-bold"},"Clear routes cache",-1)),s[5]||(s[5]=M("p",{class:"mb-2"}," It might be that you switched to a new branch but your routes are cached. ",-1)),M("div",gF,[s[3]||(s[3]=M("code",{class:"flex-1"},"php artisan route:clear",-1)),k(nu,{"on-click":()=>v(n)("php artisan route:clear"),copied:v(r)},null,8,["on-click","copied"])])]),s[7]||(s[7]=M("div",null,[M("h3",{class:"text-base font-bold"},"Sync your branch"),M("p",{class:"text-sm"}," Your schema files might be out of sync with the current branch state, make sure to rebase with the main branch. ")],-1))]),k(v(ev),{class:"border-t pt-3.5 sm:justify-start"},{default:D(()=>[k(v(uv),{"as-child":""},{default:D(()=>[k(v(gt),{variant:"default",size:"xs"},{default:D(()=>[...s[8]||(s[8]=[ne("Dismiss",-1)])]),_:1})]),_:1})]),_:1})])]),_:1})]),_:1})]))}}),GA=z({__name:"DocumentationLinkButton",props:{class:{}},setup(t){return(e,n)=>(T(),L(v(gt),{size:"xs",as:"a",href:"https://github.com/sunchayn/nimbus/tree/base/wiki/user-guide",target:"_blank"},{default:D(()=>[k(v(EN)),n[0]||(n[0]=ne(" Documentation ",-1))]),_:1}))}}),yF={class:"px-panel flex items-center justify-between border-b bg-gradient-to-tr from-blue-500/5 to-transparent to-50% py-0.5 dark:from-blue-700/30"},vF={class:"flex items-center gap-2 text-xs"},xF={class:"px-1 py-2"},SF={class:"leading-3.5"},EF={class:"text-subtle-foreground mb-0"},wF={class:"to-background from-warning/10 dark:from-warning/15 flex h-full w-full flex-col gap-4 bg-gradient-to-bl to-40% p-3.5"},_F={class:"flex flex-col gap-3.5 text-sm wrap-anywhere"},CF=z({__name:"MissingRouteInPrimarySourceInfo",setup(t){const e=Xi();return(n,r)=>(T(),K("div",yF,[M("div",vF,[M("div",xF,[k(v(IA),{class:"size-4 text-blue-900 dark:text-blue-100"})]),M("div",SF,[r[0]||(r[0]=M("span",{class:"mb-0 flex items-center gap-1 font-bold"}," Route is auto-detected ",-1)),M("p",EF," This route is not defined in "+de(v(e).primaryProcessorName)+", but it was auto-detected and added. ",1)])]),k(v(Cf),null,{default:D(()=>[k(v(cv),null,{default:D(()=>[k(v(gt),{size:"xs",variant:"ghost"},{default:D(()=>[k(v(av)),r[1]||(r[1]=ne(" Info ",-1))]),_:1})]),_:1}),k(v(Af),{class:"bg-background max-h-[90dvh] flex-col p-0 sm:max-w-[600px]"},{default:D(()=>[M("div",wF,[k(v(Df),null,{default:D(()=>[k(v(kf),null,{default:D(()=>[...r[2]||(r[2]=[ne("Route is auto-detected",-1)])]),_:1})]),_:1}),M("p",_F,[ne(" This application is configured to use "+de(v(e).primaryProcessorName)+". However, this route is not defined there. It was auto-detected from your local routes and added accordingly. ",1),r[3]||(r[3]=M("br",null,null,-1)),M("small",null," This will help you test out routes without having to define them yet in the "+de(v(e).primaryProcessorName)+". ",1)]),M("div",null,[k(GA,{variant:"outline"})]),k(v(ev),{class:"border-t pt-3.5 sm:justify-start"},{default:D(()=>[k(v(uv),{"as-child":""},{default:D(()=>[k(v(gt),{variant:"default",size:"xs"},{default:D(()=>[...r[4]||(r[4]=[ne("Dismiss",-1)])]),_:1})]),_:1})]),_:1})])]),_:1})]),_:1})]))}}),AF={class:"dark:bg-subtle bg-destructive/10 max-w-full flex-1 overflow-auto p-2 leading-tight wrap-anywhere"},DF=["innerHTML"],kF=z({__name:"SchemaExtractionErrorButton",props:{errorHtml:{}},setup(t){return(e,n)=>(T(),L(v(Cf),null,{default:D(()=>[k(v(cv),null,{default:D(()=>[k(v(gt),{size:"xs",variant:"ghost"},{default:D(()=>[k(v(av)),n[0]||(n[0]=ne(" Error Info ",-1))]),_:1})]),_:1}),k(v(Af),{class:"to-background from-destructive/10 dark:from-destructive/15 flex max-h-[90dvh] flex-col bg-gradient-to-bl to-50% sm:max-w-[600px]"},{default:D(()=>[k(v(Df),null,{default:D(()=>[k(v(kf),null,{default:D(()=>[...n[1]||(n[1]=[ne("Schema Extraction Error",-1)])]),_:1}),k(v(N0),null,{default:D(()=>[...n[2]||(n[2]=[ne(" The following error was thrown when trying to call the `rules()` method from the request. ",-1)])]),_:1})]),_:1}),M("div",AF,[M("p",{innerHTML:t.errorHtml},null,8,DF)]),n[4]||(n[4]=M("p",{class:"text-xs italic"}," Note: An attempt to understand the schema statically (from the code as is) was made. The schema might not be complete. ",-1)),k(v(ev),{class:"sm:justify-start"},{default:D(()=>[k(v(uv),{"as-child":""},{default:D(()=>[k(v(gt),{variant:"secondary"},{default:D(()=>[...n[3]||(n[3]=[ne("Dismiss",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),OF={class:"px-panel from-destructive/5 dark:from-destructive/15 flex items-center justify-between border-b bg-gradient-to-tr to-transparent to-50% py-0.5"},TF={class:"flex items-center gap-2 text-xs"},IF={class:"px-1 py-2"},PF=z({__name:"RouteExtractionError",props:{extractionError:{}},setup(t){const e=t;return(n,r)=>(T(),K("div",OF,[M("div",TF,[M("div",IF,[k(v(H0),{class:"text-destructive size-4"})]),r[0]||(r[0]=M("div",{class:"leading-3.5"},[M("span",{class:"flex items-center gap-1 font-bold"},"Extraction Error"),M("p",{class:"text-subtle-foreground mb-0"}," It wasn't possible to fully extract the shape of this route, there was an error. ")],-1))]),k(kF,{"error-html":e.extractionError},null,8,["error-html"])]))}}),RF=z({__name:"AppScrollBar",props:{class:{default:void 0},orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=Aa(e,"class");return(r,i)=>(T(),L(v(sR),Ce({"data-slot":"scroll-area-scrollbar"},v(n),{class:v(ke)("flex touch-none p-px transition-colors select-none",t.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e.class)}),{default:D(()=>[k(v(cR),{"data-slot":"scroll-area-thumb",class:"relative flex-1 rounded-full bg-gray-400 dark:bg-gray-600"})]),_:1},16,["class"]))}}),If=z({__name:"AppScrollArea",props:{class:{},type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{}},setup(t,{expose:e}){const n=t,r=Aa(n,"class"),i=Z(null);return e({viewport:i}),(s,o)=>(T(),L(v(j5),Ce({"data-slot":"scroll-area"},v(r),{class:v(ke)("relative",n.class)}),{default:D(()=>[k(v(dR),{ref_key:"viewport",ref:i,"data-slot":"scroll-area-viewport",class:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&>div]:h-full"},{default:D(()=>[Q(s.$slots,"default")]),_:3},512),k(RF),k(v(q5))]),_:3},16,["class"]))}}),NF=z({__name:"RequestBodyFormData",props:{modelValue:{default:()=>null},modelModifiers:{}},emits:Da(["update:modelValue"],["update:modelValue"]),setup(t,{emit:e}){const n=e,r=Ki(t,"modelValue"),i=Z(!1),s=Z([]);function o(u){const c=new FormData;for(const f of u){if(f.value===null){c.set(f.key,"");continue}if(f.value instanceof Blob){c.set(f.key,f.value);continue}c.set(f.key,String(f.value))}return c}function a(u){const c=[];return u.forEach((f,d)=>{if(f instanceof File){c.push({type:_r.File,key:d,value:f.name,enabled:!0});return}c.push({type:_r.Text,key:d,value:f,enabled:!0})}),c}const l=u=>{i.value=!0,s.value=u,n("update:modelValue",o(u))};return nt(r,u=>{u!==null&&(i.value||(s.value=u instanceof FormData?a(u):[],kr(()=>{i.value=!1})))},{deep:!0}),(u,c)=>(T(),L(fv,{"model-value":s.value,"free-form-types":!0,"onUpdate:parameters":l},null,8,["model-value"]))}}),MF={class:"flex flex-col"},FF=z({__name:"RequestBodyFormNone",emits:["update:modelValue"],setup(t,{emit:e}){const n=e;return gn(()=>n("update:modelValue",null)),(r,i)=>(T(),L(v(Qy),{class:"border-b shadow-none"},{default:D(()=>[k(v(dv),{class:"items-start"},{default:D(()=>[k(v(yN),{class:"size-5 min-w-5"}),M("div",MF,[k(v(pp),null,{default:D(()=>[...i[0]||(i[0]=[ne("No Body",-1)])]),_:1}),k(v(hp),null,{default:D(()=>[...i[1]||(i[1]=[ne(" You're performing the request without a Payload. ",-1)])]),_:1})])]),_:1})]),_:1}))}});let eb=[],WA=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?WA:eb).push(n=n+t[e])})();function LF(t){if(t<768)return!1;for(let e=0,n=eb.length;;){let r=e+n>>1;if(t<eb[r])n=r;else if(t>=WA[r])e=r+1;else return!0;if(e==n)return!1}}function jx(t){return t>=127462&&t<=127487}const Vx=8205;function BF(t,e,n=!0,r=!0){return(n?KA:$F)(t,e,r)}function KA(t,e,n){if(e==t.length)return e;e&&XA(t.charCodeAt(e))&&YA(t.charCodeAt(e-1))&&e--;let r=fg(t,e);for(e+=Ux(r);e<t.length;){let i=fg(t,e);if(r==Vx||i==Vx||n&&LF(i))e+=Ux(i),r=i;else if(jx(i)){let s=0,o=e-2;for(;o>=0&&jx(fg(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function $F(t,e,n){for(;e>0;){let r=KA(t,e-2,n);if(r<e)return r;e--}return 0}function fg(t,e){let n=t.charCodeAt(e);if(!YA(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return XA(r)?(n-55296<<10)+(r-56320)+65536:n}function XA(t){return t>=56320&&t<57344}function YA(t){return t>=55296&&t<56320}function Ux(t){return t<65536?1:2}class Ze{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Dl(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),Ai.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Dl(this,e,n);let r=[];return this.decompose(e,n,r,0),Ai.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new lc(this),s=new lc(e);for(let o=n,a=n;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new lc(this,e)}iterRange(e,n=this.length){return new JA(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new ZA(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ze.empty:e.length<=32?new Ht(e):Ai.from(Ht.split(e,[]))}}class Ht extends Ze{constructor(e,n=zF(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.text[s],a=i+o.length;if((n?r:a)>=e)return new jF(i,a,r,o);i=a+1,r++}}decompose(e,n,r,i){let s=e<=0&&n>=this.length?this:new Ht(Hx(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),a=_h(s.text,o.text.slice(),0,s.length);if(a.length<=32)r.push(new Ht(a,o.length+s.length));else{let l=a.length>>1;r.push(new Ht(a.slice(0,l)),new Ht(a.slice(l)))}}else r.push(s)}replace(e,n,r){if(!(r instanceof Ht))return super.replace(e,n,r);[e,n]=Dl(this,e,n);let i=_h(this.text,_h(r.text,Hx(this.text,0,e)),n),s=this.length+r.length-(n-e);return i.length<=32?new Ht(i,s):Ai.from(Ht.split(i,[]),s)}sliceString(e,n=this.length,r=`
`){[e,n]=Dl(this,e,n);let i="";for(let s=0,o=0;s<=n&&o<this.text.length;o++){let a=this.text[o],l=s+a.length;s>e&&o&&(i+=r),e<l&&n>s&&(i+=a.slice(Math.max(0,e-s),n-s)),s=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(n.push(new Ht(r,i)),r=[],i=-1);return i>-1&&n.push(new Ht(r,i)),n}}class Ai extends Ze{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.children[s],a=i+o.length,l=r+o.lines-1;if((n?l:a)>=e)return o.lineInner(e,n,r,i);i=a+1,r=l+1}}decompose(e,n,r,i){for(let s=0,o=0;o<=n&&s<this.children.length;s++){let a=this.children[s],l=o+a.length;if(e<=l&&n>=o){let u=i&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!u?r.push(a):a.decompose(e-o,n-o,r,u)}o=l+1}}replace(e,n,r){if([e,n]=Dl(this,e,n),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],a=s+o.length;if(e>=s&&n<=a){let l=o.replace(e-s,n-s,r),u=this.lines-o.lines+l.lines;if(l.lines<u>>4&&l.lines>u>>6){let c=this.children.slice();return c[i]=l,new Ai(c,this.length-(n-e)+r.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
`){[e,n]=Dl(this,e,n);let i="";for(let s=0,o=0;s<this.children.length&&o<=n;s++){let a=this.children[s],l=o+a.length;o>e&&s&&(i+=r),e<l&&n>o&&(i+=a.sliceString(e-o,n-o,r)),o=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Ai))return 0;let r=0,[i,s,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,s+=n){if(i==o||s==a)return r;let l=this.children[i],u=e.children[s];if(l!=u)return r+l.scanIdentical(u,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let p of e)p.flatten(h);return new Ht(h,n)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,a=[],l=0,u=-1,c=[];function f(h){let p;if(h.lines>s&&h instanceof Ai)for(let m of h.children)f(m);else h.lines>o&&(l>o||!l)?(d(),a.push(h)):h instanceof Ht&&l&&(p=c[c.length-1])instanceof Ht&&h.lines+p.lines<=32?(l+=h.lines,u+=h.length+1,c[c.length-1]=new Ht(p.text.concat(h.text),p.length+1+h.length)):(l+h.lines>i&&d(),l+=h.lines,u+=h.length+1,c.push(h))}function d(){l!=0&&(a.push(c.length==1?c[0]:Ai.from(c,u)),u=-1,l=c.length=0)}for(let h of e)f(h);return d(),a.length==1?a[0]:new Ai(a,n)}}Ze.empty=new Ht([""],0);function zF(t){let e=-1;for(let n of t)e+=n.length+1;return e}function _h(t,e,n=0,r=1e9){for(let i=0,s=0,o=!0;s<t.length&&i<=r;s++){let a=t[s],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),o?(e[e.length-1]+=a,o=!1):e.push(a)),i=l+1}return e}function Hx(t,e,n){return _h(t,[""],e,n)}class lc{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof Ht?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,a=i instanceof Ht?i.text.length:i.children.length;if(o==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(i instanceof Ht){let l=i.text[o+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Ht?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class JA{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new lc(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ZA{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ze.prototype[Symbol.iterator]=function(){return this.iter()},lc.prototype[Symbol.iterator]=JA.prototype[Symbol.iterator]=ZA.prototype[Symbol.iterator]=function(){return this});class jF{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Dl(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function wn(t,e,n=!0,r=!0){return BF(t,e,n,r)}function VF(t){return t>=56320&&t<57344}function UF(t){return t>=55296&&t<56320}function ir(t,e){let n=t.charCodeAt(e);if(!UF(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return VF(r)?(n-55296<<10)+(r-56320)+65536:n}function hv(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Di(t){return t<65536?1:2}const tb=/\r\n?|\n/;var En=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(En||(En={}));class Li{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let s=this.sections[n++],o=this.sections[n++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,n=!1){nb(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new Li(e)}composeDesc(e){return this.empty?e:e.empty?this:QA(this,e)}mapDesc(e,n=!1){return e.empty?this:rb(this,e,n)}mapPos(e,n=-1,r=En.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],l=this.sections[o++],u=i+a;if(l<0){if(u>e)return s+(e-i);s+=a}else{if(r!=En.Simple&&u>=e&&(r==En.TrackDel&&i<e&&u>e||r==En.TrackBefore&&i<e||r==En.TrackAfter&&u>e))return null;if(u>e||u==e&&n<0&&!a)return e==i||n<0?s:s+l;s+=l}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let s=this.sections[r++],o=this.sections[r++],a=i+s;if(o>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Li(e)}static create(e){return new Li(e)}}class sn extends Li{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return nb(this,(n,r,i,s,o)=>e=e.replace(i,i+(r-n),o),!1),e}mapDesc(e,n=!1){return rb(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,s=0;i<n.length;i+=2){let o=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=o;let l=i>>1;for(;r.length<l;)r.push(Ze.empty);r.push(o?e.slice(s,s+o):Ze.empty)}s+=o}return new sn(n,r)}compose(e){return this.empty?e:e.empty?this:QA(this,e,!0)}map(e,n=!1){return e.empty?this:rb(this,e,n,!0)}iterChanges(e,n=!1){nb(this,e,n)}get desc(){return Li.create(this.sections)}filter(e){let n=[],r=[],i=[],s=new Nc(this);e:for(let o=0,a=0;;){let l=o==e.length?1e9:e[o++];for(;a<l||a==l&&s.len==0;){if(s.done)break e;let c=Math.min(s.len,l-a);On(i,c,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;On(n,c,f),f>0&&Gs(r,n,s.text),s.forward(c),a+=c}let u=e[o++];for(;a<u;){if(s.done)break e;let c=Math.min(s.len,u-a);On(n,c,-1),On(i,c,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(c),a+=c}}return{changes:new sn(n,r),filtered:Li.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],s=[],o=0,a=null;function l(c=!1){if(!c&&!i.length)return;o<n&&On(i,n-o,-1);let f=new sn(i,s);a=a?a.compose(f.map(a)):f,i=[],s=[],o=0}function u(c){if(Array.isArray(c))for(let f of c)u(f);else if(c instanceof sn){if(c.length!=n)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);l(),a=a?a.compose(c.map(a)):c}else{let{from:f,to:d=f,insert:h}=c;if(f>d||f<0||d>n)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);let p=h?typeof h=="string"?Ze.of(h.split(r||tb)):h:Ze.empty,m=p.length;if(f==d&&m==0)return;f<o&&l(),f>o&&On(i,f-o,-1),On(i,d-f,m),Gs(s,i,p),o=d}}return u(e),l(!a),a}static empty(e){return new sn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;r.length<i;)r.push(Ze.empty);r[i]=Ze.of(s.slice(1)),n.push(s[0],r[i].length)}}}return new sn(n,r)}static createSet(e,n){return new sn(e,n)}}function On(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Gs(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(Ze.empty);t.push(n)}}function nb(t,e,n){let r=t.inserted;for(let i=0,s=0,o=0;o<t.sections.length;){let a=t.sections[o++],l=t.sections[o++];if(l<0)i+=a,s+=a;else{let u=i,c=s,f=Ze.empty;for(;u+=a,c+=l,l&&r&&(f=f.append(r[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(i,u,s,c,f),i=u,s=c}}}function rb(t,e,n,r=!1){let i=[],s=r?[]:null,o=new Nc(t),a=new Nc(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let u=Math.min(o.len,a.len);On(i,u,-1),o.forward(u),a.forward(u)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!n))){let u=a.len;for(On(i,a.ins,-1);u;){let c=Math.min(o.len,u);o.ins>=0&&l<o.i&&o.len<=c&&(On(i,0,o.ins),s&&Gs(s,i,o.text),l=o.i),o.forward(c),u-=c}a.next()}else if(o.ins>=0){let u=0,c=o.len;for(;c;)if(a.ins==-1){let f=Math.min(c,a.len);u+=f,c-=f,a.forward(f)}else if(a.ins==0&&a.len<c)c-=a.len,a.next();else break;On(i,u,l<o.i?o.ins:0),s&&l<o.i&&Gs(s,i,o.text),l=o.i,o.forward(o.len-c)}else{if(o.done&&a.done)return s?sn.createSet(i,s):Li.create(i);throw new Error("Mismatched change set lengths")}}}function QA(t,e,n=!1){let r=[],i=n?[]:null,s=new Nc(t),o=new Nc(e);for(let a=!1;;){if(s.done&&o.done)return i?sn.createSet(r,i):Li.create(r);if(s.ins==0)On(r,s.len,0,a),s.next();else if(o.len==0&&!o.done)On(r,0,o.ins,a),i&&Gs(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(s.len2,o.len),u=r.length;if(s.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;On(r,l,c,a),i&&c&&Gs(i,r,o.text)}else o.ins==-1?(On(r,s.off?0:s.len,l,a),i&&Gs(i,r,s.textBit(l))):(On(r,s.off?0:s.len,o.off?0:o.ins,a),i&&!o.off&&Gs(i,r,o.text));a=(s.ins>l||o.ins>=0&&o.len>l)&&(a||r.length>u),s.forward2(l),o.forward(l)}}}}class Nc{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Ze.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Ze.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class qo{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new qo(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Y.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Y.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Y.range(e.anchor,e.head)}static create(e,n,r){return new qo(e,n,r)}}class Y{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Y.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Y([this.main],0)}addRange(e,n=!0){return Y.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,Y.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Y(e.ranges.map(n=>qo.fromJSON(n)),e.main)}static single(e,n=e){return new Y([Y.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return Y.normalized(e.slice(),n);r=s.to}return new Y(e,n)}static cursor(e,n=0,r,i){return qo.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?qo.create(n,e,48|s):qo.create(e,n,(n>e?8:0)|s)}static normalized(e,n=0){let r=e[n];e.sort((i,s)=>i.from-s.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let a=o.from,l=Math.max(s.to,o.to);i<=n&&n--,e.splice(--i,2,s.anchor>s.head?Y.range(l,a):Y.range(a,l))}}return new Y(e,n)}}function eD(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let pv=0;class he{constructor(e,n,r,i,s){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=pv++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new he(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:mv),!!e.static,e.enables)}of(e){return new Ch([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ch(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ch(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function mv(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Ch{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=pv++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,u=!1,c=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?u=!0:(((n=e[f.id])!==null&&n!==void 0?n:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=r(f),1},update(f,d){if(l&&d.docChanged||u&&(d.docChanged||d.selection)||ib(f,c)){let h=r(f);if(a?!qx(h,f.values[o],i):!i(h,f.values[o]))return f.values[o]=h,1}return 0},reconfigure:(f,d)=>{let h,p=d.config.address[s];if(p!=null){let m=gp(d,p);if(this.dependencies.every(g=>g instanceof he?d.facet(g)===f.facet(g):g instanceof Wt?d.field(g,!1)==f.field(g,!1):!0)||(a?qx(h=r(f),m,i):i(h=r(f),m)))return f.values[o]=m,0}else h=r(f);return f.values[o]=h,1}}}}function qx(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function ib(t,e){let n=!1;for(let r of e)uc(t,r)&1&&(n=!0);return n}function HF(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),s=r.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let u=[];for(let c=0;c<r.length;c++){let f=gp(l,r[c]);if(i[c]==2)for(let d of f)u.push(d);else u.push(f)}return e.combine(u)}return{create(l){for(let u of r)uc(l,u);return l.values[o]=a(l),1},update(l,u){if(!ib(l,s))return 0;let c=a(l);return e.compare(c,l.values[o])?0:(l.values[o]=c,1)},reconfigure(l,u){let c=ib(l,r),f=u.config.facets[e.id],d=u.facet(e);if(f&&!c&&mv(n,f))return l.values[o]=d,0;let h=a(l);return e.compare(h,d)?(l.values[o]=d,0):(l.values[o]=h,1)}}}const xd=he.define({static:!0});class Wt{constructor(e,n,r,i,s){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let n=new Wt(pv++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(xd).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let s=r.values[n],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[n]=o,1)},reconfigure:(r,i)=>{let s=r.facet(xd),o=i.facet(xd),a;return(a=s.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(r.values[n]=a.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,xd.of({field:this,create:e})]}get extension(){return this}}const $o={lowest:4,low:3,default:2,high:1,highest:0};function Ou(t){return e=>new tD(e,t)}const Ao={highest:Ou($o.highest),high:Ou($o.high),default:Ou($o.default),low:Ou($o.low),lowest:Ou($o.lowest)};class tD{constructor(e,n){this.inner=e,this.prec=n}}class Pf{of(e){return new sb(this,e)}reconfigure(e){return Pf.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class sb{constructor(e,n){this.compartment=e,this.inner=n}}class mp{constructor(e,n,r,i,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],s=Object.create(null),o=new Map;for(let d of qF(e,n,o))d instanceof Wt?i.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],u=[];for(let d of i)a[d.id]=u.length<<1,u.push(h=>d.slot(h));let c=r==null?void 0:r.config.facets;for(let d in s){let h=s[d],p=h[0].facet,m=c&&c[d]||[];if(h.every(g=>g.type==0))if(a[p.id]=l.length<<1|1,mv(m,h))l.push(r.facet(p));else{let g=p.combine(h.map(b=>b.value));l.push(r&&p.compare(g,r.facet(p))?r.facet(p):g)}else{for(let g of h)g.type==0?(a[g.id]=l.length<<1|1,l.push(g.value)):(a[g.id]=u.length<<1,u.push(b=>g.dynamicSlot(b)));a[p.id]=u.length<<1,u.push(g=>HF(g,p,h))}}let f=u.map(d=>d(a));return new mp(e,o,f,a,l,s)}}function qF(t,e,n){let r=[[],[],[],[],[]],i=new Map;function s(o,a){let l=i.get(o);if(l!=null){if(l<=a)return;let u=r[l].indexOf(o);u>-1&&r[l].splice(u,1),o instanceof sb&&n.delete(o.compartment)}if(i.set(o,a),Array.isArray(o))for(let u of o)s(u,a);else if(o instanceof sb){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;n.set(o.compartment,u),s(u,a)}else if(o instanceof tD)s(o.inner,o.prec);else if(o instanceof Wt)r[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof Ch)r[a].push(o),o.facet.extensions&&s(o.facet.extensions,$o.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,a)}}return s(t,$o.default),r.reduce((o,a)=>o.concat(a))}function uc(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function gp(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const nD=he.define(),ob=he.define({combine:t=>t.some(e=>e),static:!0}),rD=he.define({combine:t=>t.length?t[0]:void 0,static:!0}),iD=he.define(),sD=he.define(),oD=he.define(),aD=he.define({combine:t=>t.length?t[0]:!1});class As{constructor(e,n){this.type=e,this.value=n}static define(){return new GF}}class GF{of(e){return new As(this,e)}}class WF{constructor(e){this.map=e}of(e){return new De(this,e)}}class De{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new De(this.type,n)}is(e){return this.type==e}static define(e={}){return new WF(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(n);s&&r.push(s)}return r}}De.reconfigure=De.define();De.appendConfig=De.define();class Qt{constructor(e,n,r,i,s,o){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&eD(r,n.newLength),s.some(a=>a.type==Qt.time)||(this.annotations=s.concat(Qt.time.of(Date.now())))}static create(e,n,r,i,s,o){return new Qt(e,n,r,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Qt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Qt.time=As.define();Qt.userEvent=As.define();Qt.addToHistory=As.define();Qt.remote=As.define();function KF(t,e){let n=[];for(let r=0,i=0;;){let s,o;if(r<t.length&&(i==e.length||e[i]>=t[r]))s=t[r++],o=t[r++];else if(i<e.length)s=e[i++],o=e[i++];else return n;!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function lD(t,e,n){var r;let i,s,o;return n?(i=e.changes,s=sn.empty(e.changes.length),o=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:De.mapEffects(t.effects,i).concat(De.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function ab(t,e,n){let r=e.selection,i=ul(e.annotations);return e.userEvent&&(i=i.concat(Qt.userEvent.of(e.userEvent))),{changes:e.changes instanceof sn?e.changes:sn.of(e.changes||[],n,t.facet(rD)),selection:r&&(r instanceof Y?r:Y.single(r.anchor,r.head)),effects:ul(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function uD(t,e,n){let r=ab(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let o=!!e[s].sequential;r=lD(r,ab(t,e[s],o?r.changes.newLength:t.doc.length),o)}let i=Qt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return YF(n?XF(i):i)}function XF(t){let e=t.startState,n=!0;for(let i of e.facet(iD)){let s=i(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:KF(n,s))}if(n!==!0){let i,s;if(n===!1)s=t.changes.invertedDesc,i=sn.empty(e.doc.length);else{let o=t.changes.filter(n);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}t=Qt.create(e,i,t.selection&&t.selection.map(s),De.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let r=e.facet(sD);for(let i=r.length-1;i>=0;i--){let s=r[i](t);s instanceof Qt?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Qt?t=s[0]:t=uD(e,ul(s),!1)}return t}function YF(t){let e=t.startState,n=e.facet(oD),r=t;for(let i=n.length-1;i>=0;i--){let s=n[i](t);s&&Object.keys(s).length&&(r=lD(r,ab(e,s,t.changes.newLength),!0))}return r==t?t:Qt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const JF=[];function ul(t){return t==null?JF:Array.isArray(t)?t:[t]}var kt=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(kt||(kt={}));const ZF=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let lb;try{lb=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function QF(t){if(lb)return lb.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||ZF.test(n)))return!0}return!1}function e9(t){return e=>{if(!/\S/.test(e))return kt.Space;if(QF(e))return kt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return kt.Word;return kt.Other}}class Ue{constructor(e,n,r,i,s,o){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)uc(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return uc(this,r),gp(this,r)}update(...e){return uD(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(Pf.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,u)=>i.set(u,l)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(De.reconfigure)?(n=null,r=a.value):a.is(De.appendConfig)&&(n=null,r=ul(r).concat(a.value));let s;n?s=e.startState.values.slice():(n=mp.resolve(r,i,this),s=new Ue(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let o=e.startState.facet(ob)?e.newSelection:e.newSelection.asSingle();new Ue(n,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Y.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),s=[r.range],o=ul(r.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),u=this.changes(l.changes),c=u.map(i);for(let d=0;d<a;d++)s[d]=s[d].map(c);let f=i.mapDesc(u,!0);s.push(l.range.map(f)),i=i.compose(c),o=De.mapEffects(o,c).concat(De.mapEffects(ul(l.effects),f))}return{changes:i,selection:Y.create(s,n.mainIndex),effects:o}}changes(e=[]){return e instanceof sn?e:sn.of(e,this.doc.length,this.facet(Ue.lineSeparator))}toText(e){return Ze.of(e.split(this.facet(Ue.lineSeparator)||tb))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(uc(this,n),gp(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof Wt&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],a=e[s];i.push(o.init(l=>o.spec.fromJSON(a,l)))}}return Ue.create({doc:e.doc,selection:Y.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=mp.resolve(e.extensions||[],new Map),r=e.doc instanceof Ze?e.doc:Ze.of((e.doc||"").split(n.staticFacet(Ue.lineSeparator)||tb)),i=e.selection?e.selection instanceof Y?e.selection:Y.single(e.selection.anchor,e.selection.head):Y.single(0);return eD(i,r.length),n.staticFacet(ob)||(i=i.asSingle()),new Ue(n,r,i,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(Ue.tabSize)}get lineBreak(){return this.facet(Ue.lineSeparator)||`
`}get readOnly(){return this.facet(aD)}phrase(e,...n){for(let r of this.facet(Ue.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>n.length?r:n[s-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let s of this.facet(nD))for(let o of s(this,n,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){return e9(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,a=e-r;for(;o>0;){let l=wn(n,o,!1);if(s(n.slice(l,o))!=kt.Word)break;o=l}for(;a<i;){let l=wn(n,a);if(s(n.slice(a,l))!=kt.Word)break;a=l}return o==a?null:Y.range(o+r,a+r)}}Ue.allowMultipleSelections=ob;Ue.tabSize=he.define({combine:t=>t.length?t[0]:4});Ue.lineSeparator=rD;Ue.readOnly=aD;Ue.phrases=he.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});Ue.languageData=nD;Ue.changeFilter=iD;Ue.transactionFilter=sD;Ue.transactionExtender=oD;Pf.reconfigure=De.define();function fi(t,e,n={}){let r={};for(let i of t)for(let s of Object.keys(i)){let o=i[s],a=r[s];if(a===void 0)r[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(n,s))r[s]=n[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class ca{eq(e){return this==e}range(e,n=e){return ub.create(e,n,this)}}ca.prototype.startSide=ca.prototype.endSide=0;ca.prototype.point=!1;ca.prototype.mapMode=En.TrackDel;let ub=class cD{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new cD(e,n,r)}};function cb(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class gv{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let s=r?this.to:this.from;for(let o=i,a=s.length;;){if(o==a)return o;let l=o+a>>1,u=s[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==o)return u>=0?o:a;u>=0?a=l:o=l+1}}between(e,n,r,i){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let r=[],i=[],s=[],o=-1,a=-1;for(let l=0;l<this.value.length;l++){let u=this.value[l],c=this.from[l]+e,f=this.to[l]+e,d,h;if(c==f){let p=n.mapPos(c,u.startSide,u.mapMode);if(p==null||(d=h=p,u.startSide!=u.endSide&&(h=n.mapPos(c,u.endSide),h<d)))continue}else if(d=n.mapPos(c,u.startSide),h=n.mapPos(f,u.endSide),d>h||d==h&&u.startSide>0&&u.endSide<=0)continue;(h-d||u.endSide-u.startSide)<0||(o<0&&(o=d),u.point&&(a=Math.max(a,h-d)),r.push(u),i.push(d-o),s.push(h-o))}return{mapped:r.length?new gv(i,s,r,a):null,pos:o}}}class Xe{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Xe(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(cb)),this.isEmpty)return n.length?Xe.of(n):this;let a=new fD(this,null,-1).goto(0),l=0,u=[],c=new _s;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let f=n[l++];c.addInner(f.from,f.to,f.value)||u.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[l].from)&&(!o||i>this.chunkEnd(a.chunkIndex)||s<this.chunkPos[a.chunkIndex])&&c.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||i>a.to||s<a.from||o(a.from,a.to,a.value))&&(c.addInner(a.from,a.to,a.value)||u.push(ub.create(a.from,a.to,a.value))),a.next());return c.finishInner(this.nextLayer.isEmpty&&!u.length?Xe.empty:this.nextLayer.update({add:u,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],l=this.chunk[o],u=e.touchesRange(a,a+l.length);if(u===!1)i=Math.max(i,l.maxPoint),n.push(l),r.push(e.mapPos(a));else if(u===!0){let{mapped:c,pos:f}=l.map(a,e);c&&(i=Math.max(i,c.maxPoint),n.push(c),r.push(f))}}let s=this.nextLayer.map(e);return n.length==0?s:new Xe(r,n,s||Xe.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(n>=s&&e<=s+o.length&&o.between(s,e-s,n-s,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Mc.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Mc.from(e).goto(n)}static compare(e,n,r,i,s=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),a=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),l=Gx(o,a,r),u=new Tu(o,l,s),c=new Tu(a,l,s);r.iterGaps((f,d,h)=>Wx(u,f,c,d,h,i)),r.empty&&r.length==0&&Wx(u,0,c,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let s=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),o=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=Gx(s,o),l=new Tu(s,a,0).goto(r),u=new Tu(o,a,0).goto(r);for(;;){if(l.to!=u.to||!fb(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>i)return!0;l.next(),u.next()}}static spans(e,n,r,i,s=-1){let o=new Tu(e,null,s).goto(n),a=n,l=o.openStart;for(;;){let u=Math.min(o.to,r);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFrom<n?c.length+1:o.point.startSide<0?c.length:Math.min(c.length,l);i.point(a,u,o.point,c,f,o.pointRank),l=Math.min(o.openEnd(u),c.length)}else u>a&&(i.span(a,u,o.active,l),l=o.openEnd(u));if(o.to>r)return l+(o.point&&o.to>r?1:0);a=o.to,o.next()}}static of(e,n=!1){let r=new _s;for(let i of e instanceof ub?[e]:n?t9(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Xe.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Xe.empty;i=i.nextLayer)n=new Xe(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Xe.empty=new Xe([],[],null,-1);function t9(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(cb(e,r)>0)return t.slice().sort(cb);e=r}return t}Xe.empty.nextLayer=Xe.empty;class _s{finishChunk(e){this.chunks.push(new gv(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new _s)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Xe.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Xe.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function Gx(t,e,n){let r=new Map;for(let s of t)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let a=r.get(s.chunk[o]);a!=null&&(n?n.mapPos(a):a)==s.chunkPos[o]&&!(n!=null&&n.touchesRange(a,a+s.chunk[o].length))&&i.add(s.chunk[o])}return i}class fD{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Mc{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new fD(o,n,r,s));return i.length==1?i[0]:new Mc(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)dg(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)dg(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),dg(this.heap,0)}}}function dg(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class Tu{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Mc.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Sd(this.active,e),Sd(this.activeTo,e),Sd(this.activeRank,e),this.minActive=Kx(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||i-this.activeTo[n])>0;)n++;Ed(this.active,n,r),Ed(this.activeTo,n,i),Ed(this.activeRank,n,s),e&&Ed(e,n,this.cursor.from),this.minActive=Kx(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Sd(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function Wx(t,e,n,r,i,s){t.goto(e),n.goto(r);let o=r+i,a=r,l=r-e;for(;;){let u=t.to+l-n.to,c=u||t.endSide-n.endSide,f=c<0?t.to+l:n.to,d=Math.min(f,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&fb(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(a,d,t.point,n.point):d>a&&!fb(t.active,n.active)&&s.compareRange(a,d,t.active,n.active),f>o)break;(u||t.openEnd!=n.openEnd)&&s.boundChange&&s.boundChange(f),a=f,c<=0&&t.next(),c>=0&&n.next()}}function fb(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function Sd(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function Ed(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function Kx(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function ru(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=wn(t,i));return r}function db(t,e,n,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==t.length)break;s+=t.charCodeAt(i)==9?n-s%n:1,i=wn(t,i)}return r===!0?-1:t.length}const hb="ͼ",Xx=typeof Symbol>"u"?"__"+hb:Symbol.for(hb),pb=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Yx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class po{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,u){let c=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return l.push(o[0]+";");for(let h in a){let p=a[h];if(/&/.test(h))s(h.split(/,\s*/).map(m=>o.map(g=>m.replace(/&/,g))).reduce((m,g)=>m.concat(g)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");s(i(h),p,c,d)}else p!=null&&c.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+p+";")}(c.length||d)&&l.push((r&&!f&&!u?o.map(r):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let e=Yx[Xx]||1;return Yx[Xx]=e+1,hb+e.toString(36)}static mount(e,n,r){let i=e[pb],s=r&&r.nonce;i?s&&i.setNonce(s):i=new n9(e,s),i.mount(Array.isArray(n)?n:[n],e)}}let Jx=new Map;class n9{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=Jx.get(r);if(s)return e[pb]=s;this.sheet=new i.CSSStyleSheet,Jx.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[pb]=this}mount(e,n){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let a=e[o],l=this.modules.indexOf(a);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),r)for(let u=0;u<a.rules.length;u++)r.insertRule(a.rules[u],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=a.rules.length,s++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let o="";for(let l=0;l<this.modules.length;l++)o+=this.modules[l].getRules()+`
`;this.styleTag.textContent=o;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var mo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Fc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},r9=typeof navigator<"u"&&/Mac/.test(navigator.platform),i9=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Sn=0;Sn<10;Sn++)mo[48+Sn]=mo[96+Sn]=String(Sn);for(var Sn=1;Sn<=24;Sn++)mo[Sn+111]="F"+Sn;for(var Sn=65;Sn<=90;Sn++)mo[Sn]=String.fromCharCode(Sn+32),Fc[Sn]=String.fromCharCode(Sn);for(var hg in mo)Fc.hasOwnProperty(hg)||(Fc[hg]=mo[hg]);function s9(t){var e=r9&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||i9&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Fc:mo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function ct(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)dD(t,arguments[e]);return t}function dD(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)dD(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let $n=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},mb=typeof document<"u"?document:{documentElement:{style:{}}};const gb=/Edge\/(\d+)/.exec($n.userAgent),hD=/MSIE \d/.test($n.userAgent),bb=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec($n.userAgent),W0=!!(hD||bb||gb),Zx=!W0&&/gecko\/(\d+)/i.test($n.userAgent),pg=!W0&&/Chrome\/(\d+)/.exec($n.userAgent),o9="webkitFontSmoothing"in mb.documentElement.style,yb=!W0&&/Apple Computer/.test($n.vendor),Qx=yb&&(/Mobile\/\w+/.test($n.userAgent)||$n.maxTouchPoints>2);var ue={mac:Qx||/Mac/.test($n.platform),windows:/Win/.test($n.platform),linux:/Linux|X11/.test($n.platform),ie:W0,ie_version:hD?mb.documentMode||6:bb?+bb[1]:gb?+gb[1]:0,gecko:Zx,gecko_version:Zx?+(/Firefox\/(\d+)/.exec($n.userAgent)||[0,0])[1]:0,chrome:!!pg,chrome_version:pg?+pg[1]:0,ios:Qx,android:/Android\b/.test($n.userAgent),webkit_version:o9?+(/\bAppleWebKit\/(\d+)/.exec($n.userAgent)||[0,0])[1]:0,safari:yb,safari_version:yb?+(/\bVersion\/(\d+(\.\d+)?)/.exec($n.userAgent)||[0,0])[1]:0,tabSize:mb.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function Lc(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function vb(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function Ah(t,e){if(!e.anchorNode)return!1;try{return vb(t,e.anchorNode)}catch{return!1}}function kl(t){return t.nodeType==3?da(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function cc(t,e,n,r){return n?eS(t,e,n,r,-1)||eS(t,e,n,r,1):!1}function fa(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function bp(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function eS(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Vi(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=fa(t)+(i<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?Vi(t):0}else return!1}}function Vi(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Rf(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function a9(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function pD(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function l9(t,e,n,r,i,s,o,a){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,f=!1;c&&!f;)if(c.nodeType==1){let d,h=c==l.body,p=1,m=1;if(h)d=a9(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let y=c.getBoundingClientRect();({scaleX:p,scaleY:m}=pD(c,y)),d={left:y.left,right:y.left+c.clientWidth*p,top:y.top,bottom:y.top+c.clientHeight*m}}let g=0,b=0;if(i=="nearest")e.top<d.top?(b=e.top-(d.top+o),n>0&&e.bottom>d.bottom+b&&(b=e.bottom-d.bottom+o)):e.bottom>d.bottom&&(b=e.bottom-d.bottom+o,n<0&&e.top-b<d.top&&(b=e.top-(d.top+o)));else{let y=e.bottom-e.top,x=d.bottom-d.top;b=(i=="center"&&y<=x?e.top+y/2-x/2:i=="start"||i=="center"&&n<0?e.top-o:e.bottom-x+o)-d.top}if(r=="nearest"?e.left<d.left?(g=e.left-(d.left+s),n>0&&e.right>d.right+g&&(g=e.right-d.right+s)):e.right>d.right&&(g=e.right-d.right+s,n<0&&e.left<d.left+g&&(g=e.left-(d.left+s))):g=(r=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:r=="start"==a?e.left-s:e.right-(d.right-d.left)+s)-d.left,g||b)if(h)u.scrollBy(g,b);else{let y=0,x=0;if(b){let S=c.scrollTop;c.scrollTop+=b/m,x=(c.scrollTop-S)*m}if(g){let S=c.scrollLeft;c.scrollLeft+=g/p,y=(c.scrollLeft-S)*p}e={left:e.left-y,top:e.top-x,right:e.right-y,bottom:e.bottom-x},y&&Math.abs(y-g)<1&&(r="nearest"),x&&Math.abs(x-b)<1&&(i="nearest")}if(h)break;(e.top<d.top||e.bottom>d.bottom||e.left<d.left||e.right>d.right)&&(e={left:Math.max(e.left,d.left),right:Math.min(e.right,d.right),top:Math.max(e.top,d.top),bottom:Math.min(e.bottom,d.bottom)}),c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function u9(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class c9{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Vi(n):0),r,Math.min(e.focusOffset,r?Vi(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Mo=null;ue.safari&&ue.safari_version>=26&&(Mo=!1);function mD(t){if(t.setActive)return t.setActive();if(Mo)return t.focus(Mo);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Mo==null?{get preventScroll(){return Mo={preventScroll:!0},!0}}:void 0),!Mo){Mo=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],s=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let tS;function da(t,e,n=e){let r=tS||(tS=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function cl(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,t.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function f9(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function gD(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function d9(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,Vi(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Vi(n))}else{if(n==t)return!0;r=fa(n),n=n.parentNode}}function bD(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function yD(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Vi(n)}else if(n.parentNode&&!bp(n))r=fa(n),n=n.parentNode;else return null}}function vD(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!bp(n))r=fa(n)+1,n=n.parentNode;else return null}}class Tn{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new Tn(e.parentNode,fa(e),n)}static after(e,n){return new Tn(e.parentNode,fa(e)+1,n)}}const bv=[];class ut{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,s;for(let o of this.children){if(o.flags&7){if(!o.dom&&(s=i?i.nextSibling:r.firstChild)){let a=ut.get(s);(!a||!a.parent&&a.canReuseDOM(o))&&o.reuseDOM(s)}o.sync(e,n),o.flags&=-8}if(s=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&s!=o.dom&&(n.written=!0),o.dom.parentNode==r)for(;s&&s!=o.dom;)s=nS(s);else r.insertBefore(o.dom,s);i=o.dom}for(s=i?i.nextSibling:r.firstChild,s&&n&&n.node==r&&(n.written=!0);s;)s=nS(s)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=Vi(e)==0?0:n==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;i==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?i=-1:i=1),e=s}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!ut.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,s=0;;i++){let o=this.children[i];if(o.dom==r)return s;s+=o.length+o.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,s=-1,o=-1,a=-1;for(let l=0,u=r,c=r;l<this.children.length;l++){let f=this.children[l],d=u+f.length;if(u<e&&d>n)return f.domBoundsAround(e,n,u);if(d>=e&&i==-1&&(i=l,s=u),u>n&&f.dom.parentNode==this.dom){o=l,a=c;break}c=d,u=d+f.breakAfter}return{from:s,to:a<0?r+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=bv){this.markDirty();for(let i=e;i<n;i++){let s=this.children[i];s.parent==this&&r.indexOf(s)<0&&s.destroy()}r.length<250?this.children.splice(e,n-e,...r):this.children=[].concat(this.children.slice(0,e),r,this.children.slice(n));for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new xD(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,s,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}ut.prototype.breakAfter=0;function nS(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class xD{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function SD(t,e,n,r,i,s,o,a,l){let{children:u}=t,c=u.length?u[e]:null,f=s.length?s[s.length-1]:null,d=f?f.breakAfter:o;if(!(e==r&&c&&!o&&!d&&s.length<2&&c.merge(n,i,s.length?f:null,n==0,a,l))){if(r<u.length){let h=u[r];h&&(i<h.length||h.breakAfter&&(f!=null&&f.breakAfter))?(e==r&&(h=h.split(i),i=0),!d&&f&&h.merge(0,i,f,!0,0,l)?s[s.length-1]=h:((i||h.children.length&&!h.children[0].length)&&h.merge(0,i,null,!1,0,l),s.push(h))):h!=null&&h.breakAfter&&(f?f.breakAfter=1:o=1),r++}for(c&&(c.breakAfter=o,n>0&&(!o&&s.length&&c.merge(n,c.length,s[0],!1,a,0)?c.breakAfter=s.shift().breakAfter:(n<c.length||c.children.length&&c.children[c.children.length-1].length==0)&&c.merge(n,c.length,null,!1,a,0),e++));e<r&&s.length;)if(u[r-1].become(s[s.length-1]))r--,s.pop(),l=s.length?0:a;else if(u[e].become(s[0]))e++,s.shift(),a=s.length?0:l;else break;!s.length&&e&&r<u.length&&!u[e-1].breakAfter&&u[r].merge(0,0,u[e-1],!1,a,l)&&e--,(e<r||s.length)&&t.replaceChildren(e,r,s)}}function ED(t,e,n,r,i,s){let o=t.childCursor(),{i:a,off:l}=o.findPos(n,1),{i:u,off:c}=o.findPos(e,-1),f=e-n;for(let d of r)f+=d.length;t.length+=f,SD(t,u,c,a,l,r,0,i,s)}const h9=256;class ui extends ut{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof ui)||this.length-(n-e)+r.length>h9||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new ui(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new Tn(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return p9(this.dom,e,n)}}class Cs extends ut{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(gD(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,s,o){return r&&(!(r instanceof Cs&&r.mark.eq(this.mark))||e&&s<=0||n<this.length&&o<=0)?!1:(ED(this,e,n,r?r.children.slice():[],s-1,o-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,s=0;for(let a of this.children){let l=r+a.length;l>e&&n.push(r<e?a.split(e-r):a),i<0&&r>=e&&(i=s),r=l,s++}let o=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Cs(this.mark,n,o)}domAtPos(e){return wD(this,e)}coordsAt(e,n){return CD(this,e,n)}}function p9(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&n<0||e==r&&n>=0?ue.chrome||ue.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):n<0?i--:s<r&&s++;let a=da(t,i,s).getClientRects();if(!a.length)return null;let l=a[(o?o<0:n>=0)?0:a.length-1];return ue.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,u=>u.width)||l),o?Rf(l,o<0):l||null}class Ws extends ut{static create(e,n,r){return new Ws(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Ws.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,s,o){return r&&(!(r instanceof Ws)||!this.widget.compare(r.widget)||e>0&&s<=0||n<this.length&&o<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof Ws&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Ze.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):Ze.empty}domAtPos(e){return(this.length?e==0:this.side>0)?Tn.before(this.dom):Tn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),s=null;if(!i.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?i.length-1:0;s=i[a],!(e>0?a==0:a==i.length-1||s.top<s.bottom);a+=o?-1:1);return Rf(s,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Ol extends ut{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Ol&&e.side==this.side}split(){return new Ol(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?Tn.before(this.dom):Tn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ze.empty}get isHidden(){return!0}}ui.prototype.children=Ws.prototype.children=Ol.prototype.children=bv;function wD(t,e){let n=t.dom,{children:r}=t,i=0;for(let s=0;i<r.length;i++){let o=r[i],a=s+o.length;if(!(a==s&&o.getSide()<=0)){if(e>s&&e<a&&o.dom.parentNode==n)return o.domAtPos(e-s);if(e<=s)break;s=a}}for(let s=i;s>0;s--){let o=r[s-1];if(o.dom.parentNode==n)return o.domAtPos(o.length)}for(let s=i;s<r.length;s++){let o=r[s];if(o.dom.parentNode==n)return o.domAtPos(0)}return new Tn(n,0)}function _D(t,e,n){let r,{children:i}=t;n>0&&e instanceof Cs&&i.length&&(r=i[i.length-1])instanceof Cs&&r.mark.eq(e.mark)?_D(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function CD(t,e,n){let r=null,i=-1,s=null,o=-1;function a(u,c){for(let f=0,d=0;f<u.children.length&&d<=c;f++){let h=u.children[f],p=d+h.length;p>=c&&(h.children.length?a(h,c-d):(!s||s.isHidden&&(n>0||g9(s,h)))&&(p>c||d==p&&h.getSide()>0)?(s=h,o=c-d):(d<c||d==p&&h.getSide()<0&&!h.isHidden)&&(r=h,i=c-d)),d=p}}a(t,e);let l=(n<0?r:s)||r||s;return l?l.coordsAt(Math.max(0,l==r?i:o),n):m9(t)}function m9(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=kl(e);return n[n.length-1]||null}function g9(t,e){let n=t.coordsAt(0,1),r=e.coordsAt(0,1);return n&&r&&r.top<n.bottom}function xb(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const rS=Object.create(null);function yp(t,e,n){if(t==e)return!0;t||(t=rS),e||(e=rS);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let s of r)if(s!=n&&(i.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function Sb(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function b9(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class Yi{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Kn=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(Kn||(Kn={}));class ve extends ca{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Nf(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new go(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=AD(e,n);r=(s?n?-3e8:-1:5e8)-1,i=(o?n?2e8:1:-6e8)+1}return new go(e,r,i,n,e.widget||null,!0)}static line(e){return new Mf(e)}static set(e,n=!1){return Xe.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}ve.none=Xe.empty;class Nf extends ve{constructor(e){let{start:n,end:r}=AD(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof Nf&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&yp(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Nf.prototype.point=!1;class Mf extends ve{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Mf&&this.spec.class==e.spec.class&&yp(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Mf.prototype.mapMode=En.TrackBefore;Mf.prototype.point=!0;class go extends ve{constructor(e,n,r,i,s,o){super(n,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?n<=0?En.TrackBefore:En.TrackAfter:En.TrackDel}get type(){return this.startSide!=this.endSide?Kn.WidgetRange:this.startSide<=0?Kn.WidgetBefore:Kn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof go&&y9(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}go.prototype.point=!0;function AD(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function y9(t,e){return t==e||!!(t&&e&&t.compare(e))}function Dh(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class Jt extends ut{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,s,o){if(r){if(!(r instanceof Jt))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),ED(this,e,n,r?r.children.slice():[],s,o),!0}split(e){let n=new Jt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let s=r;s<this.children.length;s++)n.append(this.children[s],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){yp(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){_D(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=xb(n,this.attrs||{})),r&&(this.attrs=xb({class:r},this.attrs||{}))}domAtPos(e){return wD(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(gD(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Sb(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&ut.get(i)instanceof Cs;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=ut.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!ue.ios||!this.children.some(s=>s instanceof ui))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof ui)||/[^ -~]/.test(r.text))return null;let i=kl(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=CD(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,s=r.bottom-r.top;if(Math.abs(s-i.lineHeight)<2&&i.textHeight<s){let o=(s-i.textHeight)/2;return{top:r.top+o,bottom:r.bottom-o,left:r.left,right:r.left}}}return r}become(e){return e instanceof Jt&&this.children.length==0&&e.children.length==0&&yp(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let s=e.children[r],o=i+s.length;if(o>=n){if(s instanceof Jt)return s;if(o>n)break}i=o+s.breakAfter}return null}}class gs extends ut{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,s,o){return r&&(!(r instanceof gs)||!this.widget.compare(r.widget)||e>0&&s<=0||n<this.length&&o<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?Tn.before(this.dom):Tn.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new gs(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return bv}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ze.empty}domBoundsAround(){return null}become(e){return e instanceof gs&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);return r||(this.widget instanceof Eb?null:Rf(this.dom.getBoundingClientRect(),this.length?e==0:n<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class Eb extends Yi{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class fc{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof gs&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Jt),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(wd(new Ol(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof gs)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:a,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e),s=Math.min(i,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(wd(new ui(this.text.slice(this.textOff,this.textOff+s)),n),r),this.atCursorPos=!0,this.textOff+=s,e-=s,r=i<=s?0:n.length}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,s,o){if(this.disallowBlockEffectsFor[o]&&r instanceof go){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(r instanceof go)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new gs(r.widget||Tl.block,a,r));else{let l=Ws.create(r.widget||Tl.inline,a,a?0:r.startSide),u=this.atCursorPos&&!l.isEditable&&s<=i.length&&(e<n||r.startSide>0),c=!l.isEditable&&(e<n||s>i.length||r.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),u&&(f.append(wd(new Ol(1),i),s),s=i.length+Math.max(0,s-i.length)),f.append(wd(l,i),s),this.atCursorPos=c,this.pendingBuffer=c?e<n||s>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=s)}static build(e,n,r,i,s){let o=new fc(e,n,r,s);return o.openEnd=Xe.spans(i,n,r,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function wd(t,e){for(let n of e)t=new Cs(n,[t],t.length);return t}class Tl extends Yi{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Tl.inline=new Tl("span");Tl.block=new Tl("div");var Et=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(Et||(Et={}));const ha=Et.LTR,yv=Et.RTL;function DD(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const v9=DD("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),x9=DD("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),wb=Object.create(null),yi=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);wb[e]=n,wb[n]=-e}function kD(t){return t<=247?v9[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?x9[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const S9=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Ks{get dir(){return this.level%2?yv:ha}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let s=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=n&&a.to>=n){if(a.level==r)return o;(s<0||(i!=0?i<0?a.from<n:a.to>n:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function OD(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!OD(r.inner,i.inner))return!1}return!0}const ft=[];function E9(t,e,n,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,a=s<r.length?r[s].from:n,l=s?256:i;for(let u=o,c=l,f=l;u<a;u++){let d=kD(t.charCodeAt(u));d==512?d=c:d==8&&f==4&&(d=16),ft[u]=d==4?2:d,d&7&&(f=d),c=d}for(let u=o,c=l,f=l;u<a;u++){let d=ft[u];if(d==128)u<a-1&&c==ft[u+1]&&c&24?d=ft[u]=c:ft[u]=256;else if(d==64){let h=u+1;for(;h<a&&ft[h]==64;)h++;let p=u&&c==8||h<n&&ft[h]==8?f==1?1:8:256;for(let m=u;m<h;m++)ft[m]=p;u=h-1}else d==8&&f==1&&(ft[u]=1);c=d,d&7&&(f=d)}}}function w9(t,e,n,r,i){let s=i==1?2:1;for(let o=0,a=0,l=0;o<=r.length;o++){let u=o?r[o-1].to:e,c=o<r.length?r[o].from:n;for(let f=u,d,h,p;f<c;f++)if(h=wb[d=t.charCodeAt(f)])if(h<0){for(let m=a-3;m>=0;m-=3)if(yi[m+1]==-h){let g=yi[m+2],b=g&2?i:g&4?g&1?s:i:0;b&&(ft[f]=ft[yi[m]]=b),a=m;break}}else{if(yi.length==189)break;yi[a++]=f,yi[a++]=d,yi[a++]=l}else if((p=ft[f])==2||p==1){let m=p==i;l=m?0:1;for(let g=a-3;g>=0;g-=3){let b=yi[g+2];if(b&2)break;if(m)yi[g+2]|=2;else{if(b&4)break;yi[g+2]|=4}}}}}function _9(t,e,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let l=o;l<a;){let u=ft[l];if(u==256){let c=l+1;for(;;)if(c==a){if(i==n.length)break;c=n[i++].to,a=i<n.length?n[i].from:e}else if(ft[c]==256)c++;else break;let f=s==1,d=(c<e?ft[c]:r)==1,h=f==d?f?1:2:r;for(let p=c,m=i,g=m?n[m-1].to:t;p>l;)p==g&&(p=n[--m].from,g=m?n[m-1].to:t),ft[--p]=h;l=c}else s=u,l++}}}function _b(t,e,n,r,i,s,o){let a=r%2?2:1;if(r%2==i%2)for(let l=e,u=0;l<n;){let c=!0,f=!1;if(u==s.length||l<s[u].from){let m=ft[l];m!=a&&(c=!1,f=m==16)}let d=!c&&a==1?[]:null,h=c?r:r+1,p=l;e:for(;;)if(u<s.length&&p==s[u].from){if(f)break e;let m=s[u];if(!c)for(let g=m.to,b=u+1;;){if(g==n)break e;if(b<s.length&&s[b].from==g)g=s[b++].to;else{if(ft[g]==a)break e;break}}if(u++,d)d.push(m);else{m.from>l&&o.push(new Ks(l,m.from,h));let g=m.direction==ha!=!(h%2);Cb(t,g?r+1:r,i,m.inner,m.from,m.to,o),l=m.to}p=m.to}else{if(p==n||(c?ft[p]!=a:ft[p]==a))break;p++}d?_b(t,l,p,r+1,i,d,o):l<p&&o.push(new Ks(l,p,h)),l=p}else for(let l=n,u=s.length;l>e;){let c=!0,f=!1;if(!u||l>s[u-1].to){let m=ft[l-1];m!=a&&(c=!1,f=m==16)}let d=!c&&a==1?[]:null,h=c?r:r+1,p=l;e:for(;;)if(u&&p==s[u-1].to){if(f)break e;let m=s[--u];if(!c)for(let g=m.from,b=u;;){if(g==e)break e;if(b&&s[b-1].to==g)g=s[--b].from;else{if(ft[g-1]==a)break e;break}}if(d)d.push(m);else{m.to<l&&o.push(new Ks(m.to,l,h));let g=m.direction==ha!=!(h%2);Cb(t,g?r+1:r,i,m.inner,m.from,m.to,o),l=m.from}p=m.from}else{if(p==e||(c?ft[p-1]!=a:ft[p-1]==a))break;p--}d?_b(t,p,l,r+1,i,d,o):p<l&&o.push(new Ks(p,l,h)),l=p}}function Cb(t,e,n,r,i,s,o){let a=e%2?2:1;E9(t,i,s,r,a),w9(t,i,s,r,a),_9(i,s,r,a),_b(t,i,s,e,n,r,o)}function C9(t,e,n){if(!t)return[new Ks(0,0,e==yv?1:0)];if(e==ha&&!n.length&&!S9.test(t))return TD(t.length);if(n.length)for(;t.length>ft.length;)ft[ft.length]=256;let r=[],i=e==ha?0:1;return Cb(t,i,i,n,0,t.length,r),r}function TD(t){return[new Ks(0,t,0)]}let ID="";function A9(t,e,n,r,i){var s;let o=r.head-t.from,a=Ks.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),l=e[a],u=l.side(i,n);if(o==u){let d=a+=i?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],o=l.side(!i,n),u=l.side(i,n)}let c=wn(t.text,o,l.forward(i,n));(c<l.from||c>l.to)&&(c=u),ID=t.text.slice(Math.min(o,c),Math.max(o,c));let f=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return f&&c==u&&f.level+(i?0:1)<l.level?Y.cursor(f.side(!i,n)+t.from,f.forward(i,n)?1:-1,f.level):Y.cursor(c+t.from,l.forward(i,n)?-1:1,l.level)}function D9(t,e,n){for(let r=e;r<n;r++){let i=kD(t.charCodeAt(r));if(i==1)return ha;if(i==2||i==4)return yv}return ha}const PD=he.define(),RD=he.define(),ND=he.define(),MD=he.define(),Ab=he.define(),FD=he.define(),LD=he.define(),vv=he.define(),xv=he.define(),BD=he.define({combine:t=>t.some(e=>e)}),$D=he.define({combine:t=>t.some(e=>e)}),zD=he.define();class fl{constructor(e,n="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new fl(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new fl(Y.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const _d=De.define({map:(t,e)=>t.map(e)}),jD=De.define();function qn(t,e,n){let r=t.facet(MD);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const ls=he.define({combine:t=>t.length?t[0]:!0});let k9=0;const Qa=he.define({combine(t){return t.filter((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0})}});class $t{constructor(e,n,r,i,s){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Qa.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Qa.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=n||{};return new $t(k9++,e,r,i,a=>{let l=[];return o&&l.push(Bc.of(u=>{let c=u.plugin(a);return c?o(c):ve.none})),s&&l.push(s(a)),l})}static fromClass(e,n){return $t.define((r,i)=>new e(r,i),n)}}class mg{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(qn(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){qn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){qn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const VD=he.define(),Sv=he.define(),Bc=he.define(),UD=he.define(),Ff=he.define(),HD=he.define();function iS(t,e){let n=t.state.facet(HD);if(!n.length)return n;let r=n.map(s=>s instanceof Function?s(t):s),i=[];return Xe.spans(r,e.from,e.to,{point(){},span(s,o,a,l){let u=s-e.from,c=o-e.from,f=i;for(let d=a.length-1;d>=0;d--,l--){let h=a[d].spec.bidiIsolate,p;if(h==null&&(h=D9(e.text,u,c)),l>0&&f.length&&(p=f[f.length-1]).to==u&&p.direction==h)p.to=c,f=p.inner;else{let m={from:u,to:c,direction:h,inner:[]};f.push(m),f=m.inner}}}}),i}const qD=he.define();function Ev(t){let e=0,n=0,r=0,i=0;for(let s of t.state.facet(qD)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:n,top:r,bottom:i}}const Wu=he.define();class jr{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new jr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,s=0,o=0,a=0;;i++){let l=i==e.length?null:e[i],u=o-a,c=l?l.fromB:1e9;for(;s<n.length&&n[s]<c;){let f=n[s],d=n[s+1],h=Math.max(a,f),p=Math.min(c,d);if(h<=p&&new jr(h+u,p+u,h,p).addToSet(r),d>c)break;s+=2}if(!l)return r;new jr(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),o=l.toA,a=l.toB}}}class vp{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=sn.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,a,l)=>i.push(new jr(s,o,a,l))),this.changedRanges=i}static create(e,n,r){return new vp(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class sS extends ut{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=ve.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Jt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new jr(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:c})=>c<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!M9(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?T9(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;r=new jr(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(ue.ie||ue.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),l=R9(o,a,e.changes);return r=jr.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=ue.chrome||ue.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||i.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof gs&&o.widget instanceof Eb&&s.push(o.dom);i.updateGaps(s)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,s=this.childCursor(n);for(let o=i.length-1;;o--){let a=o>=0?i[o]:null;if(!a)break;let{fromA:l,toA:u,fromB:c,toB:f}=a,d,h,p,m;if(r&&r.range.fromB<f&&r.range.toB>c){let S=fc.build(this.view.state.doc,c,r.range.fromB,this.decorations,this.dynamicDecorationMap),E=fc.build(this.view.state.doc,r.range.toB,f,this.decorations,this.dynamicDecorationMap);h=S.breakAtStart,p=S.openStart,m=E.openEnd;let C=this.compositionView(r);E.breakAtStart?C.breakAfter=1:E.content.length&&C.merge(C.length,C.length,E.content[0],!1,E.openStart,0)&&(C.breakAfter=E.content[0].breakAfter,E.content.shift()),S.content.length&&C.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),d=S.content.concat(C).concat(E.content)}else({content:d,breakAtStart:h,openStart:p,openEnd:m}=fc.build(this.view.state.doc,c,f,this.decorations,this.dynamicDecorationMap));let{i:g,off:b}=s.findPos(u,1),{i:y,off:x}=s.findPos(l,-1);SD(this,y,x,g,b,d,h,p,m)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(jD)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new ui(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new Cs(i,[n],n.length);let r=new Jt;return r.append(n,0),r}fixCompositionDOM(e){let n=(s,o)=>{o.flags|=8|(o.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(o);let a=ut.get(s);a&&a!=o&&(a.dom=null),o.setDOM(s)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let s=e.marks.length-1;s>=-1;s--)r=i.childPos(r.off,1),i=i.children[r.i],n(s>=0?e.marks[s].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,s=!i&&!(this.view.state.facet(ls)||this.dom.tabIndex>-1)&&Ah(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||s))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),u=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(ue.gecko&&a.empty&&!this.hasComposition&&O9(l)){let f=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(f,l.node.childNodes[l.offset]||null)),l=u=new Tn(f,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||(!cc(l.node,l.offset,c.anchorNode,c.anchorOffset)||!cc(u.node,u.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,a))&&(this.view.observer.ignore(()=>{ue.android&&ue.chrome&&this.dom.contains(c.focusNode)&&N9(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Lc(this.view.root);if(f)if(a.empty){if(ue.gecko){let d=I9(l.node,l.offset);if(d&&d!=3){let h=(d==1?yD:vD)(l.node,l.offset);h&&(l=new Tn(h.node,h.offset))}}f.collapse(l.node,l.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=a.bidiLevel)}else if(f.extend){f.collapse(l.node,l.offset);try{f.extend(u.node,u.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([l,u]=[u,l]),d.setEnd(u.node,u.offset),d.setStart(l.node,l.offset),f.removeAllRanges(),f.addRange(d)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new Tn(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new Tn(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&cc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Lc(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let o=Jt.find(this,n.head);if(!o)return;let a=o.posAtStart;if(n.head==a||n.head==a+o.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);r.collapse(c.node,c.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&r.collapse(i,s)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let s=ut.get(n.childNodes[i]);s instanceof Jt&&(r=s.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let s=ut.get(n.childNodes[i]);s instanceof Jt&&(r=s.domAtPos(s.length))}return r?new Tn(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=ut.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof Jt)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let s=this.length,o=this.children.length-1;o>=0;o--){let a=this.children[o],l=s-a.breakAfter,u=l-a.length;if(l<e)break;if(u<=e&&(u<e||a.covers(-1))&&(l>e||a.covers(1))&&(!r||a instanceof Jt&&!(r instanceof Jt&&n>=0)))r=a,i=u;else if(r&&u==e&&l==e&&a instanceof gs&&Math.abs(n)<2){if(a.deco.startSide<0)break;o&&(r=null)}s=u}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof Jt))return null;for(;i.children.length;){let{i:a,off:l}=i.childPos(r,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=l}if(!(i instanceof ui))return null;let s=wn(i.text,r);if(s==r)return null;let o=da(i.dom,r,s).getClientRects();for(let a=0;a<o.length;a++){let l=o[a];if(a==o.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==Et.LTR;for(let u=0,c=0;c<this.children.length;c++){let f=this.children[c],d=u+f.length;if(d>i)break;if(u>=r){let h=f.dom.getBoundingClientRect();if(n.push(h.height),o){let p=f.dom.lastChild,m=p?kl(p):[];if(m.length){let g=m[m.length-1],b=l?g.right-h.left:h.right-g.left;b>a&&(a=b,this.minWidth=s,this.minWidthFrom=u,this.minWidthTo=d)}}}u=d+f.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Et.RTL:Et.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Jt){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=kl(e.firstChild)[0];n=e.getBoundingClientRect().height,r=s?s.width/27:7,i=s?s.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new xD(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let s=i==n.viewports.length?null:n.viewports[i],o=s?s.from-1:this.length;if(o>r){let a=(n.lineBlockAt(o).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(ve.replace({widget:new Eb(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return ve.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Bc).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(UD).map((s,o)=>{let a=typeof s=="function";return a&&(r=!0),a?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Xe.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let u=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=u.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let u of this.view.state.facet(zD))try{if(u(this.view,e.range,e))return!0}catch(c){qn(this.view.state,c,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let s=Ev(this.view),o={left:r.left-s.left,top:r.top-s.top,right:r.right+s.right,bottom:r.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;l9(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==Et.LTR)}}function O9(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function GD(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=yD(n.focusNode,n.focusOffset),i=vD(n.focusNode,n.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let a=ut.get(i.node);if(!a||a instanceof ui&&a.text!=i.node.nodeValue)s=i;else if(t.docView.lastCompositionAfterCursor){let l=ut.get(r.node);!l||l instanceof ui&&l.text!=r.node.nodeValue||(s=i)}}if(t.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function T9(t,e,n){let r=GD(t,n);if(!r)return null;let{node:i,from:s,to:o}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc,u=new jr(l.mapPos(s),l.mapPos(o),s,o),c=[];for(let f=i.parentNode;;f=f.parentNode){let d=ut.get(f);if(d instanceof Cs)c.push({node:f,deco:d.mark});else{if(d instanceof Jt||f.nodeName=="DIV"&&f.parentNode==t.contentDOM)return{range:u,text:i,marks:c,line:f};if(f!=t.contentDOM)c.push({node:f,deco:new Nf({inclusive:!0,attributes:b9(f),tagName:f.tagName.toLowerCase()})});else return null}}}function I9(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let P9=class{constructor(){this.changes=[]}compareRange(e,n){Dh(e,n,this.changes)}comparePoint(e,n){Dh(e,n,this.changes)}boundChange(e){Dh(e,e,this.changes)}};function R9(t,e,n){let r=new P9;return Xe.compare(t,e,n,r),r.changes}function N9(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function M9(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function F9(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),s=e-i.from;if(i.length==0)return Y.cursor(e);s==0?n=1:s==i.length&&(n=-1);let o=s,a=s;n<0?o=wn(i.text,s,!1):a=wn(i.text,s);let l=r(i.text.slice(o,a));for(;o>0;){let u=wn(i.text,o,!1);if(r(i.text.slice(u,o))!=l)break;o=u}for(;a<i.length;){let u=wn(i.text,a);if(r(i.text.slice(a,u))!=l)break;a=u}return Y.range(o+i.from,a+i.from)}function L9(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function B9(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function gg(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function oS(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function aS(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Db(t,e,n){let r,i,s,o,a=!1,l,u,c,f;for(let p=t.firstChild;p;p=p.nextSibling){let m=kl(p);for(let g=0;g<m.length;g++){let b=m[g];i&&gg(i,b)&&(b=oS(aS(b,i.bottom),i.top));let y=L9(e,b),x=B9(n,b);if(y==0&&x==0)return p.nodeType==3?lS(p,e,n):Db(p,e,n);(!r||o>x||o==x&&s>y)&&(r=p,i=b,s=y,o=x,a=y?e<b.left?g>0:g<m.length-1:!0),y==0?n>b.bottom&&(!c||c.bottom<b.bottom)?(l=p,c=b):n<b.top&&(!f||f.top>b.top)&&(u=p,f=b):c&&gg(c,b)?c=aS(c,b.bottom):f&&gg(f,b)&&(f=oS(f,b.top))}}if(c&&c.bottom>=n?(r=l,i=c):f&&f.top<=n&&(r=u,i=f),!r)return{node:t,offset:0};let d=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return lS(r,d,n);if(a&&r.contentEditable!="false")return Db(r,d,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:h}}function lS(t,e,n){let r=t.nodeValue.length,i=-1,s=1e9,o=0;for(let a=0;a<r;a++){let l=da(t,a,a+1).getClientRects();for(let u=0;u<l.length;u++){let c=l[u];if(c.top==c.bottom)continue;o||(o=e-c.left);let f=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f<s){let d=e>=(c.left+c.right)/2,h=d;if((ue.chrome||ue.gecko)&&da(t,a).getBoundingClientRect().left==c.right&&(h=!d),f<=0)return{node:t,offset:a+(h?1:0)};i=a+(h?1:0),s=f}}}return{node:t,offset:i>-1?i:o>0?t.nodeValue.length:0}}function WD(t,e,n,r=-1){var i,s;let o=t.contentDOM.getBoundingClientRect(),a=o.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:c,y:f}=e,d=f-a;if(d<0)return 0;if(d>u)return t.state.doc.length;for(let S=t.viewState.heightOracle.textHeight/2,E=!1;l=t.elementAtHeight(d),l.type!=Kn.Text;)for(;d=r>0?l.bottom+S:l.top-S,!(d>=0&&d<=u);){if(E)return n?null:0;E=!0,r=-r}f=a+d;let h=l.from;if(h<t.viewport.from)return t.viewport.from==0?0:n?null:uS(t,o,l,c,f);if(h>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:uS(t,o,l,c,f);let p=t.dom.ownerDocument,m=t.root.elementFromPoint?t.root:p,g=m.elementFromPoint(c,f);g&&!t.contentDOM.contains(g)&&(g=null),g||(c=Math.max(o.left+1,Math.min(o.right-1,c)),g=m.elementFromPoint(c,f),g&&!t.contentDOM.contains(g)&&(g=null));let b,y=-1;if(g&&((i=t.docView.nearest(g))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let S=p.caretPositionFromPoint(c,f);S&&({offsetNode:b,offset:y}=S)}else if(p.caretRangeFromPoint){let S=p.caretRangeFromPoint(c,f);S&&({startContainer:b,startOffset:y}=S)}b&&(!t.contentDOM.contains(b)||ue.safari&&$9(b,y,c)||ue.chrome&&z9(b,y,c))&&(b=void 0),b&&(y=Math.min(Vi(b),y))}if(!b||!t.docView.dom.contains(b)){let S=Jt.find(t.docView,h);if(!S)return d>l.top+l.height/2?l.to:l.from;({node:b,offset:y}=Db(S.dom,c,f))}let x=t.docView.nearest(b);if(!x)return null;if(x.isWidget&&((s=x.dom)===null||s===void 0?void 0:s.nodeType)==1){let S=x.dom.getBoundingClientRect();return e.y<S.top||e.y<=S.bottom&&e.x<=(S.left+S.right)/2?x.posAtStart:x.posAtEnd}else return x.localPosFromDOM(b,y)+x.posAtStart}function uS(t,e,n,r,i){let s=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-a)*.5)/a);s+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+db(o,s,t.state.tabSize)}function KD(t,e,n){let r,i=t;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(;;){let s=i.nextSibling;if(s){if(s.nodeName=="BR")break;return!1}else{let o=i.parentNode;if(!o||o.nodeName=="DIV")break;i=o}}return da(t,r-1,r).getBoundingClientRect().right>n}function $9(t,e,n){return KD(t,e,n)}function z9(t,e,n){if(e!=0)return KD(t,e,n);for(let i=t;;){let s=i.parentNode;if(!s||s.nodeType!=1||s.firstChild!=i)return!1;if(s.classList.contains("cm-line"))break;i=s}let r=t.nodeType==1?t.getBoundingClientRect():da(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function kb(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==Kn.Text&&(i.type!=s.type||(n<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function j9(t,e,n,r){let i=kb(t,e.head,e.assoc||-1),s=!r||i.type!=Kn.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(a==Et.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return Y.cursor(l,n?-1:1)}return Y.cursor(n?i.to:i.from,n?-1:1)}function cS(t,e,n,r){let i=t.state.doc.lineAt(e.head),s=t.bidiSpans(i),o=t.textDirectionAt(i.from);for(let a=e,l=null;;){let u=A9(i,s,o,a,n),c=ID;if(!u){if(i.number==(n?t.state.doc.lines:1))return a;c=`
`,i=t.state.doc.line(i.number+(n?1:-1)),s=t.bidiSpans(i),u=t.visualLineSide(i,!n)}if(l){if(!l(c))return a}else{if(!r)return u;l=r(c)}a=u}}function V9(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return s=>{let o=r(s);return i==kt.Space&&(i=o),i==o}}function U9(t,e,n,r){let i=e.head,s=n?1:-1;if(i==(n?t.state.doc.length:0))return Y.cursor(i,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(i,e.assoc||-1),c=t.documentTop;if(u)o==null&&(o=u.left-l.left),a=s<0?u.top:u.bottom;else{let h=t.viewState.lineBlockAt(i);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-h.from))),a=(s<0?h.top:h.bottom)+c}let f=l.left+o,d=r??t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let p=a+(d+h)*s,m=WD(t,{x:f,y:p},!1,s);if(p<l.top||p>l.bottom||(s<0?m<i:m>i)){let g=t.docView.coordsForChar(m),b=!g||p<g.top?-1:1;return Y.cursor(m,b,void 0,o)}}}function dc(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(s,o,a)=>{if(e>s&&e<o){let l=r||n||(e-s<o-e?-1:1);e=l<0?s:o,r=l}});if(!r)return e}}function XD(t,e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=dc(t,i.from,0);o!=i.from&&(s=Y.cursor(o,-1))}else{let o=dc(t,i.from,-1),a=dc(t,i.to,1);(o!=i.from||a!=i.to)&&(s=Y.range(i.from==i.anchor?o:a,i.from==i.head?o:a))}s&&(n||(n=e.ranges.slice()),n[r]=s)}return n?Y.create(n,e.mainIndex):e}function bg(t,e,n){let r=dc(t.state.facet(Ff).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:Y.cursor(r,r<n.from?1:-1)}const Ku="￿";class H9{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(Ue.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Ku}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=i.nextSibling;if(o==n)break;let a=ut.get(i),l=ut.get(o);(a&&l?a.breakAfter:(a?a.breakAfter:bp(i))||bp(o)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>s)&&!G9(o,n)&&this.lineBreak(),i=o}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(a=i.exec(n))&&(s=a.index,o=a[0].length),this.append(n.slice(r,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);r=s+o}}readNode(e){if(e.cmIgnore)return;let n=ut.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(q9(e,r.node,r.offset)?n:0))}}function q9(t,e,n){for(;;){if(!e||n<Vi(e))return!1;if(e==t)return!0;n=fa(e)+1,e=e.parentNode}}function G9(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let r=ut.get(t);if(!(r!=null&&r.isWidget||t.cmIgnore))return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class fS{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class W9{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let a=s||o?[]:X9(e),l=new H9(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=Y9(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!vb(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),u=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!vb(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),c=e.viewport;if((ue.ios||ue.chrome)&&e.state.selection.main.empty&&l!=u&&(c.from>0||c.to<e.state.doc.length)){let f=Math.min(l,u),d=Math.max(l,u),h=c.from-f,p=c.to-d;(h==0||h==1||f==0)&&(p==0||p==-1||d==e.state.doc.length)&&(l=0,u=e.state.doc.length)}this.newSel=Y.single(u,l)}}}function YD(t,e){let n,{newSel:r}=e,i=t.state.selection.main,s=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=i.from,u=null;(s===8||ue.android&&e.text.length<a-o)&&(l=i.to,u="end");let c=JD(t.state.doc.sliceString(o,a,Ku),e.text,l-o,u);c&&(ue.chrome&&s==13&&c.toB==c.from+2&&e.text.slice(c.from,c.toB)==Ku+Ku&&c.toB--,n={from:o+c.from,to:o+c.toA,insert:Ze.of(e.text.slice(c.from,c.toB).split(Ku))})}else r&&(!t.hasFocus&&t.state.facet(ls)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(ue.mac||ue.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Y.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Ze.of([n.insert.toString().replace("."," ")])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:ue.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
`&&t.lineWrapping&&(r&&(r=Y.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ze.of([" "])}),n)return wv(t,n,r,s);if(r&&!r.main.eq(i)){let o=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),a=t.inputState.lastSelectionOrigin,a=="select.pointer"&&(r=XD(t.state.facet(Ff).map(l=>l(t)),r))),t.dispatch({selection:r,scrollIntoView:o,userEvent:a}),!0}else return!1}function wv(t,e,n,r=-1){if(ue.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(ue.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&cl(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&cl(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&cl(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,a=()=>o||(o=K9(t,e,n));return t.state.facet(FD).some(l=>l(t,e.from,e.to,s,a))||t.dispatch(a()),!0}function K9(t,e,n){let r,i=t.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let l=e.from<s.from?-1:1,u=l<0?s.from:s.to,c=dc(i.facet(Ff).map(f=>f(t)),u,l);e.from==c&&(o=c)}if(o>-1)r={changes:e,selection:Y.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=s.from<e.from?i.sliceDoc(s.from,e.from):"",u=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+u))}else{let l=i.changes(e),u=n&&n.main.to<=l.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let c=t.state.sliceDoc(e.from,e.to),f,d=n&&GD(t,n.main.head);if(d){let m=e.insert.length-(e.to-e.from);f={from:d.from,to:d.to-m}}else f=t.state.doc.lineAt(s.head);let h=s.to-e.to,p=s.to-s.from;r=i.changeByRange(m=>{if(m.from==s.from&&m.to==s.to)return{changes:l,range:u||m.map(l)};let g=m.to-h,b=g-c.length;if(m.to-m.from!=p||t.state.sliceDoc(b,g)!=c||m.to>=f.from&&m.from<=f.to)return{range:m};let y=i.changes({from:b,to:g,insert:e.insert}),x=m.to-s.to;return{changes:y,range:u?Y.range(Math.max(0,u.anchor+x),Math.max(0,u.head+x)):m.map(y)}})}else r={changes:l,selection:u&&i.selection.replaceRange(u)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}function JD(t,e,n,r){let i=Math.min(t.length,e.length),s=0;for(;s<i&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&t.length==e.length)return null;let o=t.length,a=e.length;for(;o>0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(r=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o<s&&t.length<e.length){let l=n<=s&&n>=o?s-n:0;s-=l,a=s+(a-o),o=s}else if(a<s){let l=n<=s&&n>=a?s-n:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function X9(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new fS(n,r)),(i!=n||s!=r)&&e.push(new fS(i,s))),e}function Y9(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?Y.single(n+e,r+e):null}class J9{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,ue.safari&&e.contentDOM.addEventListener("input",()=>null),ue.gecko&&hL(e.contentDOM.ownerDocument)}handleEvent(e){!sL(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=Z9(e),r=this.handlers,i=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,a=r[s];a&&o!=!a.handlers.length&&(i.removeEventListener(s,this.handleEvent),a=null),a||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!n[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&QD.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),ue.android&&ue.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return ue.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=ZD.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||Q9.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,cl(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:ue.safari&&!ue.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function dS(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){qn(n.state,i)}}}function Z9(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let a in s){let l=s[a];l&&n(a).handlers.push(dS(r.value,l))}if(o)for(let a in o){let l=o[a];l&&n(a).observers.push(dS(r.value,l))}}for(let r in ci)n(r).handlers.push(ci[r]);for(let r in qr)n(r).observers.push(qr[r]);return e}const ZD=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Q9="dthko",QD=[16,17,18,20,91,92,224,225],Cd=6;function Ad(t){return Math.max(0,t)*.7+8}function eL(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class tL{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=u9(e.contentDOM),this.atoms=e.state.facet(Ff).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Ue.allowMultipleSelections)&&nL(e,n),this.dragging=iL(e,n)&&nk(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&eL(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=Ev(this.view);e.clientX-l.left<=i+Cd?n=-Ad(i-e.clientX):e.clientX+l.right>=o-Cd&&(n=Ad(e.clientX-o)),e.clientY-l.top<=s+Cd?r=-Ad(s-e.clientY):e.clientY+l.bottom>=a-Cd&&(r=Ad(e.clientY-a)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=XD(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function nL(t,e){let n=t.state.facet(PD);return n.length?n[0](e):ue.mac?e.metaKey:e.ctrlKey}function rL(t,e){let n=t.state.facet(RD);return n.length?n[0](e):ue.mac?!e.altKey:!e.ctrlKey}function iL(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Lc(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function sL(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=ut.get(n))&&r.ignoreEvent(e))return!1;return!0}const ci=Object.create(null),qr=Object.create(null),ek=ue.ie&&ue.ie_version<15||ue.ios&&ue.webkit_version<604;function oL(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),tk(t,n.value)},50)}function K0(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function tk(t,e){e=K0(t.state,vv,e);let{state:n}=t,r,i=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(Ob!=null&&n.selection.ranges.every(l=>l.empty)&&Ob==s.toString()){let l=-1;r=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let f=n.toText((o?s.line(i++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:f},range:Y.cursor(u.from+f.length)}})}else o?r=n.changeByRange(l=>{let u=s.line(i++);return{changes:{from:l.from,to:l.to,insert:u.text},range:Y.cursor(l.from+u.length)}}):r=n.replaceSelection(s);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}qr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};ci.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);qr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};qr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};ci.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(ND))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=uL(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new tL(t,e,n,r)),r&&t.observer.ignore(()=>{mD(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function hS(t,e,n,r){if(r==1)return Y.cursor(e,n);if(r==2)return F9(t.state,e,n);{let i=Jt.find(t.docView,e),s=t.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,a=i?i.posAtEnd:s.to;return a<t.state.doc.length&&a==s.to&&a++,Y.range(o,a)}}let pS=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function aL(t,e,n,r){let i=Jt.find(t.docView,e);if(!i)return 1;let s=e-i.posAtStart;if(s==0)return 1;if(s==i.length)return-1;let o=i.coordsAt(s,-1);if(o&&pS(n,r,o))return-1;let a=i.coordsAt(s,1);return a&&pS(n,r,a)?1:o&&o.bottom>=r?-1:1}function mS(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:aL(t,n,e.clientX,e.clientY)}}const lL=ue.ie&&ue.ie_version<=11;let gS=null,bS=0,yS=0;function nk(t){if(!lL)return t.detail;let e=gS,n=yS;return gS=t,yS=Date.now(),bS=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(bS+1)%3:1}function uL(t,e){let n=mS(t,e),r=nk(e),i=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),i=i.map(s.changes))},get(s,o,a){let l=mS(t,s),u,c=hS(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!o){let f=hS(t,n.pos,n.bias,r),d=Math.min(f.from,c.from),h=Math.max(f.to,c.to);c=d<c.from?Y.range(d,h):Y.range(h,d)}return o?i.replaceRange(i.main.extend(c.from,c.to)):a&&r==1&&i.ranges.length>1&&(u=cL(i,l.pos))?u:a?i.addRange(c):Y.create([c])}}}function cL(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return Y.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}ci.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let s=i.posAtStart,o=s+i.length;(s>=n.to||o<=n.from)&&(n=Y.range(s,o))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",K0(t.state,xv,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ci.dragend=t=>(t.inputState.draggedContent=null,!1);function vS(t,e,n,r){if(n=K0(t.state,vv,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=r&&s&&rL(t,e)?{from:s.from,to:s.to}:null,a={from:i,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}ci.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&vS(t,e,r.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.length;o++){let a=new FileReader;a.onerror=s,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[o]=a.result),s()},a.readAsText(n[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return vS(t,e,r,!0),!0}return!1};ci.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=ek?null:e.clipboardData;return n?(tk(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(oL(t),!1)};function fL(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function dL(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>i&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),i=o.number}r=!0}return{text:K0(t,xv,e.join(t.lineBreak)),ranges:n,linewise:r}}let Ob=null;ci.copy=ci.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=dL(t.state);if(!n&&!i)return!1;Ob=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=ek?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(fL(t,n),!1)};const rk=As.define();function ik(t,e){let n=[];for(let r of t.facet(LD)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:rk.of(!0)}):null}function sk(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=ik(t.state,e);n?t.dispatch(n):t.update([])}},10)}qr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),sk(t)};qr.blur=t=>{t.observer.clearSelectionRange(),sk(t)};qr.compositionstart=qr.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};qr.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,ue.chrome&&ue.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};qr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};ci.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=t.posAtDOM(a.startContainer,a.startOffset),u=t.posAtDOM(a.endContainer,a.endOffset);return wv(t,{from:l,to:u,insert:t.state.toText(s)},null),!0}}let i;if(ue.chrome&&ue.android&&(i=ZD.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return ue.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),ue.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>qr.compositionend(t,e),20),!1};const xS=new Set;function hL(t){xS.has(t)||(xS.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const SS=["pre-wrap","normal","pre-line","break-spaces"];let Il=!1;function ES(){Il=!1}class pL{constructor(e){this.lineWrapping=e,this.doc=Ze.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return SS.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,s,o){let a=SS.indexOf(e)>-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=s,l){this.heightSamples={};for(let u=0;u<o.length;u++){let c=o[u];c<0?u++:this.heightSamples[Math.floor(c*10)]=!0}}return l}}class mL{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class ki{constructor(e,n,r,i,s){this.from=e,this.length=n,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?Kn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof go?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new ki(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var vt=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(vt||(vt={}));const kh=.001;class Xn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>kh&&(Il=!0),this.height=e)}replace(e,n,r){return Xn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let s=this,o=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:u,fromB:c,toB:f}=i[a],d=s.lineAt(l,vt.ByPosNoHeight,r.setDoc(n),0,0),h=d.to>=u?d:s.lineAt(u,vt.ByPosNoHeight,r,0,0);for(f+=h.to-u,u=h.to;a>0&&d.from<=i[a-1].toA;)l=i[a-1].fromA,c=i[a-1].fromB,a--,l<d.from&&(d=s.lineAt(l,vt.ByPosNoHeight,r,0,0));c+=d.from-l,l=d.from;let p=_v.build(r.setDoc(o),e,c,f);s=xp(s,s.replace(l,u,p))}return s.updateHeight(r,0)}static empty(){return new Sr(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,s=0;for(;;)if(n==r)if(i>s*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else if(s>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,s-=a.size}else break;else if(i<s){let a=e[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(s+=a.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,r++),new gL(Xn.of(e.slice(0,n)),o,Xn.of(e.slice(r)))}}function xp(t,e){return t==e?t:(t.constructor!=e.constructor&&(Il=!0),e)}Xn.prototype.size=1;class ok extends Xn{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new ki(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,s){return this.blockAt(0,r,i,s)}forEachLine(e,n,r,i,s,o){e<=s+this.length&&n>=s&&o(this.blockAt(0,r,i,s))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Sr extends ok{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new ki(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Sr||i instanceof xn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof xn?i=new Sr(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Xn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class xn extends Xn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,s=i-r+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:a}}blockAt(e,n,r,i){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let u=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),c=n.doc.lineAt(u),f=a+c.length*l,d=Math.max(r,e-f/2);return new ki(c.from,c.length,d,f,0)}else{let u=Math.max(0,Math.min(o-s,Math.floor((e-r)/a))),{from:c,length:f}=n.doc.line(s+u);return new ki(c,f,r+a*u,a,0)}}lineAt(e,n,r,i,s){if(n==vt.ByHeight)return this.blockAt(e,r,i,s);if(n==vt.ByPosNoHeight){let{from:h,to:p}=r.doc.lineAt(e);return new ki(h,p-h,0,0,0)}let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(r,s),u=r.doc.lineAt(e),c=a+u.length*l,f=u.number-o,d=i+a*f+l*(u.from-s-f);return new ki(u.from,u.length,Math.max(i,Math.min(d,i+this.height-c)),c,0)}forEachLine(e,n,r,i,s,o){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:a,perLine:l,perChar:u}=this.heightMetrics(r,s);for(let c=e,f=i;c<=n;){let d=r.doc.lineAt(c);if(c==e){let p=d.number-a;f+=l*p+u*(e-s-p)}let h=l+u*d.length;o(new ki(d.from,d.length,f,h,0)),f+=h,c=d.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let s=r[r.length-1];s instanceof xn?r[r.length-1]=new xn(s.length+i):r.push(null,new xn(i-1))}if(e>0){let s=r[0];s instanceof xn?r[0]=new xn(e+s.length):r.unshift(new xn(e-1),null)}return Xn.of(r)}decomposeLeft(e,n){n.push(new xn(e-1),null)}decomposeRight(e,n){n.push(null,new xn(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let s=n+this.length;if(i&&i.from<=n+this.length&&i.more){let o=[],a=Math.max(n,i.from),l=-1;for(i.from>n&&o.push(new xn(i.from-n-1).updateHeight(e,n));a<=s&&i.more;){let c=e.doc.lineAt(a).length;o.length&&o.push(null);let f=i.heights[i.index++];l==-1?l=f:Math.abs(f-l)>=kh&&(l=-2);let d=new Sr(c,f);d.outdated=!1,o.push(d),a+=c+1}a<=s&&o.push(null,new xn(s-a).updateHeight(e,a));let u=Xn.of(o);return(l<0||Math.abs(u.height-this.height)>=kh||Math.abs(l-this.heightMetrics(e,n).perLine)>=kh)&&(Il=!0),xp(this,u)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class gL extends Xn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,s,i+this.left.length+this.break)}lineAt(e,n,r,i,s){let o=i+this.left.height,a=s+this.left.length+this.break,l=n==vt.ByHeight?e<o:e<a,u=l?this.left.lineAt(e,n,r,i,s):this.right.lineAt(e,n,r,o,a);if(this.break||(l?u.to<a:u.from>a))return u;let c=n==vt.ByPosNoHeight?vt.ByPosNoHeight:vt.ByPos;return l?u.join(this.right.lineAt(a,c,r,o,a)):this.left.lineAt(a,c,r,i,s).join(u)}forEachLine(e,n,r,i,s,o){let a=i+this.left.height,l=s+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,r,i,s,o),n>=l&&this.right.forEachLine(e,n,r,a,l,o);else{let u=this.lineAt(l,vt.ByPos,r,i,s);e<u.from&&this.left.forEachLine(e,u.from-1,r,i,s,o),u.to>=e&&u.from<=n&&o(u),n>u.to&&this.right.forEachLine(u.to+1,n,r,a,l,o)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of r)s.push(a);if(e>0&&wS(s,o-1),n<this.length){let a=s.length;this.decomposeRight(n,s),wS(s,a)}return Xn.of(s)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Xn.of(this.break?[e,null,n]:[e,n]):(this.left=xp(this.left,e),this.right=xp(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:s,right:o}=this,a=n+s.length+this.break,l=null;return i&&i.from<=n+s.length&&i.more?l=s=s.updateHeight(e,n,r,i):s.updateHeight(e,n,r),i&&i.from<=a+o.length&&i.more?l=o=o.updateHeight(e,a,r,i):o.updateHeight(e,a,r),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function wS(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof xn&&(r=t[e+1])instanceof xn&&t.splice(e-1,3,new xn(n.length+1+r.length))}const bL=5;class _v{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Sr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Sr(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=n-e;r.block?this.addBlock(new ok(o,i,r)):(o||s||i>=bL)&&this.addLineDeco(i,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Sr(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new xn(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Sr)return e;let n=new Sr(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Sr)&&!this.isCovered?this.nodes.push(new Sr(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Sr&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let s=new _v(r,e);return Xe.spans(n,r,i,s,0),s.finish(r)}}function yL(t,e,n){let r=new vL;return Xe.compare(t,e,n,r,0),r.changes}class vL{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&Dh(e,n,this.changes,5)}}function xL(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,s=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let u=t.parentNode;u&&u!=r.body;)if(u.nodeType==1){let c=u,f=window.getComputedStyle(c);if((c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let d=c.getBoundingClientRect();s=Math.max(s,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),l=Math.min(u==t.parentNode?i.innerHeight:l,d.bottom)}u=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function SL(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function EL(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class yg{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=n[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,n){return ve.replace({widget:new wL(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class wL extends Yi{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class _S{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=CS,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Et.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(Sv).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new pL(n),this.stateDeco=e.facet(Bc).filter(r=>typeof r!="function"),this.heightMap=Xn.empty().applyChanges(this.stateDeco,Ze.empty,this.heightOracle.setDoc(e.doc),[new jr(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ve.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new Dd(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?CS:new Cv(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Xu(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Bc).filter(c=>typeof c!="function");let i=e.changedRanges,s=jr.extendWithRanges(i,yL(r,this.stateDeco,e?e.changes:sn.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);ES(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Il)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet($D)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Et.RTL:Et.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),a=n.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let u=0,c=0;if(a.width&&a.height){let{scaleX:S,scaleY:E}=pD(n,a);(S>.005&&Math.abs(this.scaleX-S)>.005||E>.005&&Math.abs(this.scaleY-E)>.005)&&(this.scaleX=S,this.scaleY=E,u|=16,o=l=!0)}let f=(parseInt(r.paddingTop)||0)*this.scaleY,d=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,u|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=bD(e.scrollDOM);let p=(this.printing?EL:xL)(n,this.paddingTop),m=p.top-this.pixelViewport.top,g=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget&&!SL(e.dom))return 0;let y=a.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,u|=16),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(S)&&(o=!0),o||i.lineWrapping&&Math.abs(y-this.contentDOMWidth)>i.charWidth){let{lineHeight:E,charWidth:C,textHeight:w}=e.docView.measureTextSize();o=E>0&&i.refresh(s,E,C,w,Math.max(5,y/C),S),o&&(e.docView.minWidth=0,u|=16)}m>0&&g>0?c=Math.max(m,g):m<0&&g<0&&(c=Math.min(m,g)),ES();for(let E of this.viewports){let C=E.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(E);this.heightMap=(o?Xn.empty().applyChanges(this.stateDeco,Ze.empty,this.heightOracle,[new jr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new mL(E.from,C))}Il&&(u|=2)}let x=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return x&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),u|=this.updateForViewport()),(u&2||x)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new Dd(i.lineAt(o-r*1e3,vt.ByHeight,s,0,0).from,i.lineAt(a+(1-r)*1e3,vt.ByHeight,s,0,0).to);if(n){let{head:u}=n.range;if(u<l.from||u>l.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(u,vt.ByPos,s,0,0),d;n.y=="center"?d=(f.top+f.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u<l.from?d=f.top:d=f.bottom-c,l=new Dd(i.lineAt(d-1e3/2,vt.ByHeight,s,0,0).from,i.lineAt(d+c+1e3/2,vt.ByHeight,s,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new Dd(this.heightMap.lineAt(r,vt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,vt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,vt.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,vt.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=a+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new yg(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=Et.LTR&&!r)return[];let a=[],l=(c,f,d,h)=>{if(f-c<s)return;let p=this.state.selection.main,m=[p.from];p.empty||m.push(p.to);for(let b of m)if(b>c&&b<f){l(c,b-10,d,h),l(b+10,f,d,h);return}let g=CL(e,b=>b.from>=d.from&&b.to<=d.to&&Math.abs(b.from-c)<s&&Math.abs(b.to-f)<s&&!m.some(y=>b.from<y&&b.to>y));if(!g){if(f<d.to&&n&&r&&n.visibleRanges.some(x=>x.from<=f&&x.to>=f)){let x=n.moveToLineBoundary(Y.cursor(f),!1,!0).head;x>c&&(f=x)}let b=this.gapSize(d,c,f,h),y=r||b<2e6?b:2e6;g=new yg(c,f,b,y)}a.push(g)},u=c=>{if(c.length<o||c.type!=Kn.Text)return;let f=_L(c.from,c.to,this.stateDeco);if(f.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,h,p;if(r){let m=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,b;if(d!=null){let y=Od(f,d),x=((this.visibleBottom-this.visibleTop)/2+m)/c.height;g=y-x,b=y+x}else g=(this.visibleTop-c.top-m)/c.height,b=(this.visibleBottom-c.top+m)/c.height;h=kd(f,g),p=kd(f,b)}else{let m=f.total*this.heightOracle.charWidth,g=i*this.heightOracle.charWidth,b=0;if(m>2e6)for(let C of e)C.from>=c.from&&C.from<c.to&&C.size!=C.displaySize&&C.from*this.heightOracle.charWidth+b<this.pixelViewport.left&&(b=C.size-C.displaySize);let y=this.pixelViewport.left+b,x=this.pixelViewport.right+b,S,E;if(d!=null){let C=Od(f,d),w=((x-y)/2+g)/m;S=C-w,E=C+w}else S=(y-g)/m,E=(x+g)/m;h=kd(f,S),p=kd(f,E)}h>c.from&&l(c.from,h,c,f),p<c.to&&l(p,c.to,c,f)};for(let c of this.viewportLines)Array.isArray(c.type)?c.type.forEach(u):u(c);return a}gapSize(e,n,r,i){let s=Od(i,r)-Od(i,n);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){yg.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ve.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];Xe.spans(n,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],a=r[s];(o.from!=a.from||o.to!=a.to)&&(i|=4,e&&e.mapPos(o.from,-1)==a.from&&e.mapPos(o.to,1)==a.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Xu(this.heightMap.lineAt(e,vt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||Xu(this.heightMap.lineAt(this.scaler.fromDOM(e),vt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Xu(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Dd{constructor(e,n){this.from=e,this.to=n}}function _L(t,e,n){let r=[],i=t,s=0;return Xe.spans(n,t,e,{span(){},point(o,a){o>i&&(r.push({from:i,to:o}),s+=o-i),i=a}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function kd({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:s,to:o}=e[i],a=o-s;if(r<=a)return s+r;r-=a}}function Od(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function CL(t,e){for(let n of t)if(e(n))return n}const CS={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class Cv{constructor(e,n,r){let i=0,s=0,o=0;this.viewports=r.map(({from:a,to:l})=>{let u=n.lineAt(a,vt.ByPos,e,0,0).top,c=n.lineAt(l,vt.ByPos,e,0,0).bottom;return i+=c-u,{from:a,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof Cv?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function Xu(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new ki(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>Xu(i,e)):t._content)}const Td=he.define({combine:t=>t.join(" ")}),Tb=he.define({combine:t=>t.indexOf(!0)>-1}),Ib=po.newName(),ak=po.newName(),lk=po.newName(),uk={"&light":"."+ak,"&dark":"."+lk};function Pb(t,e,n){return new po(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const AL=Pb("."+Ib,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},uk),DL={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},vg=ue.ie&&ue.ie_version<=11;class kL{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new c9,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(ue.ie&&ue.ie_version<=11||ue.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&ue.android&&e.constructor.EDIT_CONTEXT!==!1&&!(ue.chrome&&ue.chrome_version<126)&&(this.editContext=new TL(e),e.state.facet(ls)&&(e.contentDOM.editContext=this.editContext.editContext)),vg&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(ls)?r.root.activeElement!=this.dom:!Ah(this.dom,i))return;let s=i.anchorNode&&r.docView.nearest(i.anchorNode);if(s&&s.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(ue.ie&&ue.ie_version<=11||ue.android&&ue.chrome)&&!r.state.selection.main.empty&&i.focusNode&&cc(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Lc(e.root);if(!n)return!1;let r=ue.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&OL(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=Ah(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&d9(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,DL),vg&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),vg&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&cl(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),n==-1?{from:n,to:r}=o:(n=Math.min(o.from,n),r=Math.max(o.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Ah(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new W9(this.view,e,n,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=YD(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=AS(n,e.previousSibling||e.target.previousSibling,-1),i=AS(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(ls)!=e.state.facet(ls)&&(e.view.contentDOM.editContext=e.state.facet(ls)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function AS(t,e,n){for(;e;){let r=ut.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function DS(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return cc(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function OL(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return DS(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?DS(t,n):null}class TL{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,a=this.toEditorPos(r.updateRangeStart),l=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:a,drifted:!1});let u=l-a>r.text.length;a==this.from&&s<this.from?a=s:l==this.to&&s>this.to&&(l=s);let c=JD(e.state.sliceDoc(a,l),r.text,(u?i.from:i.to)-a,u?"end":null);if(!c){let d=Y.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));d.main.eq(i)||e.dispatch({selection:d,userEvent:"select"});return}let f={from:c.from+a,to:c.toA+a,insert:Ze.of(r.text.slice(c.from,c.toB).split(`
`))};if((ue.mac||ue.android)&&f.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:a,to:l,insert:Ze.of([r.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let d=this.to-this.from+(f.to-f.from+f.insert.length);wv(e,f,Y.single(this.toEditorPos(r.selectionStart,d),this.toEditorPos(r.selectionEnd,d)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),a=this.toEditorPos(r.rangeEnd);o<a;o++){let l=e.coordsForChar(o);s=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||s||new DOMRect,i.push(s)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,a=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(a)){let l=this.toEditorPos(s.rangeStart),u=this.toEditorPos(s.rangeEnd);if(l<u){let c=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;i.push(ve.mark({attributes:{style:c}}).range(l,u))}}}e.dispatch({effects:jD.of(ve.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Lc(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,a,l,u)=>{if(r)return;let c=u.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(u)){i=this.pendingContextChange=null,n+=c,this.to+=c;return}else i=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=c,this.to+=c;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+u.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),u.toString()),this.to+=c}n+=c}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class ce{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||f9(e.parent)||document,this.viewState=new _S(e.state||Ue.create(e)),e.scrollTo&&e.scrollTo.is(_d)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Qa).map(i=>new mg(i));for(let i of this.plugins)i.update(this);this.observer=new kL(this),this.inputState=new J9(this),this.inputState.ensureHandlers(this.plugins),this.docView=new sS(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Qt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,s=this.state;for(let d of e){if(d.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=d.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(d=>d.annotation(rk))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=ik(s,o),l||(a=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(c=null)):this.observer.clear(),s.facet(Ue.phrases)!=this.state.facet(Ue.phrases))return this.setState(s);i=vp.create(this,s,e),i.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:h}=d.state.selection;f=new fl(h.empty?h:Y.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of d.effects)h.is(_d)&&(f=h.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=Sp.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Wu)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Td)!=i.state.facet(Td)&&(this.viewState.mustMeasureContent=!0),(n||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let d of this.state.facet(Ab))try{d(i)}catch(h){qn(this.state,h,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!YD(this,c)&&u.force&&cl(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new _S(e),this.plugins=e.facet(Qa).map(r=>new mg(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new sS(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Qa),r=e.state.facet(Qa);if(n!=r){let i=[];for(let s of r){let o=n.indexOf(s);if(o<0)i.push(new mg(s));else{let a=this.plugins[o];a.mustUpdate=e,i.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){qn(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(bD(r))s=-1,o=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);s=h.from,o=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(h=>{try{return h.read(this)}catch(p){return qn(this.state,p),kS}}),f=vp.create(this,this.state,[]),d=!1;f.flags|=l,n?n.flags|=l:n=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let h=0;h<u.length;h++)if(c[h]!=kS)try{let p=u[h];p.write&&p.write(c[h],this)}catch(p){qn(this.state,p)}if(d&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let p=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(p>1||p<-1){i=i+p,r.scrollTop=i/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(Ab))a(n)}get themeClasses(){return Ib+" "+(this.state.facet(Tb)?lk:ak)+" "+this.state.facet(Td)}updateAttrs(){let e=OS(this,VD,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(ls)?"true":"false",class:"cm-content",style:`${ue.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),OS(this,Sv,n);let r=this.observer.ignore(()=>{let i=Sb(this.contentDOM,this.contentAttrs,n),s=Sb(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(ce.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Wu);let e=this.state.facet(ce.cspNonce);po.mount(this.root,this.styleModules.concat(AL).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return bg(this,e,cS(this,e,n,r))}moveByGroup(e,n){return bg(this,e,cS(this,e,n,r=>V9(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[n?r.length-1:0];return Y.cursor(s.side(n,i)+e.from,s.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return j9(this,e,n,r)}moveVertically(e,n,r){return bg(this,e,U9(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),WD(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[Ks.find(s,e-i.from,-1,n)];return Rf(r,o.dir==Et.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(BD)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>IL)return TD(e.length);let n=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||OD(s.isolates,r=iS(this,e))))return s.order;r||(r=iS(this,e));let i=C9(e.text,n,r);return this.bidiCache.push(new Sp(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ue.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{mD(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return _d.of(new fl(typeof e=="number"?Y.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return _d.of(new fl(Y.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return $t.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return $t.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=po.newName(),i=[Td.of(r),Wu.of(Pb(`.${r}`,e))];return n&&n.dark&&i.push(Tb.of(!0)),i}static baseTheme(e){return Ao.lowest(Wu.of(Pb("."+Ib,e,uk)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&ut.get(r)||ut.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}ce.styleModule=Wu;ce.inputHandler=FD;ce.clipboardInputFilter=vv;ce.clipboardOutputFilter=xv;ce.scrollHandler=zD;ce.focusChangeEffect=LD;ce.perLineTextDirection=BD;ce.exceptionSink=MD;ce.updateListener=Ab;ce.editable=ls;ce.mouseSelectionStyle=ND;ce.dragMovesSelection=RD;ce.clickAddsSelectionRange=PD;ce.decorations=Bc;ce.outerDecorations=UD;ce.atomicRanges=Ff;ce.bidiIsolatedRanges=HD;ce.scrollMargins=qD;ce.darkTheme=Tb;ce.cspNonce=he.define({combine:t=>t.length?t[0]:""});ce.contentAttributes=Sv;ce.editorAttributes=VD;ce.lineWrapping=ce.contentAttributes.of({class:"cm-lineWrapping"});ce.announce=De.define();const IL=4096,kS={};class Sp{constructor(e,n,r,i,s,o){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Et.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new Sp(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function OS(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(t):s;o&&xb(o,n)}return n}const PL=ue.mac?"mac":ue.windows?"win":ue.linux?"linux":"key";function RL(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,s,o,a;for(let l=0;l<n.length-1;++l){const u=n[l];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))i=!0;else if(/^(c|ctrl|control)$/i.test(u))s=!0;else if(/^s(hift)?$/i.test(u))o=!0;else if(/^mod$/i.test(u))e=="mac"?a=!0:s=!0;else throw new Error("Unrecognized modifier name: "+u)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),a&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function Id(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const NL=Ao.default(ce.domEventHandlers({keydown(t,e){return fk(ck(e.state),t,e,"editor")}})),Lf=he.define({enables:NL}),TS=new WeakMap;function ck(t){let e=t.facet(Lf),n=TS.get(e);return n||TS.set(e,n=LL(e.reduce((r,i)=>r.concat(i),[]))),n}function ML(t,e,n){return fk(ck(t.state),e,t,n)}let js=null;const FL=4e3;function LL(t,e=PL){let n=Object.create(null),r=Object.create(null),i=(o,a)=>{let l=r[o];if(l==null)r[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,u,c)=>{var f,d;let h=n[o]||(n[o]=Object.create(null)),p=a.split(/ (?!$)/).map(b=>RL(b,e));for(let b=1;b<p.length;b++){let y=p.slice(0,b).join(" ");i(y,!0),h[y]||(h[y]={preventDefault:!0,stopPropagation:!1,run:[x=>{let S=js={view:x,prefix:y,scope:o};return setTimeout(()=>{js==S&&(js=null)},FL),!0}]})}let m=p.join(" ");i(m,!1);let g=h[m]||(h[m]={preventDefault:!1,stopPropagation:!1,run:((d=(f=h._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});l&&g.run.push(l),u&&(g.preventDefault=!0),c&&(g.stopPropagation=!0)};for(let o of t){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let u of a){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let d in c)c[d].run.push(h=>f(h,Rb))}let l=o[e]||o.key;if(l)for(let u of a)s(u,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(u,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return n}let Rb=null;function fk(t,e,n,r){Rb=e;let i=s9(e),s=ir(i,0),o=Di(s)==i.length&&i!=" ",a="",l=!1,u=!1,c=!1;js&&js.view==n&&js.scope==r&&(a=js.prefix+" ",QD.indexOf(e.keyCode)<0&&(u=!0,js=null));let f=new Set,d=g=>{if(g){for(let b of g.run)if(!f.has(b)&&(f.add(b),b(n)))return g.stopPropagation&&(c=!0),!0;g.preventDefault&&(g.stopPropagation&&(c=!0),u=!0)}return!1},h=t[r],p,m;return h&&(d(h[a+Id(i,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ue.windows&&e.ctrlKey&&e.altKey)&&!(ue.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(p=mo[e.keyCode])&&p!=i?(d(h[a+Id(p,e,!0)])||e.shiftKey&&(m=Fc[e.keyCode])!=i&&m!=p&&d(h[a+Id(m,e,!1)]))&&(l=!0):o&&e.shiftKey&&d(h[a+Id(i,e,!0)])&&(l=!0),!l&&d(h._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),Rb=null,l}class Bf{constructor(e,n,r,i,s){this.className=e,this.left=n,this.top=r,this.width=i,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let s=dk(e);return[new Bf(n,i.left-s.left,i.top-s.top,null,i.bottom-i.top)]}else return BL(e,n,r)}}function dk(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Et.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function IS(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let s=t.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,a=t.posAtCoords({x:s.left+1,y:o}),l=t.posAtCoords({x:s.right-1,y:o});return a==null||l==null?r:{from:Math.max(r.from,Math.min(a,l)),to:Math.min(r.to,Math.max(a,l))}}function BL(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),s=t.textDirection==Et.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=dk(t),u=o.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),f=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),d=a.right-(c?parseInt(c.paddingRight):0),h=kb(t,r,1),p=kb(t,i,-1),m=h.type==Kn.Text?h:null,g=p.type==Kn.Text?p:null;if(m&&(t.lineWrapping||h.widgetLineBreaks)&&(m=IS(t,r,1,m)),g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=IS(t,i,-1,g)),m&&g&&m.from==g.from&&m.to==g.to)return y(x(n.from,n.to,m));{let E=m?x(n.from,null,m):S(h,!1),C=g?x(null,n.to,g):S(p,!0),w=[];return(m||h).to<(g||p).from-(m&&g?1:0)||h.widgetLineBreaks>1&&E.bottom+t.defaultLineHeight/2<C.top?w.push(b(f,E.bottom,d,C.top)):E.bottom<C.top&&t.elementAtHeight((E.bottom+C.top)/2).type==Kn.Text&&(E.bottom=C.top=(E.bottom+C.top)/2),y(E).concat(w).concat(y(C))}function b(E,C,w,A){return new Bf(e,E-l.left,C-l.top,w-E,A-C)}function y({top:E,bottom:C,horizontal:w}){let A=[];for(let _=0;_<w.length;_+=2)A.push(b(w[_],E,w[_+1],C));return A}function x(E,C,w){let A=1e9,_=-1e9,O=[];function I(R,F,V,B,G){let H=t.coordsAtPos(R,R==w.to?-2:2),ie=t.coordsAtPos(V,V==w.from?2:-2);!H||!ie||(A=Math.min(H.top,ie.top,A),_=Math.max(H.bottom,ie.bottom,_),G==Et.LTR?O.push(s&&F?f:H.left,s&&B?d:ie.right):O.push(!s&&B?f:ie.left,!s&&F?d:H.right))}let N=E??w.from,P=C??w.to;for(let R of t.visibleRanges)if(R.to>N&&R.from<P)for(let F=Math.max(R.from,N),V=Math.min(R.to,P);;){let B=t.state.doc.lineAt(F);for(let G of t.bidiSpans(B)){let H=G.from+B.from,ie=G.to+B.from;if(H>=V)break;ie>F&&I(Math.max(H,F),E==null&&H<=N,Math.min(ie,V),C==null&&ie>=P,G.dir)}if(F=B.to+1,F>=V)break}return O.length==0&&I(N,E==null,P,C==null,t.textDirection),{top:A,bottom:_,horizontal:O}}function S(E,C){let w=a.top+(C?E.top:E.bottom);return{top:w,bottom:w,horizontal:[]}}}function $L(t,e){return t.constructor==e.constructor&&t.eq(e)}class zL{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Oh)!=e.state.facet(Oh)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(Oh);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!$L(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e,ue.safari&&ue.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Oh=he.define();function hk(t){return[$t.define(e=>new zL(e,t)),Oh.of(t)]}const $c=he.define({combine(t){return fi(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function jL(t={}){return[$c.of(t),VL,UL,HL,$D.of(!0)]}function pk(t){return t.startState.facet($c)!=t.state.facet($c)}const VL=hk({above:!0,markers(t){let{state:e}=t,n=e.facet($c),r=[];for(let i of e.selection.ranges){let s=i==e.selection.main;if(i.empty||n.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=i.empty?i:Y.cursor(i.head,i.head>i.anchor?-1:1);for(let l of Bf.forRange(t,o,a))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=pk(t);return n&&PS(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){PS(e.state,t)},class:"cm-cursorLayer"});function PS(t,e){e.style.animationDuration=t.facet($c).cursorBlinkRate+"ms"}const UL=hk({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Bf.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||pk(t)},class:"cm-selectionLayer"}),HL=Ao.highest(ce.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),mk=De.define({map(t,e){return t==null?null:e.mapPos(t)}}),Yu=Wt.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(mk)?r.value:n,t)}}),qL=$t.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Yu);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Yu)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Yu),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Yu)!=t&&this.view.dispatch({effects:mk.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function GL(){return[Yu,qL]}function RS(t,e,n,r,i){e.lastIndex=0;for(let s=t.iterRange(n,r),o=n,a;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;a=e.exec(s.value);)i(o+a.index,a)}function WL(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:s}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=s:r.push({from:i,to:s});return r}class KL{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(a,l,u,c)=>i(c,u,u+a[0].length,a,l);else if(typeof r=="function")this.addMatch=(a,l,u,c)=>{let f=r(a,l,u);f&&c(u,u+a[0].length,f)};else if(r)this.addMatch=(a,l,u,c)=>c(u,u+a[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new _s,r=n.add.bind(n);for(let{from:i,to:s}of WL(e,this.maxLength))RS(e.state.doc,this.regexp,i,s,(o,a)=>this.addMatch(a,e,o,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((s,o,a,l)=>{l>=e.view.viewport.from&&a<=e.view.viewport.to&&(r=Math.min(a,r),i=Math.max(l,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let s of e.visibleRanges){let o=Math.max(s.from,r),a=Math.min(s.to,i);if(a>=o){let l=e.state.doc.lineAt(o),u=l.to<a?e.state.doc.lineAt(a):l,c=Math.max(s.from,l.from),f=Math.min(s.to,u.to);if(this.boundary){for(;o>l.from;o--)if(this.boundary.test(l.text[o-1-l.from])){c=o;break}for(;a<u.to;a++)if(this.boundary.test(u.text[a-u.from])){f=a;break}}let d=[],h,p=(m,g,b)=>d.push(b.range(m,g));if(l==u)for(this.regexp.lastIndex=c-l.from;(h=this.regexp.exec(l.text))&&h.index<f-l.from;)this.addMatch(h,e,h.index+l.from,p);else RS(e.state.doc,this.regexp,c,f,(m,g)=>this.addMatch(g,e,m,p));n=n.update({filterFrom:c,filterTo:f,filter:(m,g)=>m<c||g>f,add:d})}}return n}}const Nb=/x/.unicode!=null?"gu":"g",XL=new RegExp(`[\0-\b
--Ÿ­؜\u2028\u2029\uFEFF-]`,Nb),YL={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let xg=null;function JL(){var t;if(xg==null&&typeof document<"u"&&document.body){let e=document.body.style;xg=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return xg||!1}const Th=he.define({combine(t){let e=fi(t,{render:null,specialChars:XL,addSpecialChars:null});return(e.replaceTabs=!JL())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Nb)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Nb)),e}});function ZL(t={}){return[Th.of(t),QL()]}let NS=null;function QL(){return NS||(NS=$t.fromClass(class{constructor(t){this.view=t,this.decorations=ve.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Th)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new KL({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,s=ir(e[0],0);if(s==9){let o=i.lineAt(r),a=n.state.tabSize,l=ru(o.text,a,r-o.from);return ve.replace({widget:new rB((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=ve.replace({widget:new nB(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Th);t.startState.facet(Th)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const eB="•";function tB(t){return t>=32?eB:t==10?"␤":String.fromCharCode(9216+t)}class nB extends Yi{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=tB(this.code),r=e.state.phrase("Control character")+" "+(YL[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let s=document.createElement("span");return s.textContent=n,s.title=r,s.setAttribute("aria-label",r),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class rB extends Yi{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function iB(){return oB}const sB=ve.line({class:"cm-activeLine"}),oB=$t.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(sB.range(i.from)),e=i.from)}return ve.set(n)}},{decorations:t=>t.decorations});class aB extends Yi{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?kl(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=Rf(n[0],r.direction!="rtl"),s=parseInt(r.lineHeight);return i.bottom-i.top>s*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+s}:i}ignoreEvent(){return!1}}function lB(t){let e=$t.fromClass(class{constructor(n){this.view=n,this.placeholder=t?ve.set([ve.widget({widget:new aB(t),side:1}).range(0)]):ve.none}get decorations(){return this.view.state.doc.length?ve.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,ce.contentAttributes.of({"aria-placeholder":t})]:e}const Mb=2e3;function uB(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),s=[];if(e.off>Mb||n.off>Mb||e.col<0||n.col<0){let o=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let u=t.doc.line(l);u.length<=a&&s.push(Y.range(u.from+o,u.to+a))}}else{let o=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let u=t.doc.line(l),c=db(u.text,o,t.tabSize,!0);if(c<0)s.push(Y.cursor(u.to));else{let f=db(u.text,a,t.tabSize);s.push(Y.range(u.from+c,u.from+f))}}}return s}function cB(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function MS(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,s=i>Mb?-1:i==r.length?cB(t,e.clientX):ru(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:s,off:i}}function fB(t,e){let n=MS(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let s=i.changes.mapPos(i.startState.doc.line(n.line).from),o=i.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(i.changes)}},get(i,s,o){let a=MS(t,i);if(!a)return r;let l=uB(t.state,n,a);return l.length?o?Y.create(l.concat(r.ranges)):Y.create(l):r}}:null}function dB(t){let e=(n=>n.altKey&&n.button==0);return ce.mouseSelectionStyle.of((n,r)=>e(r)?fB(n,r):null)}const hB={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},pB={style:"cursor: crosshair"};function mB(t={}){let[e,n]=hB[t.key||"Alt"],r=$t.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,ce.contentAttributes.of(i=>{var s;return!((s=i.plugin(r))===null||s===void 0)&&s.isDown?pB:null})]}const Iu="-10000px";class gk{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=r(o,s))}update(e,n){var r;let i=e.state.facet(this.facet),s=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=n?[]:null;for(let l=0;l<s.length;l++){let u=s[l],c=-1;if(u){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==u.create&&(c=f)}if(c<0)o[l]=this.createTooltipView(u,l?o[l-1]:null),a&&(a[l]=!!u.above);else{let f=o[l]=this.tooltipViews[c];a&&(a[l]=n[c]),f.update&&f.update(e)}}}for(let l of this.tooltipViews)o.indexOf(l)<0&&(this.removeTooltipView(l),(r=l.destroy)===null||r===void 0||r.call(l));return n&&(a.forEach((l,u)=>n[u]=l),n.length=a.length),this.input=i,this.tooltips=s,this.tooltipViews=o,!0}}function gB(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Sg=he.define({combine:t=>{var e,n,r;return{position:ue.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||gB}}}),FS=new WeakMap,Av=$t.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Sg);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new gk(t,X0,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(Sg);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=Iu,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(ue.gecko)n=s.offsetParent!=this.container.ownerDocument.body;else if(s.style.top==Iu&&s.style.left=="0px"){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=Ev(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(Sg).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:s}=t,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],u=this.manager.tooltipViews[a],{dom:c}=u,f=t.pos[a],d=t.size[a];if(!f||l.clip!==!1&&(f.bottom<=Math.max(n.top,r.top)||f.top>=Math.min(n.bottom,r.bottom)||f.right<Math.max(n.left,r.left)-.1||f.left>Math.min(n.right,r.right)+.1)){c.style.top=Iu;continue}let h=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,p=h?7:0,m=d.right-d.left,g=(e=FS.get(u))!==null&&e!==void 0?e:d.bottom-d.top,b=u.offset||yB,y=this.view.textDirection==Et.LTR,x=d.width>r.right-r.left?y?r.left:r.right-d.width:y?Math.max(r.left,Math.min(f.left-(h?14:0)+b.x,r.right-m)):Math.min(Math.max(r.left,f.left-m+(h?14:0)-b.x),r.right-m),S=this.above[a];!l.strictSide&&(S?f.top-g-p-b.y<r.top:f.bottom+g+p+b.y>r.bottom)&&S==r.bottom-f.bottom>f.top-r.top&&(S=this.above[a]=!S);let E=(S?f.top-r.top:r.bottom-f.bottom)-p;if(E<g&&u.resize!==!1){if(E<this.view.defaultLineHeight){c.style.top=Iu;continue}FS.set(u,g),c.style.height=(g=E)/s+"px"}else c.style.height&&(c.style.height="");let C=S?f.top-g-p-b.y:f.bottom+p+b.y,w=x+m;if(u.overlap!==!0)for(let A of o)A.left<w&&A.right>x&&A.top<C+g&&A.bottom>C&&(C=S?A.top-g-2-p:A.bottom+p+2);if(this.position=="absolute"?(c.style.top=(C-t.parent.top)/s+"px",LS(c,(x-t.parent.left)/i)):(c.style.top=C/s+"px",LS(c,x/i)),h){let A=f.left+(y?b.x:-b.x)-(x+14-7);h.style.left=A/i+"px"}u.overlap!==!0&&o.push({left:x,top:C,right:w,bottom:C+g}),c.classList.toggle("cm-tooltip-above",S),c.classList.toggle("cm-tooltip-below",!S),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Iu}},{eventObservers:{scroll(){this.maybeMeasure()}}});function LS(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const bB=ce.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),yB={x:0,y:0},X0=he.define({enables:[Av,bB]}),Ep=he.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Y0{static create(e){return new Y0(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new gk(e,Ep,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const vB=X0.compute([Ep],t=>{let e=t.facet(Ep);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:Y0.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class xB{constructor(e,n,r,i,s){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,s=1;if(r instanceof Ws)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let a=e.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-e.defaultCharacterWidth||n.x>a.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(c=>c.from<=i&&c.to>=i),u=l&&l.dir==Et.RTL?-1:1;s=n.x<a.left?-u:u}let o=this.source(e,i,s);if(o!=null&&o.then){let a=this.pending={pos:i};o.then(l=>{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>qn(e.state,l,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(Av),n=e?e.manager.tooltips.findIndex(r=>r.create==Y0.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:s}=this;if(i.length&&s&&!SB(s.dom,e)||this.pending){let{pos:o}=i[0]||this.pending,a=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!EB(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Pd=4;function SB(t,e){let{left:n,right:r,top:i,bottom:s}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();i=Math.min(a.top,i),s=Math.max(a.bottom,s)}return e.clientX>=n-Pd&&e.clientX<=r+Pd&&e.clientY>=i-Pd&&e.clientY<=s+Pd}function EB(t,e,n,r,i,s){let o=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>r||o.right<r||o.top>i||Math.min(o.bottom,a)<i)return!1;let l=t.posAtCoords({x:r,y:i},!1);return l>=e&&l<=n}function bk(t,e={}){let n=De.define(),r=Wt.define({create(){return[]},update(i,s){if(i.length&&(e.hideOnChange&&(s.docChanged||s.selection)?i=[]:e.hideOn&&(i=i.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let a of i){let l=s.changes.mapPos(a.pos,-1,En.TrackDel);if(l!=null){let u=Object.assign(Object.create(null),a);u.pos=l,u.end!=null&&(u.end=s.changes.mapPos(u.end)),o.push(u)}}i=o}for(let o of s.effects)o.is(n)&&(i=o.value),o.is(wB)&&(i=[]);return i},provide:i=>Ep.from(i)});return{active:r,extension:[r,$t.define(i=>new xB(i,t,r,n,e.hoverTime||300)),vB]}}function yk(t,e){let n=t.plugin(Av);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const wB=De.define(),BS=he.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function zc(t,e){let n=t.plugin(vk),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const vk=$t.fromClass(class{constructor(t){this.input=t.state.facet(jc),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(BS);this.top=new Rd(t,!0,e.topContainer),this.bottom=new Rd(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(BS);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Rd(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Rd(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(jc);if(n!=this.input){let r=n.filter(l=>l),i=[],s=[],o=[],a=[];for(let l of r){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),a.push(c)):(c=this.panels[u],c.update&&c.update(t)),i.push(c),(c.top?s:o).push(c)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ce.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Rd{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=$S(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=$S(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function $S(t){let e=t.nextSibling;return t.remove(),e}const jc=he.define({enables:vk});class Ui extends ca{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Ui.prototype.elementClass="";Ui.prototype.toDOM=void 0;Ui.prototype.mapMode=En.TrackBefore;Ui.prototype.startSide=Ui.prototype.endSide=-1;Ui.prototype.point=!0;const Ih=he.define(),_B=he.define(),CB={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Xe.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},hc=he.define();function xk(t){return[Sk(),hc.of({...CB,...t})]}const zS=he.define({combine:t=>t.some(e=>e)});function Sk(t){return[AB]}const AB=$t.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(hc).map(e=>new VS(t,e)),this.fixed=!t.state.facet(zS);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(zS)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Xe.iter(this.view.state.facet(Ih),this.view.viewport.from),r=[],i=this.gutters.map(s=>new DB(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==Kn.Text&&o){Fb(n,r,a.from);for(let l of i)l.line(this.view,a,r);o=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(s.type==Kn.Text){Fb(n,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(hc),n=t.state.facet(hc),r=t.docChanged||t.heightChanged||t.viewportChanged||!Xe.eq(t.startState.facet(Ih),t.state.facet(Ih),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let s of n){let o=e.indexOf(s);o<0?i.push(new VS(this.view,s)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>ce.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Et.LTR?{left:r,right:i}:{right:r,left:i}})});function jS(t){return Array.isArray(t)?t:[t]}function Fb(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class DB{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Xe.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==i.elements.length){let a=new Ek(e,o,s,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,o,s,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];Fb(this.cursor,i,n.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,n,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let s of e.state.facet(_B)){let o=s(e,n.widget,n);o&&(i||(i=[])).push(o)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class VS{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=i.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=jS(n.markers(e)),n.initialSpacer&&(this.spacer=new Ek(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=jS(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Xe.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class Ek{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),kB(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=s<n.length?n[s++]:null,u=!1;if(l){let c=l.elementClass;c&&(r+=" "+c);for(let f=o;f<this.markers.length;f++)if(this.markers[f].compare(l)){a=f,u=!0;break}}else a=this.markers.length;for(;o<a;){let c=this.markers[o++];if(c.toDOM){c.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!l)break;l.toDOM&&(u?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),u&&o++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function kB(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const OB=he.define(),TB=he.define(),el=he.define({combine(t){return fi(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let s=r[i],o=n[i];r[i]=s?(a,l,u)=>s(a,l,u)||o(a,l,u):o}return r}})}});class Eg extends Ui{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function wg(t,e){return t.state.facet(el).formatNumber(e,t.state)}const IB=hc.compute([el],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(OB)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new Eg(wg(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(TB)){let s=i(e,n,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(el)!=e.state.facet(el),initialSpacer(e){return new Eg(wg(e,US(e.state.doc.lines)))},updateSpacer(e,n){let r=wg(n.view,US(n.view.state.doc.lines));return r==e.number?e:new Eg(r)},domEventHandlers:t.facet(el).domEventHandlers,side:"before"}));function PB(t={}){return[el.of(t),Sk(),IB]}function US(t){let e=9;for(;e<t;)e=e*10+9;return e}const RB=new class extends Ui{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},NB=Ih.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(RB.range(i)))}return Xe.of(e)});function MB(){return NB}class HS{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class zo{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(Pi).markerFilter;i&&(e=i(e,r));let s=e.slice().sort((c,f)=>c.from-f.from||c.to-f.to),o=new _s,a=[],l=0;for(let c=0;;){let f=c==s.length?null:s[c];if(!f&&!a.length)break;let d,h;for(a.length?(d=l,h=a.reduce((m,g)=>Math.min(m,g.to),f&&f.from>d?f.from:1e8)):(d=f.from,h=f.to,a.push(f),c++);c<s.length;){let m=s[c];if(m.from==d&&(m.to>m.from||m.to==d))a.push(m),c++,h=Math.min(m.to,h);else{h=Math.min(m.from,h);break}}let p=Ok(a);if(a.some(m=>m.from==m.to||m.from==m.to-1&&r.doc.lineAt(m.from).to==m.from))o.add(d,d,ve.widget({widget:new HB(p),diagnostics:a.slice()}));else{let m=a.reduce((g,b)=>b.markClass?g+" "+b.markClass:g,"");o.add(d,h,ve.mark({class:"cm-lintRange cm-lintRange-"+p+m,diagnostics:a.slice(),inclusiveEnd:a.some(g=>g.to>h)}))}l=h;for(let m=0;m<a.length;m++)a[m].to<=l&&a.splice(m--,1)}let u=o.finish();return new zo(u,n,Pl(u))}}function Pl(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,s,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!r)r=new HS(i,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new HS(r.from,s,r.diagnostic)}}),r}function wk(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(Pi).hideOn(t,n,r);if(i!=null)return i;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(J0))||t.changes.touchesRange(s.from,Math.max(s.to,r)))}function _k(t,e){return t.field(Cr,!1)?e:e.concat(De.appendConfig.of(Pk))}function FB(t,e){return{effects:_k(t,[J0.of(e)])}}const J0=De.define(),Dv=De.define(),Ck=De.define(),Cr=Wt.define({create(){return new zo(ve.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);r=Pl(n,t.selected.diagnostic,s)||Pl(n,null,s)}!n.size&&i&&e.state.facet(Pi).autoPanel&&(i=null),t=new zo(n,i,r)}for(let n of e.effects)if(n.is(J0)){let r=e.state.facet(Pi).autoPanel?n.value.length?Vc.open:null:t.panel;t=zo.init(n.value,r,e.state)}else n.is(Dv)?t=new zo(t.diagnostics,n.value?Vc.open:null,t.selected):n.is(Ck)&&(t=new zo(t.diagnostics,t.panel,n.value));return t},provide:t=>[jc.from(t,e=>e.panel),ce.decorations.from(t,e=>e.diagnostics)]}),LB=ve.mark({class:"cm-lintRange cm-lintRange-active"});function BB(t,e,n){let{diagnostics:r}=t.state.field(Cr),i,s=-1,o=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{if(e>=l&&e<=u&&(l==u||(e>l||n>0)&&(e<u||n<0)))return i=c.diagnostics,s=l,o=u,!1});let a=t.state.facet(Pi).tooltipFilter;return i&&a&&(i=a(i,t.state)),i?{pos:s,end:o,above:t.state.doc.lineAt(s).to<o,create(){return{dom:Ak(t,i)}}}:null}function Ak(t,e){return ct("ul",{class:"cm-tooltip-lint"},e.map(n=>kk(t,n,!1)))}const $B=t=>{let e=t.state.field(Cr,!1);(!e||!e.panel)&&t.dispatch({effects:_k(t.state,[Dv.of(!0)])});let n=zc(t,Vc.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},qS=t=>{let e=t.state.field(Cr,!1);return!e||!e.panel?!1:(t.dispatch({effects:Dv.of(!1)}),!0)},zB=t=>{let e=t.state.field(Cr,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},jB=[{key:"Mod-Shift-m",run:$B,preventDefault:!0},{key:"F8",run:zB}],VB=$t.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(Pi);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let t=Date.now();if(t<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-t);else{this.set=!1;let{state:e}=this.view,{sources:n}=e.facet(Pi);n.length&&UB(n.map(r=>Promise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(FB(this.view.state,r.reduce((i,s)=>i.concat(s))))},r=>{qn(this.view.state,r)})}}update(t){let e=t.state.facet(Pi);(t.docChanged||e!=t.startState.facet(Pi)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function UB(t,e,n){let r=[],i=-1;for(let s of t)s.then(o=>{r.push(o),clearTimeout(i),r.length==t.length?e(r):i=setTimeout(()=>e(r),200)},n)}const Pi=he.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),...fi(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:GS,tooltipFilter:GS,needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n,hideOn:(e,n)=>e?n?(r,i,s)=>e(r,i,s)||n(r,i,s):e:n,autoPanel:(e,n)=>e||n})}}});function GS(t,e){return t?e?(n,r)=>e(t(n,r),r):t:e}function Lb(t,e={}){return[Pi.of({source:t,config:e}),VB,Pk]}function Dk(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(s=>s.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function kk(t,e,n){var r;let i=n?Dk(e.actions):[];return ct("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ct("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((s,o)=>{let a=!1,l=h=>{if(h.preventDefault(),a)return;a=!0;let p=Pl(t.state.field(Cr).diagnostics,e);p&&s.apply(t,p.from,p.to)},{name:u}=s,c=i[o]?u.indexOf(i[o]):-1,f=c<0?u:[u.slice(0,c),ct("u",u.slice(c,c+1)),u.slice(c+1)],d=s.markClass?" "+s.markClass:"";return ct("button",{type:"button",class:"cm-diagnosticAction"+d,onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${i[o]})"`}.`},f)}),e.source&&ct("div",{class:"cm-diagnosticSource"},e.source))}class HB extends Yi{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return ct("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class WS{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=kk(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Vc{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)qS(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=Dk(s.actions);for(let a=0;a<o.length;a++)if(o[a].toUpperCase().charCodeAt(0)==i.keyCode){let l=Pl(this.view.state.field(Cr).diagnostics,s);l&&s.actions[a].apply(e,l.from,l.to)}}else return;i.preventDefault()},r=i=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(i.target)&&this.moveSelection(s)};this.list=ct("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=ct("div",{class:"cm-panel-lint"},this.list,ct("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>qS(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Cr).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Cr),r=0,i=!1,s=null,o=new Set;for(e.between(0,this.view.state.doc.length,(a,l,{spec:u})=>{for(let c of u.diagnostics){if(o.has(c))continue;o.add(c);let f=-1,d;for(let h=r;h<this.items.length;h++)if(this.items[h].diagnostic==c){f=h;break}f<0?(d=new WS(this.view,c),this.items.splice(r,0,d),i=!0):(d=this.items[f],f>r&&(this.items.splice(r,f-r),i=!0)),n&&d.diagnostic==n.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),s=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new WS(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:l})=>{let u=l.height/this.list.offsetHeight;a.top<l.top?this.list.scrollTop-=(l.top-a.top)/u:a.bottom>l.bottom&&(this.list.scrollTop+=(a.bottom-l.bottom)/u)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Cr),r=Pl(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:Ck.of(r)})}static open(e){return new Vc(e)}}function Ph(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function Nd(t){return Ph(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const qB=ce.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Nd("#d11")},".cm-lintRange-warning":{backgroundImage:Nd("orange")},".cm-lintRange-info":{backgroundImage:Nd("#999")},".cm-lintRange-hint":{backgroundImage:Nd("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function GB(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function Ok(t){let e="hint",n=1;for(let r of t){let i=GB(r.severity);i>n&&(n=i,e=r.severity)}return e}class Tk extends Ui{constructor(e){super(),this.diagnostics=e,this.severity=Ok(e)}toDOM(e){let n=document.createElement("div");n.className="cm-lint-marker cm-lint-marker-"+this.severity;let r=this.diagnostics,i=e.state.facet(Z0).tooltipFilter;return i&&(r=i(r,e.state)),r.length&&(n.onmouseover=()=>KB(e,n,r)),n}}function WB(t,e){let n=r=>{let i=e.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientX<i.right+10&&r.clientY>i.top-10&&r.clientY<i.bottom+10)){for(let s=r.target;s;s=s.parentNode)if(s.nodeType==1&&s.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",n),t.state.field(Ik)&&t.dispatch({effects:kv.of(null)})}};window.addEventListener("mousemove",n)}function KB(t,e,n){function r(){let o=t.elementAtHeight(e.getBoundingClientRect().top+5-t.documentTop);t.coordsAtPos(o.from)&&t.dispatch({effects:kv.of({pos:o.from,above:!1,clip:!1,create(){return{dom:Ak(t,n),getCoords:()=>e.getBoundingClientRect()}}})}),e.onmouseout=e.onmousemove=null,WB(t,e)}let{hoverTime:i}=t.state.facet(Z0),s=setTimeout(r,i);e.onmouseout=()=>{clearTimeout(s),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(s),s=setTimeout(r,i)}}function XB(t,e){let n=Object.create(null);for(let i of e){let s=t.lineAt(i.from);(n[s.from]||(n[s.from]=[])).push(i)}let r=[];for(let i in n)r.push(new Tk(n[i]).range(+i));return Xe.of(r,!0)}const YB=xk({class:"cm-gutter-lint",markers:t=>t.state.field(Bb),widgetMarker:(t,e,n)=>{let r=[];return t.state.field(Bb).between(n.from,n.to,(i,s,o)=>{i>n.from&&i<n.to&&r.push(...o.diagnostics)}),r.length?new Tk(r):null}}),Bb=Wt.define({create(){return Xe.empty},update(t,e){t=t.map(e.changes);let n=e.state.facet(Z0).markerFilter;for(let r of e.effects)if(r.is(J0)){let i=r.value;n&&(i=n(i||[],e.state)),t=XB(e.state.doc,i.slice(0))}return t}}),kv=De.define(),Ik=Wt.define({create(){return null},update(t,e){return t&&e.docChanged&&(t=wk(e,t)?null:{...t,pos:e.changes.mapPos(t.pos)}),e.effects.reduce((n,r)=>r.is(kv)?r.value:n,t)},provide:t=>X0.from(t)}),JB=ce.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:Ph('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:Ph('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:Ph('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),Pk=[Cr,ce.decorations.compute([Cr],t=>{let{selected:e,panel:n}=t.field(Cr);return!e||!n||e.from==e.to?ve.none:ve.set([LB.range(e.from,e.to)])}),bk(BB,{hideOn:wk}),qB],Z0=he.define({combine(t){return fi(t,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function ZB(t={}){return[Z0.of(t),Bb,YB,JB,Ik]}function QB(t,e=!1){const n=t.length;let r=0,i="",s=0,o=16,a=0,l=0,u=0,c=0,f=0;function d(x,S){let E=0,C=0;for(;E<x;){let w=t.charCodeAt(r);if(w>=48&&w<=57)C=C*16+w-48;else if(w>=65&&w<=70)C=C*16+w-65+10;else if(w>=97&&w<=102)C=C*16+w-97+10;else break;r++,E++}return E<x&&(C=-1),C}function h(x){r=x,i="",s=0,o=16,f=0}function p(){let x=r;if(t.charCodeAt(r)===48)r++;else for(r++;r<t.length&&Fa(t.charCodeAt(r));)r++;if(r<t.length&&t.charCodeAt(r)===46)if(r++,r<t.length&&Fa(t.charCodeAt(r)))for(r++;r<t.length&&Fa(t.charCodeAt(r));)r++;else return f=3,t.substring(x,r);let S=r;if(r<t.length&&(t.charCodeAt(r)===69||t.charCodeAt(r)===101))if(r++,(r<t.length&&t.charCodeAt(r)===43||t.charCodeAt(r)===45)&&r++,r<t.length&&Fa(t.charCodeAt(r))){for(r++;r<t.length&&Fa(t.charCodeAt(r));)r++;S=r}else f=3;return t.substring(x,S)}function m(){let x="",S=r;for(;;){if(r>=n){x+=t.substring(S,r),f=2;break}const E=t.charCodeAt(r);if(E===34){x+=t.substring(S,r),r++;break}if(E===92){if(x+=t.substring(S,r),r++,r>=n){f=2;break}switch(t.charCodeAt(r++)){case 34:x+='"';break;case 92:x+="\\";break;case 47:x+="/";break;case 98:x+="\b";break;case 102:x+="\f";break;case 110:x+=`
`;break;case 114:x+="\r";break;case 116:x+=" ";break;case 117:const w=d(4);w>=0?x+=String.fromCharCode(w):f=4;break;default:f=5}S=r;continue}if(E>=0&&E<=31)if(Pu(E)){x+=t.substring(S,r),f=2;break}else f=6;r++}return x}function g(){if(i="",f=0,s=r,l=a,c=u,r>=n)return s=n,o=17;let x=t.charCodeAt(r);if(_g(x)){do r++,i+=String.fromCharCode(x),x=t.charCodeAt(r);while(_g(x));return o=15}if(Pu(x))return r++,i+=String.fromCharCode(x),x===13&&t.charCodeAt(r)===10&&(r++,i+=`
`),a++,u=r,o=14;switch(x){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=m(),o=10;case 47:const S=r-1;if(t.charCodeAt(r+1)===47){for(r+=2;r<n&&!Pu(t.charCodeAt(r));)r++;return i=t.substring(S,r),o=12}if(t.charCodeAt(r+1)===42){r+=2;const E=n-1;let C=!1;for(;r<E;){const w=t.charCodeAt(r);if(w===42&&t.charCodeAt(r+1)===47){r+=2,C=!0;break}r++,Pu(w)&&(w===13&&t.charCodeAt(r)===10&&r++,a++,u=r)}return C||(r++,f=1),i=t.substring(S,r),o=13}return i+=String.fromCharCode(x),r++,o=16;case 45:if(i+=String.fromCharCode(x),r++,r===n||!Fa(t.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=p(),o=11;default:for(;r<n&&b(x);)r++,x=t.charCodeAt(r);if(s!==r){switch(i=t.substring(s,r),i){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return i+=String.fromCharCode(x),r++,o=16}}function b(x){if(_g(x)||Pu(x))return!1;switch(x){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function y(){let x;do x=g();while(x>=12&&x<=15);return x}return{setPosition:h,getPosition:()=>r,scan:e?y:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>l,getTokenStartCharacter:()=>s-c,getTokenError:()=>f}}function _g(t){return t===32||t===9}function Pu(t){return t===10||t===13}function Fa(t){return t>=48&&t<=57}var KS;(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(KS||(KS={}));new Array(20).fill(0).map((t,e)=>" ".repeat(e));const La=200;new Array(La).fill(0).map((t,e)=>`
`+" ".repeat(e)),new Array(La).fill(0).map((t,e)=>"\r"+" ".repeat(e)),new Array(La).fill(0).map((t,e)=>`\r
`+" ".repeat(e)),new Array(La).fill(0).map((t,e)=>`
`+" ".repeat(e)),new Array(La).fill(0).map((t,e)=>"\r"+" ".repeat(e)),new Array(La).fill(0).map((t,e)=>`\r
`+" ".repeat(e));var wp;(function(t){t.DEFAULT={allowTrailingComma:!1}})(wp||(wp={}));function e$(t,e=[],n=wp.DEFAULT){let r=null,i=[];const s=[];function o(l){Array.isArray(i)?i.push(l):r!==null&&(i[r]=l)}return t$(t,{onObjectBegin:()=>{const l={};o(l),s.push(i),i=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const l=[];o(l),s.push(i),i=l,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:o,onError:(l,u,c)=>{e.push({error:l,offset:u,length:c})}},n),i[0]}function t$(t,e,n=wp.DEFAULT){const r=QB(t,!1),i=[];let s=0;function o(R){return R?()=>s===0&&R(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(R){return R?F=>s===0&&R(F,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(R){return R?F=>s===0&&R(F,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function u(R){return R?()=>{s>0?s++:R(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}function c(R){return R?()=>{s>0&&s--,s===0&&R(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}const f=u(e.onObjectBegin),d=l(e.onObjectProperty),h=c(e.onObjectEnd),p=u(e.onArrayBegin),m=c(e.onArrayEnd),g=l(e.onLiteralValue),b=a(e.onSeparator),y=o(e.onComment),x=a(e.onError),S=n&&n.disallowComments,E=n&&n.allowTrailingComma;function C(){for(;;){const R=r.scan();switch(r.getTokenError()){case 4:w(14);break;case 5:w(15);break;case 3:w(13);break;case 1:S||w(11);break;case 2:w(12);break;case 6:w(16);break}switch(R){case 12:case 13:S?w(10):y();break;case 16:w(1);break;case 15:case 14:break;default:return R}}}function w(R,F=[],V=[]){if(x(R),F.length+V.length>0){let B=r.getToken();for(;B!==17;){if(F.indexOf(B)!==-1){C();break}else if(V.indexOf(B)!==-1)break;B=C()}}}function A(R){const F=r.getTokenValue();return R?g(F):(d(F),i.push(F)),C(),!0}function _(){switch(r.getToken()){case 11:const R=r.getTokenValue();let F=Number(R);isNaN(F)&&(w(2),F=0),g(F);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return C(),!0}function O(){return r.getToken()!==10?(w(3,[],[2,5]),!1):(A(!1),r.getToken()===6?(b(":"),C(),P()||w(4,[],[2,5])):w(5,[],[2,5]),i.pop(),!0)}function I(){f(),C();let R=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(R||w(4,[],[]),b(","),C(),r.getToken()===2&&E)break}else R&&w(6,[],[]);O()||w(4,[],[2,5]),R=!0}return h(),r.getToken()!==2?w(7,[2],[]):C(),!0}function N(){p(),C();let R=!0,F=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(F||w(4,[],[]),b(","),C(),r.getToken()===4&&E)break}else F&&w(6,[],[]);R?(i.push(0),R=!1):i[i.length-1]++,P()||w(4,[],[4,5]),F=!0}return m(),R||i.pop(),r.getToken()!==4?w(8,[4],[]):C(),!0}function P(){switch(r.getToken()){case 3:return N();case 1:return I();case 10:return A(!0);default:return _()}}return C(),r.getToken()===17?n.allowEmptyContent?!0:(w(4,[],[]),!1):P()?(r.getToken()!==17&&w(9,[],[]),!0):(w(4,[],[]),!1)}var XS;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(XS||(XS={}));var YS;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(YS||(YS={}));const n$=e$;var JS;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(JS||(JS={}));function r$(t){switch(t){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}const i$=Lb(t=>{const e=t.state.doc.toString();if(e.length===0)return[];const n=[];return n$(e,n),n.map(r=>({from:r.offset,to:r.offset+1,severity:"error",message:r$(r.error)}))}),Rk=1024;let s$=0;class Cg{constructor(e,n){this.from=e,this.to=n}}class Ve{constructor(e={}){this.id=s$++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=fr.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Ve.closedBy=new Ve({deserialize:t=>t.split(" ")});Ve.openedBy=new Ve({deserialize:t=>t.split(" ")});Ve.group=new Ve({deserialize:t=>t.split(" ")});Ve.isolate=new Ve({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Ve.contextHash=new Ve({perNode:!0});Ve.lookAhead=new Ve({perNode:!0});Ve.mounted=new Ve({perNode:!0});class _p{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Ve.mounted.id]}}const o$=Object.create(null);class fr{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):o$,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new fr(e.name||"",n,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Ve.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Ve.group),s=-1;s<(i?i.length:0);s++){let o=n[s<0?r.name:i[s]];if(o)return o}}}}fr.none=new fr("",Object.create(null),0,8);class Ov{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);o&&(i||(i=Object.assign({},r.props)),i[o[0].id]=o[1])}n.push(i?new fr(r.name,i,r.id,r.flags):r)}return new Ov(n)}}const Md=new WeakMap,ZS=new WeakMap;var hn;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(hn||(hn={}));class en{constructor(e,n,r,i,s){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,a]of s)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=_p.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new zb(this.topNode,e)}cursorAt(e,n=0,r=0){let i=Md.get(this)||this.topNode,s=new zb(i);return s.moveTo(e,n),Md.set(this,s._tree),s}get topNode(){return new Vr(this,0,0,null)}resolve(e,n=0){let r=Uc(Md.get(this)||this.topNode,e,n,!1);return Md.set(this,r),r}resolveInner(e,n=0){let r=Uc(ZS.get(this)||this.topNode,e,n,!0);return ZS.set(this,r),r}resolveStack(e,n=0){return u$(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,a=(o&hn.IncludeAnonymous)>0;for(let l=this.cursor(o|hn.IncludeAnonymous);;){let u=!1;if(l.from<=s&&l.to>=i&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Pv(fr.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new en(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new en(fr.none,n,r,i)))}static build(e){return c$(e)}}en.empty=new en(fr.none,[],[],0);class Tv{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Tv(this.buffer,this.index)}}class bo{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return fr.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,n,r,i,s){let{buffer:o}=this,a=-1;for(let l=e;l!=n&&!(Nk(s,i,o[l+1],o[l+2])&&(a=l,r>0));l=o[l+3]);return a}slice(e,n,r){let i=this.buffer,s=new Uint16Array(n-e),o=0;for(let a=e,l=0;a<n;){s[l++]=i[a++],s[l++]=i[a++]-r;let u=s[l++]=i[a++]-r;s[l++]=i[a++]-e,o=Math.max(o,u)}return new bo(s,o,this.set)}}function Nk(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Uc(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!r&&t instanceof Vr&&t.index<0?null:t.parent;if(!o)return t;t=o}let s=r?0:hn.IgnoreOverlays;if(r)for(let o=t,a=o.parent;a;o=a,a=o.parent)o instanceof Vr&&o.index<0&&((i=a.enter(e,n,s))===null||i===void 0?void 0:i.from)!=o.from&&(t=a);for(;;){let o=t.enter(e,n,s);if(!o)return t;t=o}}class Mk{cursor(e=0){return new zb(this,e)}getChild(e,n=null,r=null){let i=QS(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return QS(this,e,n,r)}resolve(e,n=0){return Uc(this,e,n,!1)}resolveInner(e,n=0){return Uc(this,e,n,!0)}matchContext(e){return $b(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Vr extends Mk{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,s=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,u=n>0?a.length:-1;e!=u;e+=n){let c=a[e],f=l[e]+o.from;if(Nk(i,r,f,f+c.length)){if(c instanceof bo){if(s&hn.ExcludeBuffers)continue;let d=c.findChild(0,c.buffer.length,n,r-f,i);if(d>-1)return new Xs(new a$(o,c,e,f),null,d)}else if(s&hn.IncludeAnonymous||!c.type.isAnonymous||Iv(c)){let d;if(!(s&hn.IgnoreMounts)&&(d=_p.get(c))&&!d.overlay)return new Vr(d.tree,f,e,o);let h=new Vr(c,f,e,o);return s&hn.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?c.children.length-1:0,n,r,i)}}}if(s&hn.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&hn.IgnoreOverlays)&&(i=_p.get(this._tree))&&i.overlay){let s=e-this.from;for(let{from:o,to:a}of i.overlay)if((n>0?o<=s:o<s)&&(n<0?a>=s:a>s))return new Vr(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function QS(t,e,n,r){let i=t.cursor(),s=[];if(!i.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=i.type.is(n),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function $b(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class a${constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Xs extends Mk{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return s<0?null:new Xs(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&hn.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Xs(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Xs(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Xs(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),n.push(0)}return new en(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Fk(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let o=t[s];(o.from>n.from||o.to<n.to)&&(n=o,e=s)}let r=n instanceof Vr&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new l$(i,n)}class l${constructor(e,n){this.heads=e,this.node=n}get next(){return Fk(this.heads)}}function u$(t,e,n){let r=t.resolveInner(e,n),i=null;for(let s=r instanceof Vr?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,n)),s=o}else{let o=_p.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new Vr(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(Uc(a,e,n,!1))}}return i?Fk(i):r}class zb{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Vr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Vr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&hn.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&hn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&hn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let s=n+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let a=r._tree.children[s];if(this.mode&hn.IncludeAnonymous||a instanceof bo||!a.type.isAnonymous||Iv(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;n=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)n=new Xs(this.buffer,n,this.stack[i]);return this.bufferNode=new Xs(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return $b(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return $b(this._tree,e,i);let o=r[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function Iv(t){return t.children.some(e=>e instanceof bo||!e.type.isAnonymous||Iv(e))}function c$(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=Rk,reused:s=[],minRepeatType:o=r.types.length}=t,a=Array.isArray(n)?new Tv(n,n.length):n,l=r.types,u=0,c=0;function f(E,C,w,A,_,O){let{id:I,start:N,end:P,size:R}=a,F=c,V=u;for(;R<0;)if(a.next(),R==-1){let se=s[I];w.push(se),A.push(N-E);return}else if(R==-3){u=I;return}else if(R==-4){c=I;return}else throw new RangeError(`Unrecognized record size: ${R}`);let B=l[I],G,H,ie=N-E;if(P-N<=i&&(H=g(a.pos-C,_))){let se=new Uint16Array(H.size-H.skip),$=a.pos-H.size,ee=se.length;for(;a.pos>$;)ee=b(H.start,se,ee);G=new bo(se,P-H.start,r),ie=H.start-E}else{let se=a.pos-R;a.next();let $=[],ee=[],pe=I>=o?I:-1,fe=0,me=P;for(;a.pos>se;)pe>=0&&a.id==pe&&a.size>=0?(a.end<=me-i&&(p($,ee,N,fe,a.end,me,pe,F,V),fe=$.length,me=a.end),a.next()):O>2500?d(N,se,$,ee):f(N,se,$,ee,pe,O+1);if(pe>=0&&fe>0&&fe<$.length&&p($,ee,N,fe,N,me,pe,F,V),$.reverse(),ee.reverse(),pe>-1&&fe>0){let Me=h(B,V);G=Pv(B,$,ee,0,$.length,0,P-N,Me,Me)}else G=m(B,$,ee,P-N,F-P,V)}w.push(G),A.push(ie)}function d(E,C,w,A){let _=[],O=0,I=-1;for(;a.pos>C;){let{id:N,start:P,end:R,size:F}=a;if(F>4)a.next();else{if(I>-1&&P<I)break;I<0&&(I=R-i),_.push(N,P,R),O++,a.next()}}if(O){let N=new Uint16Array(O*4),P=_[_.length-2];for(let R=_.length-3,F=0;R>=0;R-=3)N[F++]=_[R],N[F++]=_[R+1]-P,N[F++]=_[R+2]-P,N[F++]=F;w.push(new bo(N,_[2]-P,r)),A.push(P-E)}}function h(E,C){return(w,A,_)=>{let O=0,I=w.length-1,N,P;if(I>=0&&(N=w[I])instanceof en){if(!I&&N.type==E&&N.length==_)return N;(P=N.prop(Ve.lookAhead))&&(O=A[I]+N.length+P)}return m(E,w,A,_,O,C)}}function p(E,C,w,A,_,O,I,N,P){let R=[],F=[];for(;E.length>A;)R.push(E.pop()),F.push(C.pop()+w-_);E.push(m(r.types[I],R,F,O-_,N-O,P)),C.push(_-w)}function m(E,C,w,A,_,O,I){if(O){let N=[Ve.contextHash,O];I=I?[N].concat(I):[N]}if(_>25){let N=[Ve.lookAhead,_];I=I?[N].concat(I):[N]}return new en(E,C,w,A,I)}function g(E,C){let w=a.fork(),A=0,_=0,O=0,I=w.end-i,N={size:0,start:0,skip:0};e:for(let P=w.pos-E;w.pos>P;){let R=w.size;if(w.id==C&&R>=0){N.size=A,N.start=_,N.skip=O,O+=4,A+=4,w.next();continue}let F=w.pos-R;if(R<0||F<P||w.start<I)break;let V=w.id>=o?4:0,B=w.start;for(w.next();w.pos>F;){if(w.size<0)if(w.size==-3)V+=4;else break e;else w.id>=o&&(V+=4);w.next()}_=B,A+=R,O+=V}return(C<0||A==E)&&(N.size=A,N.start=_,N.skip=O),N.size>4?N:void 0}function b(E,C,w){let{id:A,start:_,end:O,size:I}=a;if(a.next(),I>=0&&A<o){let N=w;if(I>4){let P=a.pos-(I-4);for(;a.pos>P;)w=b(E,C,w)}C[--w]=N,C[--w]=O-E,C[--w]=_-E,C[--w]=A}else I==-3?u=A:I==-4&&(c=A);return w}let y=[],x=[];for(;a.pos>0;)f(t.start||0,t.bufferStart||0,y,x,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:y.length?x[0]+y[0].length:0;return new en(l[t.topID],y.reverse(),x.reverse(),S)}const eE=new WeakMap;function Rh(t,e){if(!t.isAnonymous||e instanceof bo||e.type!=t)return 1;let n=eE.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof en)){n=1;break}n+=Rh(t,r)}eE.set(e,n)}return n}function Pv(t,e,n,r,i,s,o,a,l){let u=0;for(let p=r;p<i;p++)u+=Rh(t,e[p]);let c=Math.ceil(u*1.5/8),f=[],d=[];function h(p,m,g,b,y){for(let x=g;x<b;){let S=x,E=m[x],C=Rh(t,p[x]);for(x++;x<b;x++){let w=Rh(t,p[x]);if(C+w>=c)break;C+=w}if(x==S+1){if(C>c){let w=p[S];h(w.children,w.positions,0,w.children.length,m[S]+y);continue}f.push(p[S])}else{let w=m[x-1]+p[x-1].length-E;f.push(Pv(t,p,m,S,x,E,w,null,l))}d.push(E+y-s)}}return h(e,n,r,i,0),(a||l)(f,d,o)}class ra{constructor(e,n,r,i,s=!1,o=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new ra(0,e.length,e,0,!1,r)];for(let s of n)s.to>e.length&&i.push(s);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,u=0;;a++){let c=a<n.length?n[a]:null,f=c?c.fromA:1e9;if(f-l>=r)for(;o&&o.from<f;){let d=o;if(l>=d.from||f<=d.to||u){let h=Math.max(d.from,l)-u,p=Math.min(d.to,f)-u;d=h>=p?null:new ra(h,p,d.tree,d.offset+u,a>0,!!c)}if(d&&i.push(d),o.to>f)break;o=s<e.length?e[s++]:null}if(!c)break;l=c.toA,u=c.toA-c.toB}return i}}let Lk=class{startParse(e,n,r){return typeof e=="string"&&(e=new f$(e)),r=r?r.length?r.map(i=>new Cg(i.from,i.to)):[new Cg(0,0)]:[new Cg(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let s=i.advance();if(s)return s}}};class f${constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new Ve({perNode:!0});var tE={};class Cp{constructor(e,n,r,i,s,o,a,l,u,c=0,f){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new Cp(e,[],n,r,r,0,[],0,i?new nE(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=s.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),u=l?this.stack[l-2]:this.p.ranges[0].from,c=this.reducePos-u;c>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=u,this.p.lastBigReductionSize=c));let f=l?this.stack[l-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<s.minRepeatTerm||e&131072){let h=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,u,h,d+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=s.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,u)}storeNode(e,n,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(n==r)return;if(o.buffer[a-2]>=n){o.buffer[a-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,n,r,i);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;(i>this.pos||n<=o.maxNode)&&(this.pos=i,o.stateFlag(s,1)||(this.reducePos=i)),this.pushState(s,r),this.shiftContext(n,r),n<=o.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new Cp(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new d$(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<n.length;s+=2)(o=n[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(n[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<n.length;s+=2){let o=n[s+1];i.some((a,l)=>l&1&&a==o)||i.push(n[s],o)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let s=n[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,s)=>{if(!n.includes(i))return n.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,u=this.stack.length-a*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return a<<19|65536|l}}else{let a=r(o,s+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new nE(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class nE{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class d${constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class Ap{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Ap(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Ap(this.stack,this.pos,this.index)}}function Fd(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let s=0;for(;;){let o=t.charCodeAt(r++),a=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}n?n[i++]=s:n=new e(s)}return n}class Nh{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const rE=new Nh;class h${constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=rE,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;n<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=rE,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class dl{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;p$(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}dl.prototype.contextual=dl.prototype.fallback=dl.prototype.extend=!1;dl.prototype.fallback=dl.prototype.extend=!1;function p$(t,e,n,r,i,s){let o=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;(a&t[o])!=0;){let u=t[o+1];for(let h=o+3;h<u;h+=2)if((t[h+1]&a)>0){let p=t[h];if(l.allows(p)&&(e.token.value==-1||e.token.value==p||m$(p,e.token.value,i,s))){e.acceptToken(p);break}}let c=e.next,f=0,d=t[o+2];if(e.next<0&&d>f&&t[u+d*3-3]==65535){o=t[u+d*3-1];continue e}for(;f<d;){let h=f+d>>1,p=u+h+(h<<1),m=t[p],g=t[p+1]||65536;if(c<m)d=h;else if(c>=g)f=h+1;else{o=t[p+2],e.advance();continue e}}break}}function iE(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function m$(t,e,n,r){let i=iE(n,r,e);return i<0||iE(n,r,t)<i}const pr=typeof process<"u"&&tE&&/\bparse\b/.test(tE.LOG);let Ag=null;function sE(t,e,n){let r=t.cursor(hn.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class g${constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?sE(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?sE(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[n]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof en){if(o==e){if(o<this.safeFrom)return null;let a=o+s.length;if(a<=this.safeTo){let l=s.prop(Ve.lookAhead);if(!l||a+l<this.fragment.to)return s}}this.index[n]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}}class b${constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Nh)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let u=0;u<s.length;u++){if((1<<u&o)==0)continue;let c=s[u],f=this.tokens[u];if(!(r&&!c.fallback)&&((c.contextual||f.start!=e.pos||f.mask!=o||f.context!=a)&&(this.updateCachedToken(f,c,e),f.mask=o,f.context=a),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let d=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!c.extend&&(r=f,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new Nh,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Nh,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let a=s.specializers[o](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:s}=e,{parser:o}=e.p,{data:a}=o;for(let l=0;l<2;l++)for(let u=o.stateSlot(s,l?2:1);;u+=3){if(a[u]==65535)if(a[u+1]==1)u=ss(a,u+2);else{i==0&&a[u+1]==2&&(i=this.putAction(ss(a,u+2),n,r,i));break}a[u]==n&&(i=this.putAction(ss(a,u+1),n,r,i))}return i}}class y${constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new h$(n,i),this.tokens=new b$(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[Cp.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new g$(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let a=e[o];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],s=[]),i.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!r.length){let o=i&&x$(i);if(o)return pr&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw pr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return pr&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((a,l)=>l.score-a.score);r.length>o;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let a=r[o];for(let l=o+1;l<r.length;l++){let u=r[l];if(a.sameState(u)||a.buffer.length>500&&u.buffer.length>500)if((a.score-u.score||a.buffer.length-u.buffer.length)>0)r.splice(l--,1);else{r.splice(o--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:s}=this,o=pr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!u||(f.prop(Ve.contextHash)||0)==c))return e.useNode(f,d),pr&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof en)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof en&&f.positions[0]==0)f=h;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),pr&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;u<l.length;){let c=l[u++],f=l[u++],d=l[u++],h=u==l.length||!r,p=h?e:e.split(),m=this.tokens.mainToken;if(p.apply(c,f,m?m.start:p.pos,d),pr&&console.log(o+this.stackID(p)+` (via ${(c&65536)==0?"shift":`reduce of ${s.getName(c&65535)}`} for ${s.getName(f)} @ ${i}${p==e?"":", split"})`),h)return!0;p.pos>i?n.push(p):r.push(p)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return oE(e,n),!0}}runRecovery(e,n,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let a=e[o],l=n[o<<1],u=n[(o<<1)+1],c=pr?this.stackID(a)+" -> ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),pr&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let f=a.split(),d=c;for(let h=0;f.forceReduce()&&h<10&&(pr&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));h++)pr&&(d=this.stackID(f)+" -> ");for(let h of a.recoverByInsert(l))pr&&console.log(c+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>a.pos?(u==a.pos&&(u++,l=0),a.recoverByDelete(l,u),pr&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),oE(a,r)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),en.build({buffer:Ap.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(Ag||(Ag=new WeakMap)).get(e);return n||Ag.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function oE(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class v${constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}class Dp extends Lk{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function s(a,l,u){i[a].push([l,l.deserialize(String(u))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=Ve[l]);for(let u=1;u<a.length;){let c=a[u++];if(c>=0)s(c,l,a[u++]);else{let f=a[u+-c];for(let d=-c;d>0;d--)s(a[u++],l,f);u++}}}this.nodeSet=new Ov(n.map((a,l)=>fr.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Rk;let o=Fd(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(aE),this.states=Fd(e.states,Uint32Array),this.data=Fd(e.stateData),this.goto=Fd(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new dl(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new y$(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let s=i[n+1];;){let o=i[s++],a=o&1,l=i[s++];if(a&&r)return l;for(let u=s+(o>>1);s<u;s++)if(i[s]==e)return l;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=ss(r,s+2)];else{if(r[s+1]==2)return ss(r,s+2);break}if(o==n||o==0)return ss(r,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=ss(this.data,s+2);else break;i=n(ss(this.data,s+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=ss(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((s,o)=>o&1&&s==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(Dp.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(a=>a.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return n.specializers[i]=aE(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<n.length;s++)if(!r[s])for(let o=this.dialects[n[s]],a;(a=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new v$(e,r,i)}static deserialize(e){return new Dp(e)}}function ss(t,e){return t[e]|t[e+1]<<16}function x$(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function aE(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}let S$=0;class Fr{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=S$++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof Fr&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new Fr(r,[],null,[]);if(i.set.push(i),n)for(let s of n.set)i.set.push(s);return i}static defineModifier(e){let n=new kp(e);return r=>r.modified.indexOf(n)>-1?r:kp.get(r.base||r,r.modified.concat(n).sort((i,s)=>i.id-s.id))}}let E$=0;class kp{constructor(e){this.name=e,this.instances=[],this.id=E$++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&w$(n,a.modified));if(r)return r;let i=[],s=new Fr(e.name,i,e,n);for(let a of n)a.instances.push(s);let o=_$(n);for(let a of e.set)if(!a.modified.length)for(let l of o)i.push(kp.get(a,l));return s}}function w$(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function _$(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function Bk(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let s=[],o=2,a=i;for(let f=0;;){if(a=="..."&&f>0&&f+3==i.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+i);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==i.length)break;let h=i[f++];if(f==i.length&&h=="!"){o=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);a=i.slice(f)}let l=s.length-1,u=s[l];if(!u)throw new RangeError("Invalid path: "+i);let c=new Op(r,o,l>0?s.slice(0,l):null);e[u]=c.sort(e[u])}}return $k.add(e)}const $k=new Ve;let Op=class{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};Op.empty=new Op([],2,null);function zk(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let o of s.tag)n[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let a of s)for(let l of a.set){let u=n[l.id];if(u){o=o?o+" "+u:u;break}}return o},scope:r}}function C$(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function A$(t,e,n,r=0,i=t.length){let s=new D$(r,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),r,i,"",s.highlighters),s.flush(i)}class D${constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,s){let{type:o,from:a,to:l}=e;if(a>=r||l<=n)return;o.isTop&&(s=this.highlighters.filter(h=>!h.scope||h.scope(o)));let u=i,c=k$(e)||Op.empty,f=C$(s,c.tags);if(f&&(u&&(u+=" "),u+=f,c.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(n,a),u),c.opaque)return;let d=e.tree&&e.tree.prop(Ve.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+a,1),p=this.highlighters.filter(g=>!g.scope||g.scope(d.tree.type)),m=e.firstChild();for(let g=0,b=a;;g++){let y=g<d.overlay.length?d.overlay[g]:null,x=y?y.from+a:l,S=Math.max(n,b),E=Math.min(r,x);if(S<E&&m)for(;e.from<E&&(this.highlightRange(e,S,E,i,s),this.startSpan(Math.min(E,e.to),u),!(e.to>=x||!e.nextSibling())););if(!y||x>r)break;b=y.to+a,b>n&&(this.highlightRange(h.cursor(),Math.max(n,y.from+a),Math.min(r,b),"",p),this.startSpan(Math.min(r,b),u))}m&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,s),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function k$(t){let e=t.type.prop($k);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const le=Fr.define,Ld=le(),Rs=le(),lE=le(Rs),uE=le(Rs),Ns=le(),Bd=le(Ns),Dg=le(Ns),Ei=le(),To=le(Ei),vi=le(),xi=le(),jb=le(),Ru=le(jb),$d=le(),oe={comment:Ld,lineComment:le(Ld),blockComment:le(Ld),docComment:le(Ld),name:Rs,variableName:le(Rs),typeName:lE,tagName:le(lE),propertyName:uE,attributeName:le(uE),className:le(Rs),labelName:le(Rs),namespace:le(Rs),macroName:le(Rs),literal:Ns,string:Bd,docString:le(Bd),character:le(Bd),attributeValue:le(Bd),number:Dg,integer:le(Dg),float:le(Dg),bool:le(Ns),regexp:le(Ns),escape:le(Ns),color:le(Ns),url:le(Ns),keyword:vi,self:le(vi),null:le(vi),atom:le(vi),unit:le(vi),modifier:le(vi),operatorKeyword:le(vi),controlKeyword:le(vi),definitionKeyword:le(vi),moduleKeyword:le(vi),operator:xi,derefOperator:le(xi),arithmeticOperator:le(xi),logicOperator:le(xi),bitwiseOperator:le(xi),compareOperator:le(xi),updateOperator:le(xi),definitionOperator:le(xi),typeOperator:le(xi),controlOperator:le(xi),punctuation:jb,separator:le(jb),bracket:Ru,angleBracket:le(Ru),squareBracket:le(Ru),paren:le(Ru),brace:le(Ru),content:Ei,heading:To,heading1:le(To),heading2:le(To),heading3:le(To),heading4:le(To),heading5:le(To),heading6:le(To),contentSeparator:le(Ei),list:le(Ei),quote:le(Ei),emphasis:le(Ei),strong:le(Ei),link:le(Ei),monospace:le(Ei),strikethrough:le(Ei),inserted:le(),deleted:le(),changed:le(),invalid:le(),meta:$d,documentMeta:le($d),annotation:le($d),processingInstruction:le($d),definition:Fr.defineModifier("definition"),constant:Fr.defineModifier("constant"),function:Fr.defineModifier("function"),standard:Fr.defineModifier("standard"),local:Fr.defineModifier("local"),special:Fr.defineModifier("special")};for(let t in oe){let e=oe[t];e instanceof Fr&&(e.name=t)}zk([{tag:oe.link,class:"tok-link"},{tag:oe.heading,class:"tok-heading"},{tag:oe.emphasis,class:"tok-emphasis"},{tag:oe.strong,class:"tok-strong"},{tag:oe.keyword,class:"tok-keyword"},{tag:oe.atom,class:"tok-atom"},{tag:oe.bool,class:"tok-bool"},{tag:oe.url,class:"tok-url"},{tag:oe.labelName,class:"tok-labelName"},{tag:oe.inserted,class:"tok-inserted"},{tag:oe.deleted,class:"tok-deleted"},{tag:oe.literal,class:"tok-literal"},{tag:oe.string,class:"tok-string"},{tag:oe.number,class:"tok-number"},{tag:[oe.regexp,oe.escape,oe.special(oe.string)],class:"tok-string2"},{tag:oe.variableName,class:"tok-variableName"},{tag:oe.local(oe.variableName),class:"tok-variableName tok-local"},{tag:oe.definition(oe.variableName),class:"tok-variableName tok-definition"},{tag:oe.special(oe.variableName),class:"tok-variableName2"},{tag:oe.definition(oe.propertyName),class:"tok-propertyName tok-definition"},{tag:oe.typeName,class:"tok-typeName"},{tag:oe.namespace,class:"tok-namespace"},{tag:oe.className,class:"tok-className"},{tag:oe.macroName,class:"tok-macroName"},{tag:oe.propertyName,class:"tok-propertyName"},{tag:oe.operator,class:"tok-operator"},{tag:oe.comment,class:"tok-comment"},{tag:oe.meta,class:"tok-meta"},{tag:oe.invalid,class:"tok-invalid"},{tag:oe.punctuation,class:"tok-punctuation"}]);const O$=Bk({String:oe.string,Number:oe.number,"True False":oe.bool,PropertyName:oe.propertyName,Null:oe.null,", :":oe.separator,"[ ]":oe.squareBracket,"{ }":oe.brace}),T$=Dp.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[O$],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});var kg;const tl=new Ve;function I$(t){return he.define({combine:t?e=>e.concat(t):void 0})}const P$=new Ve;class ai{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Ue.prototype.hasOwnProperty("tree")||Object.defineProperty(Ue.prototype,"tree",{get(){return tn(this)}}),this.parser=n,this.extension=[yo.of(this),Ue.languageData.of((s,o,a)=>{let l=cE(s,o,a),u=l.type.prop(tl);if(!u)return[];let c=s.facet(u),f=l.type.prop(P$);if(f){let d=l.resolve(o-l.from,a);for(let h of f)if(h.test(d,s)){let p=s.facet(h.facet);return h.type=="replace"?p:p.concat(c)}}return c})].concat(r)}isActiveAt(e,n,r=-1){return cE(e,n,r).type.prop(tl)==this.data}findRegions(e){let n=e.facet(yo);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(tl)==this.data){r.push({from:o,to:o+s.length});return}let a=s.prop(Ve.mounted);if(a){if(a.tree.prop(tl)==this.data){if(a.overlay)for(let l of a.overlay)r.push({from:l.from+o,to:l.to+o});else r.push({from:o,to:o+s.length});return}else if(a.overlay){let l=r.length;if(i(a.tree,a.overlay[0].from+o),r.length>l)return}}for(let l=0;l<s.children.length;l++){let u=s.children[l];u instanceof en&&i(u,s.positions[l]+o)}};return i(tn(e),0),r}get allowsNesting(){return!0}}ai.setState=De.define();function cE(t,e,n){let r=t.facet(yo),i=tn(t).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,n,hn.ExcludeBuffers))s.type.isTop&&(i=s);return i}class Tp extends ai{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=I$(e.languageData);return new Tp(n,e.parser.configure({props:[tl.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new Tp(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function tn(t){let e=t.field(ai.state,!1);return e?e.tree:en.empty}class R${constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let Nu=null;class Ip{constructor(e,n,r=[],i,s,o,a,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Ip(e,n,[],en.empty,0,r,[],null)}startParse(){return this.parser.startParse(new R$(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=en.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(ra.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(ra.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Nu;Nu=this;try{return e()}finally{Nu=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=fE(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,f,d)=>l.push({fromA:u,toA:c,fromB:f,toB:d})),r=ra.applyChanges(r,l),i=en.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),f=e.mapPos(u.to,-1);c<f&&a.push({from:c,to:f})}}}return new Ip(this.parser,n,r,i,s,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=fE(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Lk{createParse(n,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let l=Nu;if(l){for(let u of i)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new en(fr.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Nu}}function fE(t,e,n){return ra.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Rl{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Rl(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Ip.create(e.facet(yo).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Rl(r)}}ai.state=Wt.define({create:Rl.init,update(t,e){for(let n of e.effects)if(n.is(ai.setState))return n.value;return e.startState.facet(yo)!=e.state.facet(yo)?Rl.init(e.state):t.apply(e)}});let jk=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(jk=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Og=typeof navigator<"u"&&(!((kg=navigator.scheduling)===null||kg===void 0)&&kg.isInputPending)?()=>navigator.scheduling.isInputPending():null,N$=$t.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(ai.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(ai.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=jk(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(ai.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!Og?Math.max(25,e.timeRemaining()-5):1e9),a=s.context.treeLen<i&&r.doc.length>i+1e3,l=s.context.work(()=>Og&&Og()||Date.now()>o,i+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:ai.setState.of(new Rl(s.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>qn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),yo=he.define({combine(t){return t.length?t[0]:null},enables:t=>[ai.state,N$,ce.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class M${constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const F$=he.define(),$f=he.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Pp(t){let e=t.facet($f);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Hc(t,e){let n="",r=t.tabSize,i=t.facet($f)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let s=0;s<e;s++)n+=i;return n}function Rv(t,e){t instanceof Ue&&(t=new Q0(t));for(let r of t.state.facet(F$)){let i=r(t,e);if(i!==void 0)return i}let n=tn(t.state);return n.length>=e?L$(t,n,e):null}class Q0{constructor(e,n={}){this.state=e,this.options=n,this.unit=Pp(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,n=e.length){return ru(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Vk=new Ve;function L$(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let s=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return Uk(r,t,n)}function Uk(t,e,n){for(let r=t;r;r=r.next){let i=$$(r.node);if(i)return i(Nv.create(e,n,r))}return 0}function B$(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function $$(t){let e=t.type.prop(Vk);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Ve.closedBy))){let i=t.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>U$(o,!0,1,void 0,s&&!B$(o)?i.from:void 0)}return t.parent==null?z$:null}function z$(){return 0}class Nv extends Q0{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new Nv(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(j$(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return Uk(this.context.next,this.base,this.pos)}}function j$(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function V$(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let u=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+u}}a=l.to}}function U$(t,e,n,r,i){let s=t.textAfter,o=s.match(/^\s*/)[0].length,a=r&&s.slice(o,o+r.length)==r||i==t.pos+o,l=V$(t);return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}function dE({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const H$=200;function q$(){return Ue.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+H$)return t;let s=n.sliceString(i.from,r);if(!e.some(u=>u.test(s)))return t;let{state:o}=t,a=-1,l=[];for(let{head:u}of o.selection.ranges){let c=o.doc.lineAt(u);if(c.from==a)continue;a=c.from;let f=Rv(o,c.from);if(f==null)continue;let d=/^\s*/.exec(c.text)[0],h=Hc(o,f);d!=h&&l.push({from:c.from,to:c.from+d.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const G$=he.define(),Hk=new Ve;function W$(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function K$(t,e,n){let r=tn(t);if(r.length<n)return null;let i=r.resolveStack(n,1),s=null;for(let o=i;o;o=o.next){let a=o.node;if(a.to<=n||a.from>n)continue;if(s&&a.from<e)break;let l=a.type.prop(Hk);if(l&&(a.to<r.length-50||r.length==t.doc.length||!X$(a))){let u=l(a,t);u&&u.from<=n&&u.from>=e&&u.to>n&&(s=u)}}return s}function X$(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Rp(t,e,n){for(let r of t.facet(G$)){let i=r(t,e,n);if(i)return i}return K$(t,e,n)}function qk(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const em=De.define({map:qk}),zf=De.define({map:qk});function Gk(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const pa=Wt.define({create(){return ve.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=hE(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(em)&&!Y$(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(Xk),i=r?ve.replace({widget:new r7(r(e.state,n.value))}):pE;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(zf)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=hE(t,e.selection.main.head)),t},provide:t=>ce.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(pE.range(r,i))}return ve.set(e,!0)}});function hE(t,e,n=e){let r=!1;return t.between(e,n,(i,s)=>{i<n&&s>e&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,s)=>i>=n||s<=e}):t}function Np(t,e,n){var r;let i=null;return(r=t.field(pa,!1))===null||r===void 0||r.between(e,n,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function Y$(t,e,n){let r=!1;return t.between(e,e,(i,s)=>{i==e&&s==n&&(r=!0)}),r}function Wk(t,e){return t.field(pa,!1)?e:e.concat(De.appendConfig.of(Yk()))}const J$=t=>{for(let e of Gk(t)){let n=Rp(t.state,e.from,e.to);if(n)return t.dispatch({effects:Wk(t.state,[em.of(n),Kk(t,n)])}),!0}return!1},Z$=t=>{if(!t.state.field(pa,!1))return!1;let e=[];for(let n of Gk(t)){let r=Np(t.state,n.from,n.to);r&&e.push(zf.of(r),Kk(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function Kk(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return ce.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const Q$=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),s=Rp(e,i.from,i.to);s&&n.push(em.of(s)),r=(s?t.lineBlockAt(s.to):i).to+1}return n.length&&t.dispatch({effects:Wk(t.state,n)}),!!n.length},e7=t=>{let e=t.state.field(pa,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(zf.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},t7=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:J$},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Z$},{key:"Ctrl-Alt-[",run:Q$},{key:"Ctrl-Alt-]",run:e7}],n7={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Xk=he.define({combine(t){return fi(t,n7)}});function Yk(t){return[pa,o7]}function Jk(t,e){let{state:n}=t,r=n.facet(Xk),i=o=>{let a=t.lineBlockAt(t.posAtDOM(o.target)),l=Np(t.state,a.from,a.to);l&&t.dispatch({effects:zf.of(l)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const pE=ve.replace({widget:new class extends Yi{toDOM(t){return Jk(t,null)}}});class r7 extends Yi{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Jk(e,this.value)}}const i7={openText:"⌄",closedText:"",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Tg extends Ui{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function s7(t={}){let e={...i7,...t},n=new Tg(e,!0),r=new Tg(e,!1),i=$t.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(yo)!=o.state.facet(yo)||o.startState.field(pa,!1)!=o.state.field(pa,!1)||tn(o.startState)!=tn(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new _s;for(let l of o.viewportLineBlocks){let u=Np(o.state,l.from,l.to)?r:Rp(o.state,l.from,l.to)?n:null;u&&a.add(l.from,l.from,u)}return a.finish()}}),{domEventHandlers:s}=e;return[i,xk({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(i))===null||a===void 0?void 0:a.markers)||Xe.empty},initialSpacer(){return new Tg(e,!1)},domEventHandlers:{...s,click:(o,a,l)=>{if(s.click&&s.click(o,a,l))return!0;let u=Np(o.state,a.from,a.to);if(u)return o.dispatch({effects:zf.of(u)}),!0;let c=Rp(o.state,a.from,a.to);return c?(o.dispatch({effects:em.of(c)}),!0):!1}}}),Yk()]}const o7=ce.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class tm{constructor(e,n){this.specs=e;let r;function i(a){let l=po.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const s=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,o=n.scope;this.scope=o instanceof ai?a=>a.prop(tl)==o.data:o?a=>a==o:void 0,this.style=zk(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=r?new po(r):null,this.themeType=n.themeType}static define(e,n){return new tm(e,n||{})}}const Vb=he.define(),Zk=he.define({combine(t){return t.length?[t[0]]:null}});function Ig(t){let e=t.facet(Vb);return e.length?e:t.facet(Zk)}function a7(t,e){let n=[u7],r;return t instanceof tm&&(t.module&&n.push(ce.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(Zk.of(t)):r?n.push(Vb.computeN([ce.darkTheme],i=>i.facet(ce.darkTheme)==(r=="dark")?[t]:[])):n.push(Vb.of(t)),n}class l7{constructor(e){this.markCache=Object.create(null),this.tree=tn(e.state),this.decorations=this.buildDeco(e,Ig(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=tn(e.state),r=Ig(e.state),i=r!=Ig(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!i&&n.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return ve.none;let r=new _s;for(let{from:i,to:s}of e.visibleRanges)A$(this.tree,n,(o,a,l)=>{r.add(o,a,this.markCache[l]||(this.markCache[l]=ve.mark({class:l})))},i,s);return r.finish()}}const u7=Ao.high($t.fromClass(l7,{decorations:t=>t.decorations})),c7=tm.define([{tag:oe.meta,color:"#404740"},{tag:oe.link,textDecoration:"underline"},{tag:oe.heading,textDecoration:"underline",fontWeight:"bold"},{tag:oe.emphasis,fontStyle:"italic"},{tag:oe.strong,fontWeight:"bold"},{tag:oe.strikethrough,textDecoration:"line-through"},{tag:oe.keyword,color:"#708"},{tag:[oe.atom,oe.bool,oe.url,oe.contentSeparator,oe.labelName],color:"#219"},{tag:[oe.literal,oe.inserted],color:"#164"},{tag:[oe.string,oe.deleted],color:"#a11"},{tag:[oe.regexp,oe.escape,oe.special(oe.string)],color:"#e40"},{tag:oe.definition(oe.variableName),color:"#00f"},{tag:oe.local(oe.variableName),color:"#30a"},{tag:[oe.typeName,oe.namespace],color:"#085"},{tag:oe.className,color:"#167"},{tag:[oe.special(oe.variableName),oe.macroName],color:"#256"},{tag:oe.definition(oe.propertyName),color:"#00c"},{tag:oe.comment,color:"#940"},{tag:oe.invalid,color:"#f00"}]),f7=ce.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Qk=1e4,e3="()[]{}",t3=he.define({combine(t){return fi(t,{afterCursor:!0,brackets:e3,maxScanDistance:Qk,renderMatch:p7})}}),d7=ve.mark({class:"cm-matchingBracket"}),h7=ve.mark({class:"cm-nonmatchingBracket"});function p7(t){let e=[],n=t.matched?d7:h7;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const m7=Wt.define({create(){return ve.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(t3);for(let i of e.state.selection.ranges){if(!i.empty)continue;let s=Ri(e.state,i.head,-1,r)||i.head>0&&Ri(e.state,i.head-1,1,r)||r.afterCursor&&(Ri(e.state,i.head,1,r)||i.head<e.state.doc.length&&Ri(e.state,i.head+1,-1,r));s&&(n=n.concat(r.renderMatch(s,e.state)))}return ve.set(n,!0)},provide:t=>ce.decorations.from(t)}),g7=[m7,f7];function b7(t={}){return[t3.of(t),g7]}const y7=new Ve;function Ub(t,e,n){let r=t.prop(e<0?Ve.openedBy:Ve.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function Hb(t){let e=t.type.prop(y7);return e?e(t.node):t}function Ri(t,e,n,r={}){let i=r.maxScanDistance||Qk,s=r.brackets||e3,o=tn(t),a=o.resolveInner(e,n);for(let l=a;l;l=l.parent){let u=Ub(l.type,n,s);if(u&&l.from<l.to){let c=Hb(l);if(c&&(n>0?e>=c.from&&e<c.to:e>c.from&&e<=c.to))return v7(t,e,n,l,c,u,s)}}return x7(t,e,n,o,a.type,i,s)}function v7(t,e,n,r,i,s,o){let a=r.parent,l={from:i.from,to:i.to},u=0,c=a==null?void 0:a.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do if(n<0?c.to<=r.from:c.from>=r.to){if(u==0&&s.indexOf(c.type.name)>-1&&c.from<c.to){let f=Hb(c);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(Ub(c.type,n,o))u++;else if(Ub(c.type,-n,o)){if(u==0){let f=Hb(c);return{start:l,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}u--}}while(n<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}function x7(t,e,n,r,i,s,o){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=n>0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let d=0;!c.next().done&&d<=s;){let h=c.value;n<0&&(d+=h.length);let p=e+d*n;for(let m=n>0?0:h.length-1,g=n>0?h.length:-1;m!=g;m+=n){let b=o.indexOf(h[m]);if(!(b<0||r.resolveInner(p+m,1).type!=i))if(b%2==0==n>0)f++;else{if(f==1)return{start:u,end:{from:p+m,to:p+m+1},matched:b>>1==l>>1};f--}}n>0&&(d+=h.length)}return c.done?{start:u,matched:!1}:null}const S7=Object.create(null),mE=[fr.none],gE=[],bE=Object.create(null),E7=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])E7[t]=w7(S7,e);function Pg(t,e){gE.indexOf(t)>-1||(gE.push(t),console.warn(e))}function w7(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let u of a.split(".")){let c=t[u]||oe[u];c?typeof c=="function"?l.length?l=l.map(c):Pg(u,`Modifier ${u} used at start of tag`):l.length?Pg(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:Pg(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(a=>a.id),s=bE[i];if(s)return s.id;let o=bE[i]=fr.define({id:mE.length,name:r,props:[Bk({[r]:n})]});return mE.push(o),o.id}Et.RTL,Et.LTR;const _7=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const n=C7(e,t.state.doc);return[{from:n,message:e.message,severity:"error",to:n}]}return[]};function C7(t,e){let n;return(n=t.message.match(/at position (\d+)/))?Math.min(+n[1],e.length):(n=t.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+n[1]).from+ +n[2]-1,e.length):0}const n3=Tp.define({name:"json",parser:T$.configure({props:[Vk.add({Object:dE({except:/^\s*\}/}),Array:dE({except:/^\s*\]/})}),Hk.add({"Object Array":W$})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function r3(){return new M$(n3)}class i3{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=tn(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),s=i.search(s3(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function yE(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function A7(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let s=1;s<i.length;s++)n[i[s]]=!0}let r=yE(e)+yE(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function D7(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:A7(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:n}:null}}class vE{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function ia(t){return t.selection.main.from}function s3(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?t:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const Mv=As.define();function k7(t,e,n,r){let{main:i}=t.selection,s=n-i.from,o=r-i.from;return{...t.changeByRange(a=>{if(a!=i&&n!=r&&t.sliceDoc(a.from+s,a.from+o)!=t.sliceDoc(n,r))return{range:a};let l=t.toText(e);return{changes:{from:a.from+s,to:r==i.from?a.to:a.from+o,insert:l},range:Y.cursor(a.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const xE=new WeakMap;function O7(t){if(!Array.isArray(t))return t;let e=xE.get(t);return e||xE.set(t,e=D7(t)),e}const Mp=De.define(),qc=De.define();class T7{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=ir(e,n),i=Di(r);this.chars.push(r);let s=e.slice(n,n+i),o=s.toUpperCase();this.folded.push(ir(o==s?s.toLowerCase():o,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:s,byWord:o}=this;if(n.length==1){let y=ir(e,0),x=Di(y),S=x==e.length?0:-100;if(y!=n[0])if(y==r[0])S+=-200;else return null;return this.ret(S,[0,x])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,u=0;if(a<0){for(let y=0,x=Math.min(e.length,200);y<x&&u<l;){let S=ir(e,y);(S==n[u]||S==r[u])&&(i[u++]=y),y+=Di(S)}if(u<l)return null}let c=0,f=0,d=!1,h=0,p=-1,m=-1,g=/[a-z]/.test(e),b=!0;for(let y=0,x=Math.min(e.length,200),S=0;y<x&&f<l;){let E=ir(e,y);a<0&&(c<l&&E==n[c]&&(s[c++]=y),h<l&&(E==n[h]||E==r[h]?(h==0&&(p=y),m=y+1,h++):h=0));let C,w=E<255?E>=48&&E<=57||E>=97&&E<=122?2:E>=65&&E<=90?1:0:(C=hv(E))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!y||w==1&&g||S==0&&w!=0)&&(n[f]==E||r[f]==E&&(d=!0)?o[f++]=y:o.length&&(b=!1)),S=w,y+=Di(E)}return f==l&&o[0]==0&&b?this.result(-100+(d?-200:0),o,e):h==l&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):h==l?this.ret(-900-e.length,[p,m]):f==l?this.result(-100+(d?-200:0)+-700+(b?0:-1100),o,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],s=0;for(let o of n){let a=o+(this.astral?Di(ir(r,o)):1);s&&i[s-1]==o?i[s-1]=a:(i[s++]=o,i[s++]=a)}return this.ret(e-r.length,i)}}class I7{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const pn=he.define({combine(t){return fi(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:P7,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>SE(e(r),n(r)),optionClass:(e,n)=>r=>SE(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function SE(t,e){return t?e?t+" "+e:t:e}function P7(t,e,n,r,i,s){let o=t.textDirection==Et.RTL,a=o,l=!1,u="top",c,f,d=e.left-i.left,h=i.right-e.right,p=r.right-r.left,m=r.bottom-r.top;if(a&&d<Math.min(p,h)?a=!1:!a&&h<Math.min(p,d)&&(a=!0),p<=(a?d:h))c=Math.max(i.top,Math.min(n.top,i.bottom-m))-e.top,f=Math.min(400,a?d:h);else{l=!0,f=Math.min(400,(o?e.right:i.right-e.left)-30);let y=i.bottom-e.bottom;y>=m||y>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let g=(e.bottom-e.top)/s.offsetHeight,b=(e.right-e.left)/s.offsetWidth;return{style:`${u}: ${c/g}px; max-width: ${f/b}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}function R7(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let u=0;u<s.length;){let c=s[u++],f=s[u++];c>l&&o.appendChild(document.createTextNode(a.slice(l,c)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(c,f))),d.className="cm-completionMatchedText",l=f}return l<a.length&&o.appendChild(document.createTextNode(a.slice(l))),o},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function Rg(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class N7{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:s,selected:o}=i.open,a=e.state.facet(pn);this.optionContent=R7(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Rg(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,f;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(f=/-(\d+)$/.exec(c.id))&&+f[1]<u.length){this.applyCompletion(e,u[+f[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(pn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:qc.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:s,selected:o,disabled:a}=r.open;(!i.open||i.open.options!=s)&&(this.range=Rg(s.length,o,e.state.facet(pn).maxRenderedOptions),this.showOptions(s,r.id)),this.updateSel(),a!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=Rg(n.options.length,n.selected,this.view.state.facet(pn).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let s=typeof i=="string"?document.createTextNode(i):i(r);if(!s)return;"then"in s?s.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,r)}).catch(o=>qn(this.view.state,o,"completion info")):this.addInfoPane(s,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;r.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&F7(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return i.top>Math.min(s.bottom,n.bottom)-10||i.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(pn).positionInfo(this.view,n,i,r,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",o=>{o.target==i&&o.preventDefault()});let s=null;for(let o=r.from;o<r.to;o++){let{completion:a,match:l}=e[o],{section:u}=a;if(u){let d=typeof u=="string"?u:u.name;if(d!=s&&(o>r.from||r.from==0))if(s=d,typeof u!="string"&&u.header)i.appendChild(u.header(u));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=d}}const c=i.appendChild(document.createElement("li"));c.id=n+"-"+o,c.setAttribute("role","option");let f=this.optionClass(a);f&&(c.className=f);for(let d of this.optionContent){let h=d(a,this.view.state,this.view,l);h&&c.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function M7(t,e){return n=>new N7(n,t,e)}function F7(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function EE(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function L7(t,e){let n=[],r=null,i=null,s=c=>{n.push(c);let{section:f}=c.completion;if(f){r||(r=[]);let d=typeof f=="string"?f:f.name;r.some(h=>h.name==d)||r.push(typeof f=="string"?{name:d}:f)}},o=e.facet(pn);for(let c of t)if(c.hasResult()){let f=c.result.getMatch;if(c.result.filter===!1)for(let d of c.result.options)s(new vE(d,c.source,f?f(d):[],1e9-n.length));else{let d=e.sliceDoc(c.from,c.to),h,p=o.filterStrict?new I7(d):new T7(d);for(let m of c.result.options)if(h=p.match(m.label)){let g=m.displayLabel?f?f(m,h.matched):[]:h.matched,b=h.score+(m.boost||0);if(s(new vE(m,c.source,g,b)),typeof m.section=="object"&&m.section.rank==="dynamic"){let{name:y}=m.section;i||(i=Object.create(null)),i[y]=Math.max(b,i[y]||-1e9)}}}}if(r){let c=Object.create(null),f=0,d=(h,p)=>(h.rank==="dynamic"&&p.rank==="dynamic"?i[p.name]-i[h.name]:0)||(typeof h.rank=="number"?h.rank:1e9)-(typeof p.rank=="number"?p.rank:1e9)||(h.name<p.name?-1:1);for(let h of r.sort(d))f-=1e5,c[h.name]=f;for(let h of n){let{section:p}=h.completion;p&&(h.score+=c[typeof p=="string"?p:p.name])}}let a=[],l=null,u=o.compareCompletions;for(let c of n.sort((f,d)=>d.score-f.score||u(f.completion,d.completion))){let f=c.completion;!l||l.label!=f.label||l.detail!=f.detail||l.type!=null&&f.type!=null&&l.type!=f.type||l.apply!=f.apply||l.boost!=f.boost?a.push(c):EE(c.completion)>EE(l)&&(a[a.length-1]=c),l=c.completion}return a}class nl{constructor(e,n,r,i,s,o){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new nl(this.options,wE(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,s,o){if(i&&!o&&e.some(u=>u.isPending))return i.setDisabled();let a=L7(e,n);if(!a.length)return i&&e.some(u=>u.isPending)?i.setDisabled():null;let l=n.facet(pn).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let u=i.options[i.selected].completion;for(let c=0;c<a.length;c++)if(a[c].completion==u){l=c;break}}return new nl(a,wE(r,l),{pos:e.reduce((u,c)=>c.hasResult()?Math.min(u,c.from):u,1e8),create:U7,above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new nl(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new nl(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Fp{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new Fp(j7,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(pn),s=(r.override||n.languageDataAt("autocomplete",ia(n)).map(O7)).map(l=>(this.active.find(c=>c.source==l)||new $r(l,this.active.some(c=>c.state!=0)?1:0)).update(e,r));s.length==this.active.length&&s.every((l,u)=>l==this.active[u])&&(s=this.active);let o=this.open,a=e.effects.some(l=>l.is(Fv));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!B7(s,this.active)||a?o=nl.build(s,n,this.id,o,r,a):o&&o.disabled&&!s.some(l=>l.isPending)&&(o=null),!o&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new $r(l.source,0):l));for(let l of e.effects)l.is(a3)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new Fp(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?$7:z7}}function B7(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,s=r==e.length;if(i||s)return i==s;if(t[n++].result!=e[r++].result)return!1}}const $7={"aria-autocomplete":"list"},z7={};function wE(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const j7=[];function o3(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(Mv);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class $r{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=o3(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new $r(i.source,0)),r&4&&i.state==0&&(i=new $r(this.source,1)),i=i.updateFor(e,r);for(let s of e.effects)if(s.is(Mp))i=new $r(i.source,1,s.value);else if(s.is(qc))i=new $r(i.source,0);else if(s.is(Fv))for(let o of s.value)o.source==i.source&&(i=o);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(ia(e.state))}}class hl extends $r{constructor(e,n,r,i,s,o){super(e,3,n),this.limit=r,this.result=i,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=ia(e.state);if(a>o||!i||n&2&&(ia(e.startState)==this.from||a<this.limit))return new $r(this.source,n&4?1:0);let l=e.changes.mapPos(this.limit);return V7(i.validFor,e.state,s,o)?new hl(this.source,this.explicit,l,i,s,o):i.update&&(i=i.update(i,s,o,new i3(e.state,a,!1)))?new hl(this.source,this.explicit,l,i,i.from,(r=i.to)!==null&&r!==void 0?r:ia(e.state)):new $r(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new hl(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new $r(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function V7(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):s3(t,!0).test(i)}const Fv=De.define({map(t,e){return t.map(n=>n.map(e))}}),a3=De.define(),sr=Wt.define({create(){return Fp.start()},update(t,e){return t.update(e)},provide:t=>[X0.from(t,e=>e.tooltip),ce.contentAttributes.from(t,e=>e.attrs)]});function Lv(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(sr).active.find(i=>i.source==e.source);return r instanceof hl?(typeof n=="string"?t.dispatch({...k7(t.state,n,r.from,r.to),annotations:Mv.of(e.completion)}):n(t,e.completion,r.from,r.to),!0):!1}const U7=M7(sr,Lv);function zd(t,e="option"){return n=>{let r=n.state.field(sr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(pn).interactionDelay)return!1;let i=1,s;e=="page"&&(s=yk(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),n.dispatch({effects:a3.of(a)}),!0}}const H7=t=>{let e=t.state.field(sr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(pn).interactionDelay?!1:Lv(t,e.open.options[e.open.selected])},Ng=t=>t.state.field(sr,!1)?(t.dispatch({effects:Mp.of(!0)}),!0):!1,q7=t=>{let e=t.state.field(sr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:qc.of(null)}),!0)};class G7{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const W7=50,K7=1e3,X7=$t.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(sr).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(sr),n=t.state.facet(pn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(sr)==e)return;let r=t.transactions.some(s=>{let o=o3(s,n);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(r||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>W7&&Date.now()-o.time>K7){for(let a of o.context.abortListeners)try{a()}catch(l){qn(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(Mp)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(sr);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(pn).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=ia(e),r=new i3(e,n,t.explicit,this.view),i=new G7(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:qc.of(null)}),qn(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(pn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(pn),r=this.view.state.field(sr);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let a=ia(s.updates.length?s.updates[0].startState:this.view.state),l=Math.min(a,s.done.from+(s.active.explicit?0:1)),u=new hl(s.active.source,s.active.explicit,l,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:a);for(let c of s.updates)u=u.update(c,n);if(u.hasResult()){e.push(u);continue}}let o=r.active.find(a=>a.source==s.active.source);if(o&&o.isPending)if(s.done==null){let a=new $r(s.active.source,0);for(let l of s.updates)a=a.update(l,n);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:Fv.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(sr,!1);if(e&&e.tooltip&&this.view.state.facet(pn).closeOnBlur){let n=e.open&&yk(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:qc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Mp.of(!1)}),20),this.composing=0}}}),Y7=typeof navigator=="object"&&/Win/.test(navigator.platform),J7=Ao.highest(ce.domEventHandlers({keydown(t,e){let n=e.state.field(sr,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Y7&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(o=>o.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&Lv(e,r),!1}})),l3=ce.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"''"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Z7{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class Bv{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,En.TrackDel),r=e.mapPos(this.to,1,En.TrackDel);return n==null||r==null?null:new Bv(this.field,n,r)}}class $v{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(r.length){let u=o,c=/^\t*/.exec(l)[0].length;for(let f=0;f<c;f++)u+=e.facet($f);i.push(n+u.length-c),l=u+l.slice(c)}r.push(l),n+=l.length+1}let a=this.fieldPositions.map(l=>new Bv(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:a}}static parse(e){let n=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let a=s[1]?+s[1]:null,l=s[2]||s[3]||"",u=-1,c=l.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<n.length;f++)(a!=null?n[f].seq==a:c&&n[f].name==c)&&(u=f);if(u<0){let f=0;for(;f<n.length&&(a==null||n[f].seq!=null&&n[f].seq<a);)f++;n.splice(f,0,{seq:a,name:c}),u=f;for(let d of i)d.field>=u&&d.field++}for(let f of i)if(f.line==r.length&&f.from>s.index){let d=s[2]?3+(s[1]||"").length:2;f.from-=d,f.to-=d}i.push(new Z7(u,r.length,s.index,s.index+c.length)),o=o.slice(0,s.index)+l+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(a,l,u)=>{for(let c of i)c.line==r.length&&c.from>u&&(c.from--,c.to--);return l}),r.push(o)}return new $v(r,i)}}let Q7=ve.widget({widget:new class extends Yi{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),ez=ve.mark({class:"cm-snippetField"});class iu{constructor(e,n){this.ranges=e,this.active=n,this.deco=ve.set(e.map(r=>(r.from==r.to?Q7:ez).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new iu(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const jf=De.define({map(t,e){return t&&t.map(e)}}),tz=De.define(),Gc=Wt.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(jf))return n.value;if(n.is(tz)&&t)return new iu(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ce.decorations.from(t,e=>e?e.deco:ve.none)});function zv(t,e){return Y.create(t.filter(n=>n.field==e).map(n=>Y.range(n.from,n.to)))}function nz(t){let e=$v.parse(t);return(n,r,i,s)=>{let{text:o,ranges:a}=e.instantiate(n.state,i),{main:l}=n.state.selection,u={changes:{from:i,to:s==l.from?l.to:s,insert:Ze.of(o)},scrollIntoView:!0,annotations:r?[Mv.of(r),Qt.userEvent.of("input.complete")]:void 0};if(a.length&&(u.selection=zv(a,0)),a.some(c=>c.field>0)){let c=new iu(a,0),f=u.effects=[jf.of(c)];n.state.field(Gc,!1)===void 0&&f.push(De.appendConfig.of([Gc,az,uz,l3]))}n.dispatch(n.state.update(u))}}function u3(t){return({state:e,dispatch:n})=>{let r=e.field(Gc,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,s=t>0&&!r.ranges.some(o=>o.field==i+t);return n(e.update({selection:zv(r.ranges,i),effects:jf.of(s?null:new iu(r.ranges,i)),scrollIntoView:!0})),!0}}const rz=({state:t,dispatch:e})=>t.field(Gc,!1)?(e(t.update({effects:jf.of(null)})),!0):!1,iz=u3(1),sz=u3(-1),oz=[{key:"Tab",run:iz,shift:sz},{key:"Escape",run:rz}],_E=he.define({combine(t){return t.length?t[0]:oz}}),az=Ao.highest(Lf.compute([_E],t=>t.facet(_E)));function lz(t,e){return{...e,apply:nz(t)}}const uz=ce.domEventHandlers({mousedown(t,e){let n=e.state.field(Gc,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:zv(n.ranges,i.field),effects:jf.of(n.ranges.some(s=>s.field>i.field)?new iu(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Wc={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Go=De.define({map(t,e){let n=e.mapPos(t,-1,En.TrackAfter);return n??void 0}}),jv=new class extends ca{};jv.startSide=1;jv.endSide=-1;const c3=Wt.define({create(){return Xe.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(Go)&&(t=t.update({add:[jv.range(n.value,n.value+1)]}));return t}});function cz(){return[dz,c3]}const Mg="()[]{}<>«»»«[]{}";function f3(t){for(let e=0;e<Mg.length;e+=2)if(Mg.charCodeAt(e)==t)return Mg.charAt(e+1);return hv(t<128?t:t+1)}function d3(t,e){return t.languageDataAt("closeBrackets",e)[0]||Wc}const fz=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),dz=ce.inputHandler.of((t,e,n,r)=>{if((fz?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Di(ir(r,0))==1||e!=i.from||n!=i.to)return!1;let s=mz(t.state,r);return s?(t.dispatch(s),!0):!1}),hz=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=d3(t,t.selection.main.head).brackets||Wc.brackets,i=null,s=t.changeByRange(o=>{if(o.empty){let a=gz(t.doc,o.head);for(let l of r)if(l==a&&nm(t.doc,o.head)==f3(ir(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:Y.cursor(o.head-l.length)}}return{range:i=o}});return i||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},pz=[{key:"Backspace",run:hz}];function mz(t,e){let n=d3(t,t.selection.main.head),r=n.brackets||Wc.brackets;for(let i of r){let s=f3(ir(i,0));if(e==i)return s==i?vz(t,i,r.indexOf(i+i+i)>-1,n):bz(t,i,s,n.before||Wc.before);if(e==s&&h3(t,t.selection.main.from))return yz(t,i,s)}return null}function h3(t,e){let n=!1;return t.field(c3).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function nm(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Di(ir(n,0)))}function gz(t,e){let n=t.sliceString(e-2,e);return Di(ir(n,0))==n.length?n:n.slice(1)}function bz(t,e,n,r){let i=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:Go.of(o.to+e.length),range:Y.range(o.anchor+e.length,o.head+e.length)};let a=nm(t.doc,o.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:o.head},effects:Go.of(o.head+e.length),range:Y.cursor(o.head+e.length)}:{range:i=o}});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function yz(t,e,n){let r=null,i=t.changeByRange(s=>s.empty&&nm(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:Y.cursor(s.head+n.length)}:r={range:s});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function vz(t,e,n,r){let i=r.stringPrefixes||Wc.stringPrefixes,s=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:Go.of(a.to+e.length),range:Y.range(a.anchor+e.length,a.head+e.length)};let l=a.head,u=nm(t.doc,l),c;if(u==e){if(CE(t,l))return{changes:{insert:e+e,from:l},effects:Go.of(l+e.length),range:Y.cursor(l+e.length)};if(h3(t,l)){let d=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+d.length,insert:d},range:Y.cursor(l+d.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=AE(t,l-2*e.length,i))>-1&&CE(t,c))return{changes:{insert:e+e+e+e,from:l},effects:Go.of(l+e.length),range:Y.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=kt.Word&&AE(t,l,i)>-1&&!xz(t,l,e,i))return{changes:{insert:e+e,from:l},effects:Go.of(l+e.length),range:Y.cursor(l+e.length)}}return{range:s=a}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function CE(t,e){let n=tn(t).resolveInner(e+1);return n.parent&&n.from==e}function xz(t,e,n,r){let i=tn(t).resolveInner(e,-1),s=r.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+s)),l=a.indexOf(n);if(!l||l>-1&&r.indexOf(a.slice(0,l))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=i.to==e&&i.parent;if(!u)break;i=u}return!1}function AE(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=kt.Word)return e;for(let i of n){let s=e-i.length;if(t.sliceDoc(s,e)==i&&r(t.sliceDoc(s-1,s))!=kt.Word)return s}return-1}function Sz(t={}){return[J7,sr,pn.of(t),X7,Ez,l3]}const p3=[{key:"Ctrl-Space",run:Ng},{mac:"Alt-`",run:Ng},{mac:"Alt-i",run:Ng},{key:"Escape",run:q7},{key:"ArrowDown",run:zd(!0)},{key:"ArrowUp",run:zd(!1)},{key:"PageDown",run:zd(!0,"page")},{key:"PageUp",run:zd(!1,"page")},{key:"Enter",run:H7}],Ez=Ao.highest(Lf.computeN([pn],t=>t.facet(pn).defaultKeymap?[p3]:[]));function Ta(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function rm(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var Mh={exports:{}},wz=Mh.exports,DE;function _z(){return DE||(DE=1,(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(wz,function(){var e=function(){},n="undefined",r=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],s={},o=null;function a(m,g){var b=m[g];if(typeof b.bind=="function")return b.bind(m);try{return Function.prototype.bind.call(b,m)}catch{return function(){return Function.prototype.apply.apply(b,[m,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(m){return m==="debug"&&(m="log"),typeof console===n?!1:m==="trace"&&r?l:console[m]!==void 0?a(console,m):console.log!==void 0?a(console,"log"):e}function c(){for(var m=this.getLevel(),g=0;g<i.length;g++){var b=i[g];this[b]=g<m?e:this.methodFactory(b,m,this.name)}if(this.log=this.debug,typeof console===n&&m<this.levels.SILENT)return"No console available for logging"}function f(m){return function(){typeof console!==n&&(c.call(this),this[m].apply(this,arguments))}}function d(m,g,b){return u(m)||f.apply(this,arguments)}function h(m,g){var b=this,y,x,S,E="loglevel";typeof m=="string"?E+=":"+m:typeof m=="symbol"&&(E=void 0);function C(I){var N=(i[I]||"silent").toUpperCase();if(!(typeof window===n||!E)){try{window.localStorage[E]=N;return}catch{}try{window.document.cookie=encodeURIComponent(E)+"="+N+";"}catch{}}}function w(){var I;if(!(typeof window===n||!E)){try{I=window.localStorage[E]}catch{}if(typeof I===n)try{var N=window.document.cookie,P=encodeURIComponent(E),R=N.indexOf(P+"=");R!==-1&&(I=/^([^;]+)/.exec(N.slice(R+P.length+1))[1])}catch{}return b.levels[I]===void 0&&(I=void 0),I}}function A(){if(!(typeof window===n||!E)){try{window.localStorage.removeItem(E)}catch{}try{window.document.cookie=encodeURIComponent(E)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function _(I){var N=I;if(typeof N=="string"&&b.levels[N.toUpperCase()]!==void 0&&(N=b.levels[N.toUpperCase()]),typeof N=="number"&&N>=0&&N<=b.levels.SILENT)return N;throw new TypeError("log.setLevel() called with invalid level: "+I)}b.name=m,b.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},b.methodFactory=g||d,b.getLevel=function(){return S??x??y},b.setLevel=function(I,N){return S=_(I),N!==!1&&C(S),c.call(b)},b.setDefaultLevel=function(I){x=_(I),w()||b.setLevel(I,!1)},b.resetLevel=function(){S=null,A(),c.call(b)},b.enableAll=function(I){b.setLevel(b.levels.TRACE,I)},b.disableAll=function(I){b.setLevel(b.levels.SILENT,I)},b.rebuild=function(){if(o!==b&&(y=_(o.getLevel())),c.call(b),o===b)for(var I in s)s[I].rebuild()},y=_(o?o.getLevel():"WARN");var O=w();O!=null&&(S=_(O)),c.call(b)}o=new h,o.getLogger=function(g){if(typeof g!="symbol"&&typeof g!="string"||g==="")throw new TypeError("You must supply a name when creating a logger.");var b=s[g];return b||(b=s[g]=new h(g,o.methodFactory)),b};var p=typeof window!==n?window.log:void 0;return o.noConflict=function(){return typeof window!==n&&window.log===o&&(window.log=p),o},o.getLoggers=function(){return s},o.default=o,o})})(Mh)),Mh.exports}var Cz=_z();const m3=Ta(Cz);m3.setLevel("silent");const Tt=m3,Ne={STRING:"String",NUMBER:"Number",TRUE:"True",FALSE:"False",NULL:"Null",OBJECT:"Object",ARRAY:"Array",PROPERTY:"Property",PROPERTY_NAME:"PropertyName",PROPERTY_COLON:"PropertyColon",ITEM:"Item",JSON_TEXT:"JsonText",INVALID:"⚠"},Az={Pair:Ne.PROPERTY,Key:Ne.PROPERTY_NAME,BlockSequence:Ne.ARRAY,BlockMapping:Ne.OBJECT,FlowSequence:Ne.ARRAY,FlowMapping:Ne.OBJECT,QuotedLiteral:Ne.STRING,Literal:Ne.STRING,Stream:Ne.JSON_TEXT,Document:Ne.OBJECT},Dz={File:Ne.JSON_TEXT},Vv=[Ne.STRING,Ne.NUMBER,Ne.TRUE,Ne.FALSE,Ne.NULL],g3=[Ne.OBJECT,Ne.ARRAY,Ne.ITEM],At={JSON5:"json5",JSON:"json4",YAML:"yaml"},qt=(t,e)=>{var n,r;switch(e){case At.YAML:return(n=Az[t])!==null&&n!==void 0?n:t;case At.JSON5:return(r=Dz[t])!==null&&r!==void 0?r:t;default:return t}};function b3(t,e,n){const r=[];for(let i=e;i!=null&&i.parent;i=i.parent)switch(qt(i.parent.name,n)){case Ne.PROPERTY:{const s=qb(i.parent,Ne.PROPERTY_NAME,n);if(s){let o=Wa(t,s).replace(/[/~]/g,a=>a==="~"?"~0":"~1");r.unshift(o)}break}case Ne.ARRAY:{if(Oz(i,n)){const s=x3(i.parent,i,n);r.unshift(`${s}`)}break}}return r.length===0?"":"/"+r.join("/")}const y3=(t,e,n=-1,r)=>b3(t.doc,tn(t).resolve(e,n),r),Uv=(t,e)=>{const n=tn(t),r=new Map;return n.iterate({enter:i=>{var s,o,a,l,u,c,f,d;if([Ne.PROPERTY_NAME,Ne.OBJECT].includes(qt(i.name,e))){const h=b3(t.doc,i.node,e),{from:p,to:m}=i.node;if(!(!((o=(s=i.node)===null||s===void 0?void 0:s.nextSibling)===null||o===void 0)&&o.node))return r.set(h,{keyFrom:p,keyTo:m}),!0;const g=e===At.JSON?(l=(a=i.node)===null||a===void 0?void 0:a.nextSibling)===null||l===void 0?void 0:l.node:(d=(f=(c=(u=i.node)===null||u===void 0?void 0:u.nextSibling)===null||c===void 0?void 0:c.node)===null||f===void 0?void 0:f.nextSibling)===null||d===void 0?void 0:d.node;if(!g)return r.set(h,{keyFrom:p,keyTo:m}),!0;const{from:b,to:y}=g;return r.set(h,{keyFrom:p,keyTo:m,valueFrom:b,valueTo:y}),!0}}}),r},Fg=(t,e,n=-1)=>tn(t).resolveInner(e,n),Fh=t=>t.replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1"),kz=t=>t.replace(/^"(.*)"$/,"'$1'"),Wa=(t,e,n=!0,r=!0)=>{const i=e?t.sliceString(e.from,e.to):"";return n?r?Fh(i):i.replace(/(^["'])|(["']$)/g,""):i},v3=(t,e)=>{var n,r,i,s;return qt(t.name,e)===Ne.INVALID&&(qt((r=(n=t.prevSibling)===null||n===void 0?void 0:n.name)!==null&&r!==void 0?r:"",e)===Ne.PROPERTY_NAME||qt((s=(i=t.prevSibling)===null||i===void 0?void 0:i.name)!==null&&s!==void 0?s:"",e)===Ne.PROPERTY_COLON)},Lh=(t,e)=>Vv.includes(qt(t.name,e))||v3(t,e),Oz=(t,e)=>[...Vv,...g3].includes(qt(t.name,e))||v3(t,e),jd=(t,e)=>{var n,r,i,s,o,a;return qt(t.name,e)===Ne.PROPERTY_NAME||qt(t.name,e)===Ne.INVALID&&(qt((r=(n=t.prevSibling)===null||n===void 0?void 0:n.name)!==null&&r!==void 0?r:"",e)===Ne.PROPERTY||qt((s=(i=t.prevSibling)===null||i===void 0?void 0:i.name)!==null&&s!==void 0?s:"",e)==="{")||e===At.YAML&&qt((a=(o=t.parent)===null||o===void 0?void 0:o.name)!==null&&a!==void 0?a:"",e)===Ne.OBJECT},Vf=t=>{const e=[];let n=t.firstChild;for(;n;)n&&e.push(n),n=n==null?void 0:n.nextSibling;return e},Tz=(t,e,n)=>Vf(t).filter(r=>qt(r.name,n)===e),qb=(t,e,n)=>{var r;return(r=Vf(t).find(i=>qt(i.name,n)===e))!==null&&r!==void 0?r:null},kE=(t,e)=>Vf(t).find(n=>Lh(n,e)),Iz=(t,e)=>Vf(t).filter(n=>Vv.includes(qt(n.name,e))||g3.includes(qt(n.name,e))),x3=(t,e,n)=>Iz(t,n).findIndex(r=>r.from===e.from&&r.to===e.to),OE=(t,e,n,r=1/0)=>{let i=t;for(;i&&r>0;){if(qt(i.name,n)===e)return i;i=i.parent,r--}return null},Pz=De.define(),Lp=Wt.define({create(){},update(t,e){for(const n of e.effects)if(n.is(Pz))return n.value;return t}}),Hv=t=>t.field(Lp),Rz=t=>[Lp.init(()=>t)],Nz={AdditionalItemsError:"Array at `{{pointer}}` may not have an additional item `{{key}}`",AdditionalPropertiesError:"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`",AllOfError:"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`",AnyOfError:"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`",ConstError:"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`",containsAnyError:"The array at `{{pointer}}` must contain at least one item",ContainsArrayError:"The property at `{{pointer}}` must not be an array",ContainsError:"The array at `{{pointer}}` must contain an element that matches `{{schema}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",ForbiddenPropertyError:"Property name `{{property}}` at `{{pointer}}` is not allowed",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",FormatEmailError:"Value `{{value}}` at `{{pointer}}` is not a valid email",FormatHostnameError:"Value `{{value}}` at `{{pointer}}` is not a valid hostname",FormatIPV4Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address",FormatIPV4LeadingZeroError:"IPv4 addresses starting with zero are invalid, since they are interpreted as octals",FormatIPV6Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address",FormatIPV6LeadingZeroError:"IPv6 addresses starting with zero are invalid, since they are interpreted as octals",FormatJsonPointerError:"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer",FormatRegExError:"Value `{{value}}` at `{{pointer}}` is not a valid regular expression",FormatTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid time",FormatURIError:"Value `{{value}}` at `{{pointer}}` is not a valid uri",FormatURIReferenceError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference",FormatURITemplateError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-template",FormatURLError:"Value `{{value}}` at `{{pointer}}` is not a valid url",InvalidDataError:"No value may be specified in `{{pointer}}`",InvalidPropertyNameError:"Invalid property name `{{property}}` at `{{pointer}}`",MaximumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum",MaxItemsError:"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MaxLengthError:"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.",MaxPropertiesError:"Too many properties in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MinimumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum",MinItemsError:"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`",MinItemsOneError:"At least one item is required in `{{pointer}}`",MinLengthError:"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.",MinLengthOneError:"A value is required in `{{pointer}}`",MinPropertiesError:"Too few properties in `{{pointer}}`, should be at least `{{minimum}}`, but got `{{length}}`",MissingDependencyError:"The required propery '{{missingProperty}}' in `{{pointer}}` is missing",MissingOneOfPropertyError:"Value at `{{pointer}}` property: `{{property}}`",MultipleOfError:"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`",MultipleOneOfError:"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`",NoAdditionalPropertiesError:"Additional property `{{property}}` in `{{pointer}}` is not allowed",NotError:"Value `{{value}}` at pointer should not match schema `{{not}}`",OneOfError:"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema",OneOfPropertyError:"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`",PatternError:"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`",PatternPropertiesError:"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}",RequiredPropertyError:"The required property `{{key}}` is missing at `{{pointer}}`",SchemaWarning:"Failed retrieving a schema from '{{pointer}}' to key '{{key}}'",TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UniqueItemsError:"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"},Mz=Object.prototype.toString;function tt(t){const e=Mz.call(t).match(/\s([^\]]+)\]/).pop().toLowerCase();return e==="file"?"object":e}const Fz="object",Lz="array";function Bz(t,e={}){return t.replace(/\{\{\w+\}\}/g,n=>{const r=n.replace(/[{}]/g,""),i=e[r],s=tt(i);return s===Fz||s===Lz?JSON.stringify(i):i})}function $z(t,e,n=t){var r;const i=(r=Nz[t])!==null&&r!==void 0?r:n;return Bz(i,e)}function zz(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function jz(t,e){return{type:"error",name:t,code:zz(t),message:$z(t,e),data:e}}function xe(t){return jz.bind(null,t)}function Kc(t,e=[]){for(let n=0;n<t.length;n+=1){const r=t[n];Array.isArray(r)?Kc(r,e):e.push(r)}return e}const su={DECLARATOR_ONEOF:"oneOfProperty",GET_TEMPLATE_RECURSION_LIMIT:1,propertyBlacklist:["_id"],templateDefaultOptions:{addOptionalProps:!1,removeInvalidData:!1,extendDefaults:!0}};function pc(t,e,n){const r={...e};return Object.defineProperty(r,"getOneOfOrigin",{enumerable:!1,value:()=>({index:n,schema:t})}),r}function Nn(t){return(t==null?void 0:t.type)==="error"}function Vz(t){return t instanceof Promise}function Bp(t){return Nn(t)||Vz(t)}const{DECLARATOR_ONEOF:pl}=su;function S3(t,e,n=t.rootSchema,r="#"){if(e!=null&&n[pl]){const o=[],a=n[pl],l=e[n[pl]];if(l===void 0)return t.errors.missingOneOfPropertyError({property:a,pointer:r,schema:n,value:e});for(let u=0;u<n.oneOf.length;u+=1){const c=t.resolveRef(n.oneOf[u]),f=t.step(a,c,e,r);if(Nn(f))return f;let d=Kc(t.validate(l,f,r));if(d=d.filter(Bp),d.length>0)o.push(...d);else return pc(n,c,u)}return t.errors.oneOfPropertyError({property:a,value:l,pointer:r,schema:n,errors:o})}const i=[],s=[];for(let o=0;o<n.oneOf.length;o+=1){const a=t.resolveRef(n.oneOf[o]);let l=Kc(t.validate(e,a,r));l=l.filter(Bp),l.length>0?s.push(...l):i.push({index:o,schema:a})}return i.length===1?pc(n,i[0].schema,i[0].index):i.length>1?t.errors.multipleOneOfError({value:e,pointer:r,schema:n,matches:i}):t.errors.oneOfError({value:JSON.stringify(e),pointer:r,schema:n,oneOf:n.oneOf,errors:s})}function Uz(t,e,n,r){if(n==null||e.properties==null)return-1;let i=0;const s=Object.keys(e.properties);for(let o=0;o<s.length;o+=1){const a=s[o];n[a]!=null&&t.isValid(n[a],e.properties[a],r)&&(i+=1)}return i}function qv(t,e,n=t.rootSchema,r="#"){if(e!=null&&n[pl]){const s=[],o=n[pl],a=e[n[pl]];if(a===void 0)return t.errors.missingOneOfPropertyError({property:o,pointer:r,schema:n,value:e});for(let l=0;l<n.oneOf.length;l+=1){const u=t.resolveRef(n.oneOf[l]),c=t.step(o,u,e,r);if(Nn(c))return c;let f=Kc(t.validate(a,c,r));if(f=f.filter(Bp),f.length>0)s.push(...f);else return pc(n,u,l)}return t.errors.oneOfPropertyError({property:o,value:a,pointer:r,schema:n,errors:s})}const i=[];for(let s=0;s<n.oneOf.length;s+=1){const o=t.resolveRef(n.oneOf[s]);t.isValid(e,o,r)&&i.push({schema:o,index:s})}if(i.length===1)return pc(n,i[0].schema,i[0].index);if(tt(e)==="object"){let s,o=-1,a=0;for(let l=0;l<n.oneOf.length;l+=1){const u=t.resolveRef(n.oneOf[l]),c=Uz(t,u,e);a<c&&(a=c,s=n.oneOf[l],o=l)}return s===void 0?t.errors.oneOfError({value:JSON.stringify(e),pointer:r,schema:n,oneOf:n.oneOf}):pc(n,s,o)}return i.length>1?t.errors.multipleOneOfError({matches:i,pointer:r,schema:n,value:e}):t.errors.oneOfError({value:JSON.stringify(e),pointer:r,schema:n,oneOf:n.oneOf})}const Hz=(t,e,n,r)=>{if(Array.isArray(e.oneOf)){const i=t.resolveOneOf(n,e,r);if(Nn(i))return i}};var Lg,TE;function qz(){if(TE)return Lg;TE=1;var t=function(y){return e(y)&&!n(y)};function e(b){return!!b&&typeof b=="object"}function n(b){var y=Object.prototype.toString.call(b);return y==="[object RegExp]"||y==="[object Date]"||s(b)}var r=typeof Symbol=="function"&&Symbol.for,i=r?Symbol.for("react.element"):60103;function s(b){return b.$$typeof===i}function o(b){return Array.isArray(b)?[]:{}}function a(b,y){return y.clone!==!1&&y.isMergeableObject(b)?m(o(b),b,y):b}function l(b,y,x){return b.concat(y).map(function(S){return a(S,x)})}function u(b,y){if(!y.customMerge)return m;var x=y.customMerge(b);return typeof x=="function"?x:m}function c(b){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(b).filter(function(y){return Object.propertyIsEnumerable.call(b,y)}):[]}function f(b){return Object.keys(b).concat(c(b))}function d(b,y){try{return y in b}catch{return!1}}function h(b,y){return d(b,y)&&!(Object.hasOwnProperty.call(b,y)&&Object.propertyIsEnumerable.call(b,y))}function p(b,y,x){var S={};return x.isMergeableObject(b)&&f(b).forEach(function(E){S[E]=a(b[E],x)}),f(y).forEach(function(E){h(b,E)||(d(b,E)&&x.isMergeableObject(y[E])?S[E]=u(E,x)(b[E],y[E],x):S[E]=a(y[E],x))}),S}function m(b,y,x){x=x||{},x.arrayMerge=x.arrayMerge||l,x.isMergeableObject=x.isMergeableObject||t,x.cloneUnlessOtherwiseSpecified=a;var S=Array.isArray(y),E=Array.isArray(b),C=S===E;return C?S?x.arrayMerge(b,y,x):p(b,y,x):a(y,x)}m.all=function(y,x){if(!Array.isArray(y))throw new Error("first argument should be an array");return y.reduce(function(S,E){return m(S,E,x)},{})};var g=m;return Lg=g,Lg}var Gz=qz();const E3=Ta(Gz),Wz=(t,e)=>e,Gv=(t,e)=>E3(t,e,{arrayMerge:Wz}),Kz=(t,e)=>{const n=t.concat(e);return n.filter((r,i)=>n.indexOf(r)===i)},Xz=(t,e)=>E3(t,e,{arrayMerge:Kz});function zn(t,e){const n=tt(t),r=tt(e);if(n!==r)return t;const i=Xz(t,e);return t.getOneOfOrigin?Object.defineProperty(i,"getOneOfOrigin",{enumerable:!1,value:t.getOneOfOrigin}):e.getOneOfOrigin&&Object.defineProperty(i,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}),i}function Xc(t,...e){const n={};return Object.keys(t).forEach(r=>{e.includes(r)||(n[r]=t[r])}),t.getOneOfOrigin&&Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:t.getOneOfOrigin}),n}var Yz=Function.prototype.toString,Bg=Object.create,Jz=Object.prototype.toString,Zz=(function(){function t(){this._keys=[],this._values=[]}return t.prototype.has=function(e){return!!~this._keys.indexOf(e)},t.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},t.prototype.set=function(e,n){this._keys.push(e),this._values.push(n)},t})();function Qz(){return new Zz}function ej(){return new WeakMap}var tj=typeof WeakMap<"u"?ej:Qz;function Wv(t){if(!t)return Bg(null);var e=t.constructor;if(e===Object)return t===Object.prototype?{}:Bg(t);if(e&&~Yz.call(e).indexOf("[native code]"))try{return new e}catch{}return Bg(t)}function nj(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}function rj(t){return t.flags}var ij=/test/g.flags==="g"?rj:nj;function w3(t){var e=Jz.call(t);return e.substring(8,e.length-1)}function sj(t){return t[Symbol.toStringTag]||w3(t)}var oj=typeof Symbol<"u"?sj:w3,aj=Object.defineProperty,lj=Object.getOwnPropertyDescriptor,_3=Object.getOwnPropertyNames,Kv=Object.getOwnPropertySymbols,C3=Object.prototype,A3=C3.hasOwnProperty,uj=C3.propertyIsEnumerable,D3=typeof Kv=="function";function cj(t){return _3(t).concat(Kv(t))}var fj=D3?cj:_3;function im(t,e,n){for(var r=fj(t),i=0,s=r.length,o=void 0,a=void 0;i<s;++i)if(o=r[i],!(o==="callee"||o==="caller")){if(a=lj(t,o),!a){e[o]=n.copier(t[o],n);continue}!a.get&&!a.set&&(a.value=n.copier(a.value,n));try{aj(e,o,a)}catch{e[o]=a.value}}return e}function dj(t,e){var n=new e.Constructor;e.cache.set(t,n);for(var r=0,i=t.length;r<i;++r)n[r]=e.copier(t[r],e);return n}function hj(t,e){var n=new e.Constructor;return e.cache.set(t,n),im(t,n,e)}function k3(t,e){return t.slice(0)}function pj(t,e){return t.slice(0,t.size,t.type)}function mj(t,e){return new e.Constructor(k3(t.buffer))}function gj(t,e){return new e.Constructor(t.getTime())}function O3(t,e){var n=new e.Constructor;return e.cache.set(t,n),t.forEach(function(r,i){n.set(i,e.copier(r,e))}),n}function bj(t,e){return im(t,O3(t,e),e)}function yj(t,e){var n=Wv(e.prototype);e.cache.set(t,n);for(var r in t)A3.call(t,r)&&(n[r]=e.copier(t[r],e));return n}function vj(t,e){var n=Wv(e.prototype);e.cache.set(t,n);for(var r in t)A3.call(t,r)&&(n[r]=e.copier(t[r],e));for(var i=Kv(t),s=0,o=i.length,a=void 0;s<o;++s)a=i[s],uj.call(t,a)&&(n[a]=e.copier(t[a],e));return n}var xj=D3?vj:yj;function Sj(t,e){var n=Wv(e.prototype);return e.cache.set(t,n),im(t,n,e)}function $g(t,e){return new e.Constructor(t.valueOf())}function Ej(t,e){var n=new e.Constructor(t.source,ij(t));return n.lastIndex=t.lastIndex,n}function Bh(t,e){return t}function T3(t,e){var n=new e.Constructor;return e.cache.set(t,n),t.forEach(function(r){n.add(e.copier(r,e))}),n}function wj(t,e){return im(t,T3(t,e),e)}var _j=Array.isArray,Xv=Object.assign,Cj=Object.getPrototypeOf||(function(t){return t.__proto__}),I3={array:dj,arrayBuffer:k3,blob:pj,dataView:mj,date:gj,error:Bh,map:O3,object:xj,regExp:Ej,set:T3},Aj=Xv({},I3,{array:hj,map:bj,object:Sj,set:wj});function Dj(t){return{Arguments:t.object,Array:t.array,ArrayBuffer:t.arrayBuffer,Blob:t.blob,Boolean:$g,DataView:t.dataView,Date:t.date,Error:t.error,Float32Array:t.arrayBuffer,Float64Array:t.arrayBuffer,Int8Array:t.arrayBuffer,Int16Array:t.arrayBuffer,Int32Array:t.arrayBuffer,Map:t.map,Number:$g,Object:t.object,Promise:Bh,RegExp:t.regExp,Set:t.set,String:$g,WeakMap:Bh,WeakSet:Bh,Uint8Array:t.arrayBuffer,Uint8ClampedArray:t.arrayBuffer,Uint16Array:t.arrayBuffer,Uint32Array:t.arrayBuffer,Uint64Array:t.arrayBuffer}}function P3(t){var e=Xv({},I3,t),n=Dj(e),r=n.Array,i=n.Object;function s(o,a){if(a.prototype=a.Constructor=void 0,!o||typeof o!="object")return o;if(a.cache.has(o))return a.cache.get(o);if(a.prototype=Cj(o),a.Constructor=a.prototype&&a.prototype.constructor,!a.Constructor||a.Constructor===Object)return i(o,a);if(_j(o))return r(o,a);var l=n[oj(o)];return l?l(o,a):typeof o.then=="function"?o:i(o,a)}return function(a){return s(a,{Constructor:void 0,cache:tj(),copier:s,prototype:void 0})}}function kj(t){return P3(Xv({},Aj,t))}kj({});var $p=P3({});function sm(t,e,n){if(e.if!=null){if(e.if===!1)return e.else;if(e.if&&(e.then||e.else)){const r=t.validate(n,t.resolveRef(e.if));if(r.length===0&&e.then)return t.resolveRef(e.then);if(r.length!==0&&e.else)return t.resolveRef(e.else)}}}const Oj=(t,e,n,r)=>{const i=sm(t,e,n);if(i)return t.validate(n,i,r)};function R3(t,e,n){var r;const i={...(r=t.resolveRef(e))!==null&&r!==void 0?r:{}},s=sm(t,i,n);return s||Xc(i,"if","then","else")}function N3(t,e,n=t.rootSchema){let r=$p(n);for(let i=0;i<n.allOf.length;i+=1){const s=R3(t,n.allOf[i],e);r=zn(r,s)}return delete r.allOf,r}function M3(t,e){const{allOf:n}=e;if(!Array.isArray(n)||n.length===0)return;let r={};return n.forEach(i=>{r=zn(r,t.resolveRef(i))}),r}const Tj=(t,e,n,r)=>{const{allOf:i}=e;if(!Array.isArray(i)||i.length===0)return;const s=[];return e.allOf.forEach(o=>{s.push(...t.validate(n,o,r))}),s};function F3(t,e){return t==null||t.$ref==null?t:t.getRoot?t.getRoot().getRef(t):e.getRef(t)}function Ij(t){return t.filter((e,n)=>t.indexOf(e)===n)}function no(t){return tt(t)==="object"}function L3(t,e,n){const{dependencies:r}=e;if(!no(r)||!no(n))return;let i=!1,s={required:[]};if(Object.keys(r).forEach(o=>{var a,l;if(n[o]==null&&!(!((a=e.required)===null||a===void 0)&&a.includes(o)||!((l=s.required)===null||l===void 0)&&l.includes(o)))return;const u=r[o];if(Array.isArray(u)){i=!0,s.required.push(...u);return}if(no(u)){i=!0,s=zn(s,t.resolveRef(u));return}}),i)return s.required=Ij(s.required),s}const Pj=(t,e,n,r)=>{if(tt(e.dependencies)!=="object")return;const i=[];return Object.keys(n).forEach(s=>{if(e.dependencies[s]===void 0||e.dependencies[s]===!0)return;if(e.dependencies[s]===!1){i.push(t.errors.missingDependencyError({pointer:r,schema:e,value:n}));return}let o;const a=tt(e.dependencies[s]);if(a==="array")o=e.dependencies[s].filter(l=>n[l]===void 0).map(l=>t.errors.missingDependencyError({missingProperty:l,pointer:r,schema:e,value:n}));else if(a==="object")o=t.validate(n,e.dependencies[s],r);else throw new Error(`Invalid dependency definition for ${r}/${s}. Must be string[] or schema`);i.push(...o)}),i.length>0?i:void 0};function B3(t,e,n){if(!Array.isArray(e.anyOf)||e.anyOf.length===0)return;let r;return e.anyOf.forEach(i=>{i=t.resolveRef(i),t.isValid(n,i)&&(r=r?zn(r,i):i)}),r}function $3(t,e,n=t.rootSchema,r="#"){const{anyOf:i}=n;if(!Array.isArray(i)||i.length===0)return n;const s=B3(t,n,e);if(s==null)return t.errors.anyOfError({pointer:r,schema:n,value:e,anyOf:JSON.stringify(i)});const o=zn(n,s);return Xc(o,"anyOf")}const Rj=(t,e,n,r)=>{if(!(!Array.isArray(e.anyOf)||e.anyOf.length===0)){for(let i=0;i<e.anyOf.length;i+=1)if(t.isValid(n,e.anyOf[i]))return;return t.errors.anyOfError({pointer:r,schema:e,value:n,anyOf:e.anyOf})}},IE=["allOf","anyOf","oneOf","dependencies","if","then","else"],Nj=["allOf","anyOf","oneOf","dependencies","if"];function Mj(t){const e=Object.keys(t);return Nj.findIndex(n=>e.includes(n))!==-1}function Gb(t,e,n,r){let i,s;if(e=t.resolveRef(e),e.oneOf){const c=qv(t,n,e,r);Nn(c)?s=c:c&&(i=zn(i??{},c))}if(Array.isArray(e.allOf)){const c=e.allOf.map(f=>{if(Mj(f)){let d=Gb(t,f,n,r);return d?(d=zn(f,d),Xc(d,...IE)):void 0}return f});if(c.length>0){const f=M3(t,{allOf:c});i=zn(i??{},f)}}const o=B3(t,e,n);o&&(i=zn(i??{},o));const a=L3(t,e,n);a&&(i=zn(i??{},a));const l=sm(t,e,n);if(l&&(i=zn(i??{},l)),i==null)return s;const u=Gb(t,i,n,r);return u&&(i=zn(i,u)),Xc(i,...IE)}const Fj=["allOf","anyOf","oneOf","dependencies","if","then","else"];function PE(t,e,n,r){let i=Gb(t,e,n,r);return i?(i=zn(e,i),Xc(i,...Fj)):e}class z3{constructor(e,n){this.remotes={},this.errors={},this.typeKeywords={},this.validateKeyword={},this.validateType={},this.validateFormat={},this.config=e,this.typeKeywords=$p(e.typeKeywords),this.validateKeyword=Object.assign({},e.validateKeyword),this.validateType=Object.assign({},e.validateType),this.validateFormat=Object.assign({},e.validateFormat),this.errors=Object.assign({},e.errors),this.setSchema(n)}get rootSchema(){return this.__rootSchema}set rootSchema(e){e!=null&&(this.__rootSchema=this.config.compileSchema(this,e))}addRemoteSchema(e,n){this.config.addRemoteSchema(this,e,n)}compileSchema(e){var n;return this.config.compileSchema(this,e,(n=this.rootSchema)!==null&&n!==void 0?n:e)}createSchemaOf(e){return this.config.createSchemaOf(e)}each(e,n,r,i){return this.config.each(this,e,n,r,i)}eachSchema(e,n=this.rootSchema){return this.config.eachSchema(n,e)}getChildSchemaSelection(e,n){return this.config.getChildSchemaSelection(this,e,n)}getSchema(e){return this.config.getSchema(this,e)}getTemplate(e,n,r=this.config.templateDefaultOptions){return this.config.getTemplate(this,e,n,r)}isValid(e,n,r){return this.config.isValid(this,e,n,r)}resolveAnyOf(e,n,r){return this.config.resolveAnyOf(this,e,n,r)}resolveAllOf(e,n){return this.config.resolveAllOf(this,e,n)}resolveRef(e){return this.config.resolveRef(e,this.rootSchema)}resolveOneOf(e,n,r){return this.config.resolveOneOf(this,e,n,r)}setSchema(e){this.rootSchema=e}step(e,n,r,i){return this.config.step(this,e,n,r,i)}validate(e,n,r){return this.config.validate(this,e,n,r)}}function j3(t,e,n){n.id=n.id||e,t.remotes[e]=t.compileSchema(n)}var $h={exports:{}},Lj=$h.exports,RE;function Bj(){return RE||(RE=1,(function(t,e){(function(n,r){t.exports=r()})(typeof self<"u"?self:Lj,(()=>(()=>{var n={d:(P,R)=>{for(var F in R)n.o(R,F)&&!n.o(P,F)&&Object.defineProperty(P,F,{enumerable:!0,get:R[F]})},o:(P,R)=>Object.prototype.hasOwnProperty.call(P,R),r:P=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})}},r={};function i(P){return P==="#"||P===""||Array.isArray(P)&&P.length===0||!1}n.r(r),n.d(r,{default:()=>N,get:()=>d,isRoot:()=>i,join:()=>O,remove:()=>E,removeUndefinedItems:()=>S,set:()=>b,split:()=>f,splitLast:()=>I});const s=/~1/g,o=/~0/g,a=/\/+/g,l=/(^[#/]*|\/+$)/g;function u(P){return P.replace(s,"/").replace(o,"~")}function c(P){return u(decodeURIComponent(P))}function f(P){if(P==null||typeof P!="string"||i(P))return Array.isArray(P)?P:[];const R=P.indexOf("#")>=0?c:u,F=(P=(P=P.replace(a,"/")).replace(l,"")).split("/");for(let V=0,B=F.length;V<B;V+=1)F[V]=R(F[V]);return F}function d(P,R,F=void 0){if(R==null||P==null)return F;if(i(R))return P;const V=h(P,f(R));return V===void 0?F:V}function h(P,R){const F=R.shift();if(P!==void 0)return F!==void 0?h(P[F],R):P}const p=/^\[.*\]$/,m=/^\[(.+)\]$/;function g(P,R){return P==="__proto__"||P=="constructor"&&R.length>0&&R[0]=="prototype"}function b(P,R,F){if(R==null)return P;const V=f(R);if(V.length===0)return P;P==null&&(P=p.test(V[0])?[]:{});let B,G,H=P;for(;V.length>1;)B=V.shift(),G=p.test(V[0]),g(B,V)||(H=x(H,B,G));return B=V.pop(),y(H,B,F),P}function y(P,R,F){let V;const B=R.match(m);R==="[]"&&Array.isArray(P)?P.push(F):B?(V=B.pop(),P[V]=F):P[R]=F}function x(P,R,F){if(P[R]!=null)return P[R];const V=F?[]:{};return y(P,R,V),V}function S(P){let R=0,F=0;for(;R+F<P.length;)P[R+F]===void 0&&(F+=1),P[R]=P[R+F],R+=1;return P.length=P.length-F,P}function E(P,R,F){const V=f(R),B=V.pop(),G=d(P,V);return G&&delete G[B],Array.isArray(G)&&F!==!0&&S(G),P}const C=/\/+/g,w=/~/g,A=/\//g;function _(P,R){if(P.length===0)return R?"#":"";for(let F=0,V=P.length;F<V;F+=1)P[F]=P[F].replace(w,"~0").replace(A,"~1"),R&&(P[F]=encodeURIComponent(P[F]));return((R?"#/":"/")+P.join("/")).replace(C,"/")}function O(P,...R){const F=[];if(Array.isArray(P))return _(P,arguments[1]===!0);const V=arguments[arguments.length-1],B=typeof V=="boolean"?V:P&&P[0]==="#";for(let H=0,ie=arguments.length;H<ie;H+=1)F.push.apply(F,f(arguments[H]));const G=[];for(let H=0,ie=F.length;H<ie;H+=1)if(F[H]===".."){if(G.length===0)return B?"#":"";G.pop()}else G.push(F[H]);return _(G,B)}function I(P){const R=f(P);if(R.length===0)return typeof P=="string"&&P[0]==="#"?["#",R[0]]:["",void 0];if(R.length===1)return P[0]==="#"?["#",R[0]]:["",R[0]];const F=R.pop();return[O(R,P[0]==="#"),F]}const N={get:d,set:b,remove:E,join:O,split:f,splitLast:I,isRoot:i,removeUndefinedItems:S};return r})()))})($h)),$h.exports}var Wo=Bj();const Yc=Ta(Wo);var Vd={},Qn={},Mu={},NE;function $j(){if(NE)return Mu;NE=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.TokenError=void 0;let t=class extends Error{constructor(n,r){if(super(n),this.message=n,this.token=r,r&&r.errors)r.errors.push(this);else throw this}inspect(){return"SyntaxError: "+this.message}};return Mu.TokenError=t,Mu}var ME;function zj(){if(ME)return Qn;ME=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.Parser=Qn.findRuleByName=Qn.parseRuleName=Qn.escapeRegExp=Qn.readToken=void 0;const t=/^[A-Z0-9_]+$/,e=/(\?|\+|\*)$/,n=/^(@|&|!)/,r="WS",i=$j();function s(m,g){let b=g.exec(m);return b&&b.index==0?b[0].length==0&&g.source.length>0?null:{type:null,text:b[0],rest:m.substr(b[0].length),start:0,end:b[0].length-1,fullText:b[0],errors:[],children:[],parent:null}:null}Qn.readToken=s;function o(m){return m.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}Qn.escapeRegExp=o;function a(m){m.rest="",m.children&&m.children.forEach(g=>a(g))}function l(m,g){m.start+=g,m.end+=g,m.children&&m.children.forEach(b=>l(b,m.start))}function u(m,g){g.errors&&g.errors.length&&g.errors.forEach(b=>m.push(b)),g.children&&g.children.forEach(b=>u(m,b))}function c(m){let g=e.exec(m),b=n.exec(m),y=g&&g[0]||"",x=b&&b[0]||"",S={raw:m,name:m.replace(e,"").replace(n,""),isOptional:y=="?"||y=="*",allowRepetition:y=="+"||y=="*",atLeastOne:y=="+",lookupPositive:x=="&",lookupNegative:x=="!",pinned:x=="@",lookup:!1,isLiteral:!1};return S.isLiteral=S.name[0]=="'"||S.name[0]=='"',S.lookup=S.lookupNegative||S.lookupPositive,S}Qn.parseRuleName=c;function f(m,g){let b=c(m);return g.cachedRules[b.name]||null}Qn.findRuleByName=f;function d(m,g){if(m.children){let b=m.children.filter(y=>y.type&&g.test(y.type));for(let y=0;y<b.length;y++){let x=m.children.indexOf(b[y]);x!=-1&&m.children.splice(x,1)}m.children.forEach(y=>d(y,g))}}const h=["EOF"];class p{constructor(g,b){this.grammarRules=g,this.options=b,this.cachedRules={},this.debug=b?b.debug===!0:!1;let y=[],x=[];if(g.forEach(S=>{let E=c(S.name);if(E.name in this.cachedRules){y.push("Duplicated rule "+E.name);return}else this.cachedRules[E.name]=S;if(!S.bnf||!S.bnf.length){let C="Missing rule content, rule: "+S.name;y.indexOf(C)==-1&&y.push(C)}else S.bnf.forEach(C=>{if(typeof C[0]=="string"&&c(C[0]).name==S.name){let A="Left recursion is not allowed, rule: "+S.name;y.indexOf(A)==-1&&y.push(A)}C.forEach(w=>{if(typeof w=="string"){let A=c(w);!A.isLiteral&&x.indexOf(A.name)==-1&&h.indexOf(A.name)==-1&&x.push(A.name)}})});r==S.name&&(S.implicitWs=!1),S.implicitWs&&x.indexOf(r)==-1&&x.push(r),S.recover&&x.indexOf(S.recover)==-1&&x.push(S.recover)}),x.forEach(S=>{S in this.cachedRules||y.push("Missing rule "+S)}),y.length)throw new Error(y.join(`
`))}getAST(g,b){b||(b=this.grammarRules.filter(x=>!x.fragment&&x.name.indexOf("%")!=0)[0].name);let y=this.parse(g,b);if(y){u(y.errors,y),l(y,0),d(y,/^%/),(!this.options||!this.options.keepUpperRules)&&d(y,t);let x=y.rest;x&&new i.TokenError(`Unexpected end of input:
`+x,y),a(y),y.rest=x}return y}emitSource(){return"CANNOT EMIT SOURCE FROM BASE Parser"}parse(g,b,y=0){let x=null,S=c(b),E,C=this.debug&&!t.test(S.name);C&&console.log(new Array(y).join("│ ")+"Trying to get "+b+" from "+JSON.stringify(g.split(`
`)[0]));let w=S.name,A=f(S.name,this);if(S.name=="EOF"){if(g.length)return null;if(g.length==0)return{type:"EOF",text:"",rest:"",start:0,end:0,fullText:"",errors:[],children:[],parent:null}}try{if(!A&&S.isLiteral){let _=S.name.trim();if(_.startsWith('"')?_=JSON.parse(_):_.startsWith("'")&&(_=_.replace(/^'(.+)'$/,"$1").replace(/\\'/g,"'")),_==="")return{type:"%%EMPTY%%",text:"",rest:g,start:0,end:0,fullText:"",errors:[],children:[],parent:null};E=new RegExp(o(_)),w=null}}catch(_){return _ instanceof ReferenceError&&console.error(_),null}if(E){let _=s(g,E);if(_)return _.type=w,_}else{let _=A.bnf;_ instanceof Array&&_.forEach(O=>{if(x)return;let I=null,N={type:S.name,text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:g};A.fragment&&(N.fragment=!0);let P=g,R=0,F=O.length>0,V=!1;for(let B=0;B<O.length;B++)if(typeof O[B]=="string"){let G=c(O[B]);F=F&&G.isOptional;let H,ie=!1;do{if(H=null,A.implicitWs&&(H=this.parse(P,G.name,y+1),!H)){let se;do if(se=this.parse(P,r,y+1),se)N.text=N.text+se.text,N.end=N.text.length,se.parent=N,N.children.push(se),P=P.substr(se.text.length),R+=se.text.length;else break;while(se&&se.text.length)}if(H=H||this.parse(P,G.name,y+1),G.lookupNegative){if(H)return;break}if(G.lookupPositive&&!H)return;if(!H&&(G.isOptional||G.atLeastOne&&ie))break;if(H&&A.pinned==B+1&&(I=H,C&&console.log(new Array(y+1).join("│ ")+"└─ "+H.type+" PINNED")),H||(H=this.parseRecovery(A,P,y+1)),!H)if(I)x=N,H={type:"SyntaxError",text:P,children:[],end:P.length,errors:[],fullText:"",parent:null,start:0,rest:""},P.length?new i.TokenError(`Unexpected end of input. Expecting ${G.name} Got: ${P}`,H):new i.TokenError(`Unexpected end of input. Missing ${G.name}`,H),C&&console.log(new Array(y+1).join("│ ")+"└─ "+H.type+" "+JSON.stringify(H.text));else return;if(ie=!0,V=!0,H.type=="%%EMPTY%%")break;H.start+=R,H.end+=R,!G.lookupPositive&&H.type&&(H.fragment?H.children&&H.children.forEach(se=>{se.start+=R,se.end+=R,se.parent=N,N.children.push(se)}):(H.parent=N,N.children.push(H))),G.lookup&&(H.lookup=!0),C&&console.log(new Array(y+1).join("│ ")+"└─ "+H.type+" "+JSON.stringify(H.text)),!G.lookup&&!H.lookup&&(N.text=N.text+H.text,N.end=N.text.length,P=P.substr(H.text.length),R+=H.text.length),N.rest=P}while(H&&G.allowRepetition&&P.length&&!H.lookup)}else{let G=s(P,O[B]);if(!G)return;C&&console.log(new Array(y+1).join("│ ")+"└> "+JSON.stringify(G.text)+O[B].source),V=!0,G.start+=R,G.end+=R,N.text=N.text+G.text,N.end=N.text.length,P=P.substr(G.text.length),R+=G.text.length,N.rest=P}V&&(x=N,C&&console.log(new Array(y).join("│ ")+"├<─┴< PUSHING "+x.type+" "+JSON.stringify(x.text)))}),x&&A.simplifyWhenOneChildren&&x.children.length==1&&(x=x.children[0])}return x||C&&console.log(b+" NOT RESOLVED FROM "+g),x}parseRecovery(g,b,y){if(g.recover&&b.length){let x=this.debug;x&&console.log(new Array(y+1).join("│ ")+"Trying to recover until token "+g.recover+" from "+JSON.stringify(b.split(`
`)[0]+b.split(`
`)[1]));let S={type:"SyntaxError",text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:""},E;do if(E=this.parse(b,g.recover,y+1),E){new i.TokenError('Unexpected input: "'+S.text+`" Expecting: ${g.name}`,S);break}else S.text=S.text+b[0],S.end=S.text.length,b=b.substr(1);while(!E&&b.length>0);if(S.text.length>0&&E)return x&&console.log(new Array(y+1).join("│ ")+"Recovered text: "+JSON.stringify(S.text)),S}return null}}return Qn.Parser=p,Qn.default=p,Qn}var FE;function jj(){if(FE)return Vd;FE=1,Object.defineProperty(Vd,"__esModule",{value:!0});const t=zj();var e;return(function(n){n.RULES=[{name:"Grammar",bnf:[["RULE_S*","%Atomic*","EOF"]]},{name:"%Atomic",bnf:[["Production","RULE_S*"]],fragment:!0},{name:"Production",bnf:[["NCName","RULE_S*",'"::="',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*","RULE_EOL+","RULE_S*"]]},{name:"NCName",bnf:[[/[a-zA-Z][a-zA-Z_0-9]*/]]},{name:"Choice",bnf:[["SequenceOrDifference","%_Choice_1*"]],fragment:!0},{name:"%_Choice_1",bnf:[["RULE_WHITESPACE*",'"|"',"RULE_WHITESPACE*","SequenceOrDifference"]],fragment:!0},{name:"SequenceOrDifference",bnf:[["Item","RULE_WHITESPACE*","%_Item_1?"]]},{name:"%_Item_1",bnf:[["Minus","Item"],["Item*"]],fragment:!0},{name:"Minus",bnf:[['"-"']]},{name:"Item",bnf:[["RULE_WHITESPACE*","%Primary","PrimaryDecoration?"]],fragment:!0},{name:"PrimaryDecoration",bnf:[['"?"'],['"*"'],['"+"']]},{name:"DecorationName",bnf:[['"ebnf://"',/[^\x5D#]+/]]},{name:"%Primary",bnf:[["NCName"],["StringLiteral"],["CharCode"],["CharClass"],["SubItem"]],fragment:!0},{name:"SubItem",bnf:[['"("',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*",'")"']]},{name:"StringLiteral",bnf:[[`'"'`,/[^"]*/,`'"'`],[`"'"`,/[^']*/,`"'"`]],pinned:1},{name:"CharCode",bnf:[['"#x"',/[0-9a-zA-Z]+/]]},{name:"CharClass",bnf:[["'['","'^'?","%RULE_CharClass_1+",'"]"']]},{name:"%RULE_CharClass_1",bnf:[["CharCodeRange"],["CharRange"],["CharCode"],["RULE_Char"]],fragment:!0},{name:"RULE_Char",bnf:[[/\x09/],[/\x0A/],[/\x0D/],[/[\x20-\x5c]/],[/[\x5e-\uD7FF]/],[/[\uE000-\uFFFD]/]]},{name:"CharRange",bnf:[["RULE_Char",'"-"',"RULE_Char"]]},{name:"CharCodeRange",bnf:[["CharCode",'"-"',"CharCode"]]},{name:"RULE_WHITESPACE",bnf:[["%RULE_WHITESPACE_CHAR*"],["Comment","RULE_WHITESPACE*"]]},{name:"RULE_S",bnf:[["RULE_WHITESPACE","RULE_S*"],["RULE_EOL","RULE_S*"]]},{name:"%RULE_WHITESPACE_CHAR",bnf:[[/\x09/],[/\x20/]],fragment:!0},{name:"Comment",bnf:[['"/*"',"%RULE_Comment_Body*",'"*/"']]},{name:"%RULE_Comment_Body",bnf:[['!"*/"',/[^*]/]],fragment:!0},{name:"RULE_EOL",bnf:[[/\x0D/,/\x0A/],[/\x0A/],[/\x0D/]]},{name:"Link",bnf:[["'['","Url","']'"]]},{name:"Url",bnf:[[/[^\x5D:/?#]/,'"://"',/[^\x5D#]+/,"%Url1?"]]},{name:"%Url1",bnf:[['"#"',"NCName"]],fragment:!0}],n.defaultParser=new t.Parser(n.RULES,{debug:!1});const r=/^(!|&)/,i=/(\?|\+|\*)$/,s=/^%/;function o(x,S){if(typeof x=="string"){if(r.test(x))return"";if(s.test(x)){let C=i.exec(x),w=C?C[0]+" ":"";return a(x,S)?u(x,S)+w:"("+u(x,S)+")"+w}return x}else return x.source.replace(/\\(?:x|u)([a-zA-Z0-9]+)/g,"#x$1").replace(/\[\\(?:x|u)([a-zA-Z0-9]+)-\\(?:x|u)([a-zA-Z0-9]+)\]/g,"[#x$1-#x$2]")}function a(x,S){let E=t.findRuleByName(x,S);return E&&E.bnf.length==1&&E.bnf[0].length==1&&(E.bnf[0][0]instanceof RegExp||E.bnf[0][0][0]=='"'||E.bnf[0][0][0]=="'")}function l(x,S){return x.map(E=>o(E,S)).join(" ")}function u(x,S){let E=t.findRuleByName(x,S);return E?E.bnf.map(C=>l(C,S)).join(" | "):"RULE_NOT_FOUND {"+x+"}"}function c(x){let S=[];return x.grammarRules.forEach(E=>{if(!/^%/.test(E.name)){let C=E.recover?" /* { recoverUntil="+E.recover+" } */":"";S.push(E.name+" ::= "+u(E.name,x)+C)}}),S.join(`
`)}n.emit=c;let f=0;function d(x,S){throw console.log("reberia restar "+S+" a "+x),new Error("Difference not supported yet")}function h(x){return new RegExp(x.replace(/#x([a-zA-Z0-9]{4})/g,"\\u$1").replace(/#x([a-zA-Z0-9]{3})/g,"\\u0$1").replace(/#x([a-zA-Z0-9]{2})/g,"\\x$1").replace(/#x([a-zA-Z0-9]{1})/g,"\\x0$1"))}function p(x,S,E){let C=null,w=[];return S.children.forEach((A,_)=>{A.type=="Minus"&&d(C,A);let O=S.children[_+1];O=O&&O.type=="PrimaryDecoration"&&O.text||"";let I="";switch(A.type){case"SubItem":let N="%"+(E+f++);m(x,A,N),w.push(I+N+O);break;case"NCName":case"StringLiteral":w.push(I+A.text+O);break;case"CharCode":case"CharClass":if(O||I){let P={name:"%"+(E+f++),bnf:[[h(A.text)]]};x.push(P),w.push(I+P.name+O)}else w.push(h(A.text));break;case"PrimaryDecoration":break;default:throw new Error(" HOW SHOULD I PARSE THIS? "+A.type+" -> "+JSON.stringify(A.text))}C=A}),w}function m(x,S,E){let C=S.children.filter(_=>_.type=="SequenceOrDifference").map(_=>p(x,_,E)),w={name:E,bnf:C},A=null;C.forEach(_=>{A=A||_.recover,delete _.recover}),E.indexOf("%")==0&&(w.fragment=!0),A&&(w.recover=A),x.push(w)}function g(x,S=n.defaultParser){let E=S.getAST(x);if(!E)throw new Error("Could not parse "+x);if(E.errors&&E.errors.length)throw E.errors[0];let C=[];return E.children.filter(w=>w.type=="Production").map(w=>{let A=w.children.filter(_=>_.type=="NCName")[0].text;m(C,w,A)}),C}n.getRules=g;function b(x,S=n.defaultParser){return g(x.join(""),S)}n.Transform=b;class y extends t.Parser{constructor(S,E){const C=E&&E.debugRulesParser===!0?new t.Parser(n.RULES,{debug:!0}):n.defaultParser;super(g(S,C),E)}emitSource(){return c(this)}}n.Parser=y})(e||(e={})),Vd.default=e,Vd}var Vj=jj();const Uj=Ta(Vj),Hj="[^?/{}*,()#]+",qj=`
root ::= ("#" recursion | recursion | (query | pattern) recursion* | "#" SEP? | SEP)
recursion ::= (SEP query | pattern)*
query ::= (ESC escaped ESC | property | all | any | regex) typecheck? lookahead?
property ::= ${Hj}
regex ::= "{" [^}]+ "}"
SEP ::= "/"
all ::= "**"
any ::= "*"
typecheck ::= "?:" ("value" | "boolean" | "string" | "number" | "object" | "array")
lookahead ::= "?" expression ((andExpr | orExpr) expression)*
andExpr ::= S? "&&" S?
orExpr ::= S? "||" S?
expression ::= (exprProperty | ESC escaped ESC) ((isnot | is) (exprProperty | regex | ESC escaped ESC))*
exprProperty ::= [a-zA-Z0-9-_ $]+
escaped ::= [^"]+
is ::= ":"
isnot ::= ":!"
ESC ::= '"'
pattern ::= S? "(" (SEP query | pattern (orPattern? pattern)*)* ")" quantifier? S? lookahead?
quantifier ::= "+" | "*" | [0-9]+
orPattern ::= S? "," S?
S ::= [ ]*
`,Gj=new Uj.Parser(qj),Wj=t=>Gj.getAST(t),rr=0,Nl=3,zp=(t,e)=>`${t}/${e}`,V3=Object.prototype.toString,Kj=/Object|Array/,Wb=t=>Kj.test(V3.call(t)),Xj=t=>V3.call(t).match(/\s([^\]]+)\]/).pop().toLowerCase();function U3(t){return new RegExp(t.text.replace(/(^{|}$)/g,""))}function Yj(t,e){Array.isArray(t)?t.forEach(e):Object.prototype.toString.call(t)==="[object Object]"&&Object.keys(t).forEach(function(n){e(t[n],n,t)})}function LE(t){return Array.isArray(t)?t.map(function(e,n){return`${n}`}):Object.prototype.toString.call(t)==="[object Object]"?Object.keys(t):[]}const ro={mem:[],get(t,e){const n=t[rr][e];if(!ro.mem.includes(n))return Wb(n)&&ro.mem.push(n),[n,e,t[rr],zp(t[Nl],e)]},reset(){ro.mem.length=0}},Kb={any(t,e){const n=e[rr];return LE(n).map(r=>[n[r],r,n,zp(e[Nl],r)])},all(t,e){const n=[e];return Yj(e[rr],(r,i)=>{const s=ro.get(e,i);s&&n.push(...Kb.all(t,s))}),n},regex(t,e){const n=U3(t),r=e[rr];return LE(r).filter(i=>n.test(i)).map(i=>[r[i],i,r,zp(e[Nl],i)])}},jp={escaped:(t,e)=>jp.property(t,e),property:(t,e)=>{const n=t.text;if(e[rr]&&e[rr][n]!==void 0)return[e[rr][n],n,e[rr],zp(e[Nl],n)]},typecheck:(t,e)=>{const n=t.text.replace(/^\?:/,"");if(n==="value")return Wb(e[rr])?void 0:e;if(Xj(e[rr])===n)return e},lookahead:(t,e)=>{let n=!0,r=!1;return t.children.forEach(i=>{if(i.type==="expression"){const s=jp.expression(i,e)!==void 0;n=r===!0?n||s:n&&s}else r=i.type==="orExpr"}),n?e:void 0},expression:(t,e)=>{const n=t.children[0].text,r=t.children[1],i=t.children[2],s=e[rr];if(Wb(s)!==!1)return Jj(s[n],r,i)?e:void 0}};function Jj(t,e,n){if(e===void 0)return t!==void 0;let r;const i=`${t}`;return n.type==="regex"?r=U3(n).test(i):r=i===n.text,e.type==="isnot"&&(r=r===!1&&t!==void 0),r}function Zj(t,e,n,r){const i=[];for(let s=0,o=e.length;s<o;s+=1)i.push(...t(n,e[s],n,r));return i}function Qj(t,e,n,r){const i=[];for(let s=0,o=e.length;s<o;s+=1){const a=t(n,e[s],r);a&&i.push(a)}return i}function eV(t,e,n){let r=t;return e.children.forEach(i=>{if(Kb[i.type])r=Zj(Kb[i.type],r,i,n);else if(jp[i.type])r=Qj(jp[i.type],r,i,n);else throw new Error(`Unknown filter ${i.type}`)}),r}function tV(t,e,n){const r=[];let i=t;return e.children.forEach(s=>{if(s.type==="orPattern"){r.push(...i),i=t;return}i=Yv(i,s,n)}),r.push(...i),r}function nV(t){if(t==null)return 1;if(t==="*"||t==="+")return 1/0;const e=parseInt(t);return isNaN(e)?1:e}function rV(t,e,n){const r=[],i=e.children.find(l=>l.type==="quantifier"),s=nV(i&&i.text);let o=t;i&&i.text==="*"&&r.push(...o);let a=0;for(;o.length>0&&a<s;)o=tV(o,e,n),r.push(...o),a+=1;return r}function iV(t,e,n){let r=t;return e.children.forEach(i=>r=Yv(r,i,n)),r}function Yv(t,e,n){let r;return e.type==="query"?r=eV(t,e,n):e.type==="pattern"?r=rV(t,e,n):r=iV(t,e,n),ro.reset(),ro.mem.push(t),r}function sV(t,e){return ro.reset(),ro.mem.push(t),Yv([[t,null,null,"#"]],e)}const BE={value:t=>t.map(e=>e[rr]),pointer:t=>t.map(e=>e[Nl]),all:t=>t,map:t=>{const e={};return t.forEach(n=>e[n[Nl]]=n[rr]),e}};var ma;(function(t){t.POINTER="pointer",t.VALUE="value",t.ALL="all",t.MAP="map"})(ma||(ma={}));Uf.POINTER=ma.POINTER;Uf.VALUE=ma.VALUE;Uf.ALL=ma.ALL;Uf.MAP=ma.MAP;function Uf(t,e,n=ma.VALUE){if(e==null)return[];e=e.replace(/(\/$)/g,""),e===""&&(e="#");const r=Wj(e);if(r==null)throw new Error(`empty ast for '${e}'`);if(r.rest!=="")throw new Error(`Failed parsing queryString from: '${r.rest}'`);const i=sV(t,r);return typeof n=="function"?i.map(s=>n(...s)):BE[n]?BE[n](i):i}var Vp;(function(t){t.REPLACE_ITEMS="replace",t.INSERT_ITEMS="insert"})(Vp||(Vp={}));Vp.REPLACE_ITEMS;Vp.INSERT_ITEMS;const us={$ref:{type:!1},allOf:{type:!1,definitions:["allOf/*"]},anyOf:{type:!1,definitions:["anyOf/*"]},array:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not","items","items/*","additionalItems"],validationKeywords:["minItems","maxItems","uniqueItems"],keywords:["items","additionalItems","minItems","maxItems","uniqueItems"]},boolean:{type:!0},enum:{type:!1},integer:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minimum","maximum","multipleOf"]},not:{type:!1,definitions:["not"]},number:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minimum","maximum","multipleOf"]},null:{type:!0},object:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not","properties/*","additionalProperties","patternProperties/*","dependencies/*"],validationKeywords:["minProperties","maxProperties","required"],keywords:["properties","additionalProperties","patternProperties","dependencies","minProperties","maxProperties","required"]},oneOf:{type:!1,definitions:["oneOf/*"]},string:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minLength","maxLength","pattern"]}},oV=Object.keys(us).filter(t=>us[t].type===!1),$E=Object.prototype.hasOwnProperty;function zE(t){if(no(t)===!1)return;if(t.enum)return"enum";const e=t.type;if(Array.isArray(e)||us[e])return e;const n=oV.filter(r=>t[r]);if(n.length===1)return n[0];if(n.length===0){for(let r=0,i=us.object.keywords.length;r<i;r+=1){const s=us.object.keywords[r];if($E.call(t,s))return"object"}for(let r=0,i=us.array.keywords.length;r<i;r+=1){const s=us.array.keywords[r];if($E.call(t,s))return"array"}return}throw new Error(`Mutiple typeIds [${n.join(", ")}] matched in ${JSON.stringify(t)}`)}function aV(t){const e=[],n=zE(t);if(n==null)return e;let r;if(Array.isArray(n)){r={};for(let i=0,s=n.length;i<s;i+=1)Object.assign(r,us[n[i]])}else r=us[n];return r.definitions==null||r.definitions.forEach(i=>{Uf(t,i,(s,o,a,l)=>{no(s)&&zE(s)&&e.push({pointer:Yc.join(Yc.split(l),!1),def:s})})}),e}function lV(t,e){if(this.callback(t,e)===!0)return;aV(t).forEach(r=>this.nextTypeDefs(r.def,Yc.join(e,r.pointer,!1)))}function Ud(t,e,n,r="definitions"){const i=e[r];Object.keys(i).forEach(s=>{if(i[s]===!1||no(i[s])){t.nextTypeDefs(i[s],Yc.join(n,r,s,!1));return}})}function om(t,e,n="#"){const r={callback:e,nextTypeDefs:lV};r.nextTypeDefs(t,n),t.definitions!=null&&(r.callback=(i,s)=>{e(i,s),i.definitions!=null&&Ud(r,i,s)},Ud(r,t,n)),t.$defs!=null&&(r.callback=(i,s)=>{e(i,s),i.definitions!=null&&Ud(r,i,s)},Ud(r,t,n,"$defs"))}const uV=/(#|\/)+$/,Hd=/#$/,cV=/^[^:]+:\/\/[^/]+\//,fV=/\/[^/]*$/,dV=/#.*$/;function Up(t,e){return t==null&&e==null?"#":e==null?t.replace(Hd,""):t==null?e.replace(Hd,""):e[0]==="#"?`${t.replace(dV,"")}${e.replace(uV,"")}`:cV.test(e)?e.replace(Hd,""):`${t.replace(fV,"")}/${e.replace(Hd,"")}`}const Fu=/(#|\/)+$/g,hV=["",null,"#"];function pV(t){if(hV.includes(t))return[];if(t=t.replace(Fu,""),t.indexOf("#")===-1)return[t.replace(Fu,"")];if(t.indexOf("#")===0)return[t.replace(Fu,"")];const e=t.split("#");return e[0]=e[0].replace(Fu,""),e[1]=`#${e[1].replace(Fu,"")}`,e}const mV=/(#|\/)+$/g,gV=t=>tt(t)==="object";function is(t,e,n){if(gV(n)&&(n=n.__ref||n.$ref),n==null)return e;let r;const i=n.replace(mV,"");if(t.remotes[i])return r=t.remotes[i],r&&r.$ref?is(t,e,r.$ref):r;if(t.ids[n])return r=Wo.get(e,t.ids[n]),r&&r.$ref?is(t,e,r.$ref):r;const s=pV(n);if(s.length===0)return e;if(s.length===1){if(n=s[0],t.remotes[n])return r=t.remotes[n],is(t,e,r.$ref);if(t.ids[n])return r=Wo.get(e,t.ids[n]),r&&r.$ref?is(t,e,r.$ref):r}if(s.length===2){const o=s[0];if(n=s[1],t.remotes[o])return t.remotes[o].getRef?t.remotes[o].getRef(n):is(t,t.remotes[o],n);if(t.ids[o])return is(t,Wo.get(e,t.ids[o]),n)}return r=Wo.get(e,t.ids[n]||n),r&&r.$ref?is(t,e,r.$ref):r}const jE="__compiled",VE="__ref",bV="getRef",yV="getRoot",vV=/(#|\/)+$/g;function xV(t,e,n=e,r=!1){if(!e||e[jE]!==void 0)return e;const i={ids:{},remotes:t.remotes},s=JSON.stringify(e),o=JSON.parse(s);if(Object.defineProperty(o,jE,{enumerable:!1,value:!0}),Object.defineProperty(o,bV,{enumerable:!1,value:is.bind(null,i,o)}),r===!1&&s.includes("$ref")===!1)return o;e!==n&&Object.defineProperty(o,"definitions",{enumerable:!1,value:Object.assign({},n.definitions,n.$defs,e.definitions,e.$defs)});const a={},l=()=>o;return om(o,(u,c)=>{var f;if(u.id){if(u.id.startsWith("http")&&/(allOf|anyOf|oneOf)\/\d+$/.test(c)){const g=c.replace(/\/(allOf|anyOf|oneOf)\/\d+$/,""),b=Wo.get(o,g);u.id=(f=b.id)!==null&&f!==void 0?f:u.id}i.ids[u.id.replace(vV,"")]=c}c=`#${c}`.replace(/##+/,"#");const d=c.replace(/\/[^/]+$/,""),h=c.replace(/\/[^/]+\/[^/]+$/,""),p=a[d]||a[h],m=Up(p,u.id);a[c]=m,i.ids[m]==null&&(i.ids[m]=c),u.$ref&&!u[VE]&&(Object.defineProperty(u,VE,{enumerable:!1,value:Up(m,u.$ref)}),Object.defineProperty(u,yV,{enumerable:!1,value:l}))}),o}function H3(t,e,n,r=t.rootSchema,i="#"){r=t.resolveRef(r),n(r,e,i);const s=tt(e);s==="object"?Object.keys(e).forEach(o=>{const a=t.step(o,r,e,i),l=e[o];t.each(l,n,a,`${i}/${o}`)}):s==="array"&&e.forEach((o,a)=>{const l=t.step(a,r,e,i);t.each(o,n,l,`${i}/${a}`)})}const q3={additionalItemsError:xe("AdditionalItemsError"),additionalPropertiesError:xe("AdditionalPropertiesError"),anyOfError:xe("AnyOfError"),allOfError:xe("AllOfError"),constError:xe("ConstError"),containsError:xe("ContainsError"),containsArrayError:xe("ContainsArrayError"),containsAnyError:xe("ContainsAnyError"),enumError:xe("EnumError"),forbiddenPropertyError:xe("ForbiddenPropertyError"),formatURLError:xe("FormatURLError"),formatURIError:xe("FormatURIError"),formatURIReferenceError:xe("FormatURIReferenceError"),formatURITemplateError:xe("FormatURITemplateError"),formatDateError:xe("FormatDateError"),formatDateTimeError:xe("FormatDateTimeError"),formatEmailError:xe("FormatEmailError"),formatHostnameError:xe("FormatHostnameError"),formatIPV4Error:xe("FormatIPV4Error"),formatIPV4LeadingZeroError:xe("FormatIPV4LeadingZeroError"),formatIPV6Error:xe("FormatIPV6Error"),formatIPV6LeadingZeroError:xe("FormatIPV6LeadingZeroError"),formatJsonPointerError:xe("FormatJsonPointerError"),formatRegExError:xe("FormatRegExError"),formatTimeError:xe("FormatTimeError"),invalidSchemaError:xe("InvalidSchemaError"),invalidDataError:xe("InvalidDataError"),invalidTypeError:xe("InvalidTypeError"),invalidPropertyNameError:xe("InvalidPropertyNameError"),maximumError:xe("MaximumError"),maxItemsError:xe("MaxItemsError"),maxLengthError:xe("MaxLengthError"),maxPropertiesError:xe("MaxPropertiesError"),minimumError:xe("MinimumError"),minItemsError:xe("MinItemsError"),minItemsOneError:xe("MinItemsOneError"),minLengthError:xe("MinLengthError"),minLengthOneError:xe("MinLengthOneError"),minPropertiesError:xe("MinPropertiesError"),missingDependencyError:xe("MissingDependencyError"),missingOneOfPropertyError:xe("MissingOneOfPropertyError"),multipleOfError:xe("MultipleOfError"),multipleOneOfError:xe("MultipleOneOfError"),noAdditionalPropertiesError:xe("NoAdditionalPropertiesError"),notError:xe("NotError"),oneOfError:xe("OneOfError"),oneOfPropertyError:xe("OneOfPropertyError"),patternError:xe("PatternError"),patternPropertiesError:xe("PatternPropertiesError"),requiredPropertyError:xe("RequiredPropertyError"),schemaWarning:xe("SchemaWarning"),typeError:xe("TypeError"),undefinedValueError:xe("UndefinedValueError"),uniqueItemsError:xe("UniqueItemsError"),unknownPropertyError:xe("UnknownPropertyError"),valueNotEmptyError:xe("ValueNotEmptyError")};var zg={exports:{}},UE;function SV(){return UE||(UE=1,(function(t){(function(e){e.exports.is_uri=r,e.exports.is_http_uri=i,e.exports.is_https_uri=s,e.exports.is_web_uri=o,e.exports.isUri=r,e.exports.isHttpUri=i,e.exports.isHttpsUri=s,e.exports.isWebUri=o;var n=function(a){var l=a.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return l};function r(a){if(a&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(a)&&!/%[^0-9a-f]/i.test(a)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(a)){var l=[],u="",c="",f="",d="",h="",p="";if(l=n(a),u=l[1],c=l[2],f=l[3],d=l[4],h=l[5],!!(u&&u.length&&f.length>=0)){if(c&&c.length){if(!(f.length===0||/^\//.test(f)))return}else if(/^\/\//.test(f))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(u.toLowerCase()))return p+=u+":",c&&c.length&&(p+="//"+c),p+=f,d&&d.length&&(p+="?"+d),h&&h.length&&(p+="#"+h),p}}}function i(a,l){if(r(a)){var u=[],c="",f="",d="",h="",p="",m="",g="";if(u=n(a),c=u[1],f=u[2],d=u[3],p=u[4],m=u[5],!!c){if(l){if(c.toLowerCase()!="https")return}else if(c.toLowerCase()!="http")return;if(f)return/:(\d+)$/.test(f)&&(h=f.match(/:(\d+)$/)[0],f=f.replace(/:\d+$/,"")),g+=c+":",g+="//"+f,h&&(g+=h),g+=d,p&&p.length&&(g+="?"+p),m&&m.length&&(g+="#"+m),g}}}function s(a){return i(a,!0)}function o(a){return i(a)||s(a)}})(t)})(zg)),zg.exports}var EV=SV();const HE=Ta(EV);var Fn={},zh={exports:{}},wV=zh.exports,qE;function _V(){return qE||(qE=1,(function(t){(function(e,n){t.exports?t.exports=n():e.nearley=n()})(wV,function(){function e(u,c,f){return this.id=++e.highestId,this.name=u,this.symbols=c,this.postprocess=f,this}e.highestId=0,e.prototype.toString=function(u){var c=typeof u>"u"?this.symbols.map(l).join(" "):this.symbols.slice(0,u).map(l).join(" ")+" ● "+this.symbols.slice(u).map(l).join(" ");return this.name+" → "+c};function n(u,c,f,d){this.rule=u,this.dot=c,this.reference=f,this.data=[],this.wantedBy=d,this.isComplete=this.dot===u.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(u){var c=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return c.left=this,c.right=u,c.isComplete&&(c.data=c.build(),c.right=void 0),c},n.prototype.build=function(){var u=[],c=this;do u.push(c.right.data),c=c.left;while(c.left);return u.reverse(),u},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,o.fail))};function r(u,c){this.grammar=u,this.index=c,this.states=[],this.wants={},this.scannable=[],this.completed={}}r.prototype.process=function(u){for(var c=this.states,f=this.wants,d=this.completed,h=0;h<c.length;h++){var p=c[h];if(p.isComplete){if(p.finish(),p.data!==o.fail){for(var m=p.wantedBy,g=m.length;g--;){var b=m[g];this.complete(b,p)}if(p.reference===this.index){var y=p.rule.name;(this.completed[y]=this.completed[y]||[]).push(p)}}}else{var y=p.rule.symbols[p.dot];if(typeof y!="string"){this.scannable.push(p);continue}if(f[y]){if(f[y].push(p),d.hasOwnProperty(y))for(var x=d[y],g=0;g<x.length;g++){var S=x[g];this.complete(p,S)}}else f[y]=[p],this.predict(y)}}},r.prototype.predict=function(u){for(var c=this.grammar.byName[u]||[],f=0;f<c.length;f++){var d=c[f],h=this.wants[u],p=new n(d,0,this.index,h);this.states.push(p)}},r.prototype.complete=function(u,c){var f=u.nextState(c);this.states.push(f)};function i(u,c){this.rules=u,this.start=c||this.rules[0].name;var f=this.byName={};this.rules.forEach(function(d){f.hasOwnProperty(d.name)||(f[d.name]=[]),f[d.name].push(d)})}i.fromCompiled=function(d,c){var f=d.Lexer;d.ParserStart&&(c=d.ParserStart,d=d.ParserRules);var d=d.map(function(p){return new e(p.name,p.symbols,p.postprocess)}),h=new i(d,c);return h.lexer=f,h};function s(){this.reset("")}s.prototype.reset=function(u,c){this.buffer=u,this.index=0,this.line=c?c.line:1,this.lastLineBreak=c?-c.col:0},s.prototype.next=function(){if(this.index<this.buffer.length){var u=this.buffer[this.index++];return u===`
`&&(this.line+=1,this.lastLineBreak=this.index),{value:u}}},s.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},s.prototype.formatError=function(u,c){var f=this.buffer;if(typeof f=="string"){var d=f.split(`
`).slice(Math.max(0,this.line-5),this.line),h=f.indexOf(`
`,this.index);h===-1&&(h=f.length);var p=this.index-this.lastLineBreak,m=String(this.line).length;return c+=" at line "+this.line+" col "+p+`:
`,c+=d.map(function(b,y){return g(this.line-d.length+y+1,m)+" "+b},this).join(`
`),c+=`
`+g("",m+p)+`^
`,c}else return c+" at index "+(this.index-1);function g(b,y){var x=String(b);return Array(y-x.length+1).join(" ")+x}};function o(u,c,f){if(u instanceof i)var d=u,f=c;else var d=i.fromCompiled(u,c);this.grammar=d,this.options={keepHistory:!1,lexer:d.lexer||new s};for(var h in f||{})this.options[h]=f[h];this.lexer=this.options.lexer,this.lexerState=void 0;var p=new r(d,0);this.table=[p],p.wants[d.start]=[],p.predict(d.start),p.process(),this.current=0}o.fail={},o.prototype.feed=function(u){var c=this.lexer;c.reset(u,this.lexerState);for(var f;;){try{if(f=c.next(),!f)break}catch(w){var m=new r(this.grammar,this.current+1);this.table.push(m);var d=new Error(this.reportLexerError(w));throw d.offset=this.current,d.token=w.token,d}var h=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var p=this.current+1,m=new r(this.grammar,p);this.table.push(m);for(var g=f.text!==void 0?f.text:f.value,b=c.constructor===s?f.value:f,y=h.scannable,x=y.length;x--;){var S=y[x],E=S.rule.symbols[S.dot];if(E.test?E.test(b):E.type?E.type===f.type:E.literal===g){var C=S.nextState({data:b,token:f,isToken:!0,reference:p-1});m.states.push(C)}}if(m.process(),m.states.length===0){var d=new Error(this.reportError(f));throw d.offset=this.current,d.token=f,d}this.options.keepHistory&&(h.lexerState=c.save()),this.current++}return h&&(this.lexerState=c.save()),this.results=this.finish(),this},o.prototype.reportLexerError=function(u){var c,f,d=u.token;return d?(c="input "+JSON.stringify(d.text[0])+" (lexer error)",f=this.lexer.formatError(d,"Syntax error")):(c="input (lexer error)",f=u.message),this.reportErrorCommon(f,c)},o.prototype.reportError=function(u){var c=(u.type?u.type+" token: ":"")+JSON.stringify(u.value!==void 0?u.value:u),f=this.lexer.formatError(u,"Syntax error");return this.reportErrorCommon(f,c)},o.prototype.reportErrorCommon=function(u,c){var f=[];f.push(u);var d=this.table.length-2,h=this.table[d],p=h.states.filter(function(g){var b=g.rule.symbols[g.dot];return b&&typeof b!="string"});if(p.length===0)f.push("Unexpected "+c+`. I did not expect any more input. Here is the state of my parse table:
`),this.displayStateStack(h.states,f);else{f.push("Unexpected "+c+`. Instead, I was expecting to see one of the following:
`);var m=p.map(function(g){return this.buildFirstStateStack(g,[])||[g]},this);m.forEach(function(g){var b=g[0],y=b.rule.symbols[b.dot],x=this.getSymbolDisplay(y);f.push("A "+x+" based on:"),this.displayStateStack(g,f)},this)}return f.push(""),f.join(`
`)},o.prototype.displayStateStack=function(u,c){for(var f,d=0,h=0;h<u.length;h++){var p=u[h],m=p.rule.toString(p.dot);m===f?d++:(d>0&&c.push(" ^ "+d+" more lines identical to this"),d=0,c.push(" "+m)),f=m}},o.prototype.getSymbolDisplay=function(u){return a(u)},o.prototype.buildFirstStateStack=function(u,c){if(c.indexOf(u)!==-1)return null;if(u.wantedBy.length===0)return[u];var f=u.wantedBy[0],d=[u].concat(c),h=this.buildFirstStateStack(f,d);return h===null?null:[u].concat(h)},o.prototype.save=function(){var u=this.table[this.current];return u.lexerState=this.lexerState,u},o.prototype.restore=function(u){var c=u.index;this.current=c,this.table[c]=u,this.table.splice(c+1),this.lexerState=u.lexerState,this.results=this.finish()},o.prototype.rewind=function(u){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[u])},o.prototype.finish=function(){var u=[],c=this.grammar.start,f=this.table[this.table.length-1];return f.states.forEach(function(d){d.rule.name===c&&d.dot===d.rule.symbols.length&&d.reference===0&&d.data!==o.fail&&u.push(d)}),u.map(function(d){return d.data})};function a(u){var c=typeof u;if(c==="string")return u;if(c==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return"character matching "+u;if(u.type)return u.type+" token";if(u.test)return"token matching "+String(u.test);throw new Error("Unknown symbol type: "+u)}}function l(u){var c=typeof u;if(c==="string")return u;if(c==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return u.toString();if(u.type)return"%"+u.type;if(u.test)return"<"+String(u.test)+">";throw new Error("Unknown symbol type: "+u)}}return{Parser:o,Grammar:i,Rule:e}})})(zh)),zh.exports}var qd={},GE;function CV(){if(GE)return qd;GE=1,Object.defineProperty(qd,"__esModule",{value:!0});function t(i){return i[0]}const e=i=>[].concat(...i.map(s=>Array.isArray(s)?e(s):s));function n(i){return i?Array.isArray(i)?e(i).join(""):i:""}const r={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:i=>i.join("")},{name:"Reverse_path",symbols:["Reverse_path$string$1"]},{name:"Forward_path$subexpression$1$subexpression$1",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:"@"}],postprocess:function(i){return i.join("")}},{name:"Forward_path$subexpression$1",symbols:["Forward_path$subexpression$1$subexpression$1","Domain",{literal:">"}]},{name:"Forward_path",symbols:["Forward_path$subexpression$1"]},{name:"Forward_path$subexpression$2",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:">"}],postprocess:function(i){return i.join("")}},{name:"Forward_path",symbols:["Forward_path$subexpression$2"]},{name:"Forward_path",symbols:["Path"]},{name:"Path$ebnf$1$subexpression$1",symbols:["A_d_l",{literal:":"}]},{name:"Path$ebnf$1",symbols:["Path$ebnf$1$subexpression$1"],postprocess:t},{name:"Path$ebnf$1",symbols:[],postprocess:()=>null},{name:"Path",symbols:[{literal:"<"},"Path$ebnf$1","Mailbox",{literal:">"}]},{name:"A_d_l$ebnf$1",symbols:[]},{name:"A_d_l$ebnf$1$subexpression$1",symbols:[{literal:","},"At_domain"]},{name:"A_d_l$ebnf$1",symbols:["A_d_l$ebnf$1","A_d_l$ebnf$1$subexpression$1"],postprocess:i=>i[0].concat([i[1]])},{name:"A_d_l",symbols:["At_domain","A_d_l$ebnf$1"]},{name:"At_domain",symbols:[{literal:"@"},"Domain"]},{name:"Domain$ebnf$1",symbols:[]},{name:"Domain$ebnf$1$subexpression$1",symbols:[{literal:"."},"sub_domain"]},{name:"Domain$ebnf$1",symbols:["Domain$ebnf$1","Domain$ebnf$1$subexpression$1"],postprocess:i=>i[0].concat([i[1]])},{name:"Domain",symbols:["sub_domain","Domain$ebnf$1"]},{name:"sub_domain",symbols:["U_label"]},{name:"Let_dig",symbols:["ALPHA_DIGIT"],postprocess:t},{name:"Ldh_str$ebnf$1",symbols:[]},{name:"Ldh_str$ebnf$1",symbols:["Ldh_str$ebnf$1","ALPHA_DIG_DASH"],postprocess:i=>i[0].concat([i[1]])},{name:"Ldh_str",symbols:["Ldh_str$ebnf$1","Let_dig"]},{name:"U_Let_dig",symbols:["ALPHA_DIGIT_U"],postprocess:t},{name:"U_Ldh_str$ebnf$1",symbols:[]},{name:"U_Ldh_str$ebnf$1",symbols:["U_Ldh_str$ebnf$1","ALPHA_DIG_DASH_U"],postprocess:i=>i[0].concat([i[1]])},{name:"U_Ldh_str",symbols:["U_Ldh_str$ebnf$1","U_Let_dig"]},{name:"U_label$ebnf$1$subexpression$1",symbols:["U_Ldh_str"]},{name:"U_label$ebnf$1",symbols:["U_label$ebnf$1$subexpression$1"],postprocess:t},{name:"U_label$ebnf$1",symbols:[],postprocess:()=>null},{name:"U_label",symbols:["U_Let_dig","U_label$ebnf$1"]},{name:"address_literal$subexpression$1",symbols:["IPv4_address_literal"]},{name:"address_literal$subexpression$1",symbols:["IPv6_address_literal"]},{name:"address_literal$subexpression$1",symbols:["General_address_literal"]},{name:"address_literal",symbols:[{literal:"["},"address_literal$subexpression$1",{literal:"]"}]},{name:"non_local_part",symbols:["Domain"],postprocess:function(i){return{DomainName:n(i[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(i){return{AddressLiteral:n(i[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(i){return{localPart:n(i[0]),domainPart:n(i[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(i){return{DotString:n(i[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(i){return{QuotedString:n(i[0])}}},{name:"Dot_string$ebnf$1",symbols:[]},{name:"Dot_string$ebnf$1$subexpression$1",symbols:[{literal:"."},"Atom"]},{name:"Dot_string$ebnf$1",symbols:["Dot_string$ebnf$1","Dot_string$ebnf$1$subexpression$1"],postprocess:i=>i[0].concat([i[1]])},{name:"Dot_string",symbols:["Atom","Dot_string$ebnf$1"]},{name:"Atom$ebnf$1",symbols:[/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/]},{name:"Atom$ebnf$1",symbols:["Atom$ebnf$1",/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/],postprocess:i=>i[0].concat([i[1]])},{name:"Atom",symbols:["Atom$ebnf$1"]},{name:"Quoted_string$ebnf$1",symbols:[]},{name:"Quoted_string$ebnf$1",symbols:["Quoted_string$ebnf$1","QcontentSMTP"],postprocess:i=>i[0].concat([i[1]])},{name:"Quoted_string",symbols:["DQUOTE","Quoted_string$ebnf$1","DQUOTE"]},{name:"QcontentSMTP",symbols:["qtextSMTP"]},{name:"QcontentSMTP",symbols:["quoted_pairSMTP"]},{name:"quoted_pairSMTP",symbols:[{literal:"\\"},/[\x20-\x7e]/]},{name:"qtextSMTP",symbols:[/[\x20-\x21\x23-\x5b\x5d-\x7e\u0080-\uFFFF]/],postprocess:t},{name:"IPv4_address_literal$macrocall$2",symbols:[{literal:"."},"Snum"]},{name:"IPv4_address_literal$macrocall$1",symbols:["IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2"]},{name:"IPv4_address_literal",symbols:["Snum","IPv4_address_literal$macrocall$1"]},{name:"IPv6_address_literal$subexpression$1",symbols:[/[iI]/,/[pP]/,/[vV]/,{literal:"6"},{literal:":"}],postprocess:function(i){return i.join("")}},{name:"IPv6_address_literal",symbols:["IPv6_address_literal$subexpression$1","IPv6_addr"]},{name:"General_address_literal$ebnf$1",symbols:["dcontent"]},{name:"General_address_literal$ebnf$1",symbols:["General_address_literal$ebnf$1","dcontent"],postprocess:i=>i[0].concat([i[1]])},{name:"General_address_literal",symbols:["Standardized_tag",{literal:":"},"General_address_literal$ebnf$1"]},{name:"Standardized_tag",symbols:["Ldh_str"]},{name:"dcontent",symbols:[/[\x21-\x5a\x5e-\x7e]/],postprocess:t},{name:"Snum",symbols:["DIGIT"]},{name:"Snum$subexpression$1",symbols:[/[1-9]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$1"]},{name:"Snum$subexpression$2",symbols:[{literal:"1"},"DIGIT","DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$2"]},{name:"Snum$subexpression$3",symbols:[{literal:"2"},/[0-4]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$3"]},{name:"Snum$subexpression$4",symbols:[{literal:"2"},{literal:"5"},/[0-5]/]},{name:"Snum",symbols:["Snum$subexpression$4"]},{name:"IPv6_addr",symbols:["IPv6_full"]},{name:"IPv6_addr",symbols:["IPv6_comp"]},{name:"IPv6_addr",symbols:["IPv6v4_full"]},{name:"IPv6_addr",symbols:["IPv6v4_comp"]},{name:"IPv6_hex",symbols:["HEXDIG"]},{name:"IPv6_hex$subexpression$1",symbols:["HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$1"]},{name:"IPv6_hex$subexpression$2",symbols:["HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$2"]},{name:"IPv6_hex$subexpression$3",symbols:["HEXDIG","HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$3"]},{name:"IPv6_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_full$macrocall$1",symbols:["IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2"]},{name:"IPv6_full",symbols:["IPv6_hex","IPv6_full$macrocall$1"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$1",symbols:["IPv6_comp$ebnf$1$subexpression$1"],postprocess:t},{name:"IPv6_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:i=>i.join("")},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$2$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$2",symbols:["IPv6_comp$ebnf$2$subexpression$1"],postprocess:t},{name:"IPv6_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6_comp",symbols:["IPv6_comp$ebnf$1","IPv6_comp$string$1","IPv6_comp$ebnf$2"]},{name:"IPv6v4_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_full$macrocall$1",symbols:["IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2"]},{name:"IPv6v4_full",symbols:["IPv6_hex","IPv6v4_full$macrocall$1",{literal:":"},"IPv4_address_literal"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6v4_comp$ebnf$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1"],postprocess:t},{name:"IPv6v4_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:i=>i.join("")},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",{literal:":"}]},{name:"IPv6v4_comp$ebnf$2",symbols:["IPv6v4_comp$ebnf$2$subexpression$1"],postprocess:t},{name:"IPv6v4_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp",symbols:["IPv6v4_comp$ebnf$1","IPv6v4_comp$string$1","IPv6v4_comp$ebnf$2","IPv4_address_literal"]},{name:"DIGIT",symbols:[/[0-9]/],postprocess:t},{name:"ALPHA_DIGIT_U",symbols:[/[0-9A-Za-z\u0080-\uFFFF]/],postprocess:t},{name:"ALPHA_DIGIT",symbols:[/[0-9A-Za-z]/],postprocess:t},{name:"ALPHA_DIG_DASH",symbols:[/[-0-9A-Za-z]/],postprocess:t},{name:"ALPHA_DIG_DASH_U",symbols:[/[-0-9A-Za-z\u0080-\uFFFF]/],postprocess:t},{name:"HEXDIG",symbols:[/[0-9A-Fa-f]/],postprocess:t},{name:"DQUOTE",symbols:[{literal:'"'}],postprocess:t}],ParserStart:"Reverse_path"};return qd.default=r,qd}var WE;function AV(){if(WE)return Fn;WE=1;var t=Fn&&Fn.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.canonicalize=Fn.canonicalize_quoted_string=Fn.normalize=Fn.normalize_dot_string=Fn.parse=void 0;const e=_V(),n=t(CV());n.default.ParserStart="Mailbox";const r=e.Grammar.fromCompiled(n.default);function i(u){const c=new e.Parser(r);if(c.feed(u),c.results.length!==1)throw new Error("address parsing failed: ambiguous grammar");return c.results[0]}Fn.parse=i;function s(u){return(function(){const d=u.indexOf("+");return d===-1?u:u.substr(0,d)})().replace(/\./g,"").toLowerCase()}Fn.normalize_dot_string=s;function o(u){var c,f;const d=i(u),h=(c=d.domainPart.AddressLiteral)!==null&&c!==void 0?c:d.domainPart.DomainName.toLowerCase();return`${(f=d.localPart.QuotedString)!==null&&f!==void 0?f:s(d.localPart.DotString)}@${h}`}Fn.normalize=o;function a(u){return`"${u.substr(1).substr(0,u.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}Fn.canonicalize_quoted_string=a;function l(u){var c;const f=i(u),d=(c=f.domainPart.AddressLiteral)!==null&&c!==void 0?c:f.domainPart.DomainName.toLowerCase();return`${f.localPart.QuotedString?a(f.localPart.QuotedString):f.localPart.DotString}@${d}`}return Fn.canonicalize=l,Fn}var DV=AV();const kV=new RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(([Zz])|([\\+|\\-]([01][0-9]|2[0-3]):[0-5][0-9]))$"),OV=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,TV=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,IV=/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,PV=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,RV=/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,NV=[0,31,28,31,30,31,30,31,31,30,31,30,31],MV=/^(?:\/(?:[^~/]|~0|~1)*)*$/,FV=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,LV=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,BV=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,G3={date:(t,e,n,r)=>{if(typeof n!="string"||n==="")return;const i=n.match(PV);if(!i)return t.errors.formatDateTimeError({value:n,pointer:r,schema:e});const s=+i[1],o=+i[2],a=+i[3],l=s%4===0&&(s%100!==0||s%400===0);if(!(o>=1&&o<=12&&a>=1&&a<=(o==2&&l?29:NV[o])))return t.errors.formatDateError({value:n,pointer:r,schema:e})},"date-time":(t,e,n,r)=>{if(!(typeof n!="string"||n===""))return n===""||kV.test(n)?new Date(n).toString()==="Invalid Date"?t.errors.formatDateTimeError({value:n,pointer:r,schema:e}):void 0:t.errors.formatDateTimeError({value:n,pointer:r,schema:e})},email:(t,e,n,r)=>{if(typeof n!="string"||n==="")return;if(n[0]==='"')return t.errors.formatEmailError({value:n,pointer:r,schema:e});const[i,s,...o]=n.split("@");if(!i||!s||o.length!==0||i.length>64||s.length>253)return t.errors.formatEmailError({value:n,pointer:r,schema:e});if(i[0]==="."||i.endsWith(".")||i.includes(".."))return t.errors.formatEmailError({value:n,pointer:r,schema:e});if(!/^[a-z0-9.-]+$/i.test(s)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(i))return t.errors.formatEmailError({value:n,pointer:r,schema:e});if(!s.split(".").every(a=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(a)))return t.errors.formatEmailError({value:n,pointer:r,schema:e})},"idn-email":(t,e,n,r)=>{if(!(typeof n!="string"||n===""))try{DV.parse(n);return}catch{return t.errors.formatEmailError({value:n,pointer:r,schema:e})}},hostname:(t,e,n,r)=>{if(typeof n=="string"&&!(n===""||IV.test(n)))return t.errors.formatHostnameError({value:n,pointer:r,schema:e})},ipv4:(t,e,n,r)=>{if(!(typeof n!="string"||n==="")){if(n&&n[0]==="0")return t.errors.formatIPV4LeadingZeroError({value:n,pointer:r,schema:e});if(!(n.length<=15&&OV.test(n)))return t.errors.formatIPV4Error({value:n,pointer:r,schema:e})}},ipv6:(t,e,n,r)=>{if(!(typeof n!="string"||n==="")){if(n&&n[0]==="0")return t.errors.formatIPV6LeadingZeroError({value:n,pointer:r,schema:e});if(!(n.length<=45&&TV.test(n)))return t.errors.formatIPV6Error({value:n,pointer:r,schema:e})}},"json-pointer":(t,e,n,r)=>{if(!(typeof n!="string"||n==="")&&!MV.test(n))return t.errors.formatJsonPointerError({value:n,pointer:r,schema:e})},"relative-json-pointer":(t,e,n,r)=>{if(!(typeof n!="string"||n==="")&&!FV.test(n))return t.errors.formatJsonPointerError({value:n,pointer:r,schema:e})},regex:(t,e,n,r)=>{if(typeof n=="string"&&/\\Z$/.test(n)===!1){try{new RegExp(n);return}catch{}return t.errors.formatRegExError({value:n,pointer:r,schema:e})}if(!(typeof n=="object"||typeof n=="number"||Array.isArray(n)))return t.errors.formatRegExError({value:n,pointer:r,schema:e})},time:(t,e,n,r)=>typeof n!="string"||n===""||n.match(RV)?void 0:t.errors.formatDateTimeError({value:n,pointer:r,schema:e}),uri:(t,e,n,r)=>{if(!(typeof n!="string"||n==="")&&!HE.isUri(n))return t.errors.formatURIError({value:n,pointer:r,schema:e})},"uri-reference":(t,e,n,r)=>{if(!(typeof n!="string"||n==="")&&!LV.test(n))return t.errors.formatURIReferenceError({value:n,pointer:r,schema:e})},"uri-template":(t,e,n,r)=>{if(!(typeof n!="string"||n==="")&&!BV.test(n))return t.errors.formatURITemplateError({value:n,pointer:r,schema:e})},url:(t,e,n,r)=>{if(!(n===""||HE.isWebUri(n)))return t.errors.formatURLError({value:n,pointer:r,schema:e})}},W3={};function K3(t,e=W3){const{pointer:n="#",data:r,schema:i=t.rootSchema,withSchemaWarning:s=!1}=e,o=Yc.split(n),a=X3(t,t.resolveRef(i),o,"#",r);if(!(!s&&(a==null?void 0:a.code)==="schema-warning"))return a}function X3(t,e,n,r,i=W3){if(n.length===0)return t.resolveRef(e);const s=n.shift();return e=t.step(s,e,i,r),Nn(e)?e:(i=i[s],X3(t,e,n,`${r}/${s}`,i))}function $V(t){switch(tt(t)){case"string":case"array":return(t==null?void 0:t.length)===0;case"null":case"undefined":return!0;case"object":return Object.keys(t).length===0;default:return!1}}const KE=su.templateDefaultOptions;let cs;function jg(t,e){const{$ref:n}=t;return n==null?!0:(cs[e]==null||cs[e][n]==null?0:cs[e][n])<su.GET_TEMPLATE_RECURSION_LIMIT}function XE(t,e,n){const{$ref:r}=e;return r==null?e:(cs[n]=cs[n]||{},cs[n][r]=cs[n][r]||0,cs[n][r]+=1,t.resolveRef(e))}function zV(t,e){if(t==="string")return JSON.stringify(e);if(typeof e!="string")return null;try{if(e=JSON.parse(e),typeof e===t)return e}catch{}return null}function Y3(t,e,n,r,i){if(tt(e)!=="object")return Object.assign({pointer:r},e);if(jg(e,r)===!1&&n==null)return!1;let s=$p(XE(t,e,r));if(Array.isArray(e.anyOf)&&e.anyOf.length>0){if(jg(e.anyOf[0],`${r}/anyOf/0`)){const o=XE(t,e.anyOf[0],`${r}/anyOf/0`);s=Gv(s,o),s.pointer=e.anyOf[0].$ref||s.pointer}delete s.anyOf}if(Array.isArray(e.allOf)&&e.allOf.map((a,l)=>jg(a,`${r}/allOf/${l}`)).reduceRight((a,l)=>a&&l,!0)){const a=[];let l=$p(n);for(let c=0;c<e.allOf.length;c+=1)a.push(R3(t,e.allOf[c],l)),l=si(t,l,{type:e.type,...a[c]},`${r}/allOf/${c}`,i);const u=M3(t,{allOf:a});u&&(s=zn(s,u))}return s.pointer=s.pointer||e.$ref||r,s}const YE=t=>t&&typeof t=="object";function si(t,e,n,r,i){var s;if(n==null)throw new Error(`getTemplate: missing schema for data: ${JSON.stringify(e)}`);if(r==null)throw new Error("Missing pointer");let o=Y3(t,n,e,r,i);if(!YE(o))return;if(r=o.pointer,o!=null&&o.const)return o.const;if(Array.isArray(o.oneOf))if($V(e)){const c=o.oneOf[0].type||o.type||o.const&&typeof o.const||tt(e);o={...o.oneOf[0],type:c}}else{const c=qv(t,e,o);if(Nn(c)){if(e!=null&&i.removeInvalidData!==!0)return e;o=o.oneOf[0],e=void 0}else c.type=(s=c.type)!==null&&s!==void 0?s:o.type,o=c}if(!YE(o)||o.type==null)return;if(e instanceof File)return e;const a=Array.isArray(o.type)?jV(o.type,e,o.default):o.type,l=tt(e);return e!=null&&l!==a&&!(l==="number"&&a==="integer")&&(e=zV(a,e)),JE[a]==null?i.removeInvalidData?void 0:e:JE[a](t,o,e,r,i)}function jV(t,e,n){if(e==null){if(n!=null){const i=tt(n);if(t.includes(i))return i}return t[0]}const r=tt(e);return t.includes(r)?r:t[0]}const JE={null:(t,e,n)=>Lu(e,n,null),string:(t,e,n)=>Lu(e,n,""),number:(t,e,n)=>Lu(e,n,0),integer:(t,e,n)=>Lu(e,n,0),boolean:(t,e,n)=>Lu(e,n,!1),object:(t,e,n,r,i)=>{var s;const o=e.default===void 0?{}:e.default,a={},l=i.extendDefaults===!1&&e.default!==void 0?[]:(s=e.required)!==null&&s!==void 0?s:[];e.properties&&Object.keys(e.properties).forEach(f=>{const d=n==null||n[f]==null?o[f]:n[f],h=l.includes(f);(d!=null||h||i.addOptionalProps)&&(a[f]=si(t,d,e.properties[f],`${r}/properties/${f}`,i))});let u=L3(t,e,a);if(u){u=zn(e,u),delete u.dependencies;const f=si(t,n,u,`${r}/dependencies`,i);Object.assign(a,f)}n&&(i.removeInvalidData===!0&&(e.additionalProperties===!1||tt(e.additionalProperties)==="object")?tt(e.additionalProperties)==="object"&&Object.keys(n).forEach(f=>{a[f]==null&&t.isValid(n[f],e.additionalProperties)&&(a[f]=n[f])}):Object.keys(n).forEach(f=>a[f]==null&&(a[f]=n[f])));const c=sm(t,e,a);if(c){const f=si(t,a,{type:"object",...c},r,i);Object.assign(a,f)}return a},array:(t,e,n,r,i)=>{var s,o;if(e.items==null)return n||[];const a=e.default===void 0?[]:e.default,l=n||a,u=i.extendDefaults===!1&&e.default!==void 0?0:e.minItems||0;if(Array.isArray(e.items)){for(let f=0,d=Math.max(u??0,(o=(s=e.items)===null||s===void 0?void 0:s.length)!==null&&o!==void 0?o:0);f<d;f+=1)l[f]=si(t,l[f]==null?a[f]:l[f],e.items[f],`${r}/items/${f}`,i);return l}if(tt(e.items)!=="object")return l;const c=Y3(t,e.items,n,r,i);if(c===!1)return l;if(r=c.pointer||r,c.oneOf&&l.length===0){const f=c.oneOf[0];for(let d=0;d<u;d+=1)l[d]=si(t,l[d]==null?a[d]:l[d],f,`${r}/oneOf/0`,i);return l}if(c.oneOf&&l.length>0){const f=Math.max(u,l.length);for(let d=0;d<f;d+=1){let h=l[d]==null?a[d]:l[d],p=qv(t,h,c);p==null||Nn(p)?h!=null&&i.removeInvalidData!==!0?l[d]=h:(h=void 0,p=c.oneOf[0],l[d]=si(t,h,p,`${r}/oneOf/${d}`,i)):l[d]=si(t,h,p,`${r}/oneOf/${d}`,i)}return l}if(c.type){for(let f=0,d=Math.max(u,l.length);f<d;f+=1)l[f]=si(t,l[f]==null?a[f]:l[f],c,`${r}/items`,i);return l}return l}};function Lu(t,e,n){return e??(t.const?t.const:t.default===void 0&&Array.isArray(t.enum)?t.enum[0]:t.default===void 0?n:t.default)}const J3=(t,e,n=t.rootSchema,r)=>(cs={},r?si(t,e,n,"#",{...KE,...r}):si(t,e,n,"#",KE));function Z3(t,e,n=t.rootSchema,r="#"){return t.validate(e,n,r).length===0}function ZE(t){const e=[];let n=0;const r=t.length;for(;n<r;){const i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const s=t.charCodeAt(n++);(s&64512)==56320?e.push(((i&1023)<<10)+(s&1023)+65536):(e.push(i),n--)}else e.push(i)}return e}function QE(t){const e=`${t}`,n=e.indexOf(".");return n===-1?0:e.length-(n+1)}var Vg,ew;function VV(){return ew||(ew=1,Vg=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}),Vg}var UV=VV();const Q3=Ta(UV),HV=Object.prototype.hasOwnProperty,tw=(t,e)=>!(t[e]===void 0||!HV.call(t,e)),eO={additionalProperties:(t,e,n,r)=>{if(e.additionalProperties===!0||e.additionalProperties==null||tt(e.patternProperties)==="object"&&e.additionalProperties===!1)return;const i=[];let s=Object.keys(n).filter(a=>su.propertyBlacklist.includes(a)===!1);const o=Object.keys(e.properties||{});if(tt(e.patternProperties)==="object"){const a=Object.keys(e.patternProperties).map(l=>new RegExp(l));s=s.filter(l=>{for(let u=0;u<a.length;u+=1)if(a[u].test(l))return!1;return!0})}for(let a=0,l=s.length;a<l;a+=1){const u=s[a];if(o.indexOf(u)===-1){const c=no(e.additionalProperties);if(c&&Array.isArray(e.additionalProperties.oneOf)){const f=t.resolveOneOf(n[u],e.additionalProperties,`${r}/${u}`);Nn(f)?i.push(t.errors.additionalPropertiesError({pointer:r,schema:e.additionalProperties,value:n,property:s[a],properties:o,errors:f.data.errors})):i.push(...t.validate(n[u],f,r))}else c?i.push(...t.validate(n[u],e.additionalProperties,`${r}/${u}`)):i.push(t.errors.noAdditionalPropertiesError({pointer:r,schema:e,value:n,property:s[a],properties:o}))}}return i},allOf:Tj,anyOf:Rj,dependencies:Pj,enum:(t,e,n,r)=>{const i=tt(n);if(i==="object"||i==="array"){const s=JSON.stringify(n);for(let o=0;o<e.enum.length;o+=1)if(JSON.stringify(e.enum[o])===s)return}else if(e.enum.includes(n))return;return t.errors.enumError({pointer:r,schema:e,value:n,values:e.enum})},format:(t,e,n,r)=>{if(t.validateFormat[e.format])return t.validateFormat[e.format](t,e,n,r)},items:(t,e,n,r)=>{if(e.items===!1)return Array.isArray(n)&&n.length===0?void 0:t.errors.invalidDataError({pointer:r,value:n,schema:e});const i=[];for(let s=0;s<n.length;s+=1){const o=n[s],a=t.step(s,e,n,r);if(Nn(a))return[a];const l=t.validate(o,a,`${r}/${s}`);i.push(...l)}return i},maximum:(t,e,n,r)=>{if(!isNaN(e.maximum)){if(e.maximum&&e.maximum<n)return t.errors.maximumError({maximum:e.maximum,length:n,value:n,pointer:r,schema:e});if(e.maximum&&e.exclusiveMaximum===!0&&e.maximum===n)return t.errors.maximumError({maximum:e.maximum,length:n,pointer:r,schema:e,value:n})}},maxItems:(t,e,n,r)=>{if(!isNaN(e.maxItems)&&e.maxItems<n.length)return t.errors.maxItemsError({maximum:e.maxItems,length:n.length,schema:e,value:n,pointer:r})},maxLength:(t,e,n,r)=>{if(isNaN(e.maxLength))return;const i=ZE(n).length;if(e.maxLength<i)return t.errors.maxLengthError({maxLength:e.maxLength,length:i,pointer:r,schema:e,value:n})},maxProperties:(t,e,n,r)=>{const i=Object.keys(n).length;if(isNaN(e.maxProperties)===!1&&e.maxProperties<i)return t.errors.maxPropertiesError({maxProperties:e.maxProperties,length:i,pointer:r,schema:e,value:n})},minLength:(t,e,n,r)=>{if(isNaN(e.minLength))return;const i=ZE(n).length;if(e.minLength>i)return e.minLength===1?t.errors.minLengthOneError({minLength:e.minLength,length:i,pointer:r,schema:e,value:n}):t.errors.minLengthError({minLength:e.minLength,length:i,pointer:r,schema:e,value:n})},minimum:(t,e,n,r)=>{if(!isNaN(e.minimum)){if(e.minimum>n)return t.errors.minimumError({minimum:e.minimum,length:n,pointer:r,schema:e,value:n});if(e.exclusiveMinimum===!0&&e.minimum===n)return t.errors.minimumError({minimum:e.minimum,length:n,pointer:r,schema:e,value:n})}},minItems:(t,e,n,r)=>{if(!isNaN(e.minItems)&&e.minItems>n.length)return e.minItems===1?t.errors.minItemsOneError({minItems:e.minItems,length:n.length,pointer:r,schema:e,value:n}):t.errors.minItemsError({minItems:e.minItems,length:n.length,pointer:r,schema:e,value:n})},minProperties:(t,e,n,r)=>{if(isNaN(e.minProperties))return;const i=Object.keys(n).length;if(e.minProperties>i)return t.errors.minPropertiesError({minProperties:e.minProperties,length:i,pointer:r,schema:e,value:n})},multipleOf:(t,e,n,r)=>{if(isNaN(e.multipleOf)||typeof n!="number")return;const i=QE(n),s=QE(e.multipleOf);if(i>s)return t.errors.multipleOfError({multipleOf:e.multipleOf,value:n,pointer:r,schema:e});const o=Math.pow(10,s),a=Math.round(n*o),l=Math.round(e.multipleOf*o);if(a%l/o!==0)return t.errors.multipleOfError({multipleOf:e.multipleOf,value:n,pointer:r,schema:e})},not:(t,e,n,r)=>{const i=[];return t.validate(n,e.not,r).length===0&&i.push(t.errors.notError({value:n,not:e.not,pointer:r,schema:e})),i},oneOf:Hz,pattern:(t,e,n,r)=>{if(new RegExp(e.pattern,"u").test(n)===!1)return t.errors.patternError({pattern:e.pattern,description:e.patternExample||e.pattern,received:n,schema:e,value:n,pointer:r})},patternProperties:(t,e,n,r)=>{const i=e.properties||{},s=e.patternProperties;if(tt(s)!=="object")return;const o=[],a=Object.keys(n),l=Object.keys(s).map(u=>({regex:new RegExp(u),patternSchema:s[u]}));return a.forEach(u=>{let c=!1;for(let f=0,d=l.length;f<d;f+=1)if(l[f].regex.test(u)){c=!0;const h=t.validate(n[u],l[f].patternSchema,`${r}/${u}`);h&&h.length>0&&o.push(...h)}i[u]||c===!1&&e.additionalProperties===!1&&o.push(t.errors.patternPropertiesError({key:u,pointer:r,schema:e,value:n,patterns:Object.keys(s).join(",")}))}),o},properties:(t,e,n,r)=>{const i=[],s=Object.keys(e.properties||{});for(let o=0;o<s.length;o+=1){const a=s[o];if(tw(n,a)){const l=t.step(a,e,n,r),u=t.validate(n[a],l,`${r}/${a}`);i.push(...u)}}return i},propertiesRequired:(t,e,n,r)=>{const i=[],s=Object.keys(e.properties||{});for(let o=0;o<s.length;o+=1){const a=s[o];if(n[a]===void 0)i.push(t.errors.requiredPropertyError({key:a,pointer:r,schema:e,value:n}));else{const l=t.step(a,e,n,r),u=t.validate(n[a],l,`${r}/${a}`);i.push(...u)}}return i},required:(t,e,n,r)=>{if(Array.isArray(e.required)!==!1)return e.required.map(i=>{if(!tw(n,i))return t.errors.requiredPropertyError({key:i,pointer:r,schema:e,value:n})})},requiredNotEmpty:(t,e,n,r)=>{if(Array.isArray(e.required)!==!1)return e.required.map(i=>{if(n[i]==null||n[i]==="")return t.errors.valueNotEmptyError({property:i,pointer:`${r}/${i}`,schema:e,value:n})})},uniqueItems:(t,e,n,r)=>{if((Array.isArray(n)&&e.uniqueItems)===!1)return;const i=[],s=[];return n.forEach((o,a)=>{for(let l=a+1;l<n.length;l+=1)Q3(o,n[l])&&!i.includes(l)&&(s.push(t.errors.uniqueItemsError({pointer:`${r}/${l}`,duplicatePointer:`${r}/${a}`,arrayPointer:r,value:JSON.stringify(o),schema:e})),i.push(l))}),s}};function Oi(t){if(t===void 0)return;const e={type:tt(t)};return e.type==="object"&&no(t)&&(e.properties={},Object.keys(t).forEach(n=>e.properties[n]=Oi(t[n]))),e.type==="array"&&Array.isArray(t)&&(t.length===1?e.items=Oi(t[0]):e.items=t.map(Oi)),e}const qV={array:(t,e,n,r,i)=>{const s=r==null?void 0:r[e],o=tt(n.items);if(o==="object")return PE(t,n.items,s,`${i}/${e}`)||t.resolveRef(n.items);if(o==="array"){if(n.items[e]===!0)return Oi(s);if(n.items[e]===!1)return t.errors.invalidDataError({key:e,value:s,pointer:i,schema:n});if(n.items[e])return t.resolveRef(n.items[e]);if(n.additionalItems===!1)return t.errors.additionalItemsError({key:e,value:s,pointer:i,schema:n});if(n.additionalItems===!0||n.additionalItems===void 0)return Oi(s);if(tt(n.additionalItems)==="object")return n.additionalItems;throw new Error(`Invalid schema ${JSON.stringify(n,null,2)} for ${JSON.stringify(r,null,2)}`)}return n.additionalItems!==!1&&s?Oi(s):new Error(`Invalid array schema for ${e} at ${i}`)},object:(t,e,n,r,i)=>{var s;n=PE(t,n,r,i);const o=(s=n==null?void 0:n.properties)===null||s===void 0?void 0:s[e];if(o!==void 0){if(o===!1)return t.errors.forbiddenPropertyError({property:e,value:r,pointer:i,schema:n});if(o===!0)return Oi(r==null?void 0:r[e]);const u=t.resolveRef(o);if(Nn(u))return u;if(u&&Array.isArray(u.oneOf)){const c=t.resolveOneOf(r[e],u,`${i}/${e}`);for(const f in u)f!=="oneOf"&&c[f]===void 0&&(c[f]=u[f]);return c}if(u)return u}const{patternProperties:a}=n;if(tt(a)==="object"){let u;const c=Object.keys(a);for(let f=0,d=c.length;f<d;f+=1)if(u=new RegExp(c[f]),u.test(e))return a[c[f]]}const{additionalProperties:l}=n;return tt(l)==="object"?n.additionalProperties:r&&(l===void 0||l===!0)?Oi(r[e]):t.errors.unknownPropertyError({property:e,value:r,pointer:`${i}`,schema:n})}};function tO(t,e,n,r,i="#"){var s;const o=tt(r);let a=(s=n.type)!==null&&s!==void 0?s:o;if(Array.isArray(a)){if(!a.includes(o))return t.errors.typeError({value:r,pointer:i,expected:n.type,received:o,schema:n});a=o}const l=qV[a];if(l){const u=l(t,`${e}`,n,r,i);return u===void 0?t.errors.schemaWarning({pointer:i,value:r,schema:n,key:e}):u}return new Error(`Unsupported schema type ${n.type} for key ${e}`)}function nO(t,e,n=t.rootSchema){var r;if(n.oneOf)return n.oneOf.map(s=>t.resolveRef(s));if(!((r=n.items)===null||r===void 0)&&r.oneOf)return n.items.oneOf.map(s=>t.resolveRef(s));const i=t.step(e,n,{},"#");return Nn(i)?i:[i]}const GV={array:(t,e,n,r)=>t.typeKeywords.array.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),object:(t,e,n,r)=>t.typeKeywords.object.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),string:(t,e,n,r)=>t.typeKeywords.string.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),integer:(t,e,n,r)=>t.typeKeywords.number.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),number:(t,e,n,r)=>t.typeKeywords.number.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),boolean:(t,e,n,r)=>t.typeKeywords.boolean.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),null:(t,e,n,r)=>t.typeKeywords.null.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r))};function WV(t,e){const n=tt(t);return n==="number"&&(e==="integer"||Array.isArray(e)&&e.includes("integer"))?Number.isInteger(t)||isNaN(t)?"integer":"number":n}function rO(t,e,n=t.rootSchema,r="#"){if(n=t.resolveRef(n),tt(n)==="boolean")return n?[]:[t.errors.invalidDataError({pointer:r,schema:n,value:e})];if(Nn(n))return[n];if(n.const!==void 0)return Q3(n.const,e)?[]:[t.errors.constError({pointer:r,schema:n,value:e,expected:n.const})];const i=WV(e,n.type),s=n.type||i;return i!==s&&(!Array.isArray(s)||!s.includes(i))?[t.errors.typeError({pointer:r,schema:n,value:e,received:i,expected:s})]:t.validateType[i]==null?[t.errors.invalidTypeError({pointer:r,schema:n,value:e,receivedType:i})]:Kc(t.validateType[i](t,n,e,r)).filter(Bp)}const KV={typeKeywords:{array:["allOf","anyOf","enum","items","maxItems","minItems","not","oneOf","uniqueItems"],boolean:["enum","not","allOf","anyOf","oneOf"],object:["additionalProperties","dependencies","enum","format","minProperties","maxProperties","patternProperties","properties","required","not","oneOf","allOf","anyOf"],string:["allOf","anyOf","enum","format","maxLength","minLength","not","oneOf","pattern"],number:["allOf","anyOf","enum","format","maximum","minimum","multipleOf","not","oneOf"],null:["allOf","anyOf","enum","format","not","oneOf"]},validateKeyword:eO,validateType:GV,validateFormat:G3,errors:q3,addRemoteSchema:j3,compileSchema:xV,createSchemaOf:Oi,each:H3,eachSchema:om,getChildSchemaSelection:nO,getSchema:K3,getTemplate:J3,isValid:Z3,resolveAllOf:N3,resolveAnyOf:$3,resolveOneOf:S3,resolveRef:F3,step:tO,validate:rO,templateDefaultOptions:su.templateDefaultOptions};class iO extends z3{constructor(e,n={}){super(Gv(KV,n),e)}}const nw="__compiled",rw="__ref",XV="getRef",YV="getRoot",JV=/(#|\/)+$/g;function ZV(t,e,n=e,r=!1){if(e===!0||e===!1||e===void 0||e[nw]!==void 0)return e;const i={ids:{},remotes:t.remotes},s=JSON.stringify(e),o=JSON.parse(s);if(Object.defineProperty(o,nw,{enumerable:!1,value:!0}),Object.defineProperty(o,XV,{enumerable:!1,value:is.bind(null,i,o)}),r===!1&&s.includes("$ref")===!1)return o;o!==n&&Object.defineProperty(o,"$defs",{enumerable:!0,value:Object.assign({},n.definitions,n.$defs,o.definitions,o.$defs)});const a={},l=()=>o;return om(o,(u,c)=>{var f;if(u.$id){if(u.$id.startsWith("http")&&/(allOf|anyOf|oneOf)\/\d+$/.test(c)){const g=c.replace(/\/(allOf|anyOf|oneOf)\/\d+$/,""),b=Wo.get(o,g);u.$id=(f=b.$id)!==null&&f!==void 0?f:u.$id}i.ids[u.$id.replace(JV,"")]=c}c=`#${c}`.replace(/##+/,"#");const d=c.replace(/\/[^/]+$/,""),h=c.replace(/\/[^/]+\/[^/]+$/,""),p=a[d]||a[h],m=Up(p,u.$id);a[c]=m,i.ids[m]==null&&(i.ids[m]=c),u.$ref&&!u[rw]&&(Object.defineProperty(u,rw,{enumerable:!1,value:Up(m,u.$ref)}),Object.defineProperty(u,YV,{enumerable:!1,value:l}))}),o}const QV={...eO,contains:(t,e,n,r)=>{if(e.contains===!1)return t.errors.containsArrayError({pointer:r,value:n,schema:e});if(e.contains===!0)return Array.isArray(n)&&n.length===0?t.errors.containsAnyError({pointer:r,value:n,schema:e}):void 0;if(tt(e.contains)==="object"){for(let i=0;i<n.length;i+=1)if(t.isValid(n[i],e.contains))return;return t.errors.containsError({pointer:r,schema:e,value:n})}},exclusiveMaximum:(t,e,n,r)=>{if(!isNaN(e.exclusiveMaximum)&&e.exclusiveMaximum<=n)return t.errors.maximumError({maximum:e.exclusiveMaximum,length:n,pointer:r,schema:e,value:n})},exclusiveMinimum:(t,e,n,r)=>{if(!isNaN(e.exclusiveMinimum)&&e.exclusiveMinimum>=n)return t.errors.minimumError({minimum:e.exclusiveMinimum,length:n,pointer:r,schema:e,value:n})},if:Oj,maximum:(t,e,n,r)=>{if(!isNaN(e.maximum)&&e.maximum&&e.maximum<n)return t.errors.maximumError({maximum:e.maximum,length:n,pointer:r,schema:e,value:n})},minimum:(t,e,n,r)=>{if(!isNaN(e.minimum)&&e.minimum>n)return t.errors.minimumError({minimum:e.minimum,length:n,pointer:r,schema:e,value:n})},patternProperties:(t,e,n,r)=>{const i=e.properties||{},s=e.patternProperties;if(tt(s)!=="object")return;const o=[],a=Object.keys(n),l=Object.keys(s).map(u=>({regex:new RegExp(u),patternSchema:s[u]}));return a.forEach(u=>{let c=!1;for(let f=0,d=l.length;f<d;f+=1)if(l[f].regex.test(u)){if(c=!0,l[f].patternSchema===!1){o.push(t.errors.patternPropertiesError({key:u,pointer:r,patterns:Object.keys(s).join(","),schema:e,value:n}));return}const h=t.validate(n[u],l[f].patternSchema,`${r}/${u}`);h&&h.length>0&&o.push(...h)}i[u]||c===!1&&e.additionalProperties===!1&&o.push(t.errors.patternPropertiesError({key:u,pointer:r,patterns:Object.keys(s).join(","),schema:e,value:n}))}),o},propertyNames:(t,e,n,r)=>{if(e.propertyNames===!1)return Object.keys(n).length===0?void 0:t.errors.invalidPropertyNameError({property:Object.keys(n),pointer:r,value:n,schema:e});if(e.propertyNames===!0||tt(e.propertyNames)!=="object")return;const i=[],s=Object.keys(n),o={...e.propertyNames,type:"string"};return s.forEach(a=>{const l=t.validate(a,o,`${r}/${a}`);l.length>0&&i.push(t.errors.invalidPropertyNameError({property:a,pointer:r,validationError:l[0],value:n[a],schema:e}))}),i}},eU={array:(t,e,n,r)=>t.typeKeywords.array.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),object:(t,e,n,r)=>t.typeKeywords.object.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),string:(t,e,n,r)=>t.typeKeywords.string.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),integer:(t,e,n,r)=>t.typeKeywords.number.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),number:(t,e,n,r)=>t.typeKeywords.number.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),boolean:(t,e,n,r)=>t.typeKeywords.boolean.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r)),null:(t,e,n,r)=>t.typeKeywords.null.filter(i=>e&&e[i]!=null).map(i=>t.validateKeyword[i](t,e,n,r))},sO={typeKeywords:{array:["allOf","anyOf","contains","enum","if","items","maxItems","minItems","not","oneOf","uniqueItems"],boolean:["allOf","anyOf","enum","not","oneOf"],object:["additionalProperties","allOf","anyOf","dependencies","enum","format","if","maxProperties","minProperties","not","oneOf","patternProperties","properties","propertyNames","required"],string:["allOf","anyOf","enum","format","if","maxLength","minLength","not","oneOf","pattern"],number:["allOf","anyOf","enum","exclusiveMaximum","exclusiveMinimum","format","if","maximum","minimum","multipleOf","not","oneOf"],null:["allOf","anyOf","enum","format","not","oneOf"]},validateKeyword:QV,validateType:eU,validateFormat:G3,errors:q3,addRemoteSchema:j3,compileSchema:ZV,createSchemaOf:Oi,each:H3,eachSchema:om,getChildSchemaSelection:nO,getSchema:K3,getTemplate:J3,isValid:Z3,resolveAllOf:N3,resolveAnyOf:$3,resolveOneOf:S3,resolveRef:F3,step:tO,validate:rO,templateDefaultOptions:su.templateDefaultOptions};class oO extends z3{constructor(e,n={}){super(Gv(sO,n),e)}}({...sO});function Ci(t,e,n=[]){const r=document.createElement(t);return Object.entries(e).forEach(([i,s])=>{if(i==="text"){r.innerText=s;return}if(i==="inner"){r.innerHTML=s;return}r.setAttribute(i,s)}),n.forEach(i=>r.appendChild(i)),r}const iw={};function tU(t){let e=iw[t];if(e)return e;e=iw[t]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);e.push(r)}for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return e}function Ml(t,e){typeof e!="string"&&(e=Ml.defaultChars);const n=tU(e);return t.replace(/(%[a-f0-9]{2})+/gi,function(r){let i="";for(let s=0,o=r.length;s<o;s+=3){const a=parseInt(r.slice(s+1,s+3),16);if(a<128){i+=n[a];continue}if((a&224)===192&&s+3<o){const l=parseInt(r.slice(s+4,s+6),16);if((l&192)===128){const u=a<<6&1984|l&63;u<128?i+="<22><>":i+=String.fromCharCode(u),s+=3;continue}}if((a&240)===224&&s+6<o){const l=parseInt(r.slice(s+4,s+6),16),u=parseInt(r.slice(s+7,s+9),16);if((l&192)===128&&(u&192)===128){const c=a<<12&61440|l<<6&4032|u&63;c<2048||c>=55296&&c<=57343?i+="<22><><EFBFBD>":i+=String.fromCharCode(c),s+=6;continue}}if((a&248)===240&&s+9<o){const l=parseInt(r.slice(s+4,s+6),16),u=parseInt(r.slice(s+7,s+9),16),c=parseInt(r.slice(s+10,s+12),16);if((l&192)===128&&(u&192)===128&&(c&192)===128){let f=a<<18&1835008|l<<12&258048|u<<6&4032|c&63;f<65536||f>1114111?i+="<22><><EFBFBD><EFBFBD>":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),s+=9;continue}}i+="<22>"}return i})}Ml.defaultChars=";/?:@&=+$,#";Ml.componentChars="";const sw={};function nU(t){let e=sw[t];if(e)return e;e=sw[t]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?e.push(r):e.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<t.length;n++)e[t.charCodeAt(n)]=t[n];return e}function Hf(t,e,n){typeof e!="string"&&(n=e,e=Hf.defaultChars),typeof n>"u"&&(n=!0);const r=nU(e);let i="";for(let s=0,o=t.length;s<o;s++){const a=t.charCodeAt(s);if(n&&a===37&&s+2<o&&/^[0-9a-f]{2}$/i.test(t.slice(s+1,s+3))){i+=t.slice(s,s+3),s+=2;continue}if(a<128){i+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&s+1<o){const l=t.charCodeAt(s+1);if(l>=56320&&l<=57343){i+=encodeURIComponent(t[s]+t[s+1]),s++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(t[s])}return i}Hf.defaultChars=";/?:@&=+$,-_.!~*'()#";Hf.componentChars="-_.!~*'()";function Jv(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function Hp(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const rU=/^([a-z0-9.+-]+:)/i,iU=/:[0-9]*$/,sU=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,oU=["<",">",'"',"`"," ","\r",`
`," "],aU=["{","}","|","\\","^","`"].concat(oU),lU=["'"].concat(aU),ow=["%","/","?",";","#"].concat(lU),aw=["/","?","#"],uU=255,lw=/^[+a-z0-9A-Z_-]{0,63}$/,cU=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,uw={javascript:!0,"javascript:":!0},cw={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Zv(t,e){if(t&&t instanceof Hp)return t;const n=new Hp;return n.parse(t,e),n}Hp.prototype.parse=function(t,e){let n,r,i,s=t;if(s=s.trim(),!e&&t.split("#").length===1){const u=sU.exec(s);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let o=rU.exec(s);if(o&&(o=o[0],n=o.toLowerCase(),this.protocol=o,s=s.substr(o.length)),(e||o||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=s.substr(0,2)==="//",i&&!(o&&uw[o])&&(s=s.substr(2),this.slashes=!0)),!uw[o]&&(i||o&&!cw[o])){let u=-1;for(let p=0;p<aw.length;p++)r=s.indexOf(aw[p]),r!==-1&&(u===-1||r<u)&&(u=r);let c,f;u===-1?f=s.lastIndexOf("@"):f=s.lastIndexOf("@",u),f!==-1&&(c=s.slice(0,f),s=s.slice(f+1),this.auth=c),u=-1;for(let p=0;p<ow.length;p++)r=s.indexOf(ow[p]),r!==-1&&(u===-1||r<u)&&(u=r);u===-1&&(u=s.length),s[u-1]===":"&&u--;const d=s.slice(0,u);s=s.slice(u),this.parseHost(d),this.hostname=this.hostname||"";const h=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!h){const p=this.hostname.split(/\./);for(let m=0,g=p.length;m<g;m++){const b=p[m];if(b&&!b.match(lw)){let y="";for(let x=0,S=b.length;x<S;x++)b.charCodeAt(x)>127?y+="x":y+=b[x];if(!y.match(lw)){const x=p.slice(0,m),S=p.slice(m+1),E=b.match(cU);E&&(x.push(E[1]),S.unshift(E[2])),S.length&&(s=S.join(".")+s),this.hostname=x.join(".");break}}}}this.hostname.length>uU&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=s.indexOf("#");a!==-1&&(this.hash=s.substr(a),s=s.slice(0,a));const l=s.indexOf("?");return l!==-1&&(this.search=s.substr(l),s=s.slice(0,l)),s&&(this.pathname=s),cw[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Hp.prototype.parseHost=function(t){let e=iU.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const fU=Object.freeze(Object.defineProperty({__proto__:null,decode:Ml,encode:Hf,format:Jv,parse:Zv},Symbol.toStringTag,{value:"Module"})),aO=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,lO=/[\0-\x1F\x7F-\x9F]/,dU=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Qv=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,uO=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,cO=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,hU=Object.freeze(Object.defineProperty({__proto__:null,Any:aO,Cc:lO,Cf:dU,P:Qv,S:uO,Z:cO},Symbol.toStringTag,{value:"Module"})),pU=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎸᏄϨrrowƀ;BDᅐᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ\0ᚕ᚛ᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsuᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ拔;櫙artint;樍Āao⁕Ācsα‰‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0耻¾䂾;慗;慜5;慘ƶ⁌\0;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚ;檒;檥;檤ȀEaes;扩pĀ;p℣檊rox»Ā;q檈Ā;qim;拧pf;쀀𝕘Āci⅃r;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❶❼➅➇ròࢨorneòarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;efभ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛òðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬Āet;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ëĀ;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓pĀ;sᆴ㑵;쀀⊔uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;h㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊;쀀⫋setneqĀ;q㦏㦒쀀⊋;쀀⫌Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),mU=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var Ug;const gU=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),bU=(Ug=String.fromCodePoint)!==null&&Ug!==void 0?Ug:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function yU(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=gU.get(t))!==null&&e!==void 0?e:t}var mn;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(mn||(mn={}));const vU=32;var Ys;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(Ys||(Ys={}));function Xb(t){return t>=mn.ZERO&&t<=mn.NINE}function xU(t){return t>=mn.UPPER_A&&t<=mn.UPPER_F||t>=mn.LOWER_A&&t<=mn.LOWER_F}function SU(t){return t>=mn.UPPER_A&&t<=mn.UPPER_Z||t>=mn.LOWER_A&&t<=mn.LOWER_Z||Xb(t)}function EU(t){return t===mn.EQUALS||SU(t)}var un;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(un||(un={}));var Vs;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Vs||(Vs={}));class wU{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=un.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Vs.Strict}startEntity(e){this.decodeMode=e,this.state=un.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case un.EntityStart:return e.charCodeAt(n)===mn.NUM?(this.state=un.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=un.NamedEntity,this.stateNamedEntity(e,n));case un.NumericStart:return this.stateNumericStart(e,n);case un.NumericDecimal:return this.stateNumericDecimal(e,n);case un.NumericHex:return this.stateNumericHex(e,n);case un.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|vU)===mn.LOWER_X?(this.state=un.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=un.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+parseInt(e.substr(n,s),i),this.consumed+=s}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Xb(i)||xU(i))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Xb(i))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===mn.SEMI)this.consumed+=1;else if(this.decodeMode===Vs.Strict)return 0;return this.emitCodePoint(yU(this.result),this.consumed),this.errors&&(e!==mn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&Ys.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const o=e.charCodeAt(n);if(this.treeIndex=_U(r,i,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===Vs.Attribute&&(s===0||EU(o))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&Ys.VALUE_LENGTH)>>14,s!==0){if(o===mn.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Vs.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,i=(r[n]&Ys.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[e]&~Ys.VALUE_LENGTH:i[e+1],r),n===3&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case un.NamedEntity:return this.result!==0&&(this.decodeMode!==Vs.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case un.NumericDecimal:return this.emitNumericEntity(0,2);case un.NumericHex:return this.emitNumericEntity(0,3);case un.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case un.EntityStart:return 0}}}function fO(t){let e="";const n=new wU(t,r=>e+=bU(r));return function(i,s){let o=0,a=0;for(;(a=i.indexOf("&",a))>=0;){e+=i.slice(o,a),n.startEntity(s);const u=n.write(i,a+1);if(u<0){o=a+n.end();break}o=a+u,a=u===0?o+1:o}const l=e+i.slice(o);return e="",l}}function _U(t,e,n,r){const i=(e&Ys.BRANCH_LENGTH)>>7,s=e&Ys.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const l=r-s;return l<0||l>=i?-1:t[n+l]-1}let o=n,a=o+i-1;for(;o<=a;){const l=o+a>>>1,u=t[l];if(u<r)o=l+1;else if(u>r)a=l-1;else return t[l+i]}return-1}const CU=fO(pU);fO(mU);function dO(t,e=Vs.Legacy){return CU(t,e)}function AU(t){return Object.prototype.toString.call(t)}function e2(t){return AU(t)==="[object String]"}const DU=Object.prototype.hasOwnProperty;function kU(t,e){return DU.call(t,e)}function am(t){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){t[r]=n[r]})}}),t}function hO(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function t2(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534||t>=0&&t<=8||t===11||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function qp(t){if(t>65535){t-=65536;const e=55296+(t>>10),n=56320+(t&1023);return String.fromCharCode(e,n)}return String.fromCharCode(t)}const pO=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,OU=/&([a-z#][a-z0-9]{1,31});/gi,TU=new RegExp(pO.source+"|"+OU.source,"gi"),IU=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function PU(t,e){if(e.charCodeAt(0)===35&&IU.test(e)){const r=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return t2(r)?qp(r):t}const n=dO(t);return n!==t?n:t}function RU(t){return t.indexOf("\\")<0?t:t.replace(pO,"$1")}function Fl(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(TU,function(e,n,r){return n||PU(e,r)})}const NU=/[&<>"]/,MU=/[&<>"]/g,FU={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function LU(t){return FU[t]}function vo(t){return NU.test(t)?t.replace(MU,LU):t}const BU=/[.?*+^$[\]\\(){}|-]/g;function $U(t){return t.replace(BU,"\\$&")}function mt(t){switch(t){case 9:case 32:return!0}return!1}function Jc(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Zc(t){return Qv.test(t)||uO.test(t)}function Qc(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function lm(t){return t=t.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}const zU={mdurl:fU,ucmicro:hU},jU=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:hO,assign:am,escapeHtml:vo,escapeRE:$U,fromCodePoint:qp,has:kU,isMdAsciiPunct:Qc,isPunctChar:Zc,isSpace:mt,isString:e2,isValidEntityCode:t2,isWhiteSpace:Jc,lib:zU,normalizeReference:lm,unescapeAll:Fl,unescapeMd:RU},Symbol.toStringTag,{value:"Module"}));function VU(t,e,n){let r,i,s,o;const a=t.posMax,l=t.pos;for(t.pos=e+1,r=1;t.pos<a;){if(s=t.src.charCodeAt(t.pos),s===93&&(r--,r===0)){i=!0;break}if(o=t.pos,t.md.inline.skipToken(t),s===91){if(o===t.pos-1)r++;else if(n)return t.pos=l,-1}}let u=-1;return i&&(u=t.pos),t.pos=l,u}function UU(t,e,n){let r,i=e;const s={ok:!1,pos:0,str:""};if(t.charCodeAt(i)===60){for(i++;i<n;){if(r=t.charCodeAt(i),r===10||r===60)return s;if(r===62)return s.pos=i+1,s.str=Fl(t.slice(e+1,i)),s.ok=!0,s;if(r===92&&i+1<n){i+=2;continue}i++}return s}let o=0;for(;i<n&&(r=t.charCodeAt(i),!(r===32||r<32||r===127));){if(r===92&&i+1<n){if(t.charCodeAt(i+1)===32)break;i+=2;continue}if(r===40&&(o++,o>32))return s;if(r===41){if(o===0)break;o--}i++}return e===i||o!==0||(s.str=Fl(t.slice(e,i)),s.pos=i,s.ok=!0),s}function HU(t,e,n,r){let i,s=e;const o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(s>=n)return o;let a=t.charCodeAt(s);if(a!==34&&a!==39&&a!==40)return o;e++,s++,a===40&&(a=41),o.marker=a}for(;s<n;){if(i=t.charCodeAt(s),i===o.marker)return o.pos=s+1,o.str+=Fl(t.slice(e,s)),o.ok=!0,o;if(i===40&&o.marker===41)return o;i===92&&s+1<n&&s++,s++}return o.can_continue=!0,o.str+=Fl(t.slice(e,s)),o}const qU=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:UU,parseLinkLabel:VU,parseLinkTitle:HU},Symbol.toStringTag,{value:"Module"})),Ji={};Ji.code_inline=function(t,e,n,r,i){const s=t[e];return"<code"+i.renderAttrs(s)+">"+vo(s.content)+"</code>"};Ji.code_block=function(t,e,n,r,i){const s=t[e];return"<pre"+i.renderAttrs(s)+"><code>"+vo(t[e].content)+`</code></pre>
`};Ji.fence=function(t,e,n,r,i){const s=t[e],o=s.info?Fl(s.info).trim():"";let a="",l="";if(o){const c=o.split(/(\s+)/g);a=c[0],l=c.slice(2).join("")}let u;if(n.highlight?u=n.highlight(s.content,a,l)||vo(s.content):u=vo(s.content),u.indexOf("<pre")===0)return u+`
`;if(o){const c=s.attrIndex("class"),f=s.attrs?s.attrs.slice():[];c<0?f.push(["class",n.langPrefix+a]):(f[c]=f[c].slice(),f[c][1]+=" "+n.langPrefix+a);const d={attrs:f};return`<pre><code${i.renderAttrs(d)}>${u}</code></pre>
`}return`<pre><code${i.renderAttrs(s)}>${u}</code></pre>
`};Ji.image=function(t,e,n,r,i){const s=t[e];return s.attrs[s.attrIndex("alt")][1]=i.renderInlineAsText(s.children,n,r),i.renderToken(t,e,n)};Ji.hardbreak=function(t,e,n){return n.xhtmlOut?`<br />
`:`<br>
`};Ji.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?`<br />
`:`<br>
`:`
`};Ji.text=function(t,e){return vo(t[e].content)};Ji.html_block=function(t,e){return t[e].content};Ji.html_inline=function(t,e){return t[e].content};function ou(){this.rules=am({},Ji)}ou.prototype.renderAttrs=function(e){let n,r,i;if(!e.attrs)return"";for(i="",n=0,r=e.attrs.length;n<r;n++)i+=" "+vo(e.attrs[n][0])+'="'+vo(e.attrs[n][1])+'"';return i};ou.prototype.renderToken=function(e,n,r){const i=e[n];let s="";if(i.hidden)return"";i.block&&i.nesting!==-1&&n&&e[n-1].hidden&&(s+=`
`),s+=(i.nesting===-1?"</":"<")+i.tag,s+=this.renderAttrs(i),i.nesting===0&&r.xhtmlOut&&(s+=" /");let o=!1;if(i.block&&(o=!0,i.nesting===1&&n+1<e.length)){const a=e[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===i.tag)&&(o=!1)}return s+=o?`>
`:">",s};ou.prototype.renderInline=function(t,e,n){let r="";const i=this.rules;for(let s=0,o=t.length;s<o;s++){const a=t[s].type;typeof i[a]<"u"?r+=i[a](t,s,e,n,this):r+=this.renderToken(t,s,e)}return r};ou.prototype.renderInlineAsText=function(t,e,n){let r="";for(let i=0,s=t.length;i<s;i++)switch(t[i].type){case"text":r+=t[i].content;break;case"image":r+=this.renderInlineAsText(t[i].children,e,n);break;case"html_inline":case"html_block":r+=t[i].content;break;case"softbreak":case"hardbreak":r+=`
`;break}return r};ou.prototype.render=function(t,e,n){let r="";const i=this.rules;for(let s=0,o=t.length;s<o;s++){const a=t[s].type;a==="inline"?r+=this.renderInline(t[s].children,e,n):typeof i[a]<"u"?r+=i[a](t,s,e,n,this):r+=this.renderToken(t,s,e,n)}return r};function dr(){this.__rules__=[],this.__cache__=null}dr.prototype.__find__=function(t){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1};dr.prototype.__compile__=function(){const t=this,e=[""];t.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){e.indexOf(r)<0&&e.push(r)})}),t.__cache__={},e.forEach(function(n){t.__cache__[n]=[],t.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||t.__cache__[n].push(r.fn))})})};dr.prototype.at=function(t,e,n){const r=this.__find__(t),i=n||{};if(r===-1)throw new Error("Parser rule not found: "+t);this.__rules__[r].fn=e,this.__rules__[r].alt=i.alt||[],this.__cache__=null};dr.prototype.before=function(t,e,n,r){const i=this.__find__(t),s=r||{};if(i===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(i,0,{name:e,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null};dr.prototype.after=function(t,e,n,r){const i=this.__find__(t),s=r||{};if(i===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(i+1,0,{name:e,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null};dr.prototype.push=function(t,e,n){const r=n||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:r.alt||[]}),this.__cache__=null};dr.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);const n=[];return t.forEach(function(r){const i=this.__find__(r);if(i<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[i].enabled=!0,n.push(r)},this),this.__cache__=null,n};dr.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(t,e)};dr.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);const n=[];return t.forEach(function(r){const i=this.__find__(r);if(i<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[i].enabled=!1,n.push(r)},this),this.__cache__=null,n};dr.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};function di(t,e,n){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}di.prototype.attrIndex=function(e){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,i=n.length;r<i;r++)if(n[r][0]===e)return r;return-1};di.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]};di.prototype.attrSet=function(e,n){const r=this.attrIndex(e),i=[e,n];r<0?this.attrPush(i):this.attrs[r]=i};di.prototype.attrGet=function(e){const n=this.attrIndex(e);let r=null;return n>=0&&(r=this.attrs[n][1]),r};di.prototype.attrJoin=function(e,n){const r=this.attrIndex(e);r<0?this.attrPush([e,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function mO(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}mO.prototype.Token=di;const GU=/\r\n?|\n/g,WU=/\0/g;function KU(t){let e;e=t.src.replace(GU,`
`),e=e.replace(WU,"<22>"),t.src=e}function XU(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}function YU(t){const e=t.tokens;for(let n=0,r=e.length;n<r;n++){const i=e[n];i.type==="inline"&&t.md.inline.parse(i.content,t.md,t.env,i.children)}}function JU(t){return/^<a[>\s]/i.test(t)}function ZU(t){return/^<\/a\s*>/i.test(t)}function QU(t){const e=t.tokens;if(t.md.options.linkify)for(let n=0,r=e.length;n<r;n++){if(e[n].type!=="inline"||!t.md.linkify.pretest(e[n].content))continue;let i=e[n].children,s=0;for(let o=i.length-1;o>=0;o--){const a=i[o];if(a.type==="link_close"){for(o--;i[o].level!==a.level&&i[o].type!=="link_open";)o--;continue}if(a.type==="html_inline"&&(JU(a.content)&&s>0&&s--,ZU(a.content)&&s++),!(s>0)&&a.type==="text"&&t.md.linkify.test(a.content)){const l=a.content;let u=t.md.linkify.match(l);const c=[];let f=a.level,d=0;u.length>0&&u[0].index===0&&o>0&&i[o-1].type==="text_special"&&(u=u.slice(1));for(let h=0;h<u.length;h++){const p=u[h].url,m=t.md.normalizeLink(p);if(!t.md.validateLink(m))continue;let g=u[h].text;u[h].schema?u[h].schema==="mailto:"&&!/^mailto:/i.test(g)?g=t.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):g=t.md.normalizeLinkText(g):g=t.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,"");const b=u[h].index;if(b>d){const E=new t.Token("text","",0);E.content=l.slice(d,b),E.level=f,c.push(E)}const y=new t.Token("link_open","a",1);y.attrs=[["href",m]],y.level=f++,y.markup="linkify",y.info="auto",c.push(y);const x=new t.Token("text","",0);x.content=g,x.level=f,c.push(x);const S=new t.Token("link_close","a",-1);S.level=--f,S.markup="linkify",S.info="auto",c.push(S),d=u[h].lastIndex}if(d<l.length){const h=new t.Token("text","",0);h.content=l.slice(d),h.level=f,c.push(h)}e[n].children=i=hO(i,o,c)}}}}const gO=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,eH=/\((c|tm|r)\)/i,tH=/\((c|tm|r)\)/ig,nH={c:"©",r:"®",tm:"™"};function rH(t,e){return nH[e.toLowerCase()]}function iH(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];r.type==="text"&&!e&&(r.content=r.content.replace(tH,rH)),r.type==="link_open"&&r.info==="auto"&&e--,r.type==="link_close"&&r.info==="auto"&&e++}}function sH(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];r.type==="text"&&!e&&gO.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1")),r.type==="link_open"&&r.info==="auto"&&e--,r.type==="link_close"&&r.info==="auto"&&e++}}function oH(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(eH.test(t.tokens[e].content)&&iH(t.tokens[e].children),gO.test(t.tokens[e].content)&&sH(t.tokens[e].children))}const aH=/['"]/,fw=/['"]/g,dw="";function Gd(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function lH(t,e){let n;const r=[];for(let i=0;i<t.length;i++){const s=t[i],o=t[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=o);n--);if(r.length=n+1,s.type!=="text")continue;let a=s.content,l=0,u=a.length;e:for(;l<u;){fw.lastIndex=l;const c=fw.exec(a);if(!c)break;let f=!0,d=!0;l=c.index+1;const h=c[0]==="'";let p=32;if(c.index-1>=0)p=a.charCodeAt(c.index-1);else for(n=i-1;n>=0&&!(t[n].type==="softbreak"||t[n].type==="hardbreak");n--)if(t[n].content){p=t[n].content.charCodeAt(t[n].content.length-1);break}let m=32;if(l<u)m=a.charCodeAt(l);else for(n=i+1;n<t.length&&!(t[n].type==="softbreak"||t[n].type==="hardbreak");n++)if(t[n].content){m=t[n].content.charCodeAt(0);break}const g=Qc(p)||Zc(String.fromCharCode(p)),b=Qc(m)||Zc(String.fromCharCode(m)),y=Jc(p),x=Jc(m);if(x?f=!1:b&&(y||g||(f=!1)),y?d=!1:g&&(x||b||(d=!1)),m===34&&c[0]==='"'&&p>=48&&p<=57&&(d=f=!1),f&&d&&(f=g,d=b),!f&&!d){h&&(s.content=Gd(s.content,c.index,dw));continue}if(d)for(n=r.length-1;n>=0;n--){let S=r[n];if(r[n].level<o)break;if(S.single===h&&r[n].level===o){S=r[n];let E,C;h?(E=e.md.options.quotes[2],C=e.md.options.quotes[3]):(E=e.md.options.quotes[0],C=e.md.options.quotes[1]),s.content=Gd(s.content,c.index,C),t[S.token].content=Gd(t[S.token].content,S.pos,E),l+=C.length-1,S.token===i&&(l+=E.length-1),a=s.content,u=a.length,r.length=n;continue e}}f?r.push({token:i,pos:c.index,single:h,level:o}):d&&h&&(s.content=Gd(s.content,c.index,dw))}}}function uH(t){if(t.md.options.typographer)for(let e=t.tokens.length-1;e>=0;e--)t.tokens[e].type!=="inline"||!aH.test(t.tokens[e].content)||lH(t.tokens[e].children,t)}function cH(t){let e,n;const r=t.tokens,i=r.length;for(let s=0;s<i;s++){if(r[s].type!=="inline")continue;const o=r[s].children,a=o.length;for(e=0;e<a;e++)o[e].type==="text_special"&&(o[e].type="text");for(e=n=0;e<a;e++)o[e].type==="text"&&e+1<a&&o[e+1].type==="text"?o[e+1].content=o[e].content+o[e+1].content:(e!==n&&(o[n]=o[e]),n++);e!==n&&(o.length=n)}}const Hg=[["normalize",KU],["block",XU],["inline",YU],["linkify",QU],["replacements",oH],["smartquotes",uH],["text_join",cH]];function n2(){this.ruler=new dr;for(let t=0;t<Hg.length;t++)this.ruler.push(Hg[t][0],Hg[t][1])}n2.prototype.process=function(t){const e=this.ruler.getRules("");for(let n=0,r=e.length;n<r;n++)e[n](t)};n2.prototype.State=mO;function Zi(t,e,n,r){this.src=t,this.md=e,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let s=0,o=0,a=0,l=0,u=i.length,c=!1;o<u;o++){const f=i.charCodeAt(o);if(!c)if(mt(f)){a++,f===9?l+=4-l%4:l++;continue}else c=!0;(f===10||o===u-1)&&(f!==10&&o++,this.bMarks.push(s),this.eMarks.push(o),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),c=!1,a=0,l=0,s=o+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Zi.prototype.push=function(t,e,n){const r=new di(t,e,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};Zi.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};Zi.prototype.skipEmptyLines=function(e){for(let n=this.lineMax;e<n&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e};Zi.prototype.skipSpaces=function(e){for(let n=this.src.length;e<n;e++){const r=this.src.charCodeAt(e);if(!mt(r))break}return e};Zi.prototype.skipSpacesBack=function(e,n){if(e<=n)return e;for(;e>n;)if(!mt(this.src.charCodeAt(--e)))return e+1;return e};Zi.prototype.skipChars=function(e,n){for(let r=this.src.length;e<r&&this.src.charCodeAt(e)===n;e++);return e};Zi.prototype.skipCharsBack=function(e,n,r){if(e<=r)return e;for(;e>r;)if(n!==this.src.charCodeAt(--e))return e+1;return e};Zi.prototype.getLines=function(e,n,r,i){if(e>=n)return"";const s=new Array(n-e);for(let o=0,a=e;a<n;a++,o++){let l=0;const u=this.bMarks[a];let c=u,f;for(a+1<n||i?f=this.eMarks[a]+1:f=this.eMarks[a];c<f&&l<r;){const d=this.src.charCodeAt(c);if(mt(d))d===9?l+=4-(l+this.bsCount[a])%4:l++;else if(c-u<this.tShift[a])l++;else break;c++}l>r?s[o]=new Array(l-r+1).join(" ")+this.src.slice(c,f):s[o]=this.src.slice(c,f)}return s.join("")};Zi.prototype.Token=di;const fH=65536;function qg(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];return t.src.slice(n,r)}function hw(t){const e=[],n=t.length;let r=0,i=t.charCodeAt(r),s=!1,o=0,a="";for(;r<n;)i===124&&(s?(a+=t.substring(o,r-1),o=r):(e.push(a+t.substring(o,r)),a="",o=r+1)),s=i===92,r++,i=t.charCodeAt(r);return e.push(a+t.substring(o)),e}function dH(t,e,n,r){if(e+2>n)return!1;let i=e+1;if(t.sCount[i]<t.blkIndent||t.sCount[i]-t.blkIndent>=4)return!1;let s=t.bMarks[i]+t.tShift[i];if(s>=t.eMarks[i])return!1;const o=t.src.charCodeAt(s++);if(o!==124&&o!==45&&o!==58||s>=t.eMarks[i])return!1;const a=t.src.charCodeAt(s++);if(a!==124&&a!==45&&a!==58&&!mt(a)||o===45&&mt(a))return!1;for(;s<t.eMarks[i];){const S=t.src.charCodeAt(s);if(S!==124&&S!==45&&S!==58&&!mt(S))return!1;s++}let l=qg(t,e+1),u=l.split("|");const c=[];for(let S=0;S<u.length;S++){const E=u[S].trim();if(!E){if(S===0||S===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(E))return!1;E.charCodeAt(E.length-1)===58?c.push(E.charCodeAt(0)===58?"center":"right"):E.charCodeAt(0)===58?c.push("left"):c.push("")}if(l=qg(t,e).trim(),l.indexOf("|")===-1||t.sCount[e]-t.blkIndent>=4)return!1;u=hw(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const f=u.length;if(f===0||f!==c.length)return!1;if(r)return!0;const d=t.parentType;t.parentType="table";const h=t.md.block.ruler.getRules("blockquote"),p=t.push("table_open","table",1),m=[e,0];p.map=m;const g=t.push("thead_open","thead",1);g.map=[e,e+1];const b=t.push("tr_open","tr",1);b.map=[e,e+1];for(let S=0;S<u.length;S++){const E=t.push("th_open","th",1);c[S]&&(E.attrs=[["style","text-align:"+c[S]]]);const C=t.push("inline","",0);C.content=u[S].trim(),C.children=[],t.push("th_close","th",-1)}t.push("tr_close","tr",-1),t.push("thead_close","thead",-1);let y,x=0;for(i=e+2;i<n&&!(t.sCount[i]<t.blkIndent);i++){let S=!1;for(let C=0,w=h.length;C<w;C++)if(h[C](t,i,n,!0)){S=!0;break}if(S||(l=qg(t,i).trim(),!l)||t.sCount[i]-t.blkIndent>=4||(u=hw(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),x+=f-u.length,x>fH))break;if(i===e+2){const C=t.push("tbody_open","tbody",1);C.map=y=[e+2,0]}const E=t.push("tr_open","tr",1);E.map=[i,i+1];for(let C=0;C<f;C++){const w=t.push("td_open","td",1);c[C]&&(w.attrs=[["style","text-align:"+c[C]]]);const A=t.push("inline","",0);A.content=u[C]?u[C].trim():"",A.children=[],t.push("td_close","td",-1)}t.push("tr_close","tr",-1)}return y&&(t.push("tbody_close","tbody",-1),y[1]=i),t.push("table_close","table",-1),m[1]=i,t.parentType=d,t.line=i,!0}function hH(t,e,n){if(t.sCount[e]-t.blkIndent<4)return!1;let r=e+1,i=r;for(;r<n;){if(t.isEmpty(r)){r++;continue}if(t.sCount[r]-t.blkIndent>=4){r++,i=r;continue}break}t.line=i;const s=t.push("code_block","code",0);return s.content=t.getLines(e,i,4+t.blkIndent,!1)+`
`,s.map=[e,t.line],!0}function pH(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||i+3>s)return!1;const o=t.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let a=i;i=t.skipChars(i,o);let l=i-a;if(l<3)return!1;const u=t.src.slice(a,i),c=t.src.slice(i,s);if(o===96&&c.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let f=e,d=!1;for(;f++,!(f>=n||(i=a=t.bMarks[f]+t.tShift[f],s=t.eMarks[f],i<s&&t.sCount[f]<t.blkIndent));)if(t.src.charCodeAt(i)===o&&!(t.sCount[f]-t.blkIndent>=4)&&(i=t.skipChars(i,o),!(i-a<l)&&(i=t.skipSpaces(i),!(i<s)))){d=!0;break}l=t.sCount[e],t.line=f+(d?1:0);const h=t.push("fence","code",0);return h.info=c,h.content=t.getLines(e+1,f,l,!0),h.markup=u,h.map=[e,t.line],!0}function mH(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];const o=t.lineMax;if(t.sCount[e]-t.blkIndent>=4||t.src.charCodeAt(i)!==62)return!1;if(r)return!0;const a=[],l=[],u=[],c=[],f=t.md.block.ruler.getRules("blockquote"),d=t.parentType;t.parentType="blockquote";let h=!1,p;for(p=e;p<n;p++){const x=t.sCount[p]<t.blkIndent;if(i=t.bMarks[p]+t.tShift[p],s=t.eMarks[p],i>=s)break;if(t.src.charCodeAt(i++)===62&&!x){let E=t.sCount[p]+1,C,w;t.src.charCodeAt(i)===32?(i++,E++,w=!1,C=!0):t.src.charCodeAt(i)===9?(C=!0,(t.bsCount[p]+E)%4===3?(i++,E++,w=!1):w=!0):C=!1;let A=E;for(a.push(t.bMarks[p]),t.bMarks[p]=i;i<s;){const _=t.src.charCodeAt(i);if(mt(_))_===9?A+=4-(A+t.bsCount[p]+(w?1:0))%4:A++;else break;i++}h=i>=s,l.push(t.bsCount[p]),t.bsCount[p]=t.sCount[p]+1+(C?1:0),u.push(t.sCount[p]),t.sCount[p]=A-E,c.push(t.tShift[p]),t.tShift[p]=i-t.bMarks[p];continue}if(h)break;let S=!1;for(let E=0,C=f.length;E<C;E++)if(f[E](t,p,n,!0)){S=!0;break}if(S){t.lineMax=p,t.blkIndent!==0&&(a.push(t.bMarks[p]),l.push(t.bsCount[p]),c.push(t.tShift[p]),u.push(t.sCount[p]),t.sCount[p]-=t.blkIndent);break}a.push(t.bMarks[p]),l.push(t.bsCount[p]),c.push(t.tShift[p]),u.push(t.sCount[p]),t.sCount[p]=-1}const m=t.blkIndent;t.blkIndent=0;const g=t.push("blockquote_open","blockquote",1);g.markup=">";const b=[e,0];g.map=b,t.md.block.tokenize(t,e,p);const y=t.push("blockquote_close","blockquote",-1);y.markup=">",t.lineMax=o,t.parentType=d,b[1]=t.line;for(let x=0;x<c.length;x++)t.bMarks[x+e]=a[x],t.tShift[x+e]=c[x],t.sCount[x+e]=u[x],t.bsCount[x+e]=l[x];return t.blkIndent=m,!0}function gH(t,e,n,r){const i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;let s=t.bMarks[e]+t.tShift[e];const o=t.src.charCodeAt(s++);if(o!==42&&o!==45&&o!==95)return!1;let a=1;for(;s<i;){const u=t.src.charCodeAt(s++);if(u!==o&&!mt(u))return!1;u===o&&a++}if(a<3)return!1;if(r)return!0;t.line=e+1;const l=t.push("hr","hr",0);return l.map=[e,t.line],l.markup=Array(a+1).join(String.fromCharCode(o)),!0}function pw(t,e){const n=t.eMarks[e];let r=t.bMarks[e]+t.tShift[e];const i=t.src.charCodeAt(r++);if(i!==42&&i!==45&&i!==43)return-1;if(r<n){const s=t.src.charCodeAt(r);if(!mt(s))return-1}return r}function mw(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];let i=n;if(i+1>=r)return-1;let s=t.src.charCodeAt(i++);if(s<48||s>57)return-1;for(;;){if(i>=r)return-1;if(s=t.src.charCodeAt(i++),s>=48&&s<=57){if(i-n>=10)return-1;continue}if(s===41||s===46)break;return-1}return i<r&&(s=t.src.charCodeAt(i),!mt(s))?-1:i}function bH(t,e){const n=t.level+2;for(let r=e+2,i=t.tokens.length-2;r<i;r++)t.tokens[r].level===n&&t.tokens[r].type==="paragraph_open"&&(t.tokens[r+2].hidden=!0,t.tokens[r].hidden=!0,r+=2)}function yH(t,e,n,r){let i,s,o,a,l=e,u=!0;if(t.sCount[l]-t.blkIndent>=4||t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]<t.blkIndent)return!1;let c=!1;r&&t.parentType==="paragraph"&&t.sCount[l]>=t.blkIndent&&(c=!0);let f,d,h;if((h=mw(t,l))>=0){if(f=!0,o=t.bMarks[l]+t.tShift[l],d=Number(t.src.slice(o,h-1)),c&&d!==1)return!1}else if((h=pw(t,l))>=0)f=!1;else return!1;if(c&&t.skipSpaces(h)>=t.eMarks[l])return!1;if(r)return!0;const p=t.src.charCodeAt(h-1),m=t.tokens.length;f?(a=t.push("ordered_list_open","ol",1),d!==1&&(a.attrs=[["start",d]])):a=t.push("bullet_list_open","ul",1);const g=[l,0];a.map=g,a.markup=String.fromCharCode(p);let b=!1;const y=t.md.block.ruler.getRules("list"),x=t.parentType;for(t.parentType="list";l<n;){s=h,i=t.eMarks[l];const S=t.sCount[l]+h-(t.bMarks[l]+t.tShift[l]);let E=S;for(;s<i;){const F=t.src.charCodeAt(s);if(F===9)E+=4-(E+t.bsCount[l])%4;else if(F===32)E++;else break;s++}const C=s;let w;C>=i?w=1:w=E-S,w>4&&(w=1);const A=S+w;a=t.push("list_item_open","li",1),a.markup=String.fromCharCode(p);const _=[l,0];a.map=_,f&&(a.info=t.src.slice(o,h-1));const O=t.tight,I=t.tShift[l],N=t.sCount[l],P=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=A,t.tight=!0,t.tShift[l]=C-t.bMarks[l],t.sCount[l]=E,C>=i&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,l,n,!0),(!t.tight||b)&&(u=!1),b=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=P,t.tShift[l]=I,t.sCount[l]=N,t.tight=O,a=t.push("list_item_close","li",-1),a.markup=String.fromCharCode(p),l=t.line,_[1]=l,l>=n||t.sCount[l]<t.blkIndent||t.sCount[l]-t.blkIndent>=4)break;let R=!1;for(let F=0,V=y.length;F<V;F++)if(y[F](t,l,n,!0)){R=!0;break}if(R)break;if(f){if(h=mw(t,l),h<0)break;o=t.bMarks[l]+t.tShift[l]}else if(h=pw(t,l),h<0)break;if(p!==t.src.charCodeAt(h-1))break}return f?a=t.push("ordered_list_close","ol",-1):a=t.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(p),g[1]=l,t.line=l,t.parentType=x,u&&bH(t,m),!0}function vH(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e],o=e+1;if(t.sCount[e]-t.blkIndent>=4||t.src.charCodeAt(i)!==91)return!1;function a(y){const x=t.lineMax;if(y>=x||t.isEmpty(y))return null;let S=!1;if(t.sCount[y]-t.blkIndent>3&&(S=!0),t.sCount[y]<0&&(S=!0),!S){const w=t.md.block.ruler.getRules("reference"),A=t.parentType;t.parentType="reference";let _=!1;for(let O=0,I=w.length;O<I;O++)if(w[O](t,y,x,!0)){_=!0;break}if(t.parentType=A,_)return null}const E=t.bMarks[y]+t.tShift[y],C=t.eMarks[y];return t.src.slice(E,C+1)}let l=t.src.slice(i,s+1);s=l.length;let u=-1;for(i=1;i<s;i++){const y=l.charCodeAt(i);if(y===91)return!1;if(y===93){u=i;break}else if(y===10){const x=a(o);x!==null&&(l+=x,s=l.length,o++)}else if(y===92&&(i++,i<s&&l.charCodeAt(i)===10)){const x=a(o);x!==null&&(l+=x,s=l.length,o++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(i=u+2;i<s;i++){const y=l.charCodeAt(i);if(y===10){const x=a(o);x!==null&&(l+=x,s=l.length,o++)}else if(!mt(y))break}const c=t.md.helpers.parseLinkDestination(l,i,s);if(!c.ok)return!1;const f=t.md.normalizeLink(c.str);if(!t.md.validateLink(f))return!1;i=c.pos;const d=i,h=o,p=i;for(;i<s;i++){const y=l.charCodeAt(i);if(y===10){const x=a(o);x!==null&&(l+=x,s=l.length,o++)}else if(!mt(y))break}let m=t.md.helpers.parseLinkTitle(l,i,s);for(;m.can_continue;){const y=a(o);if(y===null)break;l+=y,i=s,s=l.length,o++,m=t.md.helpers.parseLinkTitle(l,i,s,m)}let g;for(i<s&&p!==i&&m.ok?(g=m.str,i=m.pos):(g="",i=d,o=h);i<s;){const y=l.charCodeAt(i);if(!mt(y))break;i++}if(i<s&&l.charCodeAt(i)!==10&&g)for(g="",i=d,o=h;i<s;){const y=l.charCodeAt(i);if(!mt(y))break;i++}if(i<s&&l.charCodeAt(i)!==10)return!1;const b=lm(l.slice(1,u));return b?(r||(typeof t.env.references>"u"&&(t.env.references={}),typeof t.env.references[b]>"u"&&(t.env.references[b]={title:g,href:f}),t.line=o),!0):!1}const xH=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],SH="[a-zA-Z_:][a-zA-Z0-9:._-]*",EH="[^\"'=<>`\\x00-\\x20]+",wH="'[^']*'",_H='"[^"]*"',CH="(?:"+EH+"|"+wH+"|"+_H+")",AH="(?:\\s+"+SH+"(?:\\s*=\\s*"+CH+")?)",bO="<[A-Za-z][A-Za-z0-9\\-]*"+AH+"*\\s*\\/?>",yO="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",DH="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",kH="<[?][\\s\\S]*?[?]>",OH="<![A-Za-z][^>]*>",TH="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",IH=new RegExp("^(?:"+bO+"|"+yO+"|"+DH+"|"+kH+"|"+OH+"|"+TH+")"),PH=new RegExp("^(?:"+bO+"|"+yO+")"),Ba=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+xH.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(PH.source+"\\s*$"),/^$/,!1]];function RH(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(i)!==60)return!1;let o=t.src.slice(i,s),a=0;for(;a<Ba.length&&!Ba[a][0].test(o);a++);if(a===Ba.length)return!1;if(r)return Ba[a][2];let l=e+1;if(!Ba[a][1].test(o)){for(;l<n&&!(t.sCount[l]<t.blkIndent);l++)if(i=t.bMarks[l]+t.tShift[l],s=t.eMarks[l],o=t.src.slice(i,s),Ba[a][1].test(o)){o.length!==0&&l++;break}}t.line=l;const u=t.push("html_block","",0);return u.map=[e,l],u.content=t.getLines(e,l,t.blkIndent,!0),!0}function NH(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;let o=t.src.charCodeAt(i);if(o!==35||i>=s)return!1;let a=1;for(o=t.src.charCodeAt(++i);o===35&&i<s&&a<=6;)a++,o=t.src.charCodeAt(++i);if(a>6||i<s&&!mt(o))return!1;if(r)return!0;s=t.skipSpacesBack(s,i);const l=t.skipCharsBack(s,35,i);l>i&&mt(t.src.charCodeAt(l-1))&&(s=l),t.line=e+1;const u=t.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[e,t.line];const c=t.push("inline","",0);c.content=t.src.slice(i,s).trim(),c.map=[e,t.line],c.children=[];const f=t.push("heading_close","h"+String(a),-1);return f.markup="########".slice(0,a),!0}function MH(t,e,n){const r=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const i=t.parentType;t.parentType="paragraph";let s=0,o,a=e+1;for(;a<n&&!t.isEmpty(a);a++){if(t.sCount[a]-t.blkIndent>3)continue;if(t.sCount[a]>=t.blkIndent){let h=t.bMarks[a]+t.tShift[a];const p=t.eMarks[a];if(h<p&&(o=t.src.charCodeAt(h),(o===45||o===61)&&(h=t.skipChars(h,o),h=t.skipSpaces(h),h>=p))){s=o===61?1:2;break}}if(t.sCount[a]<0)continue;let d=!1;for(let h=0,p=r.length;h<p;h++)if(r[h](t,a,n,!0)){d=!0;break}if(d)break}if(!s)return!1;const l=t.getLines(e,a,t.blkIndent,!1).trim();t.line=a+1;const u=t.push("heading_open","h"+String(s),1);u.markup=String.fromCharCode(o),u.map=[e,t.line];const c=t.push("inline","",0);c.content=l,c.map=[e,t.line-1],c.children=[];const f=t.push("heading_close","h"+String(s),-1);return f.markup=String.fromCharCode(o),t.parentType=i,!0}function FH(t,e,n){const r=t.md.block.ruler.getRules("paragraph"),i=t.parentType;let s=e+1;for(t.parentType="paragraph";s<n&&!t.isEmpty(s);s++){if(t.sCount[s]-t.blkIndent>3||t.sCount[s]<0)continue;let u=!1;for(let c=0,f=r.length;c<f;c++)if(r[c](t,s,n,!0)){u=!0;break}if(u)break}const o=t.getLines(e,s,t.blkIndent,!1).trim();t.line=s;const a=t.push("paragraph_open","p",1);a.map=[e,t.line];const l=t.push("inline","",0);return l.content=o,l.map=[e,t.line],l.children=[],t.push("paragraph_close","p",-1),t.parentType=i,!0}const Wd=[["table",dH,["paragraph","reference"]],["code",hH],["fence",pH,["paragraph","reference","blockquote","list"]],["blockquote",mH,["paragraph","reference","blockquote","list"]],["hr",gH,["paragraph","reference","blockquote","list"]],["list",yH,["paragraph","reference","blockquote"]],["reference",vH],["html_block",RH,["paragraph","reference","blockquote"]],["heading",NH,["paragraph","reference","blockquote"]],["lheading",MH],["paragraph",FH]];function um(){this.ruler=new dr;for(let t=0;t<Wd.length;t++)this.ruler.push(Wd[t][0],Wd[t][1],{alt:(Wd[t][2]||[]).slice()})}um.prototype.tokenize=function(t,e,n){const r=this.ruler.getRules(""),i=r.length,s=t.md.options.maxNesting;let o=e,a=!1;for(;o<n&&(t.line=o=t.skipEmptyLines(o),!(o>=n||t.sCount[o]<t.blkIndent));){if(t.level>=s){t.line=n;break}const l=t.line;let u=!1;for(let c=0;c<i;c++)if(u=r[c](t,o,n,!1),u){if(l>=t.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");t.tight=!a,t.isEmpty(t.line-1)&&(a=!0),o=t.line,o<n&&t.isEmpty(o)&&(a=!0,o++,t.line=o)}};um.prototype.parse=function(t,e,n,r){if(!t)return;const i=new this.State(t,e,n,r);this.tokenize(i,i.line,i.lineMax)};um.prototype.State=Zi;function qf(t,e,n,r){this.src=t,this.env=n,this.md=e,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}qf.prototype.pushPending=function(){const t=new di("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t};qf.prototype.push=function(t,e,n){this.pending&&this.pushPending();const r=new di(t,e,n);let i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};qf.prototype.scanDelims=function(t,e){const n=this.posMax,r=this.src.charCodeAt(t),i=t>0?this.src.charCodeAt(t-1):32;let s=t;for(;s<n&&this.src.charCodeAt(s)===r;)s++;const o=s-t,a=s<n?this.src.charCodeAt(s):32,l=Qc(i)||Zc(String.fromCharCode(i)),u=Qc(a)||Zc(String.fromCharCode(a)),c=Jc(i),f=Jc(a),d=!f&&(!u||c||l),h=!c&&(!l||f||u);return{can_open:d&&(e||!h||l),can_close:h&&(e||!d||u),length:o}};qf.prototype.Token=di;function LH(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function BH(t,e){let n=t.pos;for(;n<t.posMax&&!LH(t.src.charCodeAt(n));)n++;return n===t.pos?!1:(e||(t.pending+=t.src.slice(t.pos,n)),t.pos=n,!0)}const $H=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function zH(t,e){if(!t.md.options.linkify||t.linkLevel>0)return!1;const n=t.pos,r=t.posMax;if(n+3>r||t.src.charCodeAt(n)!==58||t.src.charCodeAt(n+1)!==47||t.src.charCodeAt(n+2)!==47)return!1;const i=t.pending.match($H);if(!i)return!1;const s=i[1],o=t.md.linkify.matchAtStart(t.src.slice(n-s.length));if(!o)return!1;let a=o.url;if(a.length<=s.length)return!1;a=a.replace(/\*+$/,"");const l=t.md.normalizeLink(a);if(!t.md.validateLink(l))return!1;if(!e){t.pending=t.pending.slice(0,-s.length);const u=t.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";const c=t.push("text","",0);c.content=t.md.normalizeLinkText(a);const f=t.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return t.pos+=a.length-s.length,!0}function jH(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==10)return!1;const r=t.pending.length-1,i=t.posMax;if(!e)if(r>=0&&t.pending.charCodeAt(r)===32)if(r>=1&&t.pending.charCodeAt(r-1)===32){let s=r-1;for(;s>=1&&t.pending.charCodeAt(s-1)===32;)s--;t.pending=t.pending.slice(0,s),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(n++;n<i&&mt(t.src.charCodeAt(n));)n++;return t.pos=n,!0}const r2=[];for(let t=0;t<256;t++)r2.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){r2[t.charCodeAt(0)]=1});function VH(t,e){let n=t.pos;const r=t.posMax;if(t.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=t.src.charCodeAt(n);if(i===10){for(e||t.push("hardbreak","br",0),n++;n<r&&(i=t.src.charCodeAt(n),!!mt(i));)n++;return t.pos=n,!0}let s=t.src[n];if(i>=55296&&i<=56319&&n+1<r){const a=t.src.charCodeAt(n+1);a>=56320&&a<=57343&&(s+=t.src[n+1],n++)}const o="\\"+s;if(!e){const a=t.push("text_special","",0);i<256&&r2[i]!==0?a.content=s:a.content=o,a.markup=o,a.info="escape"}return t.pos=n+1,!0}function UH(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==96)return!1;const i=n;n++;const s=t.posMax;for(;n<s&&t.src.charCodeAt(n)===96;)n++;const o=t.src.slice(i,n),a=o.length;if(t.backticksScanned&&(t.backticks[a]||0)<=i)return e||(t.pending+=o),t.pos+=a,!0;let l=n,u;for(;(u=t.src.indexOf("`",l))!==-1;){for(l=u+1;l<s&&t.src.charCodeAt(l)===96;)l++;const c=l-u;if(c===a){if(!e){const f=t.push("code_inline","code",0);f.markup=o,f.content=t.src.slice(n,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return t.pos=l,!0}t.backticks[c]=u}return t.backticksScanned=!0,e||(t.pending+=o),t.pos+=a,!0}function HH(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e||r!==126)return!1;const i=t.scanDelims(t.pos,!0);let s=i.length;const o=String.fromCharCode(r);if(s<2)return!1;let a;s%2&&(a=t.push("text","",0),a.content=o,s--);for(let l=0;l<s;l+=2)a=t.push("text","",0),a.content=o+o,t.delimiters.push({marker:r,length:0,token:t.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return t.pos+=i.length,!0}function gw(t,e){let n;const r=[],i=e.length;for(let s=0;s<i;s++){const o=e[s];if(o.marker!==126||o.end===-1)continue;const a=e[o.end];n=t.tokens[o.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=t.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",t.tokens[a.token-1].type==="text"&&t.tokens[a.token-1].content==="~"&&r.push(a.token-1)}for(;r.length;){const s=r.pop();let o=s+1;for(;o<t.tokens.length&&t.tokens[o].type==="s_close";)o++;o--,s!==o&&(n=t.tokens[o],t.tokens[o]=t.tokens[s],t.tokens[s]=n)}}function qH(t){const e=t.tokens_meta,n=t.tokens_meta.length;gw(t,t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&gw(t,e[r].delimiters)}const vO={tokenize:HH,postProcess:qH};function GH(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e||r!==95&&r!==42)return!1;const i=t.scanDelims(t.pos,r===42);for(let s=0;s<i.length;s++){const o=t.push("text","",0);o.content=String.fromCharCode(r),t.delimiters.push({marker:r,length:i.length,token:t.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return t.pos+=i.length,!0}function bw(t,e){const n=e.length;for(let r=n-1;r>=0;r--){const i=e[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const s=e[i.end],o=r>0&&e[r-1].end===i.end+1&&e[r-1].marker===i.marker&&e[r-1].token===i.token-1&&e[i.end+1].token===s.token+1,a=String.fromCharCode(i.marker),l=t.tokens[i.token];l.type=o?"strong_open":"em_open",l.tag=o?"strong":"em",l.nesting=1,l.markup=o?a+a:a,l.content="";const u=t.tokens[s.token];u.type=o?"strong_close":"em_close",u.tag=o?"strong":"em",u.nesting=-1,u.markup=o?a+a:a,u.content="",o&&(t.tokens[e[r-1].token].content="",t.tokens[e[i.end+1].token].content="",r--)}}function WH(t){const e=t.tokens_meta,n=t.tokens_meta.length;bw(t,t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&bw(t,e[r].delimiters)}const xO={tokenize:GH,postProcess:WH};function KH(t,e){let n,r,i,s,o="",a="",l=t.pos,u=!0;if(t.src.charCodeAt(t.pos)!==91)return!1;const c=t.pos,f=t.posMax,d=t.pos+1,h=t.md.helpers.parseLinkLabel(t,t.pos,!0);if(h<0)return!1;let p=h+1;if(p<f&&t.src.charCodeAt(p)===40){for(u=!1,p++;p<f&&(n=t.src.charCodeAt(p),!(!mt(n)&&n!==10));p++);if(p>=f)return!1;if(l=p,i=t.md.helpers.parseLinkDestination(t.src,p,t.posMax),i.ok){for(o=t.md.normalizeLink(i.str),t.md.validateLink(o)?p=i.pos:o="",l=p;p<f&&(n=t.src.charCodeAt(p),!(!mt(n)&&n!==10));p++);if(i=t.md.helpers.parseLinkTitle(t.src,p,t.posMax),p<f&&l!==p&&i.ok)for(a=i.str,p=i.pos;p<f&&(n=t.src.charCodeAt(p),!(!mt(n)&&n!==10));p++);}(p>=f||t.src.charCodeAt(p)!==41)&&(u=!0),p++}if(u){if(typeof t.env.references>"u")return!1;if(p<f&&t.src.charCodeAt(p)===91?(l=p+1,p=t.md.helpers.parseLinkLabel(t,p),p>=0?r=t.src.slice(l,p++):p=h+1):p=h+1,r||(r=t.src.slice(d,h)),s=t.env.references[lm(r)],!s)return t.pos=c,!1;o=s.href,a=s.title}if(!e){t.pos=d,t.posMax=h;const m=t.push("link_open","a",1),g=[["href",o]];m.attrs=g,a&&g.push(["title",a]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=p,t.posMax=f,!0}function XH(t,e){let n,r,i,s,o,a,l,u,c="";const f=t.pos,d=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91)return!1;const h=t.pos+2,p=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(p<0)return!1;if(s=p+1,s<d&&t.src.charCodeAt(s)===40){for(s++;s<d&&(n=t.src.charCodeAt(s),!(!mt(n)&&n!==10));s++);if(s>=d)return!1;for(u=s,a=t.md.helpers.parseLinkDestination(t.src,s,t.posMax),a.ok&&(c=t.md.normalizeLink(a.str),t.md.validateLink(c)?s=a.pos:c=""),u=s;s<d&&(n=t.src.charCodeAt(s),!(!mt(n)&&n!==10));s++);if(a=t.md.helpers.parseLinkTitle(t.src,s,t.posMax),s<d&&u!==s&&a.ok)for(l=a.str,s=a.pos;s<d&&(n=t.src.charCodeAt(s),!(!mt(n)&&n!==10));s++);else l="";if(s>=d||t.src.charCodeAt(s)!==41)return t.pos=f,!1;s++}else{if(typeof t.env.references>"u")return!1;if(s<d&&t.src.charCodeAt(s)===91?(u=s+1,s=t.md.helpers.parseLinkLabel(t,s),s>=0?i=t.src.slice(u,s++):s=p+1):s=p+1,i||(i=t.src.slice(h,p)),o=t.env.references[lm(i)],!o)return t.pos=f,!1;c=o.href,l=o.title}if(!e){r=t.src.slice(h,p);const m=[];t.md.inline.parse(r,t.md,t.env,m);const g=t.push("image","img",0),b=[["src",c],["alt",""]];g.attrs=b,g.children=m,g.content=r,l&&b.push(["title",l])}return t.pos=s,t.posMax=d,!0}const YH=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,JH=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ZH(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==60)return!1;const r=t.pos,i=t.posMax;for(;;){if(++n>=i)return!1;const o=t.src.charCodeAt(n);if(o===60)return!1;if(o===62)break}const s=t.src.slice(r+1,n);if(JH.test(s)){const o=t.md.normalizeLink(s);if(!t.md.validateLink(o))return!1;if(!e){const a=t.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";const l=t.push("text","",0);l.content=t.md.normalizeLinkText(s);const u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=s.length+2,!0}if(YH.test(s)){const o=t.md.normalizeLink("mailto:"+s);if(!t.md.validateLink(o))return!1;if(!e){const a=t.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";const l=t.push("text","",0);l.content=t.md.normalizeLinkText(s);const u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=s.length+2,!0}return!1}function QH(t){return/^<a[>\s]/i.test(t)}function eq(t){return/^<\/a\s*>/i.test(t)}function tq(t){const e=t|32;return e>=97&&e<=122}function nq(t,e){if(!t.md.options.html)return!1;const n=t.posMax,r=t.pos;if(t.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=t.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!tq(i))return!1;const s=t.src.slice(r).match(IH);if(!s)return!1;if(!e){const o=t.push("html_inline","",0);o.content=s[0],QH(o.content)&&t.linkLevel++,eq(o.content)&&t.linkLevel--}return t.pos+=s[0].length,!0}const rq=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,iq=/^&([a-z][a-z0-9]{1,31});/i;function sq(t,e){const n=t.pos,r=t.posMax;if(t.src.charCodeAt(n)!==38||n+1>=r)return!1;if(t.src.charCodeAt(n+1)===35){const s=t.src.slice(n).match(rq);if(s){if(!e){const o=s[1][0].toLowerCase()==="x"?parseInt(s[1].slice(1),16):parseInt(s[1],10),a=t.push("text_special","",0);a.content=t2(o)?qp(o):qp(65533),a.markup=s[0],a.info="entity"}return t.pos+=s[0].length,!0}}else{const s=t.src.slice(n).match(iq);if(s){const o=dO(s[0]);if(o!==s[0]){if(!e){const a=t.push("text_special","",0);a.content=o,a.markup=s[0],a.info="entity"}return t.pos+=s[0].length,!0}}}return!1}function yw(t){const e={},n=t.length;if(!n)return;let r=0,i=-2;const s=[];for(let o=0;o<n;o++){const a=t[o];if(s.push(0),(t[r].marker!==a.marker||i!==a.token-1)&&(r=o),i=a.token,a.length=a.length||0,!a.close)continue;e.hasOwnProperty(a.marker)||(e[a.marker]=[-1,-1,-1,-1,-1,-1]);const l=e[a.marker][(a.open?3:0)+a.length%3];let u=r-s[r]-1,c=u;for(;u>l;u-=s[u]+1){const f=t[u];if(f.marker===a.marker&&f.open&&f.end<0){let d=!1;if((f.close||a.open)&&(f.length+a.length)%3===0&&(f.length%3!==0||a.length%3!==0)&&(d=!0),!d){const h=u>0&&!t[u-1].open?s[u-1]+1:0;s[o]=o-u+h,s[u]=h,a.open=!1,f.end=o,f.close=!1,c=-1,i=-2;break}}}c!==-1&&(e[a.marker][(a.open?3:0)+(a.length||0)%3]=c)}}function oq(t){const e=t.tokens_meta,n=t.tokens_meta.length;yw(t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&yw(e[r].delimiters)}function aq(t){let e,n,r=0;const i=t.tokens,s=t.tokens.length;for(e=n=0;e<s;e++)i[e].nesting<0&&r--,i[e].level=r,i[e].nesting>0&&r++,i[e].type==="text"&&e+1<s&&i[e+1].type==="text"?i[e+1].content=i[e].content+i[e+1].content:(e!==n&&(i[n]=i[e]),n++);e!==n&&(i.length=n)}const Gg=[["text",BH],["linkify",zH],["newline",jH],["escape",VH],["backticks",UH],["strikethrough",vO.tokenize],["emphasis",xO.tokenize],["link",KH],["image",XH],["autolink",ZH],["html_inline",nq],["entity",sq]],Wg=[["balance_pairs",oq],["strikethrough",vO.postProcess],["emphasis",xO.postProcess],["fragments_join",aq]];function Gf(){this.ruler=new dr;for(let t=0;t<Gg.length;t++)this.ruler.push(Gg[t][0],Gg[t][1]);this.ruler2=new dr;for(let t=0;t<Wg.length;t++)this.ruler2.push(Wg[t][0],Wg[t][1])}Gf.prototype.skipToken=function(t){const e=t.pos,n=this.ruler.getRules(""),r=n.length,i=t.md.options.maxNesting,s=t.cache;if(typeof s[e]<"u"){t.pos=s[e];return}let o=!1;if(t.level<i){for(let a=0;a<r;a++)if(t.level++,o=n[a](t,!0),t.level--,o){if(e>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;o||t.pos++,s[e]=t.pos};Gf.prototype.tokenize=function(t){const e=this.ruler.getRules(""),n=e.length,r=t.posMax,i=t.md.options.maxNesting;for(;t.pos<r;){const s=t.pos;let o=!1;if(t.level<i){for(let a=0;a<n;a++)if(o=e[a](t,!1),o){if(s>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(o){if(t.pos>=r)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};Gf.prototype.parse=function(t,e,n,r){const i=new this.State(t,e,n,r);this.tokenize(i);const s=this.ruler2.getRules(""),o=s.length;for(let a=0;a<o;a++)s[a](i)};Gf.prototype.State=qf;function lq(t){const e={};t=t||{},e.src_Any=aO.source,e.src_Cc=lO.source,e.src_Z=cO.source,e.src_P=Qv.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const n="[><]";return e.src_pseudo_letter="(?:(?!"+n+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+n+"|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+e.src_ZPCc+"))((?![$+<=>^`|])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+e.src_ZPCc+"))((?![$+<=>^`|])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function Yb(t){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){t[r]=n[r]})}),t}function cm(t){return Object.prototype.toString.call(t)}function uq(t){return cm(t)==="[object String]"}function cq(t){return cm(t)==="[object Object]"}function fq(t){return cm(t)==="[object RegExp]"}function vw(t){return cm(t)==="[object Function]"}function dq(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const SO={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function hq(t){return Object.keys(t||{}).reduce(function(e,n){return e||SO.hasOwnProperty(n)},!1)}const pq={"http:":{validate:function(t,e,n){const r=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){const r=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){const r=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},mq="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",gq="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function bq(t){t.__index__=-1,t.__text_cache__=""}function yq(t){return function(e,n){const r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}function xw(){return function(t,e){e.normalize(t)}}function Gp(t){const e=t.re=lq(t.__opts__),n=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||n.push(mq),n.push(e.src_xn),e.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(r(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(r(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(r(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(r(e.tpl_host_fuzzy_test),"i");const i=[];t.__compiled__={};function s(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(t.__schemas__).forEach(function(a){const l=t.__schemas__[a];if(l===null)return;const u={validate:null,link:null};if(t.__compiled__[a]=u,cq(l)){fq(l.validate)?u.validate=yq(l.validate):vw(l.validate)?u.validate=l.validate:s(a,l),vw(l.normalize)?u.normalize=l.normalize:l.normalize?s(a,l):u.normalize=xw();return}if(uq(l)){i.push(a);return}s(a,l)}),i.forEach(function(a){t.__compiled__[t.__schemas__[a]]&&(t.__compiled__[a].validate=t.__compiled__[t.__schemas__[a]].validate,t.__compiled__[a].normalize=t.__compiled__[t.__schemas__[a]].normalize)}),t.__compiled__[""]={validate:null,normalize:xw()};const o=Object.keys(t.__compiled__).filter(function(a){return a.length>0&&t.__compiled__[a]}).map(dq).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><]|"+e.src_ZPCc+"))("+o+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><]|"+e.src_ZPCc+"))("+o+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),bq(t)}function vq(t,e){const n=t.__index__,r=t.__last_index__,i=t.__text_cache__.slice(n,r);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=r+e,this.raw=i,this.text=i,this.url=i}function Jb(t,e){const n=new vq(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function Tr(t,e){if(!(this instanceof Tr))return new Tr(t,e);e||hq(t)&&(e=t,t={}),this.__opts__=Yb({},SO,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Yb({},pq,t),this.__compiled__={},this.__tlds__=gq,this.__tlds_replaced__=!1,this.re={},Gp(this)}Tr.prototype.add=function(e,n){return this.__schemas__[e]=n,Gp(this),this};Tr.prototype.set=function(e){return this.__opts__=Yb(this.__opts__,e),this};Tr.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let n,r,i,s,o,a,l,u,c;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(e))!==null;)if(s=this.testSchemaAt(e,n[2],l.lastIndex),s){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+s;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(r=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(o=r.index+r[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&(i=e.match(this.re.email_fuzzy))!==null&&(o=i.index+i[1].length,a=i.index+i[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a))),this.__index__>=0};Tr.prototype.pretest=function(e){return this.re.pretest.test(e)};Tr.prototype.testSchemaAt=function(e,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(e,r,this):0};Tr.prototype.match=function(e){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===e&&(n.push(Jb(this,r)),r=this.__last_index__);let i=r?e.slice(r):e;for(;this.test(i);)n.push(Jb(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Tr.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const n=this.re.schema_at_start.exec(e);if(!n)return null;const r=this.testSchemaAt(e,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,Jb(this,0)):null};Tr.prototype.tlds=function(e,n){return e=Array.isArray(e)?e:[e],n?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(r,i,s){return r!==s[i-1]}).reverse(),Gp(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Gp(this),this)};Tr.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};Tr.prototype.onCompile=function(){};const ml=2147483647,Ni=36,i2=1,ef=26,xq=38,Sq=700,EO=72,wO=128,_O="-",Eq=/^xn--/,wq=/[^\0-\x7F]/,_q=/[\x2E\u3002\uFF0E\uFF61]/g,Cq={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Kg=Ni-i2,Mi=Math.floor,Xg=String.fromCharCode;function Ms(t){throw new RangeError(Cq[t])}function Aq(t,e){const n=[];let r=t.length;for(;r--;)n[r]=e(t[r]);return n}function CO(t,e){const n=t.split("@");let r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(_q,".");const i=t.split("."),s=Aq(i,e).join(".");return r+s}function AO(t){const e=[];let n=0;const r=t.length;for(;n<r;){const i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const s=t.charCodeAt(n++);(s&64512)==56320?e.push(((i&1023)<<10)+(s&1023)+65536):(e.push(i),n--)}else e.push(i)}return e}const Dq=t=>String.fromCodePoint(...t),kq=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:Ni},Sw=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},DO=function(t,e,n){let r=0;for(t=n?Mi(t/Sq):t>>1,t+=Mi(t/e);t>Kg*ef>>1;r+=Ni)t=Mi(t/Kg);return Mi(r+(Kg+1)*t/(t+xq))},kO=function(t){const e=[],n=t.length;let r=0,i=wO,s=EO,o=t.lastIndexOf(_O);o<0&&(o=0);for(let a=0;a<o;++a)t.charCodeAt(a)>=128&&Ms("not-basic"),e.push(t.charCodeAt(a));for(let a=o>0?o+1:0;a<n;){const l=r;for(let c=1,f=Ni;;f+=Ni){a>=n&&Ms("invalid-input");const d=kq(t.charCodeAt(a++));d>=Ni&&Ms("invalid-input"),d>Mi((ml-r)/c)&&Ms("overflow"),r+=d*c;const h=f<=s?i2:f>=s+ef?ef:f-s;if(d<h)break;const p=Ni-h;c>Mi(ml/p)&&Ms("overflow"),c*=p}const u=e.length+1;s=DO(r-l,u,l==0),Mi(r/u)>ml-i&&Ms("overflow"),i+=Mi(r/u),r%=u,e.splice(r++,0,i)}return String.fromCodePoint(...e)},OO=function(t){const e=[];t=AO(t);const n=t.length;let r=wO,i=0,s=EO;for(const l of t)l<128&&e.push(Xg(l));const o=e.length;let a=o;for(o&&e.push(_O);a<n;){let l=ml;for(const c of t)c>=r&&c<l&&(l=c);const u=a+1;l-r>Mi((ml-i)/u)&&Ms("overflow"),i+=(l-r)*u,r=l;for(const c of t)if(c<r&&++i>ml&&Ms("overflow"),c===r){let f=i;for(let d=Ni;;d+=Ni){const h=d<=s?i2:d>=s+ef?ef:d-s;if(f<h)break;const p=f-h,m=Ni-h;e.push(Xg(Sw(h+p%m,0))),f=Mi(p/m)}e.push(Xg(Sw(f,0))),s=DO(i,u,a===o),i=0,++a}++i,++r}return e.join("")},Oq=function(t){return CO(t,function(e){return Eq.test(e)?kO(e.slice(4).toLowerCase()):e})},Tq=function(t){return CO(t,function(e){return wq.test(e)?"xn--"+OO(e):e})},TO={version:"2.3.1",ucs2:{decode:AO,encode:Dq},decode:kO,encode:OO,toASCII:Tq,toUnicode:Oq},Iq={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Pq={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},Rq={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},Nq={default:Iq,zero:Pq,commonmark:Rq},Mq=/^(vbscript|javascript|file|data):/,Fq=/^data:image\/(gif|png|jpeg|webp);/;function Lq(t){const e=t.trim().toLowerCase();return Mq.test(e)?Fq.test(e):!0}const IO=["http:","https:","mailto:"];function Bq(t){const e=Zv(t,!0);if(e.hostname&&(!e.protocol||IO.indexOf(e.protocol)>=0))try{e.hostname=TO.toASCII(e.hostname)}catch{}return Hf(Jv(e))}function $q(t){const e=Zv(t,!0);if(e.hostname&&(!e.protocol||IO.indexOf(e.protocol)>=0))try{e.hostname=TO.toUnicode(e.hostname)}catch{}return Ml(Jv(e),Ml.defaultChars+"%")}function Gr(t,e){if(!(this instanceof Gr))return new Gr(t,e);e||e2(t)||(e=t||{},t="default"),this.inline=new Gf,this.block=new um,this.core=new n2,this.renderer=new ou,this.linkify=new Tr,this.validateLink=Lq,this.normalizeLink=Bq,this.normalizeLinkText=$q,this.utils=jU,this.helpers=am({},qU),this.options={},this.configure(t),e&&this.set(e)}Gr.prototype.set=function(t){return am(this.options,t),this};Gr.prototype.configure=function(t){const e=this;if(e2(t)){const n=t;if(t=Nq[n],!t)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(n){t.components[n].rules&&e[n].ruler.enableOnly(t.components[n].rules),t.components[n].rules2&&e[n].ruler2.enableOnly(t.components[n].rules2)}),this};Gr.prototype.enable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(t,!0))},this),n=n.concat(this.inline.ruler2.enable(t,!0));const r=t.filter(function(i){return n.indexOf(i)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Gr.prototype.disable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(t,!0))},this),n=n.concat(this.inline.ruler2.disable(t,!0));const r=t.filter(function(i){return n.indexOf(i)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Gr.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this};Gr.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");const n=new this.core.State(t,this,e);return this.core.process(n),n.tokens};Gr.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)};Gr.prototype.parseInline=function(t,e){const n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens};Gr.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};function zq(t,e,n){const{parseMetaString:r,trimEndingNewline:i=!0,defaultLanguage:s="text",fallbackLanguage:o}=n,a=e.getLoadedLanguages();t.options.highlight=(l,u="text",c)=>{u===""&&(u=s),o&&!a.includes(u)&&(u=o);const f=(r==null?void 0:r(c,l,u))||{},d={...n,lang:u,meta:{...n.meta,...f,__raw:c}},h=[];return h.push({name:"@shikijs/markdown-it:block-class",code(p){p.properties.class=`language-${u}`}}),i&&l.endsWith(`
`)&&(l=l.slice(0,-1)),e.codeToHtml(l,{...d,transformers:[...h,...d.transformers||[]]})}}function jq(t,e){return function(n){zq(n,t,e)}}let sa=class extends Error{constructor(e){super(e),this.name="ShikiError"}},s2=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Vq(){return 2147483648}function Uq(){return typeof performance<"u"?performance.now():Date.now()}const Hq=(t,e)=>t+(e-t%e)%e;async function qq(t){let e,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function s(h,p,m){r.HEAPU8.copyWithin(h,p,p+m)}function o(h){try{return e.grow(h-n.byteLength+65535>>>16),i(e.buffer),1}catch{}}function a(h){const p=r.HEAPU8.length;h=h>>>0;const m=Vq();if(h>m)return!1;for(let g=1;g<=4;g*=2){let b=p*(1+.2/g);b=Math.min(b,h+100663296);const y=Math.min(m,Hq(Math.max(h,b),65536));if(o(y))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,p,m=1024){const g=p+m;let b=p;for(;h[b]&&!(b>=g);)++b;if(b-p>16&&h.buffer&&l)return l.decode(h.subarray(p,b));let y="";for(;p<b;){let x=h[p++];if(!(x&128)){y+=String.fromCharCode(x);continue}const S=h[p++]&63;if((x&224)===192){y+=String.fromCharCode((x&31)<<6|S);continue}const E=h[p++]&63;if((x&240)===224?x=(x&15)<<12|S<<6|E:x=(x&7)<<18|S<<12|E<<6|h[p++]&63,x<65536)y+=String.fromCharCode(x);else{const C=x-65536;y+=String.fromCharCode(55296|C>>10,56320|C&1023)}}return y}function c(h,p){return h?u(r.HEAPU8,h,p):""}const f={emscripten_get_now:Uq,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function d(){const p=await t({env:f,wasi_snapshot_preview1:f});e=p.memory,i(e.buffer),Object.assign(r,p),r.UTF8ToString=c}return await d(),r}var Gq=Object.defineProperty,Wq=(t,e,n)=>e in t?Gq(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rn=(t,e,n)=>(Wq(t,typeof e!="symbol"?e+"":e,n),n);let cn=null;function Kq(t){throw new s2(t.UTF8ToString(t.getLastOnigError()))}class fm{constructor(e){rn(this,"utf16Length"),rn(this,"utf8Length"),rn(this,"utf16Value"),rn(this,"utf8Value"),rn(this,"utf16OffsetToUtf8"),rn(this,"utf8OffsetToUtf16");const n=e.length,r=fm._utf8ByteLength(e),i=r!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const o=i?new Uint32Array(r+1):null;i&&(o[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u<n;u++){const c=e.charCodeAt(u);let f=c,d=!1;if(c>=55296&&c<=56319&&u+1<n){const h=e.charCodeAt(u+1);h>=56320&&h<=57343&&(f=(c-55296<<10)+65536|h-56320,d=!0)}i&&(s[u]=l,d&&(s[u+1]=l),f<=127?o[l+0]=u:f<=2047?(o[l+0]=u,o[l+1]=u):f<=65535?(o[l+0]=u,o[l+1]=u,o[l+2]=u):(o[l+0]=u,o[l+1]=u,o[l+2]=u,o[l+3]=u)),f<=127?a[l++]=f:f<=2047?(a[l++]=192|(f&1984)>>>6,a[l++]=128|(f&63)>>>0):f<=65535?(a[l++]=224|(f&61440)>>>12,a[l++]=128|(f&4032)>>>6,a[l++]=128|(f&63)>>>0):(a[l++]=240|(f&1835008)>>>18,a[l++]=128|(f&258048)>>>12,a[l++]=128|(f&4032)>>>6,a[l++]=128|(f&63)>>>0),d&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=e,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let n=0;for(let r=0,i=e.length;r<i;r++){const s=e.charCodeAt(r);let o=s,a=!1;if(s>=55296&&s<=56319&&r+1<i){const l=e.charCodeAt(r+1);l>=56320&&l<=57343&&(o=(s-55296<<10)+65536|l-56320,a=!0)}o<=127?n+=1:o<=2047?n+=2:o<=65535?n+=3:n+=4,a&&r++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const wi=class{constructor(t){if(rn(this,"id",++wi.LAST_ID),rn(this,"_onigBinding"),rn(this,"content"),rn(this,"utf16Length"),rn(this,"utf8Length"),rn(this,"utf16OffsetToUtf8"),rn(this,"utf8OffsetToUtf16"),rn(this,"ptr"),!cn)throw new s2("Must invoke loadWasm first.");this._onigBinding=cn,this.content=t;const e=new fm(t);this.utf16Length=e.utf16Length,this.utf8Length=e.utf8Length,this.utf16OffsetToUtf8=e.utf16OffsetToUtf8,this.utf8OffsetToUtf16=e.utf8OffsetToUtf16,this.utf8Length<1e4&&!wi._sharedPtrInUse?(wi._sharedPtr||(wi._sharedPtr=cn.omalloc(1e4)),wi._sharedPtrInUse=!0,cn.HEAPU8.set(e.utf8Value,wi._sharedPtr),this.ptr=wi._sharedPtr):this.ptr=e.createString(cn)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===wi._sharedPtr?wi._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let Wf=wi;rn(Wf,"LAST_ID",0);rn(Wf,"_sharedPtr",0);rn(Wf,"_sharedPtrInUse",!1);class Xq{constructor(e){if(rn(this,"_onigBinding"),rn(this,"_ptr"),!cn)throw new s2("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=e.length;a<l;a++){const u=new fm(e[a]);n[a]=u.createString(cn),r[a]=u.utf8Length}const i=cn.omalloc(4*e.length);cn.HEAPU32.set(n,i/4);const s=cn.omalloc(4*e.length);cn.HEAPU32.set(r,s/4);const o=cn.createOnigScanner(i,s,e.length);for(let a=0,l=e.length;a<l;a++)cn.ofree(n[a]);cn.ofree(s),cn.ofree(i),o===0&&Kq(cn),this._onigBinding=cn,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof e=="string"){e=new Wf(e);const s=this._findNextMatchSync(e,n,!1,i);return e.dispose(),s}return this._findNextMatchSync(e,n,!1,i)}_findNextMatchSync(e,n,r,i){const s=this._onigBinding,o=s.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),i);if(o===0)return null;const a=s.HEAPU32;let l=o/4;const u=a[l++],c=a[l++],f=[];for(let d=0;d<c;d++){const h=e.convertUtf8OffsetToUtf16(a[l++]),p=e.convertUtf8OffsetToUtf16(a[l++]);f[d]={start:h,end:p,length:p-h}}return{index:u,captureIndices:f}}}function Yq(t){return typeof t.instantiator=="function"}function Jq(t){return typeof t.default=="function"}function Zq(t){return typeof t.data<"u"}function Qq(t){return typeof Response<"u"&&t instanceof Response}function eG(t){var e;return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&((e=Buffer.isBuffer)==null?void 0:e.call(Buffer,t))||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let Kd;function tG(t){if(Kd)return Kd;async function e(){cn=await qq(async n=>{let r=t;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),Yq(r)?r=await r.instantiator(n):Jq(r)?r=await r.default(n):(Zq(r)&&(r=r.data),Qq(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await nG(r)(n):r=await rG(r)(n):eG(r)?r=await Yg(r)(n):r instanceof WebAssembly.Module?r=await Yg(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Yg(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Kd=e(),Kd}function Yg(t){return e=>WebAssembly.instantiate(t,e)}function nG(t){return e=>WebAssembly.instantiateStreaming(t,e)}function rG(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}let iG;function sG(){return iG}async function oG(t){return t&&await tG(t),{createScanner(e){return new Xq(e.map(n=>typeof n=="string"?n:n.source))},createString(e){return new Wf(e)}}}function aG(t){return o2(t)}function o2(t){return Array.isArray(t)?lG(t):t instanceof RegExp?t:typeof t=="object"?uG(t):t}function lG(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=o2(t[n]);return e}function uG(t){let e={};for(let n in t)e[n]=o2(t[n]);return e}function PO(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function RO(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?RO(t.substring(0,t.length-1)):t.substr(~e+1)}var Jg=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Xd=class{static hasCaptures(t){return t===null?!1:(Jg.lastIndex=0,Jg.test(t))}static replaceCaptures(t,e,n){return t.replace(Jg,(r,i,s,o)=>{let a=n[parseInt(i||s,10)];if(a){let l=e.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(o){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function NO(t,e){return t<e?-1:t>e?1:0}function MO(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let i=0;i<n;i++){let s=NO(t[i],e[i]);if(s!==0)return s}return 0}return n-r}function Ew(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function FO(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var LO=class{constructor(t){X(this,"cache",new Map);this.fn=t}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},Wp=class{constructor(t,e,n){X(this,"_cachedMatchRoot",new LO(t=>this._root.match(t)));this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(dG(t),e)}static createFromParsedTheme(t,e){return pG(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(i=>cG(t.parent,i.parentScopes));return r?new BO(r.fontStyle,r.foreground,r.background):null}},Zg=class jh{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new jh(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new jh(n,e[r]);return n}push(e){return new jh(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function cG(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],i=!0}for(;t&&!fG(t.scopeName,r);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function fG(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var BO=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function dG(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let i=0,s=e.length;i<s;i++){let o=e[i];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let f=o.scope;f=f.replace(/^[,]+/,""),f=f.replace(/[,]+$/,""),a=f.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let l=-1;if(typeof o.settings.fontStyle=="string"){l=0;let f=o.settings.fontStyle.split(" ");for(let d=0,h=f.length;d<h;d++)switch(f[d]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof o.settings.foreground=="string"&&Ew(o.settings.foreground)&&(u=o.settings.foreground);let c=null;typeof o.settings.background=="string"&&Ew(o.settings.background)&&(c=o.settings.background);for(let f=0,d=a.length;f<d;f++){let p=a[f].trim().split(" "),m=p[p.length-1],g=null;p.length>1&&(g=p.slice(0,p.length-1),g.reverse()),n[r++]=new hG(m,g,i,l,u,c)}}return n}var hG=class{constructor(t,e,n,r,i,s){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},hs=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(hs||{});function pG(t,e){t.sort((l,u)=>{let c=NO(l.scope,u.scope);return c!==0||(c=MO(l.parentScopes,u.parentScopes),c!==0)?c:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let s=new mG(e),o=new BO(n,s.getId(r),s.getId(i)),a=new bG(new Zb(0,null,-1,0,0),[]);for(let l=0,u=t.length;l<u;l++){let c=t[l];a.insert(0,c.scope,c.parentScopes,c.fontStyle,s.getId(c.foreground),s.getId(c.background))}return new Wp(s,o,a)}var mG=class{constructor(t){X(this,"_isFrozen");X(this,"_lastColorId");X(this,"_id2color");X(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},gG=Object.freeze([]),Zb=class $O{constructor(e,n,r,i,s){X(this,"scopeDepth");X(this,"parentScopes");X(this,"fontStyle");X(this,"foreground");X(this,"background");this.scopeDepth=e,this.parentScopes=n||gG,this.fontStyle=r,this.foreground=i,this.background=s}clone(){return new $O(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,i=e.length;r<i;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},bG=class Qb{constructor(e,n=[],r={}){X(this,"_rulesWithParentScopes");this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,i=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=n.parentScopes.length);){const s=n.parentScopes[i].length-e.parentScopes[r].length;if(s!==0)return s;r++,i++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,s;if(r===-1?(i=e,s=""):(i=e.substring(0,r),s=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Qb._cmpBySpecificity),n}insert(e,n,r,i,s,o){if(n===""){this._doInsertHere(e,r,i,s,o);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let c;this._children.hasOwnProperty(l)?c=this._children[l]:(c=new Qb(this._mainRule.clone(),Zb.cloneArr(this._rulesWithParentScopes)),this._children[l]=c),c.insert(e+1,u,r,i,s,o)}_doInsertHere(e,n,r,i,s){if(n===null){this._mainRule.acceptOverwrite(e,r,i,s);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let l=this._rulesWithParentScopes[o];if(MO(l.parentScopes,n)===0){l.acceptOverwrite(e,r,i,s);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Zb(e,n,r,i,s))}},Ll=class Mr{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=Mr.getLanguageId(e),r=Mr.getTokenType(e),i=Mr.getFontStyle(e),s=Mr.getForeground(e),o=Mr.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:s,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,i,s,o,a){let l=Mr.getLanguageId(e),u=Mr.getTokenType(e),c=Mr.containsBalancedBrackets(e)?1:0,f=Mr.getFontStyle(e),d=Mr.getForeground(e),h=Mr.getBackground(e);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(c=i?1:0),s!==-1&&(f=s),o!==0&&(d=o),a!==0&&(h=a),(l<<0|u<<8|c<<10|f<<11|d<<15|h<<24)>>>0}};function Kp(t,e){const n=[],r=yG(t);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=o();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function s(){if(i==="-"){i=r.next();const l=s();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(ww(i)){const l=[];do l.push(i),i=r.next();while(ww(i));return u=>e(l,u)}return null}function o(){const l=[];let u=s();for(;u;)l.push(u),u=s();return c=>l.every(f=>f(c))}function a(){const l=[];let u=o();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=o()}return c=>l.some(f=>f(c))}}function ww(t){return!!t&&!!t.match(/[\w\.:]+/)}function yG(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function zO(t){typeof t.dispose=="function"&&t.dispose()}var tf=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},vG=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},xG=class{constructor(){X(this,"_references",[]);X(this,"_seenReferenceKeys",new Set);X(this,"visitedRule",new Set)}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},SG=class{constructor(t,e){X(this,"seenFullScopeRequests",new Set);X(this,"seenPartialScopeRequests",new Set);X(this,"Q");this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new tf(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new xG;for(const n of t)EG(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof tf){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function EG(t,e,n,r){const i=n.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=n.lookup(e);t instanceof tf?Vh({baseGrammar:s,selfGrammar:i},r):ey(t.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);const o=n.injections(t.scopeName);if(o)for(const a of o)r.add(new tf(a))}function ey(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];Xp([r],e,n)}}function Vh(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&Xp(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&Xp(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Xp(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?PO({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&Xp(r.patterns,{...e,repository:i},n);const s=r.include;if(!s)continue;const o=jO(s);switch(o.kind){case 0:Vh({...e,selfGrammar:e.baseGrammar},n);break;case 1:Vh(e,n);break;case 2:ey(o.ruleName,{...e,repository:i},n);break;case 3:case 4:const a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const l={baseGrammar:e.baseGrammar,selfGrammar:a,repository:i};o.kind===4?ey(o.ruleName,l,n):Vh(l,n)}else o.kind===4?n.add(new vG(o.scopeName,o.ruleName)):n.add(new tf(o.scopeName));break}}}var wG=class{constructor(){X(this,"kind",0)}},_G=class{constructor(){X(this,"kind",1)}},CG=class{constructor(t){X(this,"kind",2);this.ruleName=t}},AG=class{constructor(t){X(this,"kind",3);this.scopeName=t}},DG=class{constructor(t,e){X(this,"kind",4);this.scopeName=t,this.ruleName=e}};function jO(t){if(t==="$base")return new wG;if(t==="$self")return new _G;const e=t.indexOf("#");if(e===-1)return new AG(t);if(e===0)return new CG(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new DG(n,r)}}var kG=/\\(\d+)/,_w=/\\(\d+)/g,OG=-1,VO=-2;var Kf=class{constructor(t,e,n,r){X(this,"$location");X(this,"id");X(this,"_nameIsCapturing");X(this,"_name");X(this,"_contentNameIsCapturing");X(this,"_contentName");this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=Xd.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Xd.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${RO(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:Xd.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Xd.replaceCaptures(this._contentName,t,e)}},TG=class extends Kf{constructor(e,n,r,i,s){super(e,n,r,i);X(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(e,n){throw new Error("Not supported!")}compile(e,n){throw new Error("Not supported!")}compileAG(e,n,r,i){throw new Error("Not supported!")}},IG=class extends Kf{constructor(e,n,r,i,s){super(e,n,r,null);X(this,"_match");X(this,"captures");X(this,"_cachedCompiledPatterns");this._match=new nf(i,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,n){n.push(this._match)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new rf,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Cw=class extends Kf{constructor(e,n,r,i,s){super(e,n,r,i);X(this,"hasMissingPatterns");X(this,"patterns");X(this,"_cachedCompiledPatterns");this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,n){for(const r of this.patterns)e.getRule(r).collectPatterns(e,n)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new rf,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ty=class extends Kf{constructor(e,n,r,i,s,o,a,l,u,c){super(e,n,r,i);X(this,"_begin");X(this,"beginCaptures");X(this,"_end");X(this,"endHasBackReferences");X(this,"endCaptures");X(this,"applyEndPatternLast");X(this,"hasMissingPatterns");X(this,"patterns");X(this,"_cachedCompiledPatterns");this._begin=new nf(s,this.id),this.beginCaptures=o,this._end=new nf(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=u||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,n){return this._end.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e,n).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e,n).compileAG(e,r,i)}_getCachedCompiledPatterns(e,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new rf;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Yp=class extends Kf{constructor(e,n,r,i,s,o,a,l,u){super(e,n,r,i);X(this,"_begin");X(this,"beginCaptures");X(this,"whileCaptures");X(this,"_while");X(this,"whileHasBackReferences");X(this,"hasMissingPatterns");X(this,"patterns");X(this,"_cachedCompiledPatterns");X(this,"_cachedCompiledWhilePatterns");this._begin=new nf(s,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new nf(a,VO),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,n){return this._while.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new rf;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,n){return this._getCachedCompiledWhilePatterns(e,n).compile(e)}compileWhileAG(e,n,r,i){return this._getCachedCompiledWhilePatterns(e,n).compileAG(e,r,i)}_getCachedCompiledWhilePatterns(e,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new rf,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},UO=class Dn{static createCaptureRule(e,n,r,i,s){return e.registerRule(o=>new TG(n,o,r,i,s))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(i=>{if(e.id=i,e.match)return new IG(e.$vscodeTextmateLocation,e.id,e.name,e.match,Dn._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=PO({},r,e.repository));let s=e.patterns;return typeof s>"u"&&e.include&&(s=[{include:e.include}]),new Cw(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,Dn._compilePatterns(s,n,r))}return e.while?new Yp(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,Dn._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,Dn._compileCaptures(e.whileCaptures||e.captures,n,r),Dn._compilePatterns(e.patterns,n,r)):new ty(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,Dn._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,Dn._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,Dn._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let i=[];if(e){let s=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>s&&(s=a)}for(let o=0;o<=s;o++)i[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let l=0;e[o].patterns&&(l=Dn.getCompiledRuleId(e[o],n,r)),i[a]=Dn.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,l)}}return i}static _compilePatterns(e,n,r){let i=[];if(e)for(let s=0,o=e.length;s<o;s++){const a=e[s];let l=-1;if(a.include){const u=jO(a.include);switch(u.kind){case 0:case 1:l=Dn.getCompiledRuleId(r[a.include],n,r);break;case 2:let c=r[u.ruleName];c&&(l=Dn.getCompiledRuleId(c,n,r));break;case 3:case 4:const f=u.scopeName,d=u.kind===4?u.ruleName:null,h=n.getExternalGrammar(f,r);if(h)if(d){let p=h.repository[d];p&&(l=Dn.getCompiledRuleId(p,n,h.repository))}else l=Dn.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else l=Dn.getCompiledRuleId(a,n,r);if(l!==-1){const u=n.getRule(l);let c=!1;if((u instanceof Cw||u instanceof ty||u instanceof Yp)&&u.hasMissingPatterns&&u.patterns.length===0&&(c=!0),c)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},nf=class HO{constructor(e,n){X(this,"source");X(this,"ruleId");X(this,"hasAnchor");X(this,"hasBackReferences");X(this,"_anchorCache");if(e&&typeof e=="string"){const r=e.length;let i=0,s=[],o=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"&&a+1<r){const u=e.charAt(a+1);u==="z"?(s.push(e.substring(i,a)),s.push("$(?!\\n)(?<!\\n)"),i=a+2):(u==="A"||u==="G")&&(o=!0),a++}this.hasAnchor=o,i===0?this.source=e:(s.push(e.substring(i,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=kG.test(this.source):this.hasBackReferences=!1}clone(){return new HO(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>e.substring(i.start,i.end));return _w.lastIndex=0,this.source.replace(_w,(i,s)=>FO(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],i=[],s,o,a,l;for(s=0,o=this.source.length;s<o;s++)a=this.source.charAt(s),e[s]=a,n[s]=a,r[s]=a,i[s]=a,a==="\\"&&s+1<o&&(l=this.source.charAt(s+1),l==="A"?(e[s+1]="￿",n[s+1]="￿",r[s+1]="A",i[s+1]="A"):l==="G"?(e[s+1]="￿",n[s+1]="G",r[s+1]="￿",i[s+1]="G"):(e[s+1]=l,n[s+1]=l,r[s+1]=l,i[s+1]=l),s++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},rf=class{constructor(){X(this,"_items");X(this,"_hasAnchors");X(this,"_cached");X(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new Aw(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(i=>i.resolveAnchors(e,n));return new Aw(t,r,this._items.map(i=>i.ruleId))}},Aw=class{constructor(t,e,n){X(this,"scanner");this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
`)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Qg=class{constructor(t,e){this.languageId=t,this.tokenType=e}},ds,PG=(ds=class{constructor(e,n){X(this,"_defaultAttributes");X(this,"_embeddedLanguagesMatcher");X(this,"_getBasicScopeAttributes",new LO(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Qg(n,r)}));this._defaultAttributes=new Qg(e,8),this._embeddedLanguagesMatcher=new RG(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?ds._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(ds.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},X(ds,"_NULL_SCOPE_METADATA",new Qg(0,0)),X(ds,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),ds),RG=class{constructor(t){X(this,"values");X(this,"scopesRegExp");if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>FO(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Dw=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function qO(t,e,n,r,i,s,o,a){const l=e.content.length;let u=!1,c=-1;if(o){const h=NG(t,e,n,r,i,s);i=h.stack,r=h.linePos,n=h.isFirstLine,c=h.anchorPosition}const f=Date.now();for(;!u;){if(a!==0&&Date.now()-f>a)return new Dw(i,!0);d()}return new Dw(i,!1);function d(){const h=MG(t,e,n,r,i,c);if(!h){s.produce(i,l),u=!0;return}const p=h.captureIndices,m=h.matchedRuleId,g=p&&p.length>0?p[0].end>r:!1;if(m===OG){const b=i.getRule(t);s.produce(i,p[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ju(t,e,n,i,s,b.endCaptures,p),s.produce(i,p[0].end);const y=i;if(i=i.parent,c=y.getAnchorPos(),!g&&y.getEnterPos()===r){i=y,s.produce(i,l),u=!0;return}}else{const b=t.getRule(m);s.produce(i,p[0].start);const y=i,x=b.getName(e.content,p),S=i.contentNameScopesList.pushAttributed(x,t);if(i=i.push(m,r,c,p[0].end===l,null,S,S),b instanceof ty){const E=b;Ju(t,e,n,i,s,E.beginCaptures,p),s.produce(i,p[0].end),c=p[0].end;const C=E.getContentName(e.content,p),w=S.pushAttributed(C,t);if(i=i.withContentNameScopesList(w),E.endHasBackReferences&&(i=i.withEndRule(E.getEndWithResolvedBackReferences(e.content,p))),!g&&y.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),u=!0;return}}else if(b instanceof Yp){const E=b;Ju(t,e,n,i,s,E.beginCaptures,p),s.produce(i,p[0].end),c=p[0].end;const C=E.getContentName(e.content,p),w=S.pushAttributed(C,t);if(i=i.withContentNameScopesList(w),E.whileHasBackReferences&&(i=i.withEndRule(E.getWhileWithResolvedBackReferences(e.content,p))),!g&&y.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),u=!0;return}}else if(Ju(t,e,n,i,s,b.captures,p),s.produce(i,p[0].end),i=i.pop(),!g){i=i.safePop(),s.produce(i,l),u=!0;return}}p[0].end>r&&(r=p[0].end,n=!1)}}function NG(t,e,n,r,i,s){let o=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const u=l.getRule(t);u instanceof Yp&&a.push({rule:u,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:u,findOptions:c}=BG(l.rule,t,l.stack.endRule,n,r===o),f=u.findNextMatchSync(e,r,c);if(f){if(f.ruleId!==VO){i=l.stack.pop();break}f.captureIndices&&f.captureIndices.length&&(s.produce(l.stack,f.captureIndices[0].start),Ju(t,e,n,l.stack,s,l.rule.whileCaptures,f.captureIndices),s.produce(l.stack,f.captureIndices[0].end),o=f.captureIndices[0].end,f.captureIndices[0].end>r&&(r=f.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function MG(t,e,n,r,i,s){const o=FG(t,e,n,r,i,s),a=t.getInjections();if(a.length===0)return o;const l=LG(a,t,e,n,r,i,s);if(!l)return o;if(!o)return l;const u=o.captureIndices[0].start,c=l.captureIndices[0].start;return c<u||l.priorityMatch&&c===u?l:o}function FG(t,e,n,r,i,s){const o=i.getRule(t),{ruleScanner:a,findOptions:l}=GO(o,t,i.endRule,n,r===s),u=a.findNextMatchSync(e,r,l);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function LG(t,e,n,r,i,s,o){let a=Number.MAX_VALUE,l=null,u,c=0;const f=s.contentNameScopesList.getScopeNames();for(let d=0,h=t.length;d<h;d++){const p=t[d];if(!p.matcher(f))continue;const m=e.getRule(p.ruleId),{ruleScanner:g,findOptions:b}=GO(m,e,null,r,i===o),y=g.findNextMatchSync(n,i,b);if(!y)continue;const x=y.captureIndices[0].start;if(!(x>=a)&&(a=x,l=y.captureIndices,u=y.ruleId,c=p.priority,a===i))break}return l?{priorityMatch:c===-1,captureIndices:l,matchedRuleId:u}:null}function GO(t,e,n,r,i){return{ruleScanner:t.compileAG(e,n,r,i),findOptions:0}}function BG(t,e,n,r,i){return{ruleScanner:t.compileWhileAG(e,n,r,i),findOptions:0}}function Ju(t,e,n,r,i,s,o){if(s.length===0)return;const a=e.content,l=Math.min(s.length,o.length),u=[],c=o[0].end;for(let f=0;f<l;f++){const d=s[f];if(d===null)continue;const h=o[f];if(h.length===0)continue;if(h.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,h.start):i.produce(r,h.start),d.retokenizeCapturedWithRuleId){const m=d.getName(a,o),g=r.contentNameScopesList.pushAttributed(m,t),b=d.getContentName(a,o),y=g.pushAttributed(b,t),x=r.push(d.retokenizeCapturedWithRuleId,h.start,-1,!1,null,g,y),S=t.createOnigString(a.substring(0,h.end));qO(t,S,n&&h.start===0,h.start,x,i,!1,0),zO(S);continue}const p=d.getName(a,o);if(p!==null){const g=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(p,t);u.push(new $G(g,h.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var $G=class{constructor(t,e){X(this,"scopes");X(this,"endPos");this.scopes=t,this.endPos=e}};function zG(t,e,n,r,i,s,o,a){return new VG(t,e,n,r,i,s,o,a)}function kw(t,e,n,r,i){const s=Kp(e,Jp),o=UO.getCompiledRuleId(n,r,i.repository);for(const a of s)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:i,priority:a.priority})}function Jp(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let i=n;i<e.length;i++)if(jG(e[i],r))return n=i+1,!0;return!1})}function jG(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var VG=class{constructor(t,e,n,r,i,s,o,a){X(this,"_rootId");X(this,"_lastRuleId");X(this,"_ruleId2desc");X(this,"_includedGrammars");X(this,"_grammarRepository");X(this,"_grammar");X(this,"_injections");X(this,"_basicScopeAttributesProvider");X(this,"_tokenTypeMatchers");if(this._rootScopeName=t,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new PG(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ow(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const u=Kp(l,Jp);for(const c of u)this._tokenTypeMatchers.push({matcher:c.matcher,type:i[l]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const i=r.injections;if(i)for(let o in i)kw(e,o,i[o],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(o=>{const a=this.getExternalGrammar(o);if(a){const l=a.injectionSelector;l&&kw(e,l,a,this,a)}})}return e.sort((i,s)=>i.priority-s.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Ow(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=UO.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===ny.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),c=this.themeProvider.getDefaults(),f=Ll.set(0,u.languageId,u.tokenType,null,c.fontStyle,c.foregroundId,c.backgroundId),d=this.getRule(this._rootId).getName(null,null);let h;d?h=mc.createRootAndLookUpScopeName(d,f,this):h=mc.createRoot("unknown",f),e=new ny(null,this._rootId,-1,-1,!1,null,h,h)}else i=!1,e.reset();t=t+`
`;const s=this.createOnigString(t),o=s.content.length,a=new HG(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=qO(this,s,i,0,e,a,!0,r);return zO(s),{lineLength:o,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Ow(t,e){return t=aG(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var mc=class _i{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,i=(e==null?void 0:e.scopePath)??null;for(const s of n)i=Zg.push(i,s.scopeNames),r=new _i(r,i,s.encodedTokenAttributes);return r}static createRoot(e,n){return new _i(null,new Zg(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const i=r.getMetadataForScope(e),s=new Zg(null,e),o=r.themeProvider.themeMatch(s),a=_i.mergeAttributes(n,i,o);return new _i(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return _i.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let i=-1,s=0,o=0;return r!==null&&(i=r.fontStyle,s=r.foregroundId,o=r.backgroundId),Ll.set(e,n.languageId,n.tokenType,null,i,s,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return _i._pushAttributed(this,e,n);const r=e.split(/ /g);let i=this;for(const s of r)i=_i._pushAttributed(i,s,n);return i}static _pushAttributed(e,n,r){const i=r.getMetadataForScope(n),s=e.scopePath.push(n),o=r.themeProvider.themeMatch(s),a=_i.mergeAttributes(e.tokenAttributes,i,o);return new _i(e,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var i;const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((i=r.parent)==null?void 0:i.scopePath)??null)}),r=r.parent;return r===e?n.reverse():void 0}},Lr,ny=(Lr=class{constructor(e,n,r,i,s,o,a,l){X(this,"_stackElementBrand");X(this,"_enterPos");X(this,"_anchorPos");X(this,"depth");this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(e){return e===null?!1:Lr._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?mc.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){Lr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,i,s,o,a){return new Lr(this,e,n,r,i,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){var r,i;return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new Lr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var e,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,n){const r=mc.fromExtension((e==null?void 0:e.nameScopesList)??null,n.nameScopesList);return new Lr(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,mc.fromExtension(r,n.contentNameScopesList))}},X(Lr,"NULL",new Lr(null,0,0,0,!1,null,null,null)),Lr),UG=class{constructor(t,e){X(this,"balancedBracketScopes");X(this,"unbalancedBracketScopes");X(this,"allowAny",!1);this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Kp(n,Jp).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>Kp(n,Jp).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},HG=class{constructor(t,e,n,r){X(this,"_emitBinaryTokens");X(this,"_lineText");X(this,"_tokens");X(this,"_binaryTokens");X(this,"_lastTokenEndIndex");X(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){var r;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let i=(t==null?void 0:t.tokenAttributes)??0,s=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=(t==null?void 0:t.getScopeNames())??[];for(const a of this._tokenTypeOverrides)a.matcher(o)&&(i=Ll.set(i,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(i=Ll.set(i,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=e;return}const n=(t==null?void 0:t.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},qG=class{constructor(t,e){X(this,"_grammars",new Map);X(this,"_rawGrammars",new Map);X(this,"_injectionGrammars",new Map);X(this,"_theme");this._onigLib=e,this._theme=t}dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,i){if(!this._grammars.has(t)){let s=this._rawGrammars.get(t);if(!s)return null;this._grammars.set(t,zG(t,s,e,n,r,i,this,this._onigLib))}return this._grammars.get(t)}},GG=class{constructor(e){X(this,"_options");X(this,"_syncRegistry");X(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new qG(Wp.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(Wp.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,r){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,n,r){return this._loadGrammar(e,n,r.embeddedLanguages,r.tokenTypes,new UG(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,i,s){const o=new SG(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(a=>this._loadSingleGrammar(a.scopeName)),o.processQueue();return this._grammarForScopeName(e,n,r,i,s)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(e,n=[],r=0,i=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,i)}_grammarForScopeName(e,n=0,r=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(e,n,r,i,s)}},ry=ny.NULL;const WG=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let Xf=class{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}};Xf.prototype.normal={};Xf.prototype.property={};Xf.prototype.space=void 0;function WO(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new Xf(n,r,e)}function iy(t){return t.toLowerCase()}class hr{constructor(e,n){this.attribute=n,this.property=e}}hr.prototype.attribute="";hr.prototype.booleanish=!1;hr.prototype.boolean=!1;hr.prototype.commaOrSpaceSeparated=!1;hr.prototype.commaSeparated=!1;hr.prototype.defined=!1;hr.prototype.mustUseProperty=!1;hr.prototype.number=!1;hr.prototype.overloadedBoolean=!1;hr.prototype.property="";hr.prototype.spaceSeparated=!1;hr.prototype.space=void 0;let KG=0;const Be=Ia(),Yt=Ia(),sy=Ia(),re=Ia(),pt=Ia(),gl=Ia(),gr=Ia();function Ia(){return 2**++KG}const oy=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:Yt,commaOrSpaceSeparated:gr,commaSeparated:gl,number:re,overloadedBoolean:sy,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),e1=Object.keys(oy);class a2 extends hr{constructor(e,n,r,i){let s=-1;if(super(e,n),Tw(this,"space",i),typeof r=="number")for(;++s<e1.length;){const o=e1[s];Tw(this,e1[s],(r&oy[o])===oy[o])}}}a2.prototype.defined=!0;function Tw(t,e,n){n&&(t[e]=n)}function au(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new a2(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[iy(r)]=r,n[iy(s.attribute)]=r}return new Xf(e,n,t.space)}const KO=au({properties:{ariaActiveDescendant:null,ariaAtomic:Yt,ariaAutoComplete:null,ariaBusy:Yt,ariaChecked:Yt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Yt,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Yt,ariaFlowTo:pt,ariaGrabbed:Yt,ariaHasPopup:null,ariaHidden:Yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:re,ariaLive:null,ariaModal:Yt,ariaMultiLine:Yt,ariaMultiSelectable:Yt,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:Yt,ariaReadOnly:Yt,ariaRelevant:null,ariaRequired:Yt,ariaRoleDescription:pt,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:Yt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function XO(t,e){return e in t?t[e]:e}function YO(t,e){return XO(t,e.toLowerCase())}const XG=au({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gl,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:pt,autoFocus:Be,autoPlay:Be,blocking:pt,capture:null,charSet:null,checked:Be,cite:null,className:pt,cols:re,colSpan:null,content:null,contentEditable:Yt,controls:Be,controlsList:pt,coords:re|gl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:sy,draggable:Yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:pt,height:re,hidden:sy,high:re,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:pt,itemRef:pt,itemScope:Be,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Be,optimum:re,pattern:null,ping:pt,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:pt,required:Be,reversed:Be,rows:re,rowSpan:re,sandbox:pt,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:Yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Be,useMap:null,value:Yt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:Yt,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Be,disableRemotePlayback:Be,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:YO}),YG=au({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:gr,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:pt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Be,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:gl,g2:gl,glyphName:gl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:gr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gr,rev:gr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gr,requiredFeatures:gr,requiredFonts:gr,requiredFormats:gr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:gr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gr,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:XO}),JO=au({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),ZO=au({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:YO}),QO=au({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),JG=/[A-Z]/g,Iw=/-[a-z]/g,ZG=/^data[-\w.:]+$/i;function QG(t,e){const n=iy(e);let r=e,i=hr;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ZG.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(Iw,tW);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!Iw.test(s)){let o=s.replace(JG,eW);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=a2}return new i(r,e)}function eW(t){return"-"+t.toLowerCase()}function tW(t){return t.charAt(1).toUpperCase()}const nW=WO([KO,XG,JO,ZO,QO],"html"),e6=WO([KO,YG,JO,ZO,QO],"svg"),Pw={}.hasOwnProperty;function rW(t,e){const n=e||{};function r(i,...s){let o=r.invalid;const a=r.handlers;if(i&&Pw.call(i,t)){const l=String(i[t]);o=Pw.call(a,l)?a[l]:r.unknown}if(o)return o.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const iW=/["&'<>`]/g,sW=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,oW=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,aW=/[|\\{}()[\]^$+*?.]/g,Rw=new WeakMap;function lW(t,e){if(t=t.replace(e.subset?uW(e.subset):iW,r),e.subset||e.escapeOnly)return t;return t.replace(sW,n).replace(oW,r);function n(i,s,o){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function r(i,s,o){return e.format(i.charCodeAt(0),o.charCodeAt(s+1),e)}}function uW(t){let e=Rw.get(t);return e||(e=cW(t),Rw.set(t,e)),e}function cW(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(aW,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const fW=/[\dA-Fa-f]/;function dW(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!fW.test(String.fromCharCode(e))?r:r+";"}const hW=/\d/;function pW(t,e,n){const r="&#"+String(t);return n&&e&&!hW.test(String.fromCharCode(e))?r:r+";"}const mW=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],t1={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"",Prime:"″",oline:"‾",frasl:"",weierp:"℘",image:"",real:"",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"",lowast:"",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"",cap:"∩",cup:"",int:"∫",there4:"∴",sim:"",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:"",emsp:"",thinsp:"",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"",mdash:"—",lsquo:"",rsquo:"",sbquo:"",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"",rsaquo:"",euro:"€"},gW=["cent","copy","divide","gt","lt","not","para","times"],t6={}.hasOwnProperty,ay={};let Yd;for(Yd in t1)t6.call(t1,Yd)&&(ay[t1[Yd]]=Yd);const bW=/[^\dA-Za-z]/;function yW(t,e,n,r){const i=String.fromCharCode(t);if(t6.call(ay,i)){const s=ay[i],o="&"+s;return n&&mW.includes(s)&&!gW.includes(s)&&(!r||e&&e!==61&&bW.test(String.fromCharCode(e)))?o:o+";"}return""}function vW(t,e,n){let r=dW(t,e,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=yW(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=pW(t,e,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function bl(t,e){return lW(t,Object.assign({format:vW},e))}const xW=/^>|^->|<!--|-->|--!>|<!-$/g,SW=[">"],EW=["<",">"];function wW(t,e,n,r){return r.settings.bogusComments?"<?"+bl(t.value,Object.assign({},r.settings.characterReferences,{subset:SW}))+">":"<!--"+t.value.replace(xW,i)+"-->";function i(s){return bl(s,Object.assign({},r.settings.characterReferences,{subset:EW}))}}function _W(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Nw(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function CW(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function AW(t){return t.join(" ").trim()}const DW=/[ \t\n\f\r]/g;function l2(t){return typeof t=="object"?t.type==="text"?Mw(t.value):!1:Mw(t)}function Mw(t){return t.replace(DW,"")===""}const an=r6(1),n6=r6(-1),kW=[];function r6(t){return e;function e(n,r,i){const s=n?n.children:kW;let o=(r||0)+t,a=s[o];if(!i)for(;a&&l2(a);)o+=t,a=s[o];return a}}const OW={}.hasOwnProperty;function i6(t){return e;function e(n,r,i){return OW.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const u2=i6({body:IW,caption:n1,colgroup:n1,dd:MW,dt:NW,head:n1,html:TW,li:RW,optgroup:FW,option:LW,p:PW,rp:Fw,rt:Fw,tbody:$W,td:Lw,tfoot:zW,th:Lw,thead:BW,tr:jW});function n1(t,e,n){const r=an(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&l2(r.value.charAt(0)))}function TW(t,e,n){const r=an(n,e);return!r||r.type!=="comment"}function IW(t,e,n){const r=an(n,e);return!r||r.type!=="comment"}function PW(t,e,n){const r=an(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function RW(t,e,n){const r=an(n,e);return!r||r.type==="element"&&r.tagName==="li"}function NW(t,e,n){const r=an(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function MW(t,e,n){const r=an(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Fw(t,e,n){const r=an(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function FW(t,e,n){const r=an(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function LW(t,e,n){const r=an(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function BW(t,e,n){const r=an(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function $W(t,e,n){const r=an(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function zW(t,e,n){return!an(n,e)}function jW(t,e,n){const r=an(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Lw(t,e,n){const r=an(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const VW=i6({body:qW,colgroup:GW,head:HW,html:UW,tbody:WW});function UW(t){const e=an(t,-1);return!e||e.type!=="comment"}function HW(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function qW(t){const e=an(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&l2(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function GW(t,e,n){const r=n6(n,e),i=an(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&u2(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function WW(t,e,n){const r=n6(n,e),i=an(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&u2(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Jd={name:[[`
\f\r &/=>`.split(""),`
\f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
\f\r "&'/<=>\``.split("")]],unquoted:[[`
\f\r &>`.split(""),`\0
\f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function KW(t,e,n,r){const i=r.schema,s=i.space==="svg"?!1:r.settings.omitOptionalTags;let o=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const a=[];let l;i.space==="html"&&t.tagName==="svg"&&(r.schema=e6);const u=XW(r,t.properties),c=r.all(i.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=i,c&&(o=!1),(u||!s||!VW(t,e,n))&&(a.push("<",t.tagName,u?" "+u:""),o&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(c),!o&&(!s||!u2(t,e,n))&&a.push("</"+t.tagName+">"),a.join("")}function XW(t,e){const n=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const s=YW(t,i,e[i]);s&&n.push(s)}}for(;++r<n.length;){const s=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function YW(t,e,n){const r=QG(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,s=t.settings.allowDangerousCharacters?0:1;let o=t.quote,a;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const l=bl(r.attribute,Object.assign({},t.settings.characterReferences,{subset:Jd.name[i][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?CW:AW)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?l:(t.settings.preferUnquoted&&(a=bl(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Jd.unquoted[i][s]}))),a!==n&&(t.settings.quoteSmart&&Nw(n,o)>Nw(n,t.alternative)&&(o=t.alternative),a=o+bl(n,Object.assign({},t.settings.characterReferences,{subset:(o==="'"?Jd.single:Jd.double)[i][s],attribute:!0}))+o),l+(a&&"="+a))}const JW=["<","&"];function s6(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:bl(t.value,Object.assign({},r.settings.characterReferences,{subset:JW}))}function ZW(t,e,n,r){return r.settings.allowDangerousHtml?t.value:s6(t,e,n,r)}function QW(t,e,n,r){return r.all(t)}const eK=rW("type",{invalid:tK,unknown:nK,handlers:{comment:wW,doctype:_W,element:KW,raw:ZW,root:QW,text:s6}});function tK(t){throw new Error("Expected node, not `"+t+"`")}function nK(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const rK={},iK={},sK=[];function oK(t,e){const n=rK,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:aK,all:lK,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||WG,characterReferences:n.characterReferences||iK,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?e6:nW,quote:r,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function aK(t,e,n){return eK(t,e,n,this)}function lK(t){const e=[],n=t&&t.children||sK;let r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}function uK(t){return Array.isArray(t)?t:[t]}function dm(t,e=!1){var s;const n=t.split(/(\r?\n)/g);let r=0;const i=[];for(let o=0;o<n.length;o+=2){const a=e?n[o]+(n[o+1]||""):n[o];i.push([a,r]),r+=n[o].length,r+=((s=n[o+1])==null?void 0:s.length)||0}return i}function c2(t){return!t||["plaintext","txt","text","plain"].includes(t)}function cK(t){return t==="ansi"||c2(t)}function f2(t){return t==="none"}function fK(t){return f2(t)}function o6(t,e){var r;if(!e)return t;t.properties||(t.properties={}),(r=t.properties).class||(r.class=[]),typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const i of n)i&&!t.properties.class.includes(i)&&t.properties.class.push(i);return t}function dK(t,e){let n=0;const r=[];for(const i of e)i>n&&r.push({...t,content:t.content.slice(n,i),offset:t.offset+n}),n=i;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function hK(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort((r,i)=>r-i);return n.length?t.map(r=>r.flatMap(i=>{const s=n.filter(o=>i.offset<o&&o<i.offset+i.content.length).map(o=>o-i.offset).sort((o,a)=>o-a);return s.length?dK(i,s):i})):t}async function a6(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function Zp(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(const[i,s]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof s=="string"?n[i]=s:i===r&&Object.assign(n,s);return n}function Ko(t,e){return t&&((e==null?void 0:e[t==null?void 0:t.toLowerCase()])||t)}function l6(t){const e={};return t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle&&(t.fontStyle&hs.Italic&&(e["font-style"]="italic"),t.fontStyle&hs.Bold&&(e["font-weight"]="bold"),t.fontStyle&hs.Underline&&(e["text-decoration"]="underline")),e}function pK(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function mK(t){const e=dm(t,!0).map(([i])=>i);function n(i){if(i===t.length)return{line:e.length-1,character:e[e.length-1].length};let s=i,o=0;for(const a of e){if(s<a.length)break;s-=a.length,o++}return{line:o,character:s}}function r(i,s){let o=0;for(let a=0;a<i;a++)o+=e[a].length;return o+=s,o}return{lines:e,indexToPos:n,posToIndex:r}}class jn extends Error{constructor(e){super(e),this.name="ShikiError"}}const u6=new WeakMap;function hm(t,e){u6.set(t,e)}function sf(t){return u6.get(t)}class lu{constructor(...e){X(this,"_stacks",{});X(this,"lang");if(e.length===2){const[n,r]=e;this.lang=r,this._stacks=n}else{const[n,r,i]=e;this.lang=r,this._stacks={[i]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new lu(Object.fromEntries(uK(n).map(r=>[r,ry])),e)}getInternalStack(e=this.theme){return this._stacks[e]}get scopes(){return Bw(this._stacks[this.theme])}getScopes(e=this.theme){return Bw(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function Bw(t){const e=[],n=new Set;function r(i){var o;if(n.has(i))return;n.add(i);const s=(o=i==null?void 0:i.nameScopesList)==null?void 0:o.scopeName;s&&e.push(s),i.parent&&r(i.parent)}return r(t),e}function gK(t,e){if(!(t instanceof lu))throw new jn("Invalid grammar state");return t.getInternalStack(e)}function bK(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let r=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new jn(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...i.indexToPos(o),offset:o}}else{const a=i.lines[o.line];if(a===void 0)throw new jn(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${i.lines.length}`);if(o.character<0||o.character>a.length)throw new jn(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,offset:i.posToIndex(o.line,o.character)}}};const i=mK(n.source),s=(n.options.decorations||[]).map(o=>({...o,start:r(o.start),end:r(o.end)}));yK(s),t.set(n.meta,{decorations:s,converter:i,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){var o;if(!((o=this.options.decorations)!=null&&o.length))return;const i=e(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return hK(n,i)},code(n){var c;if(!((c=this.options.decorations)!=null&&c.length))return;const r=e(this),i=Array.from(n.children).filter(f=>f.type==="element"&&f.tagName==="span");if(i.length!==r.converter.lines.length)throw new jn(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(f,d,h,p){const m=i[f];let g="",b=-1,y=-1;if(d===0&&(b=0),h===0&&(y=0),h===Number.POSITIVE_INFINITY&&(y=m.children.length),b===-1||y===-1)for(let S=0;S<m.children.length;S++)g+=c6(m.children[S]),b===-1&&g.length===d&&(b=S+1),y===-1&&g.length===h&&(y=S+1);if(b===-1)throw new jn(`Failed to find start index for decoration ${JSON.stringify(p.start)}`);if(y===-1)throw new jn(`Failed to find end index for decoration ${JSON.stringify(p.end)}`);const x=m.children.slice(b,y);if(!p.alwaysWrap&&x.length===m.children.length)a(m,p,"line");else if(!p.alwaysWrap&&x.length===1&&x[0].type==="element")a(x[0],p,"token");else{const S={type:"element",tagName:"span",properties:{},children:x};a(S,p,"wrapper"),m.children.splice(b,x.length,S)}}function o(f,d){i[f]=a(i[f],d,"line")}function a(f,d,h){var g;const p=d.properties||{},m=d.transform||(b=>b);return f.tagName=d.tagName||"span",f.properties={...f.properties,...p,class:f.properties.class},(g=d.properties)!=null&&g.class&&o6(f,d.properties.class),f=m(f,h)||f,f}const l=[],u=r.decorations.sort((f,d)=>d.start.offset-f.start.offset);for(const f of u){const{start:d,end:h}=f;if(d.line===h.line)s(d.line,d.character,h.character,f);else if(d.line<h.line){s(d.line,d.character,Number.POSITIVE_INFINITY,f);for(let p=d.line+1;p<h.line;p++)l.unshift(()=>o(p,f));s(h.line,0,h.character,f)}}l.forEach(f=>f())}}}function yK(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new jn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){const i=t[r],s=n.start.offset<i.start.offset&&i.start.offset<n.end.offset,o=n.start.offset<i.end.offset&&i.end.offset<n.end.offset,a=i.start.offset<n.start.offset&&n.start.offset<i.end.offset,l=i.start.offset<n.end.offset&&n.end.offset<i.end.offset;if(s||o||a||l){if(o&&o||a&&l)continue;throw new jn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function c6(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(c6).join(""):""}const vK=[bK()];function Qp(t){return[...t.transformers||[],...vK]}var Xo=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],r1={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function xK(t,e){const n=t.indexOf("\x1B[",e);if(n!==-1){const r=t.indexOf("m",n);return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function $w(t,e){let n=1;const r=t[e+n++];let i;if(r==="2"){const s=[t[e+n++],t[e+n++],t[e+n]].map(o=>Number.parseInt(o));s.length===3&&!s.some(o=>Number.isNaN(o))&&(i={type:"rgb",rgb:s})}else if(r==="5"){const s=Number.parseInt(t[e+n]);Number.isNaN(s)||(i={type:"table",index:Number(s)})}return[n,i]}function SK(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=Number.parseInt(r);if(!Number.isNaN(i))if(i===0)e.push({type:"resetAll"});else if(i<=9)r1[i]&&e.push({type:"setDecoration",value:r1[i]});else if(i<=29){const s=r1[i-20];s&&e.push({type:"resetDecoration",value:s})}else if(i<=37)e.push({type:"setForegroundColor",value:{type:"named",name:Xo[i-30]}});else if(i===38){const[s,o]=$w(t,n);o&&e.push({type:"setForegroundColor",value:o}),n+=s}else if(i===39)e.push({type:"resetForegroundColor"});else if(i<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:Xo[i-40]}});else if(i===48){const[s,o]=$w(t,n);o&&e.push({type:"setBackgroundColor",value:o}),n+=s}else i===49?e.push({type:"resetBackgroundColor"}):i>=90&&i<=97?e.push({type:"setForegroundColor",value:{type:"named",name:Xo[i-90+8]}}):i>=100&&i<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:Xo[i-100+8]}})}return e}function EK(){let t=null,e=null,n=new Set;return{parse(r){const i=[];let s=0;do{const o=xK(r,s),a=o.sequence?r.substring(s,o.startPosition):r.substring(s);if(a.length>0&&i.push({value:a,foreground:t,background:e,decorations:new Set(n)}),o.sequence){const l=SK(o.sequence);for(const u of l)u.type==="resetAll"?(t=null,e=null,n.clear()):u.type==="resetForegroundColor"?t=null:u.type==="resetBackgroundColor"?e=null:u.type==="resetDecoration"&&n.delete(u.value);for(const u of l)u.type==="setForegroundColor"?t=u.value:u.type==="setBackgroundColor"?e=u.value:u.type==="setDecoration"&&n.add(u.value)}s=o.position}while(s<r.length);return i}}}var wK={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function _K(t=wK){function e(a){return t[a]}function n(a){return`#${a.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let u=0;u<Xo.length;u++)r.push(e(Xo[u]));let a=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let c=0;c<6;c++)for(let f=0;f<6;f++)r.push(n([a[u],a[c],a[f]]));let l=8;for(let u=0;u<24;u++,l+=10)r.push(n([l,l,l]));return r}function s(a){return i()[a]}function o(a){switch(a.type){case"named":return e(a.name);case"rgb":return n(a.rgb);case"table":return s(a.index)}}return{value:o}}function CK(t,e,n){const r=Zp(t,n),i=dm(e),s=_K(Object.fromEntries(Xo.map(a=>{var l;return[a,(l=t.colors)==null?void 0:l[`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`]]}))),o=EK();return i.map(a=>o.parse(a[0]).map(l=>{let u,c;l.decorations.has("reverse")?(u=l.background?s.value(l.background):t.bg,c=l.foreground?s.value(l.foreground):t.fg):(u=l.foreground?s.value(l.foreground):t.fg,c=l.background?s.value(l.background):void 0),u=Ko(u,r),c=Ko(c,r),l.decorations.has("dim")&&(u=AK(u));let f=hs.None;return l.decorations.has("bold")&&(f|=hs.Bold),l.decorations.has("italic")&&(f|=hs.Italic),l.decorations.has("underline")&&(f|=hs.Underline),{content:l.value,offset:a[1],color:u,bgColor:c,fontStyle:f}}))}function AK(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e)if(e[3]){const r=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${r}`}else return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map(r=>`${r}${r}`).join("")}80`;const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}function d2(t,e,n={}){const{lang:r="text",theme:i=t.getLoadedThemes()[0]}=n;if(c2(r)||f2(i))return dm(e).map(l=>[{content:l[0],offset:l[1]}]);const{theme:s,colorMap:o}=t.setTheme(i);if(r==="ansi")return CK(s,e,n);const a=t.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==a.name)throw new sa(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(s.name))throw new sa(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return kK(e,a,s,o,n)}function DK(...t){if(t.length===2)return sf(t[1]);const[e,n,r={}]=t,{lang:i="text",theme:s=e.getLoadedThemes()[0]}=r;if(c2(i)||f2(s))throw new sa("Plain language does not have grammar state");if(i==="ansi")throw new sa("ANSI language does not have grammar state");const{theme:o,colorMap:a}=e.setTheme(s),l=e.getLanguage(i);return new lu(e0(n,l,o,a,r).stateStack,l.name,o.name)}function kK(t,e,n,r,i){const s=e0(t,e,n,r,i),o=new lu(e0(t,e,n,r,i).stateStack,e.name,n.name);return hm(s.tokens,o),s.tokens}function e0(t,e,n,r,i){const s=Zp(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500}=i,l=dm(t);let u=i.grammarState?gK(i.grammarState,n.name)??ry:i.grammarContextCode!=null?e0(i.grammarContextCode,e,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:ry,c=[];const f=[];for(let d=0,h=l.length;d<h;d++){const[p,m]=l[d];if(p===""){c=[],f.push([]);continue}if(o>0&&p.length>=o){c=[],f.push([{content:p,offset:m,color:"",fontStyle:0}]);continue}let g,b,y;i.includeExplanation&&(g=e.tokenizeLine(p,u),b=g.tokens,y=0);const x=e.tokenizeLine2(p,u,a),S=x.tokens.length/2;for(let E=0;E<S;E++){const C=x.tokens[2*E],w=E+1<S?x.tokens[2*E+2]:p.length;if(C===w)continue;const A=x.tokens[2*E+1],_=Ko(r[Ll.getForeground(A)],s),O=Ll.getFontStyle(A),I={content:p.substring(C,w),offset:m+C,color:_,fontStyle:O};if(i.includeExplanation){const N=[];if(i.includeExplanation!=="scopeName")for(const R of n.settings){let F;switch(typeof R.scope){case"string":F=R.scope.split(/,/).map(V=>V.trim());break;case"object":F=R.scope;break;default:continue}N.push({settings:R,selectors:F.map(V=>V.split(/ /))})}I.explanation=[];let P=0;for(;C+P<w;){const R=b[y],F=p.substring(R.startIndex,R.endIndex);P+=F.length,I.explanation.push({content:F,scopes:i.includeExplanation==="scopeName"?OK(R.scopes):TK(N,R.scopes)}),y+=1}}c.push(I)}f.push(c),c=[],u=x.ruleStack}return{tokens:f,stateStack:u}}function OK(t){return t.map(e=>({scopeName:e}))}function TK(t,e){const n=[];for(let r=0,i=e.length;r<i;r++){const s=e[r];n[r]={scopeName:s,themeMatches:PK(t,s,e.slice(0,r))}}return n}function zw(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function IK(t,e,n){if(!zw(t[t.length-1],e))return!1;let r=t.length-2,i=n.length-1;for(;r>=0&&i>=0;)zw(t[r],n[i])&&(r-=1),i-=1;return r===-1}function PK(t,e,n){const r=[];for(const{selectors:i,settings:s}of t)for(const o of i)if(IK(o,e,n)){r.push(s);break}return r}function f6(t,e,n){const r=Object.entries(n.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=r.map(l=>{const u=d2(t,e,{...n,theme:l.theme}),c=sf(u),f=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:u,state:c,theme:f}}),s=RK(...i.map(l=>l.tokens)),o=s[0].map((l,u)=>l.map((c,f)=>{const d={content:c.content,variants:{},offset:c.offset};return"includeExplanation"in n&&n.includeExplanation&&(d.explanation=c.explanation),s.forEach((h,p)=>{const{content:m,explanation:g,offset:b,...y}=h[u][f];d.variants[r[p].color]=y}),d})),a=i[0].state?new lu(Object.fromEntries(i.map(l=>{var u;return[l.theme,(u=l.state)==null?void 0:u.getInternalStack(l.theme)]})),i[0].state.lang):void 0;return a&&hm(o,a),o}function RK(...t){const e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){const i=t.map(l=>l[r]),s=e.map(()=>[]);e.forEach((l,u)=>l.push(s[u]));const o=i.map(()=>0),a=i.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(u=>u.content.length));for(let u=0;u<n;u++){const c=a[u];c.content.length===l?(s[u].push(c),o[u]+=1,a[u]=i[u][o[u]]):(s[u].push({...c,content:c.content.slice(0,l)}),a[u]={...c,content:c.content.slice(l),offset:c.offset+l})}}}return e}function t0(t,e,n){let r,i,s,o,a,l;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:c="--shiki-"}=n,f=Object.entries(n.themes).filter(g=>g[1]).map(g=>({color:g[0],theme:g[1]})).sort((g,b)=>g.color===u?-1:b.color===u?1:0);if(f.length===0)throw new sa("`themes` option must not be empty");const d=f6(t,e,n);if(l=sf(d),u&&!f.find(g=>g.color===u))throw new sa(`\`themes\` option must contain the defaultColor key \`${u}\``);const h=f.map(g=>t.getTheme(g.theme)),p=f.map(g=>g.color);s=d.map(g=>g.map(b=>NK(b,p,c,u))),l&&hm(s,l);const m=f.map(g=>Zp(g.theme,n));i=f.map((g,b)=>(b===0&&u?"":`${c+g.color}:`)+(Ko(h[b].fg,m[b])||"inherit")).join(";"),r=f.map((g,b)=>(b===0&&u?"":`${c+g.color}-bg:`)+(Ko(h[b].bg,m[b])||"inherit")).join(";"),o=`shiki-themes ${h.map(g=>g.name).join(" ")}`,a=u?void 0:[i,r].join(";")}else if("theme"in n){const u=Zp(n.theme,n);s=d2(t,e,n);const c=t.getTheme(n.theme);r=Ko(c.bg,u),i=Ko(c.fg,u),o=c.name,l=sf(s)}else throw new sa("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:o,rootStyle:a,grammarState:l}}function NK(t,e,n,r){const i={content:t.content,explanation:t.explanation,offset:t.offset},s=e.map(l=>l6(t.variants[l])),o=new Set(s.flatMap(l=>Object.keys(l))),a={};return s.forEach((l,u)=>{for(const c of o){const f=l[c]||"inherit";if(u===0&&r)a[c]=f;else{const d=c==="color"?"":c==="background-color"?"-bg":`-${c}`,h=n+e[u]+(c==="color"?"":d);a[h]=f}}}),i.htmlStyle=a,i}function n0(t,e,n,r={meta:{},options:n,codeToHast:(i,s)=>n0(t,i,s),codeToTokens:(i,s)=>t0(t,i,s)}){var h,p;let i=e;for(const m of Qp(n))i=((h=m.preprocess)==null?void 0:h.call(r,i,n))||i;let{tokens:s,fg:o,bg:a,themeName:l,rootStyle:u,grammarState:c}=t0(t,i,n);const{mergeWhitespaces:f=!0}=n;f===!0?s=FK(s):f==="never"&&(s=LK(s));const d={...r,get source(){return i}};for(const m of Qp(n))s=((p=m.tokens)==null?void 0:p.call(d,s))||s;return MK(s,{...n,fg:o,bg:a,themeName:l,rootStyle:u},d,c)}function MK(t,e,n,r=sf(t)){var p,m,g;const i=Qp(e),s=[],o={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=e;let u={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,...l!==!1&&l!=null?{tabindex:l.toString()}:{},...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter(([b])=>!b.startsWith("_")))},children:[]},c={type:"element",tagName:"code",properties:{},children:s};const f=[],d={...n,structure:a,addClassToHast:o6,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return u},get code(){return c},get lines(){return f}};if(t.forEach((b,y)=>{var E,C;y&&(a==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&s.push({type:"text",value:`
`}));let x={type:"element",tagName:"span",properties:{class:"line"},children:[]},S=0;for(const w of b){let A={type:"element",tagName:"span",properties:{...w.htmlAttrs},children:[{type:"text",value:w.content}]};w.htmlStyle;const _=pK(w.htmlStyle||l6(w));_&&(A.properties.style=_);for(const O of i)A=((E=O==null?void 0:O.span)==null?void 0:E.call(d,A,y+1,S,x,w))||A;a==="inline"?o.children.push(A):a==="classic"&&x.children.push(A),S+=w.content.length}if(a==="classic"){for(const w of i)x=((C=w==null?void 0:w.line)==null?void 0:C.call(d,x,y+1))||x;f.push(x),s.push(x)}}),a==="classic"){for(const b of i)c=((p=b==null?void 0:b.code)==null?void 0:p.call(d,c))||c;u.children.push(c);for(const b of i)u=((m=b==null?void 0:b.pre)==null?void 0:m.call(d,u))||u;o.children.push(u)}let h=o;for(const b of i)h=((g=b==null?void 0:b.root)==null?void 0:g.call(d,h))||h;return r&&hm(h,r),h}function FK(t){return t.map(e=>{const n=[];let r="",i=0;return e.forEach((s,o)=>{const l=!(s.fontStyle&&s.fontStyle&hs.Underline);l&&s.content.match(/^\s+$/)&&e[o+1]?(i||(i=s.offset),r+=s.content):r?(l?n.push({...s,offset:i,content:r+s.content}):n.push({content:r,offset:i},s),i=0,r=""):n.push(s)}),n})}function LK(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,s,o]=r;if(!i&&!o)return n;const a=[{...n,offset:n.offset+i.length,content:s}];return i&&a.unshift({content:i,offset:n.offset}),o&&a.push({content:o,offset:n.offset+i.length+s.length}),a}))}function BK(t,e,n){var s;const r={meta:{},options:n,codeToHast:(o,a)=>n0(t,o,a),codeToTokens:(o,a)=>t0(t,o,a)};let i=oK(n0(t,e,n,r));for(const o of Qp(n))i=((s=o.postprocess)==null?void 0:s.call(r,i,n))||i;return i}const jw={light:"#333333",dark:"#bbbbbb"},Vw={light:"#fffffe",dark:"#1e1e1e"},Uw="__shiki_resolved";function h2(t){var a,l,u,c,f;if(t!=null&&t[Uw])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:n,fg:r}=e;if(!n||!r){const d=e.settings?e.settings.find(h=>!h.name&&!h.scope):void 0;(a=d==null?void 0:d.settings)!=null&&a.foreground&&(r=d.settings.foreground),(l=d==null?void 0:d.settings)!=null&&l.background&&(n=d.settings.background),!r&&((u=e==null?void 0:e.colors)!=null&&u["editor.foreground"])&&(r=e.colors["editor.foreground"]),!n&&((c=e==null?void 0:e.colors)!=null&&c["editor.background"])&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?jw.light:jw.dark),n||(n=e.type==="light"?Vw.light:Vw.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const s=new Map;function o(d){var p;if(s.has(d))return s.get(d);i+=1;const h=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(p=e.colorReplacements)!=null&&p[`#${h}`]?o(d):(s.set(d,h),h)}e.settings=e.settings.map(d=>{var g,b;const h=((g=d.settings)==null?void 0:g.foreground)&&!d.settings.foreground.startsWith("#"),p=((b=d.settings)==null?void 0:b.background)&&!d.settings.background.startsWith("#");if(!h&&!p)return d;const m={...d,settings:{...d.settings}};if(h){const y=o(d.settings.foreground);e.colorReplacements[y]=d.settings.foreground,m.settings.foreground=y}if(p){const y=o(d.settings.background);e.colorReplacements[y]=d.settings.background,m.settings.background=y}return m});for(const d of Object.keys(e.colors||{}))if((d==="editor.foreground"||d==="editor.background"||d.startsWith("terminal.ansi"))&&!((f=e.colors[d])!=null&&f.startsWith("#"))){const h=o(e.colors[d]);e.colorReplacements[h]=e.colors[d],e.colors[d]=h}return Object.defineProperty(e,Uw,{enumerable:!1,writable:!1,value:!0}),e}async function d6(t){return Array.from(new Set((await Promise.all(t.filter(e=>!cK(e)).map(async e=>await a6(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function h6(t){return(await Promise.all(t.map(async n=>fK(n)?null:h2(await a6(n))))).filter(n=>!!n)}class $K extends GG{constructor(n,r,i,s={}){super(n);X(this,"_resolvedThemes",new Map);X(this,"_resolvedGrammars",new Map);X(this,"_langMap",new Map);X(this,"_langGraph",new Map);X(this,"_textmateThemeCache",new WeakMap);X(this,"_loadedThemesCache",null);X(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=i,this._alias=s,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=h2(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=Wp.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){if(this._alias[n]){const r=new Set([n]);for(;this._alias[n];){if(n=this._alias[n],r.has(n))throw new jn(`Circular alias \`${Array.from(r).join(" -> ")} -> ${n}\``);r.add(n)}}return this._resolvedGrammars.get(n)}loadLanguage(n){var o,a,l,u;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(c=>{var f;return(f=c.embeddedLangsLazy)==null?void 0:f.includes(n.name)}));this._resolver.addLanguage(n);const i={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const s=this.loadGrammarWithConfiguration(n.scopeName,1,i);if(s.name=n.name,this._resolvedGrammars.set(n.name,s),n.aliases&&n.aliases.forEach(c=>{this._alias[c]=n.name}),this._loadedLanguagesCache=null,r.size)for(const c of r)this._resolvedGrammars.delete(c.name),this._loadedLanguagesCache=null,(a=(o=this._syncRegistry)==null?void 0:o._injectionGrammars)==null||a.delete(c.scopeName),(u=(l=this._syncRegistry)==null?void 0:l._grammars)==null||u.delete(c.scopeName),this.loadLanguage(this._langMap.get(c.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const s of n)this.resolveEmbeddedLanguages(s);const r=Array.from(this._langGraph.entries()),i=r.filter(([s,o])=>!o);if(i.length){const s=r.filter(([o,a])=>{var l;return a&&((l=a.embeddedLangs)==null?void 0:l.some(u=>i.map(([c])=>c).includes(u)))}).filter(o=>!i.includes(o));throw new jn(`Missing languages ${i.map(([o])=>`\`${o}\``).join(", ")}, required by ${s.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[s,o]of r)this._resolver.addLanguage(o);for(const[s,o]of r)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){if(this._langMap.set(n.name,n),this._langGraph.set(n.name,n),n.embeddedLangs)for(const r of n.embeddedLangs)this._langGraph.set(r,this._langMap.get(r))}}class zK{constructor(e,n){X(this,"_langs",new Map);X(this,"_scopeToLang",new Map);X(this,"_injections",new Map);X(this,"_onigLib");this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(n=>{this._langs.set(n,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(e.scopeName)})}getInjections(e){const n=e.split(".");let r=[];for(let i=1;i<=n.length;i++){const s=n.slice(0,i).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let Bu=0;function jK(t){Bu+=1,t.warnings!==!1&&Bu>=10&&Bu%10===0&&console.warn(`[Shiki] ${Bu} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new jn("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(h2),i=new zK(t.engine,n),s=new $K(i,r,n,t.langAlias);let o;function a(y){g();const x=s.getGrammar(typeof y=="string"?y:y.name);if(!x)throw new jn(`Language \`${y}\` not found, you may need to load it first`);return x}function l(y){if(y==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};g();const x=s.getTheme(y);if(!x)throw new jn(`Theme \`${y}\` not found, you may need to load it first`);return x}function u(y){g();const x=l(y);o!==y&&(s.setTheme(x),o=y);const S=s.getColorMap();return{theme:x,colorMap:S}}function c(){return g(),s.getLoadedThemes()}function f(){return g(),s.getLoadedLanguages()}function d(...y){g(),s.loadLanguages(y.flat(1))}async function h(...y){return d(await d6(y))}function p(...y){g();for(const x of y.flat(1))s.loadTheme(x)}async function m(...y){return g(),p(await h6(y))}function g(){if(e)throw new jn("Shiki instance has been disposed")}function b(){e||(e=!0,s.dispose(),Bu-=1)}return{setTheme:u,getTheme:l,getLanguage:a,getLoadedThemes:c,getLoadedLanguages:f,loadLanguage:h,loadLanguageSync:d,loadTheme:m,loadThemeSync:p,dispose:b,[Symbol.dispose]:b}}async function VK(t={}){t.loadWasm;const[e,n,r]=await Promise.all([h6(t.themes||[]),d6(t.langs||[]),t.engine||oG(t.loadWasm||sG())]);return jK({...t,themes:e,langs:n,engine:r})}async function UK(t={}){const e=await VK(t);return{getLastGrammarState:(...n)=>DK(e,...n),codeToTokensBase:(n,r)=>d2(e,n,r),codeToTokensWithThemes:(n,r)=>f6(e,n,r),codeToTokens:(n,r)=>t0(e,n,r),codeToHast:(n,r)=>n0(e,n,r),codeToHtml:(n,r)=>BK(e,n,r),...e,getInternalContext:()=>e}}const ly=Gr({linkify:!0,typographer:!0});(async()=>{const t=await UK({themes:[og(()=>import("./vitesse-light-CVO1_9PV.js"),[]),og(()=>import("./vitesse-dark-D0r3Knsf.js"),[])],langs:[og(()=>import("./javascript-ySlJ1b_l.js"),[])]});ly.use(jq(t,{themes:{light:"vitesse-light",dark:"vitesse-dark"}}))})();function yl(t,e=!0){return e?ly.renderInline(t):ly.render(t)}var i1={},Hw;function HK(){return Hw||(Hw=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.enableErrorLogging=t.disableErrorLogging=t.setErrorLogger=void 0;let e=console.error;function n(w){e=w}t.setErrorLogger=n;function r(){e=()=>{}}t.disableErrorLogging=r;function i(){e=console.error}t.enableErrorLogging=i;function s(w){if(w!==void 0){if(w===null)return null;if(w==="")return"";w=w.replace(/\\+$/,A=>A.length%2===0?A:A.slice(0,-1));try{return JSON.parse(w)}catch(A){const[_,O]=w.trimLeft()[0]===":"?o(w,A):o(w,A,b);if(s.lastParseReminding=O,s.onExtraToken&&O.length>0){const I=O.trimRight();s.lastParseReminding=I,I.length>0&&s.onExtraToken(w,_,I)}return _}}}t.parse=s,(function(w){w.onExtraToken=(A,_,O)=>{e("parsed json with extra tokens:",{text:A,data:_,reminding:O})}})(s=t.parse||(t.parse={}));function o(w,A,_){const O=l[w[0]]||_;if(!O)throw e(`no parser registered for ${JSON.stringify(w[0])}:`,{s:w}),A;return O(w,A)}function a(w,A,_){return w[0]==='"'?p(w):w[0]==="'"?g(w):b(w,A,_)}const l={};function u(w){return w.trimLeft()}l[" "]=c,l["\r"]=c,l[`
`]=c,l[" "]=c;function c(w,A){return w=u(w),o(w,A)}l["["]=f;function f(w,A){w=w.substr(1);const _=[];for(w=u(w);w.length>0;){if(w[0]==="]"){w=w.substr(1);break}const O=o(w,A,(I,N)=>b(I,N,[",","]"]));_.push(O[0]),w=O[1],w=u(w),w[0]===","&&(w=w.substring(1),w=u(w))}return[_,w]}for(const w of"0123456789.-".slice())l[w]=d;function d(w){for(let A=0;A<w.length;A++){const _=w[A];if(l[_]===d)continue;const O=w.substring(0,A);return w=w.substring(A),[h(O),w]}return[h(w),""]}function h(w){if(w==="-")return-0;const A=+w;return Number.isNaN(A)?w:A}l['"']=p;function p(w){for(let A=1;A<w.length;A++){const _=w[A];if(_==="\\"){A++;continue}if(_==='"'){const O=m(w.substring(0,A+1));return w=w.substring(A+1),[JSON.parse(O),w]}}return[JSON.parse(m(w)+'"'),""]}function m(w){return w.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}l["'"]=g;function g(w){for(let A=1;A<w.length;A++){const _=w[A];if(_==="\\"){A++;continue}if(_==="'"){const O=m(w.substring(0,A+1));return w=w.substring(A+1),[JSON.parse('"'+O.slice(1,-1)+'"'),w]}}return[JSON.parse('"'+m(w.slice(1))+'"'),""]}function b(w,A,_=[" "]){const O=Math.min(..._.map(P=>{const R=w.indexOf(P);return R===-1?w.length:R})),I=w.substring(0,O).trim(),N=w.substring(O);return[I,N]}l["{"]=y;function y(w,A){w=w.substr(1);const _={};for(w=u(w);w.length>0;){if(w[0]==="}"){w=w.substr(1);break}const O=a(w,A,[":","}"]),I=O[0];if(w=O[1],w=u(w),w[0]!==":"){_[I]=void 0;break}if(w=w.substr(1),w=u(w),w.length===0){_[I]=void 0;break}const N=o(w,A);_[I]=N[0],w=N[1],w=u(w),w[0]===","&&(w=w.substr(1),w=u(w))}return[_,w]}l.t=x;function x(w,A){return C(w,"true",!0,A)}l.f=S;function S(w,A){return C(w,"false",!1,A)}l.n=E;function E(w,A){return C(w,"null",null,A)}function C(w,A,_,O){for(let I=A.length;I>=1;I--)if(w.startsWith(A.slice(0,I)))return[_,w.slice(I)];{const I=JSON.stringify(w.slice(0,A.length));throw e(`unknown token starting with ${I}:`,{s:w}),O}}})(i1)),i1}var p6=HK();function qK(t){let e=null;try{e=JSON.parse(t.doc.toString())}catch{try{e=p6.parse(t.doc.toString())}catch{}}const n=Uv(t,At.JSON);return{data:e,pointers:n}}var GK=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,WK=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,KK=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,s1={Space_Separator:GK,ID_Start:WK,ID_Continue:KK},Vt={isSpaceSeparator(t){return typeof t=="string"&&s1.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||s1.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t===""||t===""||s1.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}};let uy,Hn,fs,r0,xo,li,fn,p2,gc;var XK=function(e,n){uy=String(e),Hn="start",fs=[],r0=0,xo=1,li=0,fn=void 0,p2=void 0,gc=void 0;do fn=YK(),QK[Hn]();while(fn.type!=="eof");return typeof n=="function"?cy({"":gc},"",n):gc};function cy(t,e,n){const r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let i=0;i<r.length;i++){const s=String(i),o=cy(r,s,n);o===void 0?delete r[s]:Object.defineProperty(r,s,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const i in r){const s=cy(r,i,n);s===void 0?delete r[i]:Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0})}return n.call(t,e,r)}let $e,Re,Zu,ns,He;function YK(){for($e="default",Re="",Zu=!1,ns=1;;){He=bs();const t=m6[$e]();if(t)return t}}function bs(){if(uy[r0])return String.fromCodePoint(uy.codePointAt(r0))}function J(){const t=bs();return t===`
`?(xo++,li=0):t?li+=t.length:li++,t&&(r0+=t.length),t}const m6={default(){switch(He){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
`:case"\r":case"\u2028":case"\u2029":J();return;case"/":J(),$e="comment";return;case void 0:return J(),bt("eof")}if(Vt.isSpaceSeparator(He)){J();return}return m6[Hn]()},comment(){switch(He){case"*":J(),$e="multiLineComment";return;case"/":J(),$e="singleLineComment";return}throw yt(J())},multiLineComment(){switch(He){case"*":J(),$e="multiLineCommentAsterisk";return;case void 0:throw yt(J())}J()},multiLineCommentAsterisk(){switch(He){case"*":J();return;case"/":J(),$e="default";return;case void 0:throw yt(J())}J(),$e="multiLineComment"},singleLineComment(){switch(He){case`
`:case"\r":case"\u2028":case"\u2029":J(),$e="default";return;case void 0:return J(),bt("eof")}J()},value(){switch(He){case"{":case"[":return bt("punctuator",J());case"n":return J(),Io("ull"),bt("null",null);case"t":return J(),Io("rue"),bt("boolean",!0);case"f":return J(),Io("alse"),bt("boolean",!1);case"-":case"+":J()==="-"&&(ns=-1),$e="sign";return;case".":Re=J(),$e="decimalPointLeading";return;case"0":Re=J(),$e="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Re=J(),$e="decimalInteger";return;case"I":return J(),Io("nfinity"),bt("numeric",1/0);case"N":return J(),Io("aN"),bt("numeric",NaN);case'"':case"'":Zu=J()==='"',Re="",$e="string";return}throw yt(J())},identifierNameStartEscape(){if(He!=="u")throw yt(J());J();const t=fy();switch(t){case"$":case"_":break;default:if(!Vt.isIdStartChar(t))throw qw();break}Re+=t,$e="identifierName"},identifierName(){switch(He){case"$":case"_":case"":case"":Re+=J();return;case"\\":J(),$e="identifierNameEscape";return}if(Vt.isIdContinueChar(He)){Re+=J();return}return bt("identifier",Re)},identifierNameEscape(){if(He!=="u")throw yt(J());J();const t=fy();switch(t){case"$":case"_":case"":case"":break;default:if(!Vt.isIdContinueChar(t))throw qw();break}Re+=t,$e="identifierName"},sign(){switch(He){case".":Re=J(),$e="decimalPointLeading";return;case"0":Re=J(),$e="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Re=J(),$e="decimalInteger";return;case"I":return J(),Io("nfinity"),bt("numeric",ns*(1/0));case"N":return J(),Io("aN"),bt("numeric",NaN)}throw yt(J())},zero(){switch(He){case".":Re+=J(),$e="decimalPoint";return;case"e":case"E":Re+=J(),$e="decimalExponent";return;case"x":case"X":Re+=J(),$e="hexadecimal";return}return bt("numeric",ns*0)},decimalInteger(){switch(He){case".":Re+=J(),$e="decimalPoint";return;case"e":case"E":Re+=J(),$e="decimalExponent";return}if(Vt.isDigit(He)){Re+=J();return}return bt("numeric",ns*Number(Re))},decimalPointLeading(){if(Vt.isDigit(He)){Re+=J(),$e="decimalFraction";return}throw yt(J())},decimalPoint(){switch(He){case"e":case"E":Re+=J(),$e="decimalExponent";return}if(Vt.isDigit(He)){Re+=J(),$e="decimalFraction";return}return bt("numeric",ns*Number(Re))},decimalFraction(){switch(He){case"e":case"E":Re+=J(),$e="decimalExponent";return}if(Vt.isDigit(He)){Re+=J();return}return bt("numeric",ns*Number(Re))},decimalExponent(){switch(He){case"+":case"-":Re+=J(),$e="decimalExponentSign";return}if(Vt.isDigit(He)){Re+=J(),$e="decimalExponentInteger";return}throw yt(J())},decimalExponentSign(){if(Vt.isDigit(He)){Re+=J(),$e="decimalExponentInteger";return}throw yt(J())},decimalExponentInteger(){if(Vt.isDigit(He)){Re+=J();return}return bt("numeric",ns*Number(Re))},hexadecimal(){if(Vt.isHexDigit(He)){Re+=J(),$e="hexadecimalInteger";return}throw yt(J())},hexadecimalInteger(){if(Vt.isHexDigit(He)){Re+=J();return}return bt("numeric",ns*Number(Re))},string(){switch(He){case"\\":J(),Re+=JK();return;case'"':if(Zu)return J(),bt("string",Re);Re+=J();return;case"'":if(!Zu)return J(),bt("string",Re);Re+=J();return;case`
`:case"\r":throw yt(J());case"\u2028":case"\u2029":eX(He);break;case void 0:throw yt(J())}Re+=J()},start(){switch(He){case"{":case"[":return bt("punctuator",J())}$e="value"},beforePropertyName(){switch(He){case"$":case"_":Re=J(),$e="identifierName";return;case"\\":J(),$e="identifierNameStartEscape";return;case"}":return bt("punctuator",J());case'"':case"'":Zu=J()==='"',$e="string";return}if(Vt.isIdStartChar(He)){Re+=J(),$e="identifierName";return}throw yt(J())},afterPropertyName(){if(He===":")return bt("punctuator",J());throw yt(J())},beforePropertyValue(){$e="value"},afterPropertyValue(){switch(He){case",":case"}":return bt("punctuator",J())}throw yt(J())},beforeArrayValue(){if(He==="]")return bt("punctuator",J());$e="value"},afterArrayValue(){switch(He){case",":case"]":return bt("punctuator",J())}throw yt(J())},end(){throw yt(J())}};function bt(t,e){return{type:t,value:e,line:xo,column:li}}function Io(t){for(const e of t){if(bs()!==e)throw yt(J());J()}}function JK(){switch(bs()){case"b":return J(),"\b";case"f":return J(),"\f";case"n":return J(),`
`;case"r":return J(),"\r";case"t":return J()," ";case"v":return J(),"\v";case"0":if(J(),Vt.isDigit(bs()))throw yt(J());return"\0";case"x":return J(),ZK();case"u":return J(),fy();case`
`:case"\u2028":case"\u2029":return J(),"";case"\r":return J(),bs()===`
`&&J(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw yt(J());case void 0:throw yt(J())}return J()}function ZK(){let t="",e=bs();if(!Vt.isHexDigit(e)||(t+=J(),e=bs(),!Vt.isHexDigit(e)))throw yt(J());return t+=J(),String.fromCodePoint(parseInt(t,16))}function fy(){let t="",e=4;for(;e-- >0;){const n=bs();if(!Vt.isHexDigit(n))throw yt(J());t+=J()}return String.fromCodePoint(parseInt(t,16))}const QK={start(){if(fn.type==="eof")throw Po();o1()},beforePropertyName(){switch(fn.type){case"identifier":case"string":p2=fn.value,Hn="afterPropertyName";return;case"punctuator":Zd();return;case"eof":throw Po()}},afterPropertyName(){if(fn.type==="eof")throw Po();Hn="beforePropertyValue"},beforePropertyValue(){if(fn.type==="eof")throw Po();o1()},beforeArrayValue(){if(fn.type==="eof")throw Po();if(fn.type==="punctuator"&&fn.value==="]"){Zd();return}o1()},afterPropertyValue(){if(fn.type==="eof")throw Po();switch(fn.value){case",":Hn="beforePropertyName";return;case"}":Zd()}},afterArrayValue(){if(fn.type==="eof")throw Po();switch(fn.value){case",":Hn="beforeArrayValue";return;case"]":Zd()}},end(){}};function o1(){let t;switch(fn.type){case"punctuator":switch(fn.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=fn.value;break}if(gc===void 0)gc=t;else{const e=fs[fs.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,p2,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")fs.push(t),Array.isArray(t)?Hn="beforeArrayValue":Hn="beforePropertyName";else{const e=fs[fs.length-1];e==null?Hn="end":Array.isArray(e)?Hn="afterArrayValue":Hn="afterPropertyValue"}}function Zd(){fs.pop();const t=fs[fs.length-1];t==null?Hn="end":Array.isArray(t)?Hn="afterArrayValue":Hn="afterPropertyValue"}function yt(t){return i0(t===void 0?`JSON5: invalid end of input at ${xo}:${li}`:`JSON5: invalid character '${g6(t)}' at ${xo}:${li}`)}function Po(){return i0(`JSON5: invalid end of input at ${xo}:${li}`)}function qw(){return li-=5,i0(`JSON5: invalid identifier character at ${xo}:${li}`)}function eX(t){console.warn(`JSON5: '${g6(t)}' in strings is not valid ECMAScript; consider escaping`)}function g6(t){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){const n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function i0(t){const e=new SyntaxError(t);return e.lineNumber=xo,e.columnNumber=li,e}var tX=function(e,n,r){const i=[];let s="",o,a,l="",u;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(r=n.space,u=n.quote,n=n.replacer),typeof n=="function")a=n;else if(Array.isArray(n)){o=[];for(const m of n){let g;typeof m=="string"?g=m:(typeof m=="number"||m instanceof String||m instanceof Number)&&(g=String(m)),g!==void 0&&o.indexOf(g)<0&&o.push(g)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r=="number"?r>0&&(r=Math.min(10,Math.floor(r)),l=" ".substr(0,r)):typeof r=="string"&&(l=r.substr(0,10)),c("",{"":e});function c(m,g){let b=g[m];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(m):typeof b.toJSON=="function"&&(b=b.toJSON(m))),a&&(b=a.call(g,m,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return f(b);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?p(b):d(b)}function f(m){const g={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let y="";for(let S=0;S<m.length;S++){const E=m[S];switch(E){case"'":case'"':g[E]++,y+=E;continue;case"\0":if(Vt.isDigit(m[S+1])){y+="\\x00";continue}}if(b[E]){y+=b[E];continue}if(E<" "){let C=E.charCodeAt(0).toString(16);y+="\\x"+("00"+C).substring(C.length);continue}y+=E}const x=u||Object.keys(g).reduce((S,E)=>g[S]<g[E]?S:E);return y=y.replace(new RegExp(x,"g"),b[x]),x+y+x}function d(m){if(i.indexOf(m)>=0)throw TypeError("Converting circular structure to JSON5");i.push(m);let g=s;s=s+l;let b=o||Object.keys(m),y=[];for(const S of b){const E=c(S,m);if(E!==void 0){let C=h(S)+":";l!==""&&(C+=" "),C+=E,y.push(C)}}let x;if(y.length===0)x="{}";else{let S;if(l==="")S=y.join(","),x="{"+S+"}";else{let E=`,
`+s;S=y.join(E),x=`{
`+s+S+`,
`+g+"}"}}return i.pop(),s=g,x}function h(m){if(m.length===0)return f(m);const g=String.fromCodePoint(m.codePointAt(0));if(!Vt.isIdStartChar(g))return f(m);for(let b=g.length;b<m.length;b++)if(!Vt.isIdContinueChar(String.fromCodePoint(m.codePointAt(b))))return f(m);return m}function p(m){if(i.indexOf(m)>=0)throw TypeError("Converting circular structure to JSON5");i.push(m);let g=s;s=s+l;let b=[];for(let x=0;x<m.length;x++){const S=c(String(x),m);b.push(S!==void 0?S:"null")}let y;if(b.length===0)y="[]";else if(l==="")y="["+b.join(",")+"]";else{let x=`,
`+s,S=b.join(x);y=`[
`+s+S+`,
`+g+"]"}return i.pop(),s=g,y}};const nX={parse:XK,stringify:tX};var rX=nX;function iX(t){const e=t.doc.toString();let n=null;try{n=rX.parse(e)}catch{try{n=p6.parse(e)}catch{}}const r=Uv(t,At.JSON5);return{data:n,pointers:r}}const m2=Symbol.for("yaml.alias"),dy=Symbol.for("yaml.document"),io=Symbol.for("yaml.map"),b6=Symbol.for("yaml.pair"),Hi=Symbol.for("yaml.scalar"),uu=Symbol.for("yaml.seq"),Wr=Symbol.for("yaml.node.type"),Do=t=>!!t&&typeof t=="object"&&t[Wr]===m2,Pa=t=>!!t&&typeof t=="object"&&t[Wr]===dy,cu=t=>!!t&&typeof t=="object"&&t[Wr]===io,Ot=t=>!!t&&typeof t=="object"&&t[Wr]===b6,dt=t=>!!t&&typeof t=="object"&&t[Wr]===Hi,fu=t=>!!t&&typeof t=="object"&&t[Wr]===uu;function Pt(t){if(t&&typeof t=="object")switch(t[Wr]){case io:case uu:return!0}return!1}function Rt(t){if(t&&typeof t=="object")switch(t[Wr]){case m2:case io:case Hi:case uu:return!0}return!1}const y6=t=>(dt(t)||Pt(t))&&!!t.anchor,or=Symbol("break visit"),v6=Symbol("skip children"),Bi=Symbol("remove node");function Ra(t,e){const n=x6(e);Pa(t)?rl(null,t.contents,n,Object.freeze([t]))===Bi&&(t.contents=null):rl(null,t,n,Object.freeze([]))}Ra.BREAK=or;Ra.SKIP=v6;Ra.REMOVE=Bi;function rl(t,e,n,r){const i=S6(t,e,n,r);if(Rt(i)||Ot(i))return E6(t,r,i),rl(t,i,n,r);if(typeof i!="symbol"){if(Pt(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=rl(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===or)return or;o===Bi&&(e.items.splice(s,1),s-=1)}}}else if(Ot(e)){r=Object.freeze(r.concat(e));const s=rl("key",e.key,n,r);if(s===or)return or;s===Bi&&(e.key=null);const o=rl("value",e.value,n,r);if(o===or)return or;o===Bi&&(e.value=null)}}return i}async function pm(t,e){const n=x6(e);Pa(t)?await il(null,t.contents,n,Object.freeze([t]))===Bi&&(t.contents=null):await il(null,t,n,Object.freeze([]))}pm.BREAK=or;pm.SKIP=v6;pm.REMOVE=Bi;async function il(t,e,n,r){const i=await S6(t,e,n,r);if(Rt(i)||Ot(i))return E6(t,r,i),il(t,i,n,r);if(typeof i!="symbol"){if(Pt(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=await il(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===or)return or;o===Bi&&(e.items.splice(s,1),s-=1)}}}else if(Ot(e)){r=Object.freeze(r.concat(e));const s=await il("key",e.key,n,r);if(s===or)return or;s===Bi&&(e.key=null);const o=await il("value",e.value,n,r);if(o===or)return or;o===Bi&&(e.value=null)}}return i}function x6(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function S6(t,e,n,r){var i,s,o,a,l;if(typeof n=="function")return n(t,e,r);if(cu(e))return(i=n.Map)==null?void 0:i.call(n,t,e,r);if(fu(e))return(s=n.Seq)==null?void 0:s.call(n,t,e,r);if(Ot(e))return(o=n.Pair)==null?void 0:o.call(n,t,e,r);if(dt(e))return(a=n.Scalar)==null?void 0:a.call(n,t,e,r);if(Do(e))return(l=n.Alias)==null?void 0:l.call(n,t,e,r)}function E6(t,e,n){const r=e[e.length-1];if(Pt(r))r.items[t]=n;else if(Ot(r))t==="key"?r.key=n:r.value=n;else if(Pa(r))r.contents=n;else{const i=Do(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const sX={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},oX=t=>t.replace(/[!,[\]{}]/g,e=>sX[e]);class Bn{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Bn.defaultYaml,e),this.tags=Object.assign({},Bn.defaultTags,n)}clone(){const e=new Bn(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Bn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Bn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Bn.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:Bn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Bn.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const o=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,o),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}const[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||n(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return n(String(o)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+oX(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(e&&r.length>0&&Rt(e.contents)){const s={};Ra(e.contents,(o,a)=>{Rt(a)&&a.tag&&(s[a.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&n.push(`%TAG ${s} ${o}`);return n.join(`
`)}}Bn.defaultYaml={explicit:!1,version:"1.2"};Bn.defaultTags={"!!":"tag:yaml.org,2002:"};function w6(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function _6(t){const e=new Set;return Ra(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function C6(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function aX(t,e){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i??(i=_6(t));const o=C6(e,i);return i.add(o),o},setAnchors:()=>{for(const s of n){const o=r.get(s);if(typeof o=="object"&&o.anchor&&(dt(o.node)||Pt(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}function sl(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const o=r[i],a=sl(t,r,String(i),o);a===void 0?delete r[i]:a!==o&&(r[i]=a)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),o=sl(t,r,i,s);o===void 0?r.delete(i):o!==s&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const s=sl(t,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const o=sl(t,r,i,s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}return t.call(e,n,r)}function Ur(t,e,n){if(Array.isArray(t))return t.map((r,i)=>Ur(r,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!y6(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!(n!=null&&n.keep)?Number(t):t}class g2{constructor(e){Object.defineProperty(this,Wr,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!Pa(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=Ur(this,"",o);if(typeof i=="function")for(const{count:l,res:u}of o.anchors.values())i(u,l);return typeof s=="function"?sl(s,{"":a},"",a):a}}class mm extends g2{constructor(e){super(m2),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){let r;n!=null&&n.aliasResolveCache?r=n.aliasResolveCache:(r=[],Ra(e,{Node:(s,o)=>{(Do(o)||y6(o))&&r.push(o)}}),n&&(n.aliasResolveCache=r));let i;for(const s of r){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,o=this.resolve(i,n);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(Ur(o,null,n),a=r.get(o)),!a||a.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Uh(i,o,r)),a.count*a.aliasCount>s)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,n,r){const i=`*${this.source}`;if(e){if(w6(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}}function Uh(t,e,n){if(Do(e)){const r=e.resolve(t),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Pt(e)){let r=0;for(const i of e.items){const s=Uh(t,i,n);s>r&&(r=s)}return r}else if(Ot(e)){const r=Uh(t,e.key,n),i=Uh(t,e.value,n);return Math.max(r,i)}return 1}const A6=t=>!t||typeof t!="function"&&typeof t!="object";class Ie extends g2{constructor(e){super(Hi),this.value=e}toJSON(e,n){return n!=null&&n.keep?this.value:Ur(this.value,e,n)}toString(){return String(this.value)}}Ie.BLOCK_FOLDED="BLOCK_FOLDED";Ie.BLOCK_LITERAL="BLOCK_LITERAL";Ie.PLAIN="PLAIN";Ie.QUOTE_DOUBLE="QUOTE_DOUBLE";Ie.QUOTE_SINGLE="QUOTE_SINGLE";const lX="tag:yaml.org,2002:";function uX(t,e,n){if(e){const r=n.filter(s=>s.tag===e),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return n.find(r=>{var i;return((i=r.identify)==null?void 0:i.call(r,t))&&!r.format})}function of(t,e,n){var f,d,h;if(Pa(t)&&(t=t.contents),Rt(t))return t;if(Ot(t)){const p=(d=(f=n.schema[io]).createNode)==null?void 0:d.call(f,n.schema,null,n);return p.items.push(t),p}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:o,sourceObjects:a}=n;let l;if(r&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor??(l.anchor=i(t)),new mm(l.anchor);l={anchor:null,node:null},a.set(t,l)}e!=null&&e.startsWith("!!")&&(e=lX+e.slice(2));let u=uX(t,e,o.tags);if(!u){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const p=new Ie(t);return l&&(l.node=p),p}u=t instanceof Map?o[io]:Symbol.iterator in Object(t)?o[uu]:o[io]}s&&(s(u),delete n.onTagObj);const c=u!=null&&u.createNode?u.createNode(n.schema,t,n):typeof((h=u==null?void 0:u.nodeClass)==null?void 0:h.from)=="function"?u.nodeClass.from(n.schema,t,n):new Ie(t);return e?c.tag=e:u.default||(c.tag=u.tag),l&&(l.node=c),c}function s0(t,e,n){let r=n;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return of(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const Qu=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class D6 extends g2{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>Rt(r)||Ot(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Qu(e))this.add(n);else{const[r,...i]=e,s=this.get(r,!0);if(Pt(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,s0(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(Pt(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...i]=e,s=this.get(r,!0);return i.length===0?!n&&dt(s)?s.value:s:Pt(s)?s.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!Ot(n))return!1;const r=n.value;return r==null||e&&dt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const i=this.get(n,!0);return Pt(i)?i.hasIn(r):!1}setIn(e,n){const[r,...i]=e;if(i.length===0)this.set(r,n);else{const s=this.get(r,!0);if(Pt(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,s0(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}const cX=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function ps(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const Yo=(t,e,n)=>t.endsWith(`
`)?ps(n,e):n.includes(`
`)?`
`+ps(n,e):(t.endsWith(" ")?"":" ")+n,k6="flow",hy="block",Hh="quoted";function gm(t,e,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return t;i<s&&(s=0);const l=Math.max(1+s,1+i-e.length);if(t.length<=l)return t;const u=[],c={};let f=i-e.length;typeof r=="number"&&(r>i-Math.max(2,s)?u.push(0):f=i-r);let d,h,p=!1,m=-1,g=-1,b=-1;n===hy&&(m=Gw(t,m,e.length),m!==-1&&(f=m+l));for(let x;x=t[m+=1];){if(n===Hh&&x==="\\"){switch(g=m,t[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}b=m}if(x===`
`)n===hy&&(m=Gw(t,m,e.length)),f=m+e.length+l,d=void 0;else{if(x===" "&&h&&h!==" "&&h!==`
`&&h!==" "){const S=t[m+1];S&&S!==" "&&S!==`
`&&S!==" "&&(d=m)}if(m>=f)if(d)u.push(d),f=d+l,d=void 0;else if(n===Hh){for(;h===" "||h===" ";)h=x,x=t[m+=1],p=!0;const S=m>b+1?m-2:g-1;if(c[S])return t;u.push(S),c[S]=!0,f=S+l,d=void 0}else p=!0}h=x}if(p&&a&&a(),u.length===0)return t;o&&o();let y=t.slice(0,u[0]);for(let x=0;x<u.length;++x){const S=u[x],E=u[x+1]||t.length;S===0?y=`
${e}${t.slice(0,E)}`:(n===Hh&&c[S]&&(y+=`${t[S]}\\`),y+=`
${e}${t.slice(S+1,E)}`)}return y}function Gw(t,e,n){let r=e,i=e+1,s=t[i];for(;s===" "||s===" ";)if(e<i+n)s=t[++e];else{do s=t[++e];while(s&&s!==`
`);r=e,i=e+1,s=t[i]}return r}const bm=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),ym=t=>/^(%|---|\.\.\.)/m.test(t);function fX(t,e,n){if(!e||e<0)return!1;const r=e-n,i=t.length;if(i<=r)return!1;for(let s=0,o=0;s<i;++s)if(t[s]===`
`){if(s-o>r)return!0;if(o=s+1,i-o<=r)return!1}return!0}function bc(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(ym(t)?" ":"");let o="",a=0;for(let l=0,u=n[l];u;u=n[++l])if(u===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(o+=n.slice(a,l)+"\\ ",l+=1,a=l,u="\\"),u==="\\")switch(n[l+1]){case"u":{o+=n.slice(a,l);const c=n.substr(l+2,4);switch(c){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:c.substr(0,2)==="00"?o+="\\x"+c.substr(2):o+=n.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||n[l+2]==='"'||n.length<i)l+=1;else{for(o+=n.slice(a,l)+`
`;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)o+=`
`,l+=2;o+=s,n[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+n.slice(a):n,r?o:gm(o,s,Hh,bm(e,!1))}function py(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
`)||/[ \t]\n|\n[ \t]/.test(t))return bc(t,e);const n=e.indent||(ym(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
${n}`)+"'";return e.implicitKey?r:gm(r,n,k6,bm(e,!1))}function ol(t,e){const{singleQuote:n}=e.options;let r;if(n===!1)r=bc;else{const i=t.includes('"'),s=t.includes("'");i&&!s?r=py:s&&!i?r=bc:r=n?py:bc}return r(t,e)}let my;try{my=new RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{my=/\n+(?!\n|$)/g}function qh({comment:t,type:e,value:n},r,i,s){const{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(n))return ol(n,r);const u=r.indent||(r.forceBlockIndent||ym(n)?" ":""),c=o==="literal"?!0:o==="folded"||e===Ie.BLOCK_FOLDED?!1:e===Ie.BLOCK_LITERAL?!0:!fX(n,l,u.length);if(!n)return c?`|
`:`>
`;let f,d;for(d=n.length;d>0;--d){const E=n[d-1];if(E!==`
`&&E!==" "&&E!==" ")break}let h=n.substring(d);const p=h.indexOf(`
`);p===-1?f="-":n===h||p!==h.length-1?(f="+",s&&s()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
`&&(h=h.slice(0,-1)),h=h.replace(my,`$&${u}`));let m=!1,g,b=-1;for(g=0;g<n.length;++g){const E=n[g];if(E===" ")m=!0;else if(E===`
`)b=g;else break}let y=n.substring(0,b<g?b+1:g);y&&(n=n.substring(y.length),y=y.replace(/\n+/g,`$&${u}`));let S=(m?u?"2":"1":"")+f;if(t&&(S+=" "+a(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!c){const E=n.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);let C=!1;const w=bm(r,!0);o!=="folded"&&e!==Ie.BLOCK_FOLDED&&(w.onOverflow=()=>{C=!0});const A=gm(`${y}${E}${h}`,u,hy,w);if(!C)return`>${S}
${u}${A}`}return n=n.replace(/\n+/g,`$&${u}`),`|${S}
${u}${y}${n}${h}`}function dX(t,e,n,r){const{type:i,value:s}=t,{actualString:o,implicitKey:a,indent:l,indentStep:u,inFlow:c}=e;if(a&&s.includes(`
`)||c&&/[[\]{},]/.test(s))return ol(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||c||!s.includes(`
`)?ol(s,e):qh(t,e,n,r);if(!a&&!c&&i!==Ie.PLAIN&&s.includes(`
`))return qh(t,e,n,r);if(ym(s)){if(l==="")return e.forceBlockIndent=!0,qh(t,e,n,r);if(a&&l===u)return ol(s,e)}const f=s.replace(/\n+/g,`$&
${l}`);if(o){const d=m=>{var g;return m.default&&m.tag!=="tag:yaml.org,2002:str"&&((g=m.test)==null?void 0:g.test(f))},{compat:h,tags:p}=e.doc.schema;if(p.some(d)||h!=null&&h.some(d))return ol(s,e)}return a?f:gm(f,l,k6,bm(e,!1))}function Yf(t,e,n,r){const{implicitKey:i,inFlow:s}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==Ie.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=Ie.QUOTE_DOUBLE);const l=c=>{switch(c){case Ie.BLOCK_FOLDED:case Ie.BLOCK_LITERAL:return i||s?ol(o.value,e):qh(o,e,n,r);case Ie.QUOTE_DOUBLE:return bc(o.value,e);case Ie.QUOTE_SINGLE:return py(o.value,e);case Ie.PLAIN:return dX(o,e,n,r);default:return null}};let u=l(a);if(u===null){const{defaultKeyType:c,defaultStringType:f}=e.options,d=i&&c||f;if(u=l(d),u===null)throw new Error(`Unsupported default string type ${d}`)}return u}function O6(t,e){const n=Object.assign({blockQuote:!0,commentString:cX,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function hX(t,e){var i;if(e.tag){const s=t.filter(o=>o.tag===e.tag);if(s.length>0)return s.find(o=>o.format===e.format)??s[0]}let n,r;if(dt(e)){r=e.value;let s=t.filter(o=>{var a;return(a=o.identify)==null?void 0:a.call(o,r)});if(s.length>1){const o=s.filter(a=>a.test);o.length>0&&(s=o)}n=s.find(o=>o.format===e.format)??s.find(o=>!o.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){const s=((i=r==null?void 0:r.constructor)==null?void 0:i.name)??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${s} value`)}return n}function pX(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],s=(dt(t)||Pt(t))&&t.anchor;s&&w6(s)&&(n.add(s),i.push(`&${s}`));const o=t.tag??(e.default?null:e.tag);return o&&i.push(r.directives.tagString(o)),i.join(" ")}function Bl(t,e,n,r){var l;if(Ot(t))return t.toString(e,n,r);if(Do(t)){if(e.doc.directives)return t.toString(e);if((l=e.resolvedAliases)!=null&&l.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i;const s=Rt(t)?t:e.doc.createNode(t,{onTagObj:u=>i=u});i??(i=hX(e.doc.schema.tags,s));const o=pX(s,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof i.stringify=="function"?i.stringify(s,e,n,r):dt(s)?Yf(s,e,n,r):s.toString(e,n,r);return o?dt(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
${e.indent}${a}`:a}function mX({key:t,value:e},n,r,i){const{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:u,indentSeq:c,simpleKeys:f}}=n;let d=Rt(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(Pt(t)||!Rt(t)&&typeof t=="object"){const w="With simple keys, collection cannot be used as a key value";throw new Error(w)}}let h=!f&&(!t||d&&e==null&&!n.inFlow||Pt(t)||(dt(t)?t.type===Ie.BLOCK_FOLDED||t.type===Ie.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(f||!s),indent:a+l});let p=!1,m=!1,g=Bl(t,n,()=>p=!0,()=>m=!0);if(!h&&!n.inFlow&&g.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(s||e==null)return p&&r&&r(),g===""?"?":h?`? ${g}`:g}else if(s&&!f||e==null&&h)return g=`? ${g}`,d&&!p?g+=Yo(g,n.indent,u(d)):m&&i&&i(),g;p&&(d=null),h?(d&&(g+=Yo(g,n.indent,u(d))),g=`? ${g}
${a}:`):(g=`${g}:`,d&&(g+=Yo(g,n.indent,u(d))));let b,y,x;Rt(e)?(b=!!e.spaceBefore,y=e.commentBefore,x=e.comment):(b=!1,y=null,x=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!h&&!d&&dt(e)&&(n.indentAtStart=g.length+1),m=!1,!c&&l.length>=2&&!n.inFlow&&!h&&fu(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let S=!1;const E=Bl(e,n,()=>S=!0,()=>m=!0);let C=" ";if(d||b||y){if(C=b?`
`:"",y){const w=u(y);C+=`
${ps(w,n.indent)}`}E===""&&!n.inFlow?C===`
`&&(C=`
`):C+=`
${n.indent}`}else if(!h&&Pt(e)){const w=E[0],A=E.indexOf(`
`),_=A!==-1,O=n.inFlow??e.flow??e.items.length===0;if(_||!O){let I=!1;if(_&&(w==="&"||w==="!")){let N=E.indexOf(" ");w==="&"&&N!==-1&&N<A&&E[N+1]==="!"&&(N=E.indexOf(" ",N+1)),(N===-1||A<N)&&(I=!0)}I||(C=`
${n.indent}`)}}else(E===""||E[0]===`
`)&&(C="");return g+=C+E,n.inFlow?S&&r&&r():x&&!S?g+=Yo(g,n.indent,u(x)):m&&i&&i(),g}function T6(t,e){(t==="debug"||t==="warn")&&console.warn(e)}const Qd="<<",ys={identify:t=>t===Qd||typeof t=="symbol"&&t.description===Qd,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ie(Symbol(Qd)),{addToJSMap:I6}),stringify:()=>Qd},gX=(t,e)=>(ys.identify(e)||dt(e)&&(!e.type||e.type===Ie.PLAIN)&&ys.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(n=>n.tag===ys.tag&&n.default));function I6(t,e,n){if(n=t&&Do(n)?n.resolve(t.doc):n,fu(n))for(const r of n.items)a1(t,e,r);else if(Array.isArray(n))for(const r of n)a1(t,e,r);else a1(t,e,n)}function a1(t,e,n){const r=t&&Do(n)?n.resolve(t.doc):n;if(!cu(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,t,Map);for(const[s,o]of i)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function P6(t,e,{key:n,value:r}){if(Rt(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(gX(t,n))I6(t,e,r);else{const i=Ur(n,"",t);if(e instanceof Map)e.set(i,Ur(r,i,t));else if(e instanceof Set)e.add(i);else{const s=bX(n,i,t),o=Ur(r,s,t);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function bX(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(Rt(t)&&(n!=null&&n.doc)){const r=O6(n.doc,{});r.anchors=new Set;for(const s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=t.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),T6(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(e)}function b2(t,e,n){const r=of(t,void 0,n),i=of(e,void 0,n);return new Pn(r,i)}class Pn{constructor(e,n=null){Object.defineProperty(this,Wr,{value:b6}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return Rt(n)&&(n=n.clone(e)),Rt(r)&&(r=r.clone(e)),new Pn(n,r)}toJSON(e,n){const r=n!=null&&n.mapAsMap?new Map:{};return P6(n,r,this)}toString(e,n,r){return e!=null&&e.doc?mX(this,e,n,r):JSON.stringify(this)}}function R6(t,e,n){return(e.inFlow??t.flow?vX:yX)(t,e,n)}function yX({comment:t,items:e},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){const{indent:l,options:{commentString:u}}=n,c=Object.assign({},n,{indent:s,type:null});let f=!1;const d=[];for(let p=0;p<e.length;++p){const m=e[p];let g=null;if(Rt(m))!f&&m.spaceBefore&&d.push(""),o0(n,d,m.commentBefore,f),m.comment&&(g=m.comment);else if(Ot(m)){const y=Rt(m.key)?m.key:null;y&&(!f&&y.spaceBefore&&d.push(""),o0(n,d,y.commentBefore,f))}f=!1;let b=Bl(m,c,()=>g=null,()=>f=!0);g&&(b+=Yo(b,s,u(g))),f&&g&&(f=!1),d.push(r+b)}let h;if(d.length===0)h=i.start+i.end;else{h=d[0];for(let p=1;p<d.length;++p){const m=d[p];h+=m?`
${l}${m}`:`
`}}return t?(h+=`
`+ps(u(t),l),a&&a()):f&&o&&o(),h}function vX({items:t},e,{flowChars:n,itemIndent:r}){const{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;const l=Object.assign({},e,{indent:r,inFlow:!0,type:null});let u=!1,c=0;const f=[];for(let p=0;p<t.length;++p){const m=t[p];let g=null;if(Rt(m))m.spaceBefore&&f.push(""),o0(e,f,m.commentBefore,!1),m.comment&&(g=m.comment);else if(Ot(m)){const y=Rt(m.key)?m.key:null;y&&(y.spaceBefore&&f.push(""),o0(e,f,y.commentBefore,!1),y.comment&&(u=!0));const x=Rt(m.value)?m.value:null;x?(x.comment&&(g=x.comment),x.commentBefore&&(u=!0)):m.value==null&&(y!=null&&y.comment)&&(g=y.comment)}g&&(u=!0);let b=Bl(m,l,()=>g=null);p<t.length-1&&(b+=","),g&&(b+=Yo(b,r,a(g))),!u&&(f.length>c||b.includes(`
`))&&(u=!0),f.push(b),c=f.length}const{start:d,end:h}=n;if(f.length===0)return d+h;if(!u){const p=f.reduce((m,g)=>m+g.length+2,2);u=e.options.lineWidth>0&&p>e.options.lineWidth}if(u){let p=d;for(const m of f)p+=m?`
${s}${i}${m}`:`
`;return`${p}
${i}${h}`}else return`${d}${o}${f.join(" ")}${o}${h}`}function o0({indent:t,options:{commentString:e}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=ps(e(r),t);n.push(s.trimStart())}}function Jo(t,e){const n=dt(e)?e.value:e;for(const r of t)if(Ot(r)&&(r.key===e||r.key===n||dt(r.key)&&r.key.value===n))return r}class wr extends D6{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(io,e),this.items=[]}static from(e,n,r){const{keepUndefined:i,replacer:s}=r,o=new this(e),a=(l,u)=>{if(typeof s=="function")u=s.call(n,l,u);else if(Array.isArray(s)&&!s.includes(l))return;(u!==void 0||i)&&o.items.push(b2(l,u,r))};if(n instanceof Map)for(const[l,u]of n)a(l,u);else if(n&&typeof n=="object")for(const l of Object.keys(n))a(l,n[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){var o;let r;Ot(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Pn(e,e==null?void 0:e.value):r=new Pn(e.key,e.value);const i=Jo(this.items,r.key),s=(o=this.schema)==null?void 0:o.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);dt(i.value)&&A6(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const a=this.items.findIndex(l=>s(r,l)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(e){const n=Jo(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const r=Jo(this.items,e),i=r==null?void 0:r.value;return(!n&&dt(i)?i.value:i)??void 0}has(e){return!!Jo(this.items,e)}set(e,n){this.add(new Pn(e,n),!0)}toJSON(e,n,r){const i=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(i);for(const s of this.items)P6(n,i,s);return i}toString(e,n,r){if(!e)return JSON.stringify(this);for(const i of this.items)if(!Ot(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),R6(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const du={collection:"map",default:!0,nodeClass:wr,tag:"tag:yaml.org,2002:map",resolve(t,e){return cu(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>wr.from(t,e,n)};class So extends D6{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(uu,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=eh(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=eh(e);if(typeof r!="number")return;const i=this.items[r];return!n&&dt(i)?i.value:i}has(e){const n=eh(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=eh(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[r];dt(i)&&A6(n)?i.value=n:this.items[r]=n}toJSON(e,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let i=0;for(const s of this.items)r.push(Ur(s,String(i++),n));return r}toString(e,n,r){return e?R6(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof i=="function"){const l=n instanceof Set?a:String(o++);a=i.call(n,l,a)}s.items.push(of(a,void 0,r))}}return s}}function eh(t){let e=dt(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const hu={collection:"seq",default:!0,nodeClass:So,tag:"tag:yaml.org,2002:seq",resolve(t,e){return fu(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>So.from(t,e,n)},vm={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Yf(t,e,n,r)}},xm={identify:t=>t==null,createNode:()=>new Ie(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ie(null),stringify:({source:t},e)=>typeof t=="string"&&xm.test.test(t)?t:e.options.nullStr},y2={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new Ie(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&y2.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function hi({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}const N6={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:hi},M6={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():hi(t)}},F6={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new Ie(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:hi},Sm=t=>typeof t=="bigint"||Number.isInteger(t),v2=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function L6(t,e,n){const{value:r}=t;return Sm(r)&&r>=0?n+r.toString(e):hi(t)}const B6={identify:t=>Sm(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>v2(t,2,8,n),stringify:t=>L6(t,8,"0o")},$6={identify:Sm,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>v2(t,0,10,n),stringify:hi},z6={identify:t=>Sm(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>v2(t,2,16,n),stringify:t=>L6(t,16,"0x")},xX=[du,hu,vm,xm,y2,B6,$6,z6,N6,M6,F6];function Ww(t){return typeof t=="bigint"||Number.isInteger(t)}const th=({value:t})=>JSON.stringify(t),SX=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:th},{identify:t=>t==null,createNode:()=>new Ie(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:th},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:th},{identify:Ww,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>Ww(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:th}],EX={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},wX=[du,hu].concat(SX,EX),x2={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,i,s){if(!n)return"";const o=n;let a;if(typeof btoa=="function"){let l="";for(let u=0;u<o.length;++u)l+=String.fromCharCode(o[u]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=Ie.BLOCK_LITERAL),e!==Ie.QUOTE_DOUBLE){const l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),u=Math.ceil(a.length/l),c=new Array(u);for(let f=0,d=0;f<u;++f,d+=l)c[f]=a.substr(d,l);a=c.join(e===Ie.BLOCK_LITERAL?`
`:" ")}return Yf({comment:t,type:e,value:a},r,i,s)}};function j6(t,e){if(fu(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!Ot(r)){if(cu(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const i=r.items[0]||new Pn(new Ie(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}
${i.key.commentBefore}`:r.commentBefore),r.comment){const s=i.value??i.key;s.comment=s.comment?`${r.comment}
${s.comment}`:r.comment}r=i}t.items[n]=Ot(r)?r:new Pn(r)}}else e("Expected a sequence for this tag");return t}function V6(t,e,n){const{replacer:r}=n,i=new So(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const u=Object.keys(o);if(u.length===1)a=u[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else a=o;i.items.push(b2(a,l,n))}return i}const S2={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:j6,createNode:V6};class vl extends So{constructor(){super(),this.add=wr.prototype.add.bind(this),this.delete=wr.prototype.delete.bind(this),this.get=wr.prototype.get.bind(this),this.has=wr.prototype.has.bind(this),this.set=wr.prototype.set.bind(this),this.tag=vl.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const i of this.items){let s,o;if(Ot(i)?(s=Ur(i.key,"",n),o=Ur(i.value,s,n)):s=Ur(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,n,r){const i=V6(e,n,r),s=new this;return s.items=i.items,s}}vl.tag="tag:yaml.org,2002:omap";const E2={collection:"seq",identify:t=>t instanceof Map,nodeClass:vl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=j6(t,e),r=[];for(const{key:i}of n.items)dt(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new vl,n)},createNode:(t,e,n)=>vl.from(t,e,n)};function U6({value:t,source:e},n){return e&&(t?H6:q6).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const H6={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Ie(!0),stringify:U6},q6={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Ie(!1),stringify:U6},_X={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:hi},CX={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():hi(t)}},AX={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new Ie(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:hi},Jf=t=>typeof t=="bigint"||Number.isInteger(t);function Em(t,e,n,{intAsBigInt:r}){const i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return i==="-"?BigInt(-1)*o:o}const s=parseInt(t,n);return i==="-"?-1*s:s}function w2(t,e,n){const{value:r}=t;if(Jf(r)){const i=r.toString(e);return r<0?"-"+n+i.substr(1):n+i}return hi(t)}const DX={identify:Jf,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Em(t,2,2,n),stringify:t=>w2(t,2,"0b")},kX={identify:Jf,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Em(t,1,8,n),stringify:t=>w2(t,8,"0")},OX={identify:Jf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Em(t,0,10,n),stringify:hi},TX={identify:Jf,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Em(t,2,16,n),stringify:t=>w2(t,16,"0x")};class xl extends wr{constructor(e){super(e),this.tag=xl.tag}add(e){let n;Ot(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new Pn(e.key,null):n=new Pn(e,null),Jo(this.items,n.key)||this.items.push(n)}get(e,n){const r=Jo(this.items,e);return!n&&Ot(r)?dt(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Jo(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new Pn(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof i=="function"&&(o=i.call(n,o,o)),s.items.push(b2(o,null,r));return s}}xl.tag="tag:yaml.org,2002:set";const _2={collection:"map",identify:t=>t instanceof Set,nodeClass:xl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>xl.from(t,e,n),resolve(t,e){if(cu(t)){if(t.hasAllNullValues(!0))return Object.assign(new xl,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function C2(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,i=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return n==="-"?i(-1)*s:s}function G6(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return hi(t);let r="";e<0&&(r="-",e*=n(-1));const i=n(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const W6={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>C2(t,n),stringify:G6},K6={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>C2(t,!1),stringify:G6},wm={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(wm.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,s,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0;let u=Date.UTC(n,r-1,i,s||0,o||0,a||0,l);const c=e[8];if(c&&c!=="Z"){let f=C2(c,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:t})=>(t==null?void 0:t.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Kw=[du,hu,vm,xm,H6,q6,DX,kX,OX,TX,_X,CX,AX,x2,ys,E2,S2,_2,W6,K6,wm],Xw=new Map([["core",xX],["failsafe",[du,hu,vm]],["json",wX],["yaml11",Kw],["yaml-1.1",Kw]]),Yw={binary:x2,bool:y2,float:F6,floatExp:M6,floatNaN:N6,floatTime:K6,int:$6,intHex:z6,intOct:B6,intTime:W6,map:du,merge:ys,null:xm,omap:E2,pairs:S2,seq:hu,set:_2,timestamp:wm},IX={"tag:yaml.org,2002:binary":x2,"tag:yaml.org,2002:merge":ys,"tag:yaml.org,2002:omap":E2,"tag:yaml.org,2002:pairs":S2,"tag:yaml.org,2002:set":_2,"tag:yaml.org,2002:timestamp":wm};function l1(t,e,n){const r=Xw.get(e);if(r&&!t)return n&&!r.includes(ys)?r.concat(ys):r.slice();let i=r;if(!i)if(Array.isArray(t))i=[];else{const s=Array.from(Xw.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(const s of t)i=i.concat(s);else typeof t=="function"&&(i=t(i.slice()));return n&&(i=i.concat(ys)),i.reduce((s,o)=>{const a=typeof o=="string"?Yw[o]:o;if(!a){const l=JSON.stringify(o),u=Object.keys(Yw).map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${u}`)}return s.includes(a)||s.push(a),s},[])}const PX=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class _m{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?l1(e,"compat"):e?l1(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?IX:{},this.tags=l1(n,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,io,{value:du}),Object.defineProperty(this,Hi,{value:vm}),Object.defineProperty(this,uu,{value:hu}),this.sortMapEntries=typeof o=="function"?o:o===!0?PX:null}clone(){const e=Object.create(_m.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function RX(t,e){var l;const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const u=t.directives.toString(t);u?(n.push(u),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const i=O6(t,e),{commentString:s}=i.options;if(t.commentBefore){n.length!==1&&n.unshift("");const u=s(t.commentBefore);n.unshift(ps(u,""))}let o=!1,a=null;if(t.contents){if(Rt(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const f=s(t.contents.commentBefore);n.push(ps(f,""))}i.forceBlockIndent=!!t.comment,a=t.contents.comment}const u=a?void 0:()=>o=!0;let c=Bl(t.contents,i,()=>a=null,u);a&&(c+=Yo(c,"",s(a))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Bl(t.contents,i));if((l=t.directives)!=null&&l.docEnd)if(t.comment){const u=s(t.comment);u.includes(`
`)?(n.push("..."),n.push(ps(u,""))):n.push(`... ${u}`)}else n.push("...");else{let u=t.comment;u&&o&&(u=u.replace(/^\n+/,"")),u&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(ps(s(u),"")))}return n.join(`
`)+`
`}class pu{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Wr,{value:dy});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Bn({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,i,r)}clone(){const e=Object.create(pu.prototype,{[Wr]:{value:dy}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Rt(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){$a(this.contents)&&this.contents.add(e)}addIn(e,n){$a(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=_6(this);e.anchor=!n||r.has(n)?C6(n||"a",r):n}return new mm(e.anchor)}createNode(e,n,r){let i;if(typeof n=="function")e=n.call({"":e},"",e),i=n;else if(Array.isArray(n)){const g=y=>typeof y=="number"||y instanceof String||y instanceof Number,b=n.filter(g).map(String);b.length>0&&(n=n.concat(b)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:u,tag:c}=r??{},{onAnchor:f,setAnchors:d,sourceObjects:h}=aX(this,o||"a"),p={aliasDuplicateObjects:s??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:h},m=of(e,c,p);return a&&Pt(m)&&(m.flow=!0),d(),m}createPair(e,n,r={}){const i=this.createNode(e,null,r),s=this.createNode(n,null,r);return new Pn(i,s)}delete(e){return $a(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Qu(e)?this.contents==null?!1:(this.contents=null,!0):$a(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return Pt(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Qu(e)?!n&&dt(this.contents)?this.contents.value:this.contents:Pt(this.contents)?this.contents.getIn(e,n):void 0}has(e){return Pt(this.contents)?this.contents.has(e):!1}hasIn(e){return Qu(e)?this.contents!==void 0:Pt(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=s0(this.schema,[e],n):$a(this.contents)&&this.contents.set(e,n)}setIn(e,n){Qu(e)?this.contents=n:this.contents==null?this.contents=s0(this.schema,Array.from(e),n):$a(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Bn({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Bn({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new _m(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},l=Ur(this.contents,n??"",a);if(typeof s=="function")for(const{count:u,res:c}of a.anchors.values())s(c,u);return typeof o=="function"?sl(o,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return RX(this,e)}}function $a(t){if(Pt(t))return!0;throw new Error("Expected a YAML collection as document contents")}class A2 extends Error{constructor(e,n,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=n}}class Zo extends A2{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class X6 extends A2{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const a0=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,o=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){const a=Math.min(s-39,o.length-79);o="…"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,s))){let a=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`…
`),o=a+o}if(/[^ ]/.test(o)){let a=1;const l=n.linePos[1];l&&l.line===r&&l.col>i&&(a=Math.max(1,Math.min(l.col-i,80-s)));const u=" ".repeat(s)+"^".repeat(a);n.message+=`:
${o}
${u}
`}};function $l(t,{flow:e,indicator:n,next:r,offset:i,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,u=a,c=a,f="",d="",h=!1,p=!1,m=null,g=null,b=null,y=null,x=null,S=null,E=null;for(const A of t)switch(p&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&s(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),m&&(u&&A.type!=="comment"&&A.type!=="newline"&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),A.type){case"space":!e&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&A.source.includes(" ")&&(m=A),c=!0;break;case"comment":{c||s(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const _=A.source.substring(1)||" ";f?f+=d+_:f=_,d="",u=!1;break}case"newline":u?f?f+=A.source:(!S||n!=="seq-item-ind")&&(l=!0):d+=A.source,u=!0,h=!0,(g||b)&&(y=A),c=!0;break;case"anchor":g&&s(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&s(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=A,E??(E=A.offset),u=!1,c=!1,p=!0;break;case"tag":{b&&s(A,"MULTIPLE_TAGS","A node can have at most one tag"),b=A,E??(E=A.offset),u=!1,c=!1,p=!0;break}case n:(g||b)&&s(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),S&&s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e??"collection"}`),S=A,u=n==="seq-item-ind"||n==="explicit-key-ind",c=!1;break;case"comma":if(e){x&&s(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),x=A,u=!1,c=!1;break}default:s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),u=!1,c=!1}const C=t[t.length-1],w=C?C.offset+C.source.length:i;return p&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=o||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:x,found:S,spaceBefore:l,comment:f,hasNewline:h,anchor:g,tag:b,newlineAfterProp:y,end:w,start:E??w}}function af(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
`))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(af(e.key)||af(e.value))return!0}return!1;default:return!0}}function gy(t,e,n){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&af(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Y6(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const i=typeof r=="function"?r:(s,o)=>s===o||dt(s)&&dt(o)&&s.value===o.value;return e.some(s=>i(s.key,n))}const Jw="All mapping items must start at the same column";function NX({composeNode:t,composeEmptyNode:e},n,r,i,s){var c;const o=(s==null?void 0:s.nodeClass)??wr,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let l=r.offset,u=null;for(const f of r.items){const{start:d,key:h,sep:p,value:m}=f,g=$l(d,{indicator:"explicit-key-ind",next:h??(p==null?void 0:p[0]),offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0}),b=!g.found;if(b){if(h&&(h.type==="block-seq"?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==r.indent&&i(l,"BAD_INDENT",Jw)),!g.anchor&&!g.tag&&!p){u=g.end,g.comment&&(a.comment?a.comment+=`
`+g.comment:a.comment=g.comment);continue}(g.newlineAfterProp||af(h))&&i(h??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((c=g.found)==null?void 0:c.indent)!==r.indent&&i(l,"BAD_INDENT",Jw);n.atKey=!0;const y=g.end,x=h?t(n,h,g,i):e(n,y,d,null,g,i);n.schema.compat&&gy(r.indent,h,i),n.atKey=!1,Y6(n,a.items,x)&&i(y,"DUPLICATE_KEY","Map keys must be unique");const S=$l(p??[],{indicator:"map-value-ind",next:m,offset:x.range[2],onError:i,parentIndent:r.indent,startOnNewline:!h||h.type==="block-scalar"});if(l=S.end,S.found){b&&((m==null?void 0:m.type)==="block-map"&&!S.hasNewline&&i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&g.start<S.found.offset-1024&&i(x.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const E=m?t(n,m,S,i):e(n,l,p,null,S,i);n.schema.compat&&gy(r.indent,m,i),l=E.range[2];const C=new Pn(x,E);n.options.keepSourceTokens&&(C.srcToken=f),a.items.push(C)}else{b&&i(x.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(x.comment?x.comment+=`
`+S.comment:x.comment=S.comment);const E=new Pn(x);n.options.keepSourceTokens&&(E.srcToken=f),a.items.push(E)}}return u&&u<l&&i(u,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,u??l],a}function MX({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=(s==null?void 0:s.nodeClass)??So,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=r.offset,u=null;for(const{start:c,value:f}of r.items){const d=$l(c,{indicator:"seq-item-ind",next:f,offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)f&&f.type==="block-seq"?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(l,"MISSING_CHAR","Sequence item without - indicator");else{u=d.end,d.comment&&(a.comment=d.comment);continue}const h=f?t(n,f,d,i):e(n,d.end,c,null,d,i);n.schema.compat&&gy(r.indent,f,i),l=h.range[2],a.items.push(h)}return a.range=[r.offset,l,u??l],a}function Zf(t,e,n,r){let i="";if(t){let s=!1,o="";for(const a of t){const{source:l,type:u}=a;switch(u){case"space":s=!0;break;case"comment":{n&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const c=l.substring(1)||" ";i?i+=o+c:i=c,o="";break}case"newline":i&&(o+=l),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=l.length}}return{comment:i,offset:e}}const u1="Block collections are not allowed within flow collections",c1=t=>t&&(t.type==="block-map"||t.type==="block-seq");function FX({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=r.start.source==="{",a=o?"flow map":"flow sequence",l=(s==null?void 0:s.nodeClass)??(o?wr:So),u=new l(n.schema);u.flow=!0;const c=n.atRoot;c&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let g=0;g<r.items.length;++g){const b=r.items[g],{start:y,key:x,sep:S,value:E}=b,C=$l(y,{flow:a,indicator:"explicit-key-ind",next:x??(S==null?void 0:S[0]),offset:f,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!C.found){if(!C.anchor&&!C.tag&&!S&&!E){g===0&&C.comma?i(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):g<r.items.length-1&&i(C.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),C.comment&&(u.comment?u.comment+=`
`+C.comment:u.comment=C.comment),f=C.end;continue}!o&&n.options.strict&&af(x)&&i(x,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(g===0)C.comma&&i(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(C.comma||i(C.start,"MISSING_CHAR",`Missing , between ${a} items`),C.comment){let w="";e:for(const A of y)switch(A.type){case"comma":case"space":break;case"comment":w=A.source.substring(1);break e;default:break e}if(w){let A=u.items[u.items.length-1];Ot(A)&&(A=A.value??A.key),A.comment?A.comment+=`
`+w:A.comment=w,C.comment=C.comment.substring(w.length+1)}}if(!o&&!S&&!C.found){const w=E?t(n,E,C,i):e(n,C.end,S,null,C,i);u.items.push(w),f=w.range[2],c1(E)&&i(w.range,"BLOCK_IN_FLOW",u1)}else{n.atKey=!0;const w=C.end,A=x?t(n,x,C,i):e(n,w,y,null,C,i);c1(x)&&i(A.range,"BLOCK_IN_FLOW",u1),n.atKey=!1;const _=$l(S??[],{flow:a,indicator:"map-value-ind",next:E,offset:A.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!C.found&&n.options.strict){if(S)for(const N of S){if(N===_.found)break;if(N.type==="newline"){i(N,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}C.start<_.found.offset-1024&&i(_.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else E&&("source"in E&&E.source&&E.source[0]===":"?i(E,"MISSING_CHAR",`Missing space after : in ${a}`):i(_.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const O=E?t(n,E,_,i):_.found?e(n,_.end,S,null,_,i):null;O?c1(E)&&i(O.range,"BLOCK_IN_FLOW",u1):_.comment&&(A.comment?A.comment+=`
`+_.comment:A.comment=_.comment);const I=new Pn(A,O);if(n.options.keepSourceTokens&&(I.srcToken=b),o){const N=u;Y6(n,N.items,A)&&i(w,"DUPLICATE_KEY","Map keys must be unique"),N.items.push(I)}else{const N=new wr(n.schema);N.flow=!0,N.items.push(I);const P=(O??A).range;N.range=[A.range[0],P[1],P[2]],u.items.push(N)}f=O?O.range[2]:_.end}}const d=o?"}":"]",[h,...p]=r.end;let m=f;if(h&&h.source===d)m=h.offset+h.source.length;else{const g=a[0].toUpperCase()+a.substring(1),b=c?`${g} must end with a ${d}`:`${g} in block collection must be sufficiently indented and end with a ${d}`;i(f,c?"MISSING_CHAR":"BAD_INDENT",b),h&&h.source.length!==1&&p.unshift(h)}if(p.length>0){const g=Zf(p,m,n.options.strict,i);g.comment&&(u.comment?u.comment+=`
`+g.comment:u.comment=g.comment),u.range=[r.offset,m,g.offset]}else u.range=[r.offset,m,m];return u}function f1(t,e,n,r,i,s){const o=n.type==="block-map"?NX(t,e,n,r,s):n.type==="block-seq"?MX(t,e,n,r,s):FX(t,e,n,r,s),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function LX(t,e,n,r,i){var d;const s=r.tag,o=s?e.directives.tagName(s.source,h=>i(s,"TAG_RESOLVE_FAILED",h)):null;if(n.type==="block-seq"){const{anchor:h,newlineAfterProp:p}=r,m=h&&s?h.offset>s.offset?h:s:h??s;m&&(!p||p.offset<m.offset)&&i(m,"MISSING_CHAR","Missing newline after block sequence props")}const a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===wr.tagName&&a==="map"||o===So.tagName&&a==="seq")return f1(t,e,n,i,o);let l=e.schema.tags.find(h=>h.tag===o&&h.collection===a);if(!l){const h=e.schema.knownTags[o];if(h&&h.collection===a)e.schema.tags.push(Object.assign({},h,{default:!1})),l=h;else return h?i(s,"BAD_COLLECTION_TYPE",`${h.tag} used for ${a} collection, but expects ${h.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),f1(t,e,n,i,o)}const u=f1(t,e,n,i,o,l),c=((d=l.resolve)==null?void 0:d.call(l,u,h=>i(s,"TAG_RESOLVE_FAILED",h),e.options))??u,f=Rt(c)?c:new Ie(c);return f.range=u.range,f.tag=o,l!=null&&l.format&&(f.format=l.format),f}function J6(t,e,n){const r=e.offset,i=BX(e,t.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?Ie.BLOCK_FOLDED:Ie.BLOCK_LITERAL,o=e.source?$X(e.source):[];let a=o.length;for(let m=o.length-1;m>=0;--m){const g=o[m][1];if(g===""||g==="\r")a=m;else break}if(a===0){const m=i.chomp==="+"&&o.length>0?`
`.repeat(Math.max(1,o.length-1)):"";let g=r+i.length;return e.source&&(g+=e.source.length),{value:m,type:s,comment:i.comment,range:[r,g,g]}}let l=e.indent+i.indent,u=e.offset+i.length,c=0;for(let m=0;m<a;++m){const[g,b]=o[m];if(b===""||b==="\r")i.indent===0&&g.length>l&&(l=g.length);else{g.length<l&&n(u+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(l=g.length),c=m,l===0&&!t.atRoot&&n(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=g.length+b.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>l&&(a=m+1);let f="",d="",h=!1;for(let m=0;m<c;++m)f+=o[m][0].slice(l)+`
`;for(let m=c;m<a;++m){let[g,b]=o[m];u+=g.length+b.length+1;const y=b[b.length-1]==="\r";if(y&&(b=b.slice(0,-1)),b&&g.length<l){const S=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(u-b.length-(y?2:1),"BAD_INDENT",S),g=""}s===Ie.BLOCK_LITERAL?(f+=d+g.slice(l)+b,d=`
`):g.length>l||b[0]===" "?(d===" "?d=`
`:!h&&d===`
`&&(d=`
`),f+=d+g.slice(l)+b,d=`
`,h=!0):b===""?d===`
`?f+=`
`:d=`
`:(f+=d+b,d=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let m=a;m<o.length;++m)f+=`
`+o[m][0].slice(l);f[f.length-1]!==`
`&&(f+=`
`);break;default:f+=`
`}const p=r+i.length+e.source.length;return{value:f,type:s,comment:i.comment,range:[r,p,p]}}function BX({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],s=i[0];let o=0,a="",l=-1;for(let d=1;d<i.length;++d){const h=i[d];if(!a&&(h==="-"||h==="+"))a=h;else{const p=Number(h);!o&&p?o=p:l===-1&&(l=t+d)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let u=!1,c="",f=i.length;for(let d=1;d<e.length;++d){const h=e[d];switch(h.type){case"space":u=!0;case"newline":f+=h.source.length;break;case"comment":n&&!u&&r(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,c=h.source.substring(1);break;case"error":r(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{const p=`Unexpected token in block scalar header: ${h.type}`;r(h,"UNEXPECTED_TOKEN",p);const m=h.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:s,indent:o,chomp:a,comment:c,length:f}}function $X(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),s=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}function Z6(t,e,n){const{offset:r,type:i,source:s,end:o}=t;let a,l;const u=(d,h,p)=>n(r+d,h,p);switch(i){case"scalar":a=Ie.PLAIN,l=zX(s,u);break;case"single-quoted-scalar":a=Ie.QUOTE_SINGLE,l=jX(s,u);break;case"double-quoted-scalar":a=Ie.QUOTE_DOUBLE,l=VX(s,u);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}const c=r+s.length,f=Zf(o,c,e,n);return{value:l,type:a,comment:f.comment,range:[r,c,f.offset]}}function zX(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Q6(t)}function jX(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Q6(t.slice(1,-1)).replace(/''/g,"'")}function Q6(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let i=r[1],s=" ",o=e.lastIndex;for(n.lastIndex=o;r=n.exec(t);)r[1]===""?s===`
`?i+=s:s=`
`:(i+=s+r[1],s=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(t),i+s+((r==null?void 0:r[1])??"")}function VX(t,e){let n="";for(let r=1;r<t.length-1;++r){const i=t[r];if(!(i==="\r"&&t[r+1]===`
`))if(i===`
`){const{fold:s,offset:o}=UX(t,r);n+=s,r=o}else if(i==="\\"){let s=t[++r];const o=HX[s];if(o)n+=o;else if(s===`
`)for(s=t[r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="\r"&&t[r+1]===`
`)for(s=t[++r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="x"||s==="u"||s==="U"){const a={x:2,u:4,U:8}[s];n+=qX(t,r+1,a,e),r+=a}else{const a=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(i===" "||i===" "){const s=r;let o=t[r+1];for(;o===" "||o===" ";)o=t[++r+1];o!==`
`&&!(o==="\r"&&t[r+2]===`
`)&&(n+=r>s?t.slice(s,r+1):i)}else n+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function UX(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
`||r==="\r")&&!(r==="\r"&&t[e+2]!==`
`);)r===`
`&&(n+=`
`),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const HX={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function qX(t,e,n,r){const i=t.substr(e,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const a=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function eT(t,e,n,r){const{value:i,type:s,comment:o,range:a}=e.type==="block-scalar"?J6(t,e,r):Z6(e,t.options.strict,r),l=n?t.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null;let u;t.options.stringKeys&&t.atKey?u=t.schema[Hi]:l?u=GX(t.schema,i,l,n,r):e.type==="scalar"?u=WX(t,i,e,r):u=t.schema[Hi];let c;try{const f=u.resolve(i,d=>r(n??e,"TAG_RESOLVE_FAILED",d),t.options);c=dt(f)?f:new Ie(f)}catch(f){const d=f instanceof Error?f.message:String(f);r(n??e,"TAG_RESOLVE_FAILED",d),c=new Ie(i)}return c.range=a,c.source=i,s&&(c.type=s),l&&(c.tag=l),u.format&&(c.format=u.format),o&&(c.comment=o),c}function GX(t,e,n,r,i){var a;if(n==="!")return t[Hi];const s=[];for(const l of t.tags)if(!l.collection&&l.tag===n)if(l.default&&l.test)s.push(l);else return l;for(const l of s)if((a=l.test)!=null&&a.test(e))return l;const o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[Hi])}function WX({atKey:t,directives:e,schema:n},r,i,s){const o=n.tags.find(a=>{var l;return(a.default===!0||t&&a.default==="key")&&((l=a.test)==null?void 0:l.test(r))})||n[Hi];if(n.compat){const a=n.compat.find(l=>{var u;return l.default&&((u=l.test)==null?void 0:u.test(r))})??n[Hi];if(o.tag!==a.tag){const l=e.tagString(o.tag),u=e.tagString(a.tag),c=`Value may be parsed as either ${l} or ${u}`;s(i,"TAG_RESOLVE_FAILED",c,!0)}}return o}function KX(t,e,n){if(e){n??(n=e.length);for(let r=n-1;r>=0;--r){let i=e[r];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++r];(i==null?void 0:i.type)==="space";)t+=i.source.length,i=e[++r];break}}return t}const XX={composeNode:tT,composeEmptyNode:D2};function tT(t,e,n,r){const i=t.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=n;let u,c=!0;switch(e.type){case"alias":u=YX(t,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=eT(t,e,l,r),a&&(u.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":u=LX(XX,t,e,n,r),a&&(u.anchor=a.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),u=D2(t,e.offset,void 0,null,n,r),c=!1}}return a&&u.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!dt(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&r(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(u.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?u.comment=o:u.commentBefore=o),t.options.keepSourceTokens&&c&&(u.srcToken=e),u}function D2(t,e,n,r,{spaceBefore:i,comment:s,anchor:o,tag:a,end:l},u){const c={type:"scalar",offset:KX(e,n,r),indent:-1,source:""},f=eT(t,c,a,u);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&u(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=l),f}function YX({options:t},{offset:e,source:n,end:r},i){const s=new mm(n.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+n.length,a=Zf(r,o,t.strict,i);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}function JX(t,e,{offset:n,start:r,value:i,end:s},o){const a=Object.assign({_directives:e},t),l=new pu(void 0,a),u={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},c=$l(r,{indicator:"doc-start",next:i??(s==null?void 0:s[0]),offset:n,onError:o,parentIndent:0,startOnNewline:!0});c.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!c.hasNewline&&o(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?tT(u,i,c,o):D2(u,c.end,r,null,c,o);const f=l.contents.range[2],d=Zf(s,f,!1,o);return d.comment&&(l.comment=d.comment),l.range=[n,f,d.offset],l}function $u(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function Zw(t){var i;let e="",n=!1,r=!1;for(let s=0;s<t.length;++s){const o=t[s];switch(o[0]){case"#":e+=(e===""?"":r?`
`:`
`)+(o.substring(1)||" "),n=!0,r=!1;break;case"%":((i=t[s+1])==null?void 0:i[0])!=="#"&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}class k2{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,i,s)=>{const o=$u(n);s?this.warnings.push(new X6(o,r,i)):this.errors.push(new Zo(o,r,i))},this.directives=new Bn({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:r,afterEmptyLine:i}=Zw(this.prelude);if(r){const s=e.contents;if(n)e.comment=e.comment?`${e.comment}
${r}`:r;else if(i||e.directives.docStart||!s)e.commentBefore=r;else if(Pt(s)&&!s.flow&&s.items.length>0){let o=s.items[0];Ot(o)&&(o=o.key);const a=o.commentBefore;o.commentBefore=a?`${r}
${a}`:r}else{const o=s.commentBefore;s.commentBefore=o?`${r}
${o}`:r}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Zw(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const i of e)yield*this.next(i);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,i)=>{const s=$u(e);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=JX(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Zo($u(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Zo($u(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Zf(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Zo($u(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),i=new pu(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function ZX(t,e=!0,n){if(t){const r=(i,s,o)=>{const a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(a,s,o);else throw new Zo([a,a+1],s,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Z6(t,e,r);case"block-scalar":return J6({options:{strict:e}},t,r)}}return null}function QX(t,e){const{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=e,a=Yf({type:o,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:r,source:`
`}];switch(a[0]){case"|":case">":{const u=a.indexOf(`
`),c=a.substring(0,u),f=a.substring(u+1)+`
`,d=[{type:"block-scalar-header",offset:s,indent:r,source:c}];return nT(d,l)||d.push({type:"newline",offset:-1,indent:r,source:`
`}),{type:"block-scalar",offset:s,indent:r,props:d,source:f}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function eY(t,e,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=n,a="indent"in t?t.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const u=t.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const l=Yf({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":tY(t,l);break;case'"':d1(t,l,"double-quoted-scalar");break;case"'":d1(t,l,"single-quoted-scalar");break;default:d1(t,l,"scalar")}}function tY(t,e){const n=e.indexOf(`
`),r=e.substring(0,n),i=e.substring(n+1)+`
`;if(t.type==="block-scalar"){const s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,t.source=i}else{const{offset:s}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];nT(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
`});for(const l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:i})}}function nT(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function d1(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const r=t.props.slice(1);let i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(const s of r)s.offset+=i;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{const i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
`};delete t.items,Object.assign(t,{type:n,source:e,end:[i]});break}default:{const r="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:n,indent:r,source:e,end:i})}}}const nY=t=>"type"in t?l0(t):Gh(t);function l0(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=l0(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=Gh(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=Gh(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=Gh(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function Gh({start:t,key:e,sep:n,value:r}){let i="";for(const s of t)i+=s.source;if(e&&(i+=l0(e)),n)for(const s of n)i+=s.source;return r&&(i+=l0(r)),i}const by=Symbol("break visit"),rY=Symbol("skip children"),rT=Symbol("remove item");function ga(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),iT(Object.freeze([]),t,e)}ga.BREAK=by;ga.SKIP=rY;ga.REMOVE=rT;ga.itemAtPath=(t,e)=>{let n=t;for(const[r,i]of e){const s=n==null?void 0:n[r];if(s&&"items"in s)n=s.items[i];else return}return n};ga.parentCollection=(t,e)=>{const n=ga.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],i=n==null?void 0:n[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function iT(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const i of["key","value"]){const s=e[i];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){const a=iT(Object.freeze(t.concat([[i,o]])),s.items[o],n);if(typeof a=="number")o=a-1;else{if(a===by)return by;a===rT&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&i==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const Cm="\uFEFF",Am="",Dm="",lf="",iY=t=>!!t&&"items"in t,sY=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function oY(t){switch(t){case Cm:return"<BOM>";case Am:return"<DOC>";case Dm:return"<FLOW_END>";case lf:return"<SCALAR>";default:return JSON.stringify(t)}}function sT(t){switch(t){case Cm:return"byte-order-mark";case Am:return"doc-mode";case Dm:return"flow-error-end";case lf:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const aY=Object.freeze(Object.defineProperty({__proto__:null,BOM:Cm,DOCUMENT:Am,FLOW_END:Dm,SCALAR:lf,createScalarToken:QX,isCollection:iY,isScalar:sY,prettyToken:oY,resolveAsScalar:ZX,setScalarValue:eY,stringify:nY,tokenType:sT,visit:ga},Symbol.toStringTag,{value:"Module"}));function ti(t){switch(t){case void 0:case" ":case`
`:case"\r":case" ":return!0;default:return!1}}const Qw=new Set("0123456789ABCDEFabcdef"),lY=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),nh=new Set(",[]{}"),uY=new Set(` ,[]{}
\r `),h1=t=>!t||uY.has(t);class oT{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
`?!0:n==="\r"?this.buffer[e+1]===`
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){const i=this.buffer[r+e+1];if(i===`
`||!i&&!this.atEnd)return e+r+1}return n===`
`||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&ti(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Cm&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){const s=e[r-1];if(s===" "||s===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const s=e[n-1];if(s===" "||s===" ")n-=1;else break}const i=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Am,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&ti(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ti(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ti(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(h1),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&i[0]!=="#"||r===0&&(i.startsWith("---")||i.startsWith("..."))&&ti(i[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Dm,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(h1),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||ti(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let s=0;for(;this.buffer[n-1-s]==="\\";)s+=1;if(s%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let i=r.indexOf(`
`,this.pos);if(i!==-1){for(;i!==-1;){const s=this.continueScalar(i+1);if(s===-1)break;i=r.indexOf(`
`,s)}i!==-1&&(n=i-(r[i-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>ti(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":n+=1;break;case`
`:e=s,n=0;break;case"\r":{const o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(r=this.buffer[i];r===" ";)r=this.buffer[++i];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
`;)r=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);const a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
`&&s>=this.pos&&s+1+n>a)e=s;else break}while(!0);return yield lf,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){const s=this.buffer[r+1];if(ti(s)||e&&nh.has(s))break;n=r}else if(ti(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===`
`?(r+=1,i=`
`,s=this.buffer[r+1]):n=r),s==="#"||e&&nh.has(s))break;if(i===`
`){const o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&nh.has(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield lf,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(h1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(ti(n)||e&&nh.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!ti(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(lY.has(n))n=this.buffer[++e];else if(n==="%"&&Qw.has(this.buffer[e+1])&&Qw.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class aT{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){const s=n+r>>1;this.lineStarts[s]<e?n=s+1:r=s}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const i=this.lineStarts[n-1];return{line:n,col:e-i+1}}}}function Fs(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function e_(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function lT(t){switch(t==null?void 0:t.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function rh(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function za(t){var n;if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=t[++e])==null?void 0:n.type)==="space";);return t.splice(e,t.length)}function t_(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!Fs(e.start,"explicit-key-ind")&&!Fs(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,lT(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class O2{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new oT,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=sT(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&t_(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{const i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&e_(i.start)===-1&&(n.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<n.indent))&&(r.type==="document"?r.end=i.start:r.items.push({start:i.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{e_(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const n=rh(this.peek(2)),r=za(n);let i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const i="end"in n.value?n.value.end:void 0,s=Array.isArray(i)?i[i.length-1]:void 0;(s==null?void 0:s.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2],s=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const i=!this.onKeyLine&&this.indent===e.indent,s=i&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let o=[];if(s&&n.sep&&!n.value){const a=[];for(let l=0;l<n.sep.length;++l){const u=n.sep[l];switch(u.type){case"newline":a.push(l);break;case"space":break;case"comment":u.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=n.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):s||n.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Fs(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(lT(n.key)&&!Fs(n.sep,"newline")){const a=za(n.start),l=n.key,u=n.sep;u.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:u}]})}else o.length>0?n.sep=n.sep.concat(o,this.sourceToken):n.sep.push(this.sourceToken);else if(Fs(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const a=za(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):Fs(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);s||n.value?(e.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(a):(Object.assign(n,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{const a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Fs(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&e.items.push({start:o});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const i="end"in n.value?n.value.end:void 0,s=Array.isArray(i)?i[i.length-1]:void 0;(s==null?void 0:s.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2],s=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Fs(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const i=rh(r),s=za(i);t_(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=rh(e),r=za(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=rh(e),r=za(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function uT(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new aT||null,prettyErrors:e}}function cY(t,e={}){const{lineCounter:n,prettyErrors:r}=uT(e),i=new O2(n==null?void 0:n.addNewLine),s=new k2(e),o=Array.from(s.compose(i.parse(t)));if(r&&n)for(const a of o)a.errors.forEach(a0(t,n)),a.warnings.forEach(a0(t,n));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function cT(t,e={}){const{lineCounter:n,prettyErrors:r}=uT(e),i=new O2(n==null?void 0:n.addNewLine),s=new k2(e);let o=null;for(const a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Zo(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(o.errors.forEach(a0(t,n)),o.warnings.forEach(a0(t,n))),o}function fY(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=cT(t,n);if(!i)return null;if(i.warnings.forEach(s=>T6(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function dY(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){const{keepUndefined:i}=n??e??{};if(!i)return}return Pa(t)&&!r?t.toString(n):new pu(t,r,n).toString(n)}const hY=Object.freeze(Object.defineProperty({__proto__:null,Alias:mm,CST:aY,Composer:k2,Document:pu,Lexer:oT,LineCounter:aT,Pair:Pn,Parser:O2,Scalar:Ie,Schema:_m,YAMLError:A2,YAMLMap:wr,YAMLParseError:Zo,YAMLSeq:So,YAMLWarning:X6,isAlias:Do,isCollection:Pt,isDocument:Pa,isMap:cu,isNode:Rt,isPair:Ot,isScalar:dt,isSeq:fu,parse:fY,parseAllDocuments:cY,parseDocument:cT,stringify:dY,visit:Ra,visitAsync:pm},Symbol.toStringTag,{value:"Module"}));function pY(t){let e=null;try{e=hY.parse(t.doc.toString())}catch{}const n=Uv(t,At.YAML);return{data:e,pointers:n}}const fT=t=>{switch(t){case At.JSON:return qK;case At.JSON5:return iX;case At.YAML:return pY}};function mY(t){return Object.entries(t)}function ec(t,e){if(typeof t=="string"||typeof t!="object"||t===null)return t;if(Array.isArray(t))return t.map(i=>ec(i,e));if(t instanceof Map){const i=new Map;for(const[s,o]of t){const a=s,l=ec(o,e);i.set(a,l)}return i}if(t instanceof Set){const i=new Set;for(const s of t){const o=ec(s,e);i.add(o)}return i}const n={};function r(i,s,o,a){o===i&&a===s?n[o]=ec(s,e):n[o]=a}for(const[i,s]of mY(t)){const o=e(i,s);if(o.length===2&&typeof o[0]=="string")r(i,s,o[0],o[1]);else for(const[a,l]of o)r(i,s,a,l)}return n}var gY=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class bY{constructor(){this.completions=new Map,this.reservedKeys=new Set}reserve(e){this.reservedKeys.add(e)}add(e){this.reservedKeys.has(e.label)||this.completions.set(e.label,e)}}function yc(t){return!(!t||Nn(t)||t.name==="UnknownPropertyError"||t.type==="undefined")}class yY{constructor(e){var n,r,i;this.opts=e,this.originalSchema=null,this.schema=null,this.laxSchema=null,this.mode=At.JSON,this.mode=(n=e.mode)!==null&&n!==void 0?n:At.JSON,this.parser=(i=(r=this.opts)===null||r===void 0?void 0:r.jsonParser)!==null&&i!==void 0?i:fT(this.mode)}doComplete(e){var n;const r=Hv(e.state);if(this.originalSchema!==r&&(this.schema=(n=Fo(r,r))!==null&&n!==void 0?n:r,this.laxSchema=xY(this.schema)),!this.schema||!this.laxSchema)return[];Tt.log("xxx","trying with original schema");const i=this.doCompleteForSchema(e,this.schema);return i.options.length!==0?i:(Tt.log("xxx","no completions with original schema, trying with lax schema"),this.doCompleteForSchema(e,this.laxSchema))}doCompleteForSchema(e,n){var r,i;const s={from:e.pos,to:e.pos,options:[],filter:!1},o=e.state.doc.sliceString(0);let a=Fg(e.state,e.pos),l=e.state.sliceDoc(a.from,e.pos).replace(/^(["'])/,"");if(Tt.log("xxx","node",a,"prefix",l,"ctx",e),!(Lh(a,this.mode)||jd(a,this.mode))&&!e.explicit)return Tt.log("xxx","no completions for non-word/primitive",a),s;const u=Wa(e.state.doc,a),c=Wa(e.state.doc,a,!1);if(a&&(Lh(a,this.mode)||jd(a,this.mode)))s.from=a.from,s.to=a.to;else{const p=e.matchBefore(/[A-Za-z0-9._]*/),m=e.pos-u.length;Tt.log("xxx","overwriteStart after",m,"ctx.pos",e.pos,"word",p,"currentWord",u,"=>",o[m-1],"..",o[m],"..",o),s.from=a.name===Ne.INVALID?(r=p==null?void 0:p.from)!==null&&r!==void 0?r:e.pos:m,s.to=e.pos}const f=new bY;let d=!0;const h=OE(a,Ne.PROPERTY_NAME,this.mode);if(h&&(Tt.log("xxx","closestPropertyNameNode",h,"node",a),a=h),jd(a,this.mode)){Tt.log("xxx","isPropertyNameNode",a);const p=a.parent;if(p){const m=kE(p,this.mode);d=!m||m.name===Ne.INVALID&&m.from-m.to===0||(m.parent?Vf(m.parent).length<=1:!1),Tt.log("xxx","addValue",d,kE(p,this.mode),a),a=(i=OE(p,Ne.OBJECT,this.mode))!==null&&i!==void 0?i:null}}if(Tt.log("xxx",a,u,e,"node at pos",Fg(e.state,e.pos)),a&&[Ne.OBJECT,Ne.JSON_TEXT].includes(qt(a.name,this.mode))&&(jd(Fg(e.state,e.pos),this.mode)||h)){if(a.from===e.pos)return Tt.log("xxx","no completions for just before opening brace"),s;this.getPropertyCompletions(n,e,a,f,d,c)}else{const p={},m=this.getValueCompletions(n,e,p,f);Tt.log("xxx","getValueCompletions res",m)}return s.options=Array.from(f.completions.values()).filter(p=>Fh(p.label).startsWith(l)),Tt.log("xxx","result",s,"prefix",l,"collector.completions",f.completions,"reservedKeys",f.reservedKeys),s}applySnippetCompletion(e){return lz(typeof e.apply!="string"?e.label:e.apply,e)}getPropertyCompletions(e,n,r,i,s,o){const a=Tz(r,Ne.PROPERTY,this.mode);Tt.log("xxx","getPropertyCompletions",r,n,a),a.forEach(u=>{const c=Wa(n.state.doc,qb(u,Ne.PROPERTY_NAME,this.mode));i.reserve(Fh(c))});const l=this.getSchemas(e,n);Tt.log("xxx","propertyCompletion schemas",l),l.forEach(u=>{if(typeof u!="object")return;const c=u.properties;c&&Object.entries(c).forEach(([d,h])=>{var p,m;if(typeof h=="object"){const g=(p=h.description)!==null&&p!==void 0?p:"",b=(m=h.type)!==null&&m!==void 0?m:"",y=Array.isArray(b)?b.toString():b,x={label:d,apply:this.getInsertTextForProperty(d,s,o,e,h),type:"property",detail:y,info:()=>Ci("div",{inner:yl(g)})};i.add(this.applySnippetCompletion(x))}});const f=u.propertyNames;if(typeof f=="object"&&(f.enum&&f.enum.forEach(d=>{const h=d==null?void 0:d.toString();if(h){const p={label:h,apply:this.getInsertTextForProperty(h,s,o,e),type:"property"};i.add(this.applySnippetCompletion(p))}}),f.const)){const d=f.const.toString(),h={label:d,apply:this.getInsertTextForProperty(d,s,o,e),type:"property"};i.add(this.applySnippetCompletion(h))}})}getInsertTextForProperty(e,n,r,i,s){s=s&&Fo(s,i);let o=this.getInsertTextForPropertyName(e,r);if(!n)return o;o+=": ";let a,l=0;if(typeof s=="object"){if(typeof s.default<"u")a||(a=this.getInsertTextForGuessedValue(s.default,"")),l++;else if(s.enum&&(!a&&s.enum.length===1&&(a=this.getInsertTextForGuessedValue(s.enum[0],"")),l+=s.enum.length),typeof s.const<"u"&&(a||(a=this.getInsertTextForGuessedValue(s.const,"")),l++),Array.isArray(s.examples)&&s.examples.length&&(a||(a=this.getInsertTextForGuessedValue(s.examples[0],"")),l+=s.examples.length),a===void 0&&l===0){let u=Array.isArray(s.type)?s.type[0]:s.type;switch(u||(s.properties?u="object":s.items&&(u="array")),u){case"boolean":a="#{}";break;case"string":a=this.getInsertTextForString("");break;case"object":switch(this.mode){case At.JSON5:a="{#{}}";break;case At.YAML:a="#{}";break;default:a="{#{}}";break}break;case"array":a="[#{}]";break;case"number":case"integer":a="#{0}";break;case"null":a="#{null}";break;default:a="#{}";break}}}return(!a||l>1)&&(Tt.log("xxx","value",a,"nValueProposals",l,s),a="#{}"),o+a}getInsertTextForPropertyName(e,n){switch(this.mode){case At.JSON5:case At.YAML:return n.startsWith('"')?`"${e}"`:n.startsWith("'")?`'${e}'`:e;default:return`"${e}"`}}getInsertTextForString(e,n="#"){switch(this.mode){case At.JSON5:return`'${n}{${e}}'`;case At.YAML:return`${n}{${e}}`;default:return`"${n}{${e}}"`}}getInsertTextForGuessedValue(e,n=""){switch(typeof e){case"object":return e===null?"${null}"+n:this.getInsertTextForValue(e,n);case"string":{let r=JSON.stringify(e);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),this.getInsertTextForString(r,"$")+n}case"number":case"boolean":return"${"+JSON.stringify(e)+"}"+n}return this.getInsertTextForValue(e,n)}getInsertTextForPlainText(e){return e.replace(/[\\$}]/g,"\\$&")}getInsertTextForValue(e,n){const r=JSON.stringify(e,null," ");return r==="{}"?"{#{}}"+n:r==="[]"?"[#{}]"+n:this.getInsertTextForPlainText(r+n)}getValueCompletions(e,n,r,i){let s=tn(n.state).resolveInner(n.pos,-1),o=null,a;if(Tt.log("xxx","getValueCompletions",s,n),s&&Lh(s,this.mode)&&(o=s,s=s.parent),!s){this.addSchemaValueCompletions(e,r,i);return}if(qt(s.name,this.mode)===Ne.PROPERTY){const u=qb(s,Ne.PROPERTY_NAME,this.mode);u&&(a=Wa(n.state.doc,u),s=s.parent)}if(Tt.log("xxx","node",s,"parentKey",a),s&&(a!==void 0||qt(s.name,this.mode)===Ne.ARRAY)){const u=this.getSchemas(e,n);for(const c of u){if(typeof c!="object")return;if(qt(s.name,this.mode)===Ne.ARRAY&&c.items){let f=i;if(c.uniqueItems&&(f=Object.assign(Object.assign({},f),{add(d){f.completions.has(d.label)||i.add(d)},reserve(d){i.reserve(d)}})),Array.isArray(c.items)){let d=0;if(o){const p=x3(s,o,this.mode);p>=0&&(d=p)}const h=c.items[d];h&&this.addSchemaValueCompletions(h,r,f)}else this.addSchemaValueCompletions(c.items,r,f)}if((c.type==null||c.type!=="object")&&this.addSchemaValueCompletions(c,r,i),a!==void 0){let f=!1;if(c.properties){const d=c.properties[a];d&&(f=!0,this.addSchemaValueCompletions(d,r,i))}if(c.patternProperties&&!f)for(const d of Object.keys(c.patternProperties)){const h=this.extendedRegExp(d);if(h!=null&&h.test(a)){f=!0;const p=c.patternProperties[d];p&&this.addSchemaValueCompletions(p,r,i)}}if(c.additionalProperties&&!f){const d=c.additionalProperties;this.addSchemaValueCompletions(d,r,i)}}r.boolean&&(this.addBooleanValueCompletion(!0,i),this.addBooleanValueCompletion(!1,i)),r.null&&this.addNullValueCompletion(i)}}return{valuePrefix:o?Wa(n.state.doc,o,!0,!1):""}}addSchemaValueCompletions(e,n,r){typeof e=="object"&&(this.addEnumValueCompletions(e,r),this.addDefaultValueCompletions(e,r),this.collectTypes(e,n),Array.isArray(e.allOf)&&e.allOf.forEach(i=>this.addSchemaValueCompletions(i,n,r)),Array.isArray(e.anyOf)&&e.anyOf.forEach(i=>this.addSchemaValueCompletions(i,n,r)),Array.isArray(e.oneOf)&&e.oneOf.forEach(i=>this.addSchemaValueCompletions(i,n,r)))}addDefaultValueCompletions(e,n,r=0){let i=!1;if(typeof e.default<"u"){let s=e.type,o=e.default;for(let l=r;l>0;l--)o=[o],s="array";const a=Object.assign(Object.assign({type:s==null?void 0:s.toString()},this.getAppliedValue(o)),{detail:"Default value"});n.add(a),i=!0}Array.isArray(e.examples)&&e.examples.forEach(s=>{let o=e.type,a=s;for(let l=r;l>0;l--)a=[a],o="array";n.add(Object.assign({type:o==null?void 0:o.toString()},this.getAppliedValue(a))),i=!0}),!i&&typeof e.items=="object"&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,n,r+1)}addEnumValueCompletions(e,n){var r,i;if(typeof e.const<"u"&&n.add(Object.assign(Object.assign({type:(r=e.type)===null||r===void 0?void 0:r.toString()},this.getAppliedValue(e.const)),{info:e.description})),Array.isArray(e.enum))for(let s=0,o=e.enum.length;s<o;s++){const a=e.enum[s];n.add(Object.assign(Object.assign({type:(i=e.type)===null||i===void 0?void 0:i.toString()},this.getAppliedValue(a)),{info:e.description}))}}addBooleanValueCompletion(e,n){n.add({type:"boolean",label:e?"true":"false"})}addNullValueCompletion(e){e.add({type:"null",label:"null"})}collectTypes(e,n){if(Array.isArray(e.enum)||typeof e.const<"u")return;const r=e.type;Array.isArray(r)?r.forEach(i=>n[i]=!0):r&&(n[r]=!0)}getSchemas(e,n){var r,i,s;const{data:o}=this.parser(n.state),a=new oO(e);let l=y3(n.state,n.pos,-1,this.mode);if(l===""&&(l=void 0),l!=null&&l.endsWith("/")){l=l.substring(0,l.length-1);const p=n_(e,o,l);if(p!=null)return[p]}let u=l!=null?l.replace(/\/[^/]*$/,""):void 0;u===""&&(u=void 0);const c=n_(e,o,u),f=l==null?void 0:l.split("/").pop(),d=f==null||f in((r=c==null?void 0:c.properties)!==null&&r!==void 0?r:{});let h=a.getSchema({pointer:l,data:o??void 0});return!d&&(h==null?void 0:h.type)==="null"&&this.mode==="yaml"&&(h=void 0),Tt.log("xxxx","draft.getSchema",h,"data",o,"pointer",l,"pointerPointsToKnownProperty",d),Nn(h)&&(h=(i=h.data)===null||i===void 0?void 0:i.schema),!yc(h)&&c?[c]:(yc(h)||(h=a.getSchema({pointer:u}),l=u),Tt.log("xxx","pointer..",JSON.stringify(l)),!yc(h)&&(!l||l==="/")&&(h=(s=Fo(e,e))!==null&&s!==void 0?s:e),Tt.log("xxx","subSchema..",h),h?Array.isArray(h.allOf)?[h,...h.allOf.map(p=>Fo(p,e))]:Array.isArray(h.oneOf)?[h,...h.oneOf.map(p=>Fo(p,e))]:Array.isArray(h.anyOf)?[h,...h.anyOf.map(p=>Fo(p,e))]:[h]:[])}getAppliedValue(e){const n=Fh(JSON.stringify(e));switch(this.mode){case At.JSON5:return{label:n,apply:kz(JSON.stringify(e))};case At.YAML:return{label:n,apply:n};default:return{label:n,apply:JSON.stringify(e)}}}getValueFromLabel(e){return JSON.parse(e)}extendedRegExp(e){let n="";e.startsWith("(?i)")&&(e=e.substring(4),n="i");try{return new RegExp(e,n+"u")}catch{try{return new RegExp(e,n)}catch{return}}}}function vY(t={}){const e=new yY(t);return function(r){return e.doComplete(r)}}function xY(t){return ec(t,(e,n)=>e==="additionalProperties"&&n===!1?[]:e==="required"&&Array.isArray(n)?[]:e==="unevaluatedProperties"&&n===!1?[]:e==="unevaluatedItems"&&n===!1?[]:[e,n])}function n_(t,e,n){const r=new oO(t),i=r.getSchema({pointer:n,data:e??void 0});if(!yc(i))return;const s=dT(r,i),o={};for(let d of s){let h=EY(n,d);const p=r.getSchema({pointer:h,data:e??void 0});yc(p)&&Object.assign(o,{[d]:p})}if(s.length===0||Object.keys(o).length===0)return;const a=i,{allOf:l,anyOf:u,oneOf:c}=a,f=gY(a,["allOf","anyOf","oneOf"]);return Object.assign(Object.assign({},f),{properties:o})}function dT(t,e){if(e=Fo(e,t.rootSchema),typeof e!="object"||e==null)return[];const n=[];function r(i){const s=dT(t,i);n.push(...s)}if(typeof e.properties=="object"&&e.properties!=null&&n.push(...Object.keys(e.properties)),typeof e.then=="object"&&e.then!=null&&r(e.then),Array.isArray(e.allOf))for(const i of e.allOf)r(i);if(Array.isArray(e.anyOf))for(const i of e.anyOf)r(i);if(Array.isArray(e.oneOf))for(const i of e.oneOf)r(i);return n}function Fo(t,e){if(typeof t=="object"&&t.$ref){const n=SY(e,t.$ref);if(typeof n=="object"){const r=Object.assign(Object.assign({},t),n);return Reflect.deleteProperty(r,"$ref"),r}}return t}function SY(t,e){const n=e.split("/");let r=t;return n.forEach(i=>{if(i){if(i==="#"){r=t;return}typeof r=="object"&&(r=r[i])}}),r}function EY(t,e){return t===void 0?`/${e}`:`${t}/${e}`}const uf=(t,e)=>{const n=t.length>2;let r=t.map((i,s)=>{const o="`"+(e?e(i):i)+"`";return s===t.length-1?"or "+o:o});return n?r.join(", "):r.join(" ")},wY=t=>{var e,n,r;return!((e=t==null?void 0:t.data)===null||e===void 0)&&e.pointer&&((n=t==null?void 0:t.data)===null||n===void 0?void 0:n.pointer)!=="#"?t.data.pointer.slice(1):!((r=t==null?void 0:t.data)===null||r===void 0)&&r.property?`/${t.data.property}`:""},_Y=t=>t.startState.field(Lp)!==t.state.field(Lp);function CY(t){const e=new DY(t);return n=>e.doValidation(n)}const AY=["NoAdditionalPropertiesError","RequiredPropertyError","InvalidPropertyNameError","ForbiddenPropertyError","UndefinedValueError"];class DY{constructor(e){var n,r,i,s;this.options=e,this.schema=null,this.mode=At.JSON,this.rewriteError=o=>{var a,l,u,c,f;const d=o==null?void 0:o.data,h=d==null?void 0:d.errors;return o.code==="one-of-error"&&(h!=null&&h.length)?`Expected one of ${uf(h,m=>m.data.expected)}`:o.code==="type-error"?`Expected \`${!((a=o==null?void 0:o.data)===null||a===void 0)&&a.expected&&Array.isArray((l=o==null?void 0:o.data)===null||l===void 0?void 0:l.expected)?uf((u=o==null?void 0:o.data)===null||u===void 0?void 0:u.expected):(c=o==null?void 0:o.data)===null||c===void 0?void 0:c.expected}\` but received \`${(f=o==null?void 0:o.data)===null||f===void 0?void 0:f.received}\``:o.message.replaceAll("in `#` ","").replaceAll("at `#`","").replaceAll("/",".").replaceAll("#.","")},this.mode=(r=(n=this.options)===null||n===void 0?void 0:n.mode)!==null&&r!==void 0?r:At.JSON,this.parser=(s=(i=this.options)===null||i===void 0?void 0:i.jsonParser)!==null&&s!==void 0?s:fT(this.mode)}get schemaTitle(){var e,n,r;return(r=(n=(e=this.schema)===null||e===void 0?void 0:e.getSchema())===null||n===void 0?void 0:n.title)!==null&&r!==void 0?r:"json-schema"}doValidation(e){const n=Hv(e.state);if(!n)return[];if(this.schema=new iO(n),!this.schema)return[];const r=e.state.doc.toString();if(!(r!=null&&r.length))return[];const i=this.parser(e.state);if(i.data==null)return[];let s=[];try{s=this.schema.validate(i.data)}catch{}return Tt.log("xxx","validation errors",s,i.data),s.length?s.reduce((o,a)=>{const l=()=>{const f=this.rewriteError(a);o.push({from:0,to:0,message:f,severity:"error",source:this.schemaTitle,renderMessage:()=>{const d=Ci("div",{});return d.innerHTML=yl(f),d}})},u=wY(a),c=i.pointers.get(u);if(a.name==="MaxPropertiesError"||a.name==="MinPropertiesError"||u==="")l();else if(c){const f=AY.includes(a.name),d=this.rewriteError(a),h=f?c.keyFrom:c.valueFrom,p=f?c.keyTo:c.valueTo;p!==void 0&&h!==void 0&&o.push({from:h,to:p,message:d,renderMessage:()=>{const m=Ci("div",{});return m.innerHTML=yl(d),m},severity:"error",source:this.schemaTitle})}else l();return o},[]):[]}}function kY(t){const e=new OY(t);return async function(r,i,s){return e.doHover(r,i,s)}}function r_(t){if(t.type)return t.$ref?`${t.$ref} (${t.type})`:t.type;if(t.$ref)return`${t.$ref}`}function p1(t,e,n){return`${e}: ${uf(t[e].map(r=>{try{const{data:i}=n.resolveRef({data:r,pointer:r.$ref});return r_(i||r)}catch{return r.type}}))}`}class OY{constructor(e){var n,r;this.opts=e,this.schema=null,this.mode=At.JSON,this.opts=Object.assign({parser:JSON.parse},this.opts),this.mode=(r=(n=this.opts)===null||n===void 0?void 0:n.mode)!==null&&r!==void 0?r:At.JSON}getDataForCursor(e,n,r){const i=Hv(e.state);if(!i)return null;this.schema=new iO(i);const s=y3(e.state,n,r,this.mode);let o;try{o=this.opts.parser(e.state.doc.toString())}catch{}if(!s)return null;let a=this.schema.getSchema({pointer:s,data:o,withSchemaWarning:!0});return Nn(a)&&(a!=null&&a.data.schema.$ref?a=this.schema.resolveRef(a):a=a==null?void 0:a.data.schema),{schema:a,pointer:s}}formatMessage(e){const{message:n,typeInfo:r}=e;return n?Ci("div",{class:"cm6-json-schema-hover"},[Ci("div",{class:"cm6-json-schema-hover--description",inner:yl(n,!1)}),Ci("div",{class:"cm6-json-schema-hover--code-wrapper"},[Ci("div",{class:"cm6-json-schema-hover--code",inner:yl(r,!1)})])]):Ci("div",{class:"cm6-json-schema-hover"},[Ci("div",{class:"cm6-json-schema-hover--code-wrapper"},[Ci("code",{class:"cm6-json-schema-hover--code",inner:yl(r,!1)})])])}getHoverTexts(e,n){let r="",i=null;const{schema:s}=e;return s.oneOf&&(r=p1(s,"oneOf",n)),s.anyOf&&(r=p1(s,"anyOf",n)),s.allOf&&(r=p1(s,"allOf",n)),s.type&&(r=Array.isArray(s.type)?uf(s.type):s.type),s.$ref&&(r=` Reference: ${s.$ref}`),s.enum&&(r=`\`enum\`: ${uf(s.enum)}`),s.format&&(r+=`\`format\`: ${s.format}`),s.pattern&&(r+=`\`pattern\`: ${s.pattern}`),s.description&&(i=s.description),{message:i,typeInfo:r}}async doHover(e,n,r){var i,s,o,a;const l=n,u=n;try{const c=this.getDataForCursor(e,n,r);if(Tt.log("cursorData",c),!(c!=null&&c.schema))return null;const d=((s=(i=this.opts)===null||i===void 0?void 0:i.getHoverTexts)!==null&&s!==void 0?s:this.getHoverTexts)(c,this.schema),p=((a=(o=this.opts)===null||o===void 0?void 0:o.formatHover)!==null&&a!==void 0?a:this.formatMessage)(d);return{pos:l,end:u,arrow:!0,above:!0,create:m=>({dom:p})}}catch(c){return Tt.log(c),null}}}function TY(t){return[r3(),Lb(_7()),Lb(CY(),{needsRefresh:_Y}),n3.data.of({autocomplete:vY()}),bk(kY()),Rz(t)]}const IY=(t,e)=>{const n=hT(t);return n.push(r3()),e!==void 0&&n.push(TY(e)),t||n.push(i$),n},hT=t=>{const e=[ZB()];return t&&e.push(Ue.readOnly.of(!0)),e},PY=t=>hT(t),RY=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=I2(t.state,n.from);return r.line?NY(t):r.block?FY(t):!1};function T2(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const NY=T2($Y,0),MY=T2(pT,0),FY=T2((t,e)=>pT(t,e,BY(e)),0);function I2(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const zu=50;function LY(t,{open:e,close:n},r,i){let s=t.sliceDoc(r-zu,r),o=t.sliceDoc(i,i+zu),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(o)[0].length,u=s.length-a;if(s.slice(u-e.length,u)==e&&o.slice(l,l+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+l,margin:l&&1}};let c,f;i-r<=2*zu?c=f=t.sliceDoc(r,i):(c=t.sliceDoc(r,r+zu),f=t.sliceDoc(i-zu,i));let d=/^\s*/.exec(c)[0].length,h=/\s*$/.exec(f)[0].length,p=f.length-h-n.length;return c.slice(d,d+e.length)==e&&f.slice(p,p+n.length)==n?{open:{pos:r+d+e.length,margin:/\s/.test(c.charAt(d+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function BY(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function pT(t,e,n=e.selection.ranges){let r=n.map(s=>I2(e,s.from).block);if(!r.every(s=>s))return null;let i=n.map((s,o)=>LY(e,r[o],s.from,s.to));if(t!=2&&!i.every(s=>s))return{changes:e.changes(n.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(t!=1&&i.some(s=>s)){let s=[];for(let o=0,a;o<i.length;o++)if(a=i[o]){let l=r[o],{open:u,close:c}=a;s.push({from:u.pos-l.open.length,to:u.pos+u.margin},{from:c.pos-c.margin,to:c.pos+l.close.length})}return{changes:s}}return null}function $Y(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:s,to:o}of n){let a=r.length,l=1e9,u=I2(e,s).line;if(u){for(let c=s;c<=o;){let f=e.doc.lineAt(c);if(f.from>i&&(s==o||o>f.from)){i=f.from;let d=/^\s*/.exec(f.text)[0].length,h=d==f.length,p=f.text.slice(d,d+u.length)==u?d:-1;d<f.text.length&&d<l&&(l=d),r.push({line:f,comment:p,token:u,indent:d,empty:h,single:!1})}c=f.to+1}if(l<1e9)for(let c=a;c<r.length;c++)r[c].indent<r[c].line.text.length&&(r[c].indent=l);r.length==a+1&&(r[a].single=!0)}}if(t!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:u,empty:c,single:f}of r)(f||!c)&&s.push({from:a.from+u,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of r)if(a>=0){let u=o.from+a,c=u+l.length;o.text[c-o.from]==" "&&c++,s.push({from:u,to:c})}return{changes:s}}return null}const yy=As.define(),zY=As.define(),jY=he.define(),mT=he.define({combine(t){return fi(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),gT=Wt.define({create(){return Fi.empty},update(t,e){let n=e.state.facet(mT),r=e.annotation(yy);if(r){let l=ar.fromTransaction(e,r.selection),u=r.side,c=u==0?t.undone:t.done;return l?c=u0(c,c.length,n.minDepth,l):c=vT(c,e.startState.selection),new Fi(u==0?r.rest:c,u==0?c:r.rest)}let i=e.annotation(zY);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Qt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=ar.fromTransaction(e),o=e.annotation(Qt.time),a=e.annotation(Qt.userEvent);return s?t=t.addChanges(s,o,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Fi(t.done.map(ar.fromJSON),t.undone.map(ar.fromJSON))}});function VY(t={}){return[gT,mT.of(t),ce.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?bT:e.inputType=="historyRedo"?vy:null;return r?(e.preventDefault(),r(n)):!1}})]}function km(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(gT,!1);if(!i)return!1;let s=i.pop(t,n,e);return s?(r(s),!0):!1}}const bT=km(0,!1),vy=km(1,!1),UY=km(0,!0),HY=km(1,!0);class ar{constructor(e,n,r,i,s){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new ar(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new ar(e.changes&&sn.fromJSON(e.changes),[],e.mapped&&Li.fromJSON(e.mapped),e.startSelection&&Y.fromJSON(e.startSelection),e.selectionsAfter.map(Y.fromJSON))}static fromTransaction(e,n){let r=zr;for(let i of e.startState.facet(jY)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new ar(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,zr)}static selection(e){return new ar(void 0,zr,void 0,void 0,e)}}function u0(t,e,n,r){let i=e+1>n+20?e-n-1:0,s=t.slice(i,e);return s.push(r),s}function qY(t,e){let n=[],r=!1;return t.iterChangedRanges((i,s)=>n.push(i,s)),e.iterChangedRanges((i,s,o,a)=>{for(let l=0;l<n.length;){let u=n[l++],c=n[l++];a>=u&&o<=c&&(r=!0)}}),r}function GY(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function yT(t,e){return t.length?e.length?t.concat(e):t:e}const zr=[],WY=200;function vT(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-WY));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),u0(t,t.length-1,1e9,n.setSelAfter(r)))}else return[ar.selection([e])]}function KY(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function m1(t,e){if(!t.length)return t;let n=t.length,r=zr;for(;n;){let i=XY(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=t.slice(0,n);return s[n-1]=i,s}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[ar.selection(r)]:zr}function XY(t,e,n){let r=yT(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):zr,n);if(!t.changes)return ar.selection(r);let i=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new ar(i,De.mapEffects(t.effects,e),o,t.startSelection.map(s),r)}const YY=/^(input\.type|delete)($|\.)/;class Fi{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Fi(this.done,this.undone):this}addChanges(e,n,r,i,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||YY.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,qY(a.changes,e.changes))||r=="input.type.compose")?o=u0(o,o.length-1,i.minDepth,new ar(e.changes.compose(a.changes),yT(De.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,zr)):o=u0(o,o.length,i.minDepth,e),new Fi(o,zr,n,r)}addSelection(e,n,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:zr;return s.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&GY(s[s.length-1],e)?this:new Fi(vT(this.done,e),this.undone,n,r)}addMapping(e){return new Fi(m1(this.done,e),m1(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],o=s.selectionsAfter[0]||n.selection;if(r&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:yy.of({side:e,rest:KY(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let a=i.length==1?zr:i.slice(0,i.length-1);return s.mapped&&(a=m1(a,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:yy.of({side:e,rest:a,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Fi.empty=new Fi(zr,zr);const JY=[{key:"Mod-z",run:bT,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:vy,preventDefault:!0},{linux:"Ctrl-Shift-z",run:vy,preventDefault:!0},{key:"Mod-u",run:UY,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:HY,preventDefault:!0}];function mu(t,e){return Y.create(t.ranges.map(e),t.mainIndex)}function pi(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function mi({state:t,dispatch:e},n){let r=mu(t.selection,n);return r.eq(t.selection,!0)?!1:(e(pi(t,r)),!0)}function Om(t,e){return Y.cursor(e?t.to:t.from)}function xT(t,e){return mi(t,n=>n.empty?t.moveByChar(n,e):Om(n,e))}function Mn(t){return t.textDirectionAt(t.state.selection.main.head)==Et.LTR}const ST=t=>xT(t,!Mn(t)),ET=t=>xT(t,Mn(t));function wT(t,e){return mi(t,n=>n.empty?t.moveByGroup(n,e):Om(n,e))}const ZY=t=>wT(t,!Mn(t)),QY=t=>wT(t,Mn(t));function eJ(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Tm(t,e,n){let r=tn(t).resolveInner(e.head),i=n?Ve.closedBy:Ve.openedBy;for(let l=e.head;;){let u=n?r.childAfter(l):r.childBefore(l);if(!u)break;eJ(t,u,i)?r=u:l=n?u.to:u.from}let s=r.type.prop(i),o,a;return s&&(o=n?Ri(t,r.from,1):Ri(t,r.to,-1))&&o.matched?a=n?o.end.to:o.end.from:a=n?r.to:r.from,Y.cursor(a,n?-1:1)}const tJ=t=>mi(t,e=>Tm(t.state,e,!Mn(t))),nJ=t=>mi(t,e=>Tm(t.state,e,Mn(t)));function _T(t,e){return mi(t,n=>{if(!n.empty)return Om(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const CT=t=>_T(t,!1),AT=t=>_T(t,!0);function DT(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let s of t.state.facet(ce.scrollMargins)){let o=s(t);o!=null&&o.top&&(n=Math.max(o==null?void 0:o.top,n)),o!=null&&o.bottom&&(r=Math.max(o==null?void 0:o.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function kT(t,e){let n=DT(t),{state:r}=t,i=mu(r.selection,o=>o.empty?t.moveVertically(o,e,n.height):Om(o,e));if(i.eq(r.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,u=a.bottom-n.marginBottom;o&&o.top>l&&o.bottom<u&&(s=ce.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-l}))}return t.dispatch(pi(r,i),{effects:s}),!0}const i_=t=>kT(t,!1),xy=t=>kT(t,!0);function ko(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let s=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=Y.cursor(r.from+s))}return i}const rJ=t=>mi(t,e=>ko(t,e,!0)),iJ=t=>mi(t,e=>ko(t,e,!1)),sJ=t=>mi(t,e=>ko(t,e,!Mn(t))),oJ=t=>mi(t,e=>ko(t,e,Mn(t))),aJ=t=>mi(t,e=>Y.cursor(t.lineBlockAt(e.head).from,1)),lJ=t=>mi(t,e=>Y.cursor(t.lineBlockAt(e.head).to,-1));function uJ(t,e,n){let r=!1,i=mu(t.selection,s=>{let o=Ri(t,s.head,-1)||Ri(t,s.head,1)||s.head>0&&Ri(t,s.head-1,1)||s.head<t.doc.length&&Ri(t,s.head+1,-1);if(!o||!o.end)return s;r=!0;let a=o.start.from==s.head?o.end.to:o.end.from;return Y.cursor(a)});return r?(e(pi(t,i)),!0):!1}const cJ=({state:t,dispatch:e})=>uJ(t,e);function Zr(t,e){let n=mu(t.state.selection,r=>{let i=e(r);return Y.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(pi(t.state,n)),!0)}function OT(t,e){return Zr(t,n=>t.moveByChar(n,e))}const TT=t=>OT(t,!Mn(t)),IT=t=>OT(t,Mn(t));function PT(t,e){return Zr(t,n=>t.moveByGroup(n,e))}const fJ=t=>PT(t,!Mn(t)),dJ=t=>PT(t,Mn(t)),hJ=t=>Zr(t,e=>Tm(t.state,e,!Mn(t))),pJ=t=>Zr(t,e=>Tm(t.state,e,Mn(t)));function RT(t,e){return Zr(t,n=>t.moveVertically(n,e))}const NT=t=>RT(t,!1),MT=t=>RT(t,!0);function FT(t,e){return Zr(t,n=>t.moveVertically(n,e,DT(t).height))}const s_=t=>FT(t,!1),o_=t=>FT(t,!0),mJ=t=>Zr(t,e=>ko(t,e,!0)),gJ=t=>Zr(t,e=>ko(t,e,!1)),bJ=t=>Zr(t,e=>ko(t,e,!Mn(t))),yJ=t=>Zr(t,e=>ko(t,e,Mn(t))),vJ=t=>Zr(t,e=>Y.cursor(t.lineBlockAt(e.head).from)),xJ=t=>Zr(t,e=>Y.cursor(t.lineBlockAt(e.head).to)),a_=({state:t,dispatch:e})=>(e(pi(t,{anchor:0})),!0),l_=({state:t,dispatch:e})=>(e(pi(t,{anchor:t.doc.length})),!0),u_=({state:t,dispatch:e})=>(e(pi(t,{anchor:t.selection.main.anchor,head:0})),!0),c_=({state:t,dispatch:e})=>(e(pi(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),SJ=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),EJ=({state:t,dispatch:e})=>{let n=Im(t).map(({from:r,to:i})=>Y.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:Y.create(n),userEvent:"select"})),!0},wJ=({state:t,dispatch:e})=>{let n=mu(t.selection,r=>{let i=tn(t),s=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:a}=o;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&o.next)return Y.range(a.to,a.from)}return r});return n.eq(t.selection)?!1:(e(pi(t,n)),!0)};function LT(t,e){let{state:n}=t,r=n.selection,i=n.selection.ranges.slice();for(let s of n.selection.ranges){let o=n.doc.lineAt(s.head);if(e?o.to<t.state.doc.length:o.from>0)for(let a=s;;){let l=t.moveVertically(a,e);if(l.head<o.from||l.head>o.to){i.some(u=>u.head==l.head)||i.push(l);break}else{if(l.head==a.head)break;a=l}}}return i.length==r.ranges.length?!1:(t.dispatch(pi(n,Y.create(i,i.length-1))),!0)}const _J=t=>LT(t,!1),CJ=t=>LT(t,!0),AJ=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=Y.create([n.main]):n.main.empty||(r=Y.create([Y.cursor(n.main.head)])),r?(e(pi(t,r)),!0):!1};function Qf(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);l<o?(n="delete.backward",l=ih(t,l,!1)):l>o&&(n="delete.forward",l=ih(t,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=ih(t,o,!1),a=ih(t,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:Y.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?ce.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function ih(t,e,n){if(t instanceof ce)for(let r of t.state.facet(ce.atomicRanges).map(i=>i(t)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=n?s:i)});return e}const BT=(t,e,n)=>Qf(t,r=>{let i=r.from,{state:s}=t,o=s.doc.lineAt(i),a,l;if(n&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,i-o.from))){if(a[a.length-1]==" ")return i-1;let u=ru(a,s.tabSize),c=u%Pp(s)||Pp(s);for(let f=0;f<c&&a[a.length-1-f]==" ";f++)i--;l=i}else l=wn(o.text,i-o.from,e,e)+o.from,l==i&&o.number!=(e?s.doc.lines:1)?l+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(l-o.from,i-o.from))&&(l=wn(o.text,l-o.from,!1,!1)+o.from);return l}),Sy=t=>BT(t,!1,!0),$T=t=>BT(t,!0,!1),zT=(t,e)=>Qf(t,n=>{let r=n.head,{state:i}=t,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let a=null;;){if(r==(e?s.to:s.from)){r==n.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=wn(s.text,r-s.from,e)+s.from,u=s.text.slice(Math.min(r,l)-s.from,Math.max(r,l)-s.from),c=o(u);if(a!=null&&c!=a)break;(u!=" "||r!=n.head)&&(a=c),r=l}return r}),jT=t=>zT(t,!1),DJ=t=>zT(t,!0),kJ=t=>Qf(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),OJ=t=>Qf(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),TJ=t=>Qf(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),IJ=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ze.of(["",""])},range:Y.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},PJ=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,s=t.doc.lineAt(i),o=i==s.from?i-1:wn(s.text,i-s.from,!1)+s.from,a=i==s.to?i+1:wn(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(o,i))},range:Y.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Im(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),s=t.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=t.doc.lineAt(r.to-1)),n>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return e}function VT(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let s of Im(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),a=o.length+1;if(n){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let l of s.ranges)i.push(Y.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let l of s.ranges)i.push(Y.range(l.anchor-a,l.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:Y.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const RJ=({state:t,dispatch:e})=>VT(t,e,!1),NJ=({state:t,dispatch:e})=>VT(t,e,!0);function UT(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of Im(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const MJ=({state:t,dispatch:e})=>UT(t,e,!1),FJ=({state:t,dispatch:e})=>UT(t,e,!0),LJ=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Im(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=mu(e.selection,i=>{let s;if(t.lineWrapping){let o=t.lineBlockAt(i.head),a=t.coordsAtPos(i.head,i.assoc||1);a&&(s=o.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,s)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function BJ(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=tn(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(Ve.closedBy))&&s.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const f_=HT(!1),$J=HT(!0);function HT(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,a=e.doc.lineAt(s),l=!t&&s==o&&BJ(e,s);t&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let u=new Q0(e,{simulateBreak:s,simulateDoubleBreak:!!l}),c=Rv(u,s);for(c==null&&(c=ru(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<a.to&&/\s/.test(a.text[o-a.from]);)o++;l?{from:s,to:o}=l:s>a.from&&s<a.from+100&&!/\S/.test(a.text.slice(0,s))&&(s=a.from);let f=["",Hc(e,c)];return l&&f.push(Hc(e,u.lineIndent(a.from,-1))),{changes:{from:s,to:o,insert:Ze.of(f)},range:Y.cursor(s+1+f[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function P2(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let a=t.doc.lineAt(o);a.number>n&&(r.empty||r.to>a.from)&&(e(a,i,r),n=a.number),o=a.to+1}let s=t.changes(i);return{changes:i,range:Y.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const zJ=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Q0(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),i=P2(t,(s,o,a)=>{let l=Rv(r,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let u=/^\s*/.exec(s.text)[0],c=Hc(t,l);(u!=c||a.from<s.from+u.length)&&(n[s.from]=l,o.push({from:s.from,to:s.from+u.length,insert:c}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},qT=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(P2(t,(n,r)=>{r.push({from:n.from,insert:t.facet($f)})}),{userEvent:"input.indent"})),!0),GT=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(P2(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let s=ru(i,t.tabSize),o=0,a=Hc(t,Math.max(0,s-Pp(t)));for(;o<i.length&&o<a.length&&i.charCodeAt(o)==a.charCodeAt(o);)o++;r.push({from:n.from+o,to:n.from+i.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),jJ=t=>(t.setTabFocusMode(),!0),VJ=[{key:"Ctrl-b",run:ST,shift:TT,preventDefault:!0},{key:"Ctrl-f",run:ET,shift:IT},{key:"Ctrl-p",run:CT,shift:NT},{key:"Ctrl-n",run:AT,shift:MT},{key:"Ctrl-a",run:aJ,shift:vJ},{key:"Ctrl-e",run:lJ,shift:xJ},{key:"Ctrl-d",run:$T},{key:"Ctrl-h",run:Sy},{key:"Ctrl-k",run:kJ},{key:"Ctrl-Alt-h",run:jT},{key:"Ctrl-o",run:IJ},{key:"Ctrl-t",run:PJ},{key:"Ctrl-v",run:xy}],UJ=[{key:"ArrowLeft",run:ST,shift:TT,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:ZY,shift:fJ,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:sJ,shift:bJ,preventDefault:!0},{key:"ArrowRight",run:ET,shift:IT,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:QY,shift:dJ,preventDefault:!0},{mac:"Cmd-ArrowRight",run:oJ,shift:yJ,preventDefault:!0},{key:"ArrowUp",run:CT,shift:NT,preventDefault:!0},{mac:"Cmd-ArrowUp",run:a_,shift:u_},{mac:"Ctrl-ArrowUp",run:i_,shift:s_},{key:"ArrowDown",run:AT,shift:MT,preventDefault:!0},{mac:"Cmd-ArrowDown",run:l_,shift:c_},{mac:"Ctrl-ArrowDown",run:xy,shift:o_},{key:"PageUp",run:i_,shift:s_},{key:"PageDown",run:xy,shift:o_},{key:"Home",run:iJ,shift:gJ,preventDefault:!0},{key:"Mod-Home",run:a_,shift:u_},{key:"End",run:rJ,shift:mJ,preventDefault:!0},{key:"Mod-End",run:l_,shift:c_},{key:"Enter",run:f_,shift:f_},{key:"Mod-a",run:SJ},{key:"Backspace",run:Sy,shift:Sy,preventDefault:!0},{key:"Delete",run:$T,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:jT,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:DJ,preventDefault:!0},{mac:"Mod-Backspace",run:OJ,preventDefault:!0},{mac:"Mod-Delete",run:TJ,preventDefault:!0}].concat(VJ.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),HJ=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:tJ,shift:hJ},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:nJ,shift:pJ},{key:"Alt-ArrowUp",run:RJ},{key:"Shift-Alt-ArrowUp",run:MJ},{key:"Alt-ArrowDown",run:NJ},{key:"Shift-Alt-ArrowDown",run:FJ},{key:"Mod-Alt-ArrowUp",run:_J},{key:"Mod-Alt-ArrowDown",run:CJ},{key:"Escape",run:AJ},{key:"Mod-Enter",run:$J},{key:"Alt-l",mac:"Ctrl-l",run:EJ},{key:"Mod-i",run:wJ,preventDefault:!0},{key:"Mod-[",run:GT},{key:"Mod-]",run:qT},{key:"Mod-Alt-\\",run:zJ},{key:"Shift-Mod-k",run:LJ},{key:"Shift-Mod-\\",run:cJ},{key:"Mod-/",run:RY},{key:"Alt-A",run:MY},{key:"Ctrl-m",mac:"Shift-Alt-m",run:jJ}].concat(UJ),qJ={key:"Tab",run:qT,shift:GT},d_=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class zl{constructor(e,n,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?a=>s(d_(a)):d_,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ir(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=hv(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Di(e);let i=this.normalize(n);if(i.length)for(let s=0,o=r;;s++){let a=i.charCodeAt(s),l=this.match(a,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(l)return this.value=l,this;break}o==r&&s<n.length&&n.charCodeAt(s)==a&&o++}}}match(e,n,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],a=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,a=!0)),a||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(zl.prototype[Symbol.iterator]=function(){return this});const WT={from:-1,to:-1,match:/.*/.exec("")},R2="gm"+(/x/.unicode==null?"":"u");class KT{constructor(e,n,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=WT,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new XT(e,n,r,i,s);this.re=new RegExp(n,R2+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=c0(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=c0(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const g1=new WeakMap;class Sl{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=g1.get(e);if(!i||i.from>=r||i.to<=n){let a=new Sl(n,e.sliceString(n,r));return g1.set(e,a),a}if(i.from==n&&i.to==r)return i;let{text:s,from:o}=i;return o>n&&(s=e.sliceString(n,o)+s,o=n),i.to<r&&(s+=e.sliceString(i.to,r)),g1.set(e,new Sl(o,s)),new Sl(n,s.slice(n-o,r-o))}}class XT{constructor(e,n,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=WT,this.matchPos=c0(e,i),this.re=new RegExp(n,R2+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=Sl.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=c0(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Sl.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(KT.prototype[Symbol.iterator]=XT.prototype[Symbol.iterator]=function(){return this});function GJ(t){try{return new RegExp(t,R2),!0}catch{return!1}}function c0(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function Ey(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=ct("input",{class:"cm-textfield",name:"line",value:e}),r=ct("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),t.dispatch({effects:vc.of(!1)}),t.focus()):s.keyCode==13&&(s.preventDefault(),i())},onsubmit:s=>{s.preventDefault(),i()}},ct("label",t.state.phrase("Go to line"),": ",n)," ",ct("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),ct("button",{name:"close",onclick:()=>{t.dispatch({effects:vc.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function i(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!s)return;let{state:o}=t,a=o.doc.lineAt(o.selection.main.head),[,l,u,c,f]=s,d=c?+c.slice(1):0,h=u?+u:a.number;if(u&&f){let g=h/100;l&&(g=g*(l=="-"?-1:1)+a.number/o.doc.lines),h=Math.round(o.doc.lines*g)}else u&&l&&(h=h*(l=="-"?-1:1)+a.number);let p=o.doc.line(Math.max(1,Math.min(o.doc.lines,h))),m=Y.cursor(p.from+Math.max(0,Math.min(d,p.length)));t.dispatch({effects:[vc.of(!1),ce.scrollIntoView(m.from,{y:"center"})],selection:m}),t.focus()}return{dom:r}}const vc=De.define(),h_=Wt.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(vc)&&(t=n.value);return t},provide:t=>jc.from(t,e=>e?Ey:null)}),WJ=t=>{let e=zc(t,Ey);if(!e){let n=[vc.of(!0)];t.state.field(h_,!1)==null&&n.push(De.appendConfig.of([h_,KJ])),t.dispatch({effects:n}),e=zc(t,Ey)}return e&&e.dom.querySelector("input").select(),!0},KJ=ce.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),XJ={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},YJ=he.define({combine(t){return fi(t,XJ,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function JJ(t){return[nZ,tZ]}const ZJ=ve.mark({class:"cm-selectionMatch"}),QJ=ve.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function p_(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=kt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=kt.Word)}function eZ(t,e,n,r){return t(e.sliceDoc(n,n+1))==kt.Word&&t(e.sliceDoc(r-1,r))==kt.Word}const tZ=$t.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(YJ),{state:n}=t,r=n.selection;if(r.ranges.length>1)return ve.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return ve.none;let l=n.wordAt(i.head);if(!l)return ve.none;o=n.charCategorizer(i.head),s=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return ve.none;if(e.wholeWords){if(s=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(p_(o,n,i.from,i.to)&&eZ(o,n,i.from,i.to)))return ve.none}else if(s=n.sliceDoc(i.from,i.to),!s)return ve.none}let a=[];for(let l of t.visibleRanges){let u=new zl(n.doc,s,l.from,l.to);for(;!u.next().done;){let{from:c,to:f}=u.value;if((!o||p_(o,n,c,f))&&(i.empty&&c<=i.from&&f>=i.to?a.push(QJ.range(c,f)):(c>=i.to||f<=i.from)&&a.push(ZJ.range(c,f)),a.length>e.maxMatches))return ve.none}}return ve.set(a)}},{decorations:t=>t.decorations}),nZ=ce.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),rZ=({state:t,dispatch:e})=>{let{selection:n}=t,r=Y.create(n.ranges.map(i=>t.wordAt(i.head)||Y.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function iZ(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),s=i&&i.from==n.from&&i.to==n.to;for(let o=!1,a=new zl(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new zl(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(l=>l.from==a.value.from))continue;if(s){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const sZ=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return rZ({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=r))return!1;let i=iZ(t,r);return i?(e(t.update({selection:t.selection.addRange(Y.range(i.from,i.to),!1),effects:ce.scrollIntoView(i.to)})),!0):!1},gu=he.define({combine(t){return fi(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new bZ(e),scrollToMatch:e=>ce.scrollIntoView(e)})}});class YT{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||GJ(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new uZ(this):new aZ(this)}getCursor(e,n=0,r){let i=e.doc?e:Ue.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Xa(this,i,n,r):Ka(this,i,n,r)}}class JT{constructor(e){this.spec=e}}function Ka(t,e,n,r){return new zl(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?oZ(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function oZ(t,e){return(n,r,i,s)=>((s>n||s+i.length<r)&&(s=Math.max(0,n-2),i=t.sliceString(s,Math.min(t.length,r+2))),(e(f0(i,n-s))!=kt.Word||e(d0(i,n-s))!=kt.Word)&&(e(d0(i,r-s))!=kt.Word||e(f0(i,r-s))!=kt.Word))}class aZ extends JT{constructor(e){super(e)}nextMatch(e,n,r){let i=Ka(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,n+this.spec.unquoted.length);i=Ka(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let s=Math.max(n,i-1e4-this.spec.unquoted.length),o=Ka(this.spec,e,s,i),a=null;for(;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(s==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=Ka(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=Ka(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function Xa(t,e,n,r){return new KT(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?lZ(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function f0(t,e){return t.slice(wn(t,e,!1),e)}function d0(t,e){return t.slice(e,wn(t,e))}function lZ(t){return(e,n,r)=>!r[0].length||(t(f0(r.input,r.index))!=kt.Word||t(d0(r.input,r.index))!=kt.Word)&&(t(d0(r.input,r.index+r[0].length))!=kt.Word||t(f0(r.input,r.index+r[0].length))!=kt.Word)}class uZ extends JT{nextMatch(e,n,r){let i=Xa(this.spec,e,r,e.doc.length).next();return i.done&&(i=Xa(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let s=Math.max(n,r-i*1e4),o=Xa(this.spec,e,s,r),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==n||a.from>s+10))return a;if(s==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let s=+r.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+r.slice(i)}return n})}matchAll(e,n){let r=Xa(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=Xa(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const cf=De.define(),N2=De.define(),so=Wt.define({create(t){return new b1(wy(t).create(),null)},update(t,e){for(let n of e.effects)n.is(cf)?t=new b1(n.value.create(),t.panel):n.is(N2)&&(t=new b1(t.query,n.value?M2:null));return t},provide:t=>jc.from(t,e=>e.panel)});class b1{constructor(e,n){this.query=e,this.panel=n}}const cZ=ve.mark({class:"cm-searchMatch"}),fZ=ve.mark({class:"cm-searchMatch cm-searchMatch-selected"}),dZ=$t.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(so))}update(t){let e=t.state.field(so);(e!=t.startState.field(so)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return ve.none;let{view:n}=this,r=new _s;for(let i=0,s=n.visibleRanges,o=s.length;i<o;i++){let{from:a,to:l}=s[i];for(;i<o-1&&l>s[i+1].from-500;)l=s[++i].to;t.highlight(n.state,a,l,(u,c)=>{let f=n.state.selection.ranges.some(d=>d.from==u&&d.to==c);r.add(u,c,f?fZ:cZ)})}return r.finish()}},{decorations:t=>t.decorations});function ed(t){return e=>{let n=e.state.field(so,!1);return n&&n.query.spec.valid?t(e,n):e8(e)}}const h0=ed((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=Y.single(r.from,r.to),s=t.state.facet(gu);return t.dispatch({selection:i,effects:[F2(t,r),s.scrollToMatch(i.main,t)],userEvent:"select.search"}),QT(t),!0}),p0=ed((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let s=Y.single(i.from,i.to),o=t.state.facet(gu);return t.dispatch({selection:s,effects:[F2(t,i),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),QT(t),!0}),hZ=ed((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Y.create(n.map(r=>Y.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),pZ=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,s=[],o=0;for(let a=new zl(t.doc,t.sliceDoc(r,i));!a.next().done;){if(s.length>1e3)return!1;a.value.from==r&&(o=s.length),s.push(Y.range(a.value.from,a.value.to))}return e(t.update({selection:Y.create(s,o),userEvent:"select.search.matches"})),!0},m_=ed((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,r,r);if(!s)return!1;let o=s,a=[],l,u,c=[];o.from==r&&o.to==i&&(u=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:u}),o=e.nextMatch(n,o.from,o.to),c.push(ce.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let f=t.state.changes(a);return o&&(l=Y.single(o.from,o.to).map(f),c.push(F2(t,o)),c.push(n.facet(gu).scrollToMatch(l.main,t))),t.dispatch({changes:f,selection:l,effects:c,userEvent:"input.replace"}),!0}),mZ=ed((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ce.announce.of(r),userEvent:"input.replace.all"}),!0});function M2(t){return t.state.facet(gu).createPanel(t)}function wy(t,e){var n,r,i,s,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let u=t.facet(gu);return new YT({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:u.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:u.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:u.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:u.wholeWord})}function ZT(t){let e=zc(t,M2);return e&&e.dom.querySelector("[main-field]")}function QT(t){let e=ZT(t);e&&e==t.root.activeElement&&e.select()}const e8=t=>{let e=t.state.field(so,!1);if(e&&e.panel){let n=ZT(t);if(n&&n!=t.root.activeElement){let r=wy(t.state,e.query.spec);r.valid&&t.dispatch({effects:cf.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[N2.of(!0),e?cf.of(wy(t.state,e.query.spec)):De.appendConfig.of(vZ)]});return!0},t8=t=>{let e=t.state.field(so,!1);if(!e||!e.panel)return!1;let n=zc(t,M2);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:N2.of(!1)}),!0},gZ=[{key:"Mod-f",run:e8,scope:"editor search-panel"},{key:"F3",run:h0,shift:p0,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:h0,shift:p0,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:t8,scope:"editor search-panel"},{key:"Mod-Shift-l",run:pZ},{key:"Mod-Alt-g",run:WJ},{key:"Mod-d",run:sZ,preventDefault:!0}];class bZ{constructor(e){this.view=e;let n=this.query=e.state.field(so).query.spec;this.commit=this.commit.bind(this),this.searchField=ct("input",{value:n.search,placeholder:mr(e,"Find"),"aria-label":mr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ct("input",{value:n.replace,placeholder:mr(e,"Replace"),"aria-label":mr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ct("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=ct("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=ct("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,s,o){return ct("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=ct("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>h0(e),[mr(e,"next")]),r("prev",()=>p0(e),[mr(e,"previous")]),r("select",()=>hZ(e),[mr(e,"all")]),ct("label",null,[this.caseField,mr(e,"match case")]),ct("label",null,[this.reField,mr(e,"regexp")]),ct("label",null,[this.wordField,mr(e,"by word")]),...e.state.readOnly?[]:[ct("br"),this.replaceField,r("replace",()=>m_(e),[mr(e,"replace")]),r("replaceAll",()=>mZ(e),[mr(e,"replace all")])],ct("button",{name:"close",onclick:()=>t8(e),"aria-label":mr(e,"close"),type:"button"},["×"])])}commit(){let e=new YT({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:cf.of(e)}))}keydown(e){ML(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?p0:h0)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),m_(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(cf)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(gu).top}}function mr(t,e){return t.state.phrase(e)}const sh=30,oh=/[\s\.,:;?!]/;function F2(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,s=Math.max(r.from,e-sh),o=Math.min(i,n+sh),a=t.state.sliceDoc(s,o);if(s!=r.from){for(let l=0;l<sh;l++)if(!oh.test(a[l+1])&&oh.test(a[l])){a=a.slice(l);break}}if(o!=i){for(let l=a.length-1;l>a.length-sh;l--)if(!oh.test(a[l-1])&&oh.test(a[l])){a=a.slice(0,l);break}}return ce.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const yZ=ce.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),vZ=[so,Ao.low(dZ),yZ],xZ=[PB(),MB(),ZL(),VY(),s7(),jL(),GL(),Ue.allowMultipleSelections.of(!0),q$(),a7(c7,{fallback:!0}),b7(),cz(),Sz(),dB(),mB(),iB(),JJ(),Lf.of([...pz,...HJ,...gZ,...JY,...t7,...p3,...jB])];/*!
* VueCodemirror v6.1.1
* Copyright (c) Surmon. All rights reserved.
* Released under the MIT License.
* Surmon
*/var SZ=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[xZ]}),EZ=Symbol("vue-codemirror-global-config"),Vn,wZ=function(t){var e=t.onUpdate,n=t.onChange,r=t.onFocus,i=t.onBlur,s=(function(o,a){var l={};for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&a.indexOf(u)<0&&(l[u]=o[u]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function"){var c=0;for(u=Object.getOwnPropertySymbols(o);c<u.length;c++)a.indexOf(u[c])<0&&Object.prototype.propertyIsEnumerable.call(o,u[c])&&(l[u[c]]=o[u[c]])}return l})(t,["onUpdate","onChange","onFocus","onBlur"]);return Ue.create({doc:s.doc,selection:s.selection,extensions:(Array.isArray(s.extensions)?s.extensions:[s.extensions]).concat([ce.updateListener.of((function(o){e(o),o.docChanged&&n(o.state.doc.toString(),o),o.focusChanged&&(o.view.hasFocus?r(o):i(o))}))])})},Ya=function(t){var e=new Pf;return{compartment:e,run:function(n){e.get(t.state)?t.dispatch({effects:e.reconfigure(n)}):t.dispatch({effects:De.appendConfig.of(e.of(n))})}}},g_=function(t,e){var n=Ya(t),r=n.compartment,i=n.run;return function(s){var o=r.get(t.state);i(s??o!==e?e:[])}},ah={type:Boolean,default:void 0},_Z={autofocus:ah,disabled:ah,indentWithTab:ah,tabSize:Number,placeholder:String,style:Object,autoDestroy:ah,phrases:Object,root:Object,extensions:Array,selection:Object},CZ={modelValue:{type:String,default:""}},AZ=Object.assign(Object.assign({},_Z),CZ);(function(t){t.Change="change",t.Update="update",t.Focus="focus",t.Blur="blur",t.Ready="ready",t.ModelUpdate="update:modelValue"})(Vn||(Vn={}));var jo={};jo[Vn.Change]=function(t,e){return!0},jo[Vn.Update]=function(t){return!0},jo[Vn.Focus]=function(t){return!0},jo[Vn.Blur]=function(t){return!0},jo[Vn.Ready]=function(t){return!0};var n8={};n8[Vn.ModelUpdate]=jo[Vn.Change];var DZ=Object.assign(Object.assign({},jo),n8),kZ=z({name:"VueCodemirror",props:Object.assign({},AZ),emits:Object.assign({},DZ),setup:function(t,e){var n=ag(),r=ag(),i=ag(),s=Object.assign(Object.assign({},SZ),Jy(EZ,{})),o=q((function(){var a={};return Object.keys(qI(t)).forEach((function(l){var u;l!=="modelValue"&&(a[l]=(u=t[l])!==null&&u!==void 0?u:s[l])})),a}));return gn((function(){var a;r.value=wZ({doc:t.modelValue,selection:o.value.selection,extensions:(a=s.extensions)!==null&&a!==void 0?a:[],onFocus:function(u){return e.emit(Vn.Focus,u)},onBlur:function(u){return e.emit(Vn.Blur,u)},onUpdate:function(u){return e.emit(Vn.Update,u)},onChange:function(u,c){u!==t.modelValue&&(e.emit(Vn.Change,u,c),e.emit(Vn.ModelUpdate,u,c))}}),i.value=(function(u){return new ce(Object.assign({},u))})({state:r.value,parent:n.value,root:o.value.root});var l=(function(u){var c=function(){return u.state.doc.toString()},f=Ya(u).run,d=g_(u,[ce.editable.of(!1),Ue.readOnly.of(!0)]),h=g_(u,Lf.of([qJ])),p=Ya(u).run,m=Ya(u).run,g=Ya(u).run,b=Ya(u).run;return{focus:function(){return u.focus()},getDoc:c,setDoc:function(y){y!==c()&&u.dispatch({changes:{from:0,to:u.state.doc.length,insert:y}})},reExtensions:f,toggleDisabled:d,toggleIndentWithTab:h,setTabSize:function(y){p([Ue.tabSize.of(y),$f.of(" ".repeat(y))])},setPhrases:function(y){m([Ue.phrases.of(y)])},setPlaceholder:function(y){g(lB(y))},setStyle:function(y){y===void 0&&(y={}),b(ce.theme({"&":Object.assign({},y)}))}}})(i.value);nt((function(){return t.modelValue}),(function(u){u!==l.getDoc()&&l.setDoc(u)})),nt((function(){return t.extensions}),(function(u){return l.reExtensions(u||[])}),{immediate:!0}),nt((function(){return o.value.disabled}),(function(u){return l.toggleDisabled(u)}),{immediate:!0}),nt((function(){return o.value.indentWithTab}),(function(u){return l.toggleIndentWithTab(u)}),{immediate:!0}),nt((function(){return o.value.tabSize}),(function(u){return l.setTabSize(u)}),{immediate:!0}),nt((function(){return o.value.phrases}),(function(u){return l.setPhrases(u||{})}),{immediate:!0}),nt((function(){return o.value.placeholder}),(function(u){return l.setPlaceholder(u)}),{immediate:!0}),nt((function(){return o.value.style}),(function(u){return l.setStyle(u)}),{immediate:!0}),o.value.autofocus&&l.focus(),e.emit(Vn.Ready,{state:r.value,view:i.value,container:n.value})})),GI((function(){o.value.autoDestroy&&i.value&&(function(a){a.destroy()})(i.value)})),function(){return WI("div",{class:"v-codemirror",style:{display:"contents"},ref:n})}}}),OZ=kZ;const Pm=z({__name:"CodeEditor",props:Da({class:{default:""},placeholder:{default:"Payload..."},language:{},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},validationSchema:{default:void 0},autoHeight:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},{modelValue:{default:()=>""},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=Ki(t,"modelValue"),r=q(()=>e.language==="json"?IY(e.readonly,e.validationSchema):PY(e.readonly)),i=s=>{n.value=s};return(s,o)=>(T(),L(v(OZ),{placeholder:t.placeholder,style:_o({height:t.autoHeight?"auto":"100%",minHeight:"100%"}),extensions:r.value,"indent-with-tab":!0,"tab-size":4,"model-value":n.value,disabled:t.disabled,onChange:i},null,8,["placeholder","style","extensions","model-value","disabled"]))}}),TZ=z({__name:"RequestBodyJson",props:Da({schema:{}},{modelValue:{default:()=>""},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=Ki(t,"modelValue");return(n,r)=>(T(),L(Pm,{modelValue:e.value,"onUpdate:modelValue":r[0]||(r[0]=i=>e.value=i),language:"json",readonly:!1,placeholder:"Your JSON Payload","validation-schema":t.schema},null,8,["modelValue","validation-schema"]))}}),IZ=z({__name:"RequestBodyPlainText",setup(t){return(e,n)=>(T(),L(Pm,{language:"plain",readonly:!1,placeholder:"Your Plain Text Content"}))}}),PZ=z({__name:"RequestBodyContent",props:{payloadType:{},payload:{},schema:{}},emits:["update:payload"],setup(t,{emit:e}){const n=e,r=i=>{n("update:payload",i)};return(i,s)=>(T(),L(v(If),{class:"min-h-0 w-full flex-1"},{default:D(()=>[t.payloadType===v(Or).JSON?(T(),L(TZ,{key:0,"model-value":t.payload,schema:t.schema,"onUpdate:modelValue":r},null,8,["model-value","schema"])):t.payloadType===v(Or).FORM_DATA?(T(),L(NF,{key:1,"model-value":t.payload,"onUpdate:modelValue":r},null,8,["model-value"])):t.payloadType===v(Or).PLAIN_TEXT?(T(),L(IZ,{key:2,"model-value":t.payload,"onUpdate:modelValue":r},null,8,["model-value"])):(T(),L(FF,{key:3,"onUpdate:modelValue":r}))]),_:1}))}}),RZ={class:"flex min-h-0 flex-1 flex-col"},NZ=z({__name:"RequestBody",setup(t){const e=Rr(),n=lv(),{payloadType:r,payload:i,pendingRequestData:s,supportsAutoFill:o,autofill:a,types:l}=aF(),u=q(()=>{var h;return(h=e.pendingRequestData)==null?void 0:h.routeDefinition}),c=q(()=>u.value?n.isMissingImplementation(u.value):!1),f=q(()=>c.value),d=q(function(){var p;const h=(p=e.pendingRequestData)==null?void 0:p.routeDefinition;return h?n.isUndocumented(h):!1});return(h,p)=>{var m,g,b,y,x,S;return T(),K("div",RZ,[k(Oa,{class:"border-b"},{toolbox:D(()=>[k(v(LZ),{disabled:!v(o),onClick:v(a)},null,8,["disabled","onClick"])]),default:D(()=>[k(v($Z),{modelValue:v(r),"onUpdate:modelValue":p[0]||(p[0]=E=>_l(r)?r.value=E:null),types:v(l)},null,8,["modelValue","types"])]),_:1}),f.value?(T(),L(bF,{key:0})):we("",!0),d.value?(T(),L(CF,{key:1})):we("",!0),((g=(m=v(s))==null?void 0:m.schema)==null?void 0:g.extractionErrors)!=null?(T(),L(PF,{key:2,"extraction-error":(y=(b=v(s))==null?void 0:b.schema)==null?void 0:y.extractionErrors},null,8,["extraction-error"])):we("",!0),k(PZ,{"payload-type":v(r),payload:v(i),schema:(S=(x=v(s))==null?void 0:x.schema)==null?void 0:S.shape,"onUpdate:payload":p[1]||(p[1]=E=>i.value=E)},null,8,["payload-type","payload","schema"])])}}}),MZ=z({__name:"AppBorderBeam",props:{class:{default:""},size:{default:200},duration:{default:15e3},borderWidth:{default:1.5},anchor:{default:10},colorFrom:{default:"#ffaa40"},colorTo:{default:"#9c40ff"},delay:{default:0}},setup(t){HC(i=>({v72a84cbc:i.size,v46fc34ea:n.value,v4b4cecb0:i.anchor,v55e45fdf:i.borderWidth,v4557a1d2:i.colorFrom,eb57faba:i.colorTo,v01f91a52:r.value}));const e=t,n=q(()=>`${e.duration}s`),r=q(()=>`${e.delay}s`);return(i,s)=>(T(),K("div",{class:Se(v(ke)("border-beam","pointer-events-none absolute inset-0 rounded-[inherit] [border:calc(var(--border-width)*1px)_solid_transparent]","![mask-composite:intersect] ![mask-clip:padding-box,border-box] [mask:linear-gradient(transparent,transparent),linear-gradient(white,white)]","animate-border-beam after:absolute after:aspect-square after:w-[calc(var(--size)*1px)] after:[animation-delay:var(--delay)] after:[background:linear-gradient(to_left,var(--color-from),var(--color-to),transparent)] after:[offset-anchor:calc(var(--anchor)*1%)_50%] after:[offset-path:rect(0_auto_auto_0_round_calc(var(--size)*1px))]",e.class))},null,2))}}),Rm=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},FZ=Rm(MZ,[["__scopeId","data-v-5b422e07"]]),r8=z({__name:"AppGlowingButton",props:{duration:{default:10},beamSize:{default:200},variant:{default:"secondary"},size:{default:"xs"},class:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(T(),L(v(gt),{size:t.size,variant:t.variant,class:Se(v(ke)("group relative",e.class))},{default:D(()=>[k(FZ,{size:t.beamSize,duration:t.duration,delay:0,"border-width":1,class:"group-disabled:hidden"},null,8,["size","duration"]),Q(n.$slots,"default")]),_:3},8,["size","variant","class"]))}}),LZ=z({__name:"RequestBodyAutoFillButton",setup(t){return(e,n)=>(T(),L(r8,null,{default:D(()=>[k(v(BN),{class:"transition-all will-change-transform group-hover:rotate-12"}),n[0]||(n[0]=ne(" Auto Fill ",-1))]),_:1}))}}),BZ={class:"flex items-center"},$Z=z({__name:"RequestBodySelector",props:Da({types:{}},{modelValue:{default:()=>""},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=Ki(t,"modelValue");return(r,i)=>(T(),K("div",BZ,[i[1]||(i[1]=M("span",{class:"text-subtle-foreground w-[80px] text-xs"},"Payload Type:",-1)),k(v(tu),{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s)},{default:D(()=>[k(v(Zl),{variant:"toolbar",class:"min-w-[120px] text-xs"},{default:D(()=>[k(v(Ql))]),_:1}),k(v(eu),null,{default:D(()=>[(T(!0),K(Qe,null,_n(e.types,s=>(T(),L(v(Es),{key:s.id,value:s.id},{default:D(()=>[ne(de(s.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"])]))}});function zZ(t){const{endpoint:e}=t,n=Z([]),r=p=>{const m=p.split("/"),g=[];return m.forEach((b,y)=>{b.startsWith("{")&&b.endsWith("}")&&g.push(y)}),g},i=p=>p==="{",s=p=>p==="}",o=(p,m)=>{for(let g=m;g>=0;g--){if(i(p[g]))return g;if(s(p[g]))return-1}return-1},a=(p,m)=>{for(let g=m;g<p.length;g++){if(s(p[g]))return g+1;if(i(p[g]))return-1}return-1},l=(p,m)=>{const g=o(p,m);if(g===-1)return null;const b=a(p,m);return b===-1?null:{start:g,end:b}},u=(p,m)=>{const g=p.split("/");let b=0;for(let y=0;y<g.length;y++){const x=g[y].length,S=b,E=b+x;if(m>=S&&m<=E)return y;b+=x+1}return null},c=(p,m)=>{const g=p.split("/");if(m>=g.length)return null;let b=0;for(let y=0;y<m;y++)b+=g[y].length+1;return{start:b,end:b+g[m].length}},f=(p,m)=>{const g=u(p,m);return g===null||!n.value.includes(g)?null:c(p,g)},d=(p,m)=>{kr(()=>{p.setSelectionRange(m.start,m.end)})},h=p=>{const m=p.target;if(!m||m.selectionStart===null)return;const g=m.selectionStart,b=m.value,y=l(b,g);if(y){d(m,y);return}const x=f(b,g);x&&d(m,x)};return nt(e,p=>{(p==null?void 0:p.includes("{"))&&(n.value=r(p))},{immediate:!0}),{handleClick:h,identifyVariableSegments:r,variableSegmentIndices:kc(n)}}const jZ={class:"flex flex-1 items-center"},VZ={class:"flex gap-2 pr-2"},UZ=z({__name:"RequestBuilderEndpointInput",setup(t){const e=Rr(),n=q(()=>e.pendingRequestData),r=q({get:()=>{var a;return((a=n.value)==null?void 0:a.endpoint)??""},set:a=>e.updateRequestEndpoint(a)}),{handleClick:i}=zZ({endpoint:r}),s=async function(){e.pendingRequestData&&await e.executeCurrentRequest()},o=a=>{a.key==="Enter"&&(a.preventDefault(),s())};return(a,l)=>{var u;return T(),K("div",jZ,[k(v(ws),{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),variant:"toolbar",class:"h-full flex-1 text-xs",placeholder:"<endpoint>","data-testid":"endpoint-input",onClick:v(i),onKeydown:o},null,8,["modelValue","onClick"]),M("div",VZ,[k(v(gt),{size:"xs",disabled:!n.value||((u=n.value)==null?void 0:u.isProcessing),class:"gap-0",onClick:s},{default:D(()=>[l[1]||(l[1]=ne(" Send ( ",-1)),k(v(xN),{class:"size-3 px-0"}),l[2]||(l[2]=ne(" ) ",-1))]),_:1},8,["disabled"]),Q(a.$slots,"options-menu")])])}}}),HZ=z({__name:"RequestBuilderMethodSelector",setup(t){const e=Rr(),n=["GET","POST","PUT","PATCH","DELETE"],r=q({get:()=>{var o,a;return((a=(o=e.pendingRequestData)==null?void 0:o.method)==null?void 0:a.toUpperCase())??"GET"},set:o=>e.updateRequestMethod(o.toUpperCase())}),i=q(()=>{var l;const o=(l=e.pendingRequestData)==null?void 0:l.supportedRoutes,a=(o==null?void 0:o.map(u=>u.method))??[];return n.filter(u=>a.includes(u))}),s=q(()=>n.filter(o=>!i.value.includes(o)));return(o,a)=>(T(),L(v(tu),{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l)},{default:D(()=>[k(v(Zl),{variant:"toolbar",class:"h-full w-[95px] border-r pr-1.5 pl-5 text-xs"},{default:D(()=>[k(v(Ql),{placeholder:r.value?"":"Select a Method"},{default:D(()=>[ne(de(r.value||"Select a Method"),1)]),_:1},8,["placeholder"])]),_:1}),k(v(eu),{"align-offset":2},{default:D(()=>[i.value.length?(T(),L(v(Pc),{key:0},{default:D(()=>[k(v(Rc),null,{default:D(()=>[...a[1]||(a[1]=[ne("Supported",-1)])]),_:1}),(T(!0),K(Qe,null,_n(i.value,l=>(T(),L(v(Es),{key:l,value:l},{default:D(()=>[ne(de(l),1)]),_:2},1032,["value"]))),128))]),_:1})):we("",!0),s.value.length!==0?(T(),L(v(Pc),{key:1},{default:D(()=>[i.value.length?(T(),K(Qe,{key:0},[k(v(RM)),k(v(Rc),null,{default:D(()=>[...a[2]||(a[2]=[ne("Other",-1)])]),_:1})],64)):we("",!0),(T(!0),K(Qe,null,_n(s.value,l=>(T(),L(v(Es),{key:l,value:l},{default:D(()=>[ne(de(l),1)]),_:2},1032,["value"]))),128))]),_:1})):we("",!0)]),_:1})]),_:1},8,["modelValue"]))}}),i8=z({__name:"AppDropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Yr(t,e);return(s,o)=>(T(),L(v(_5),Yn(Pr(v(i))),{default:D(()=>[Q(s.$slots,"default")]),_:3},16))}}),s8=z({__name:"AppDropdownMenuContent",props:{class:{default:""},forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=q(()=>{const{class:o,...a}=n;return a}),s=Yr(i,r);return(o,a)=>(T(),L(v(N5),null,{default:D(()=>[k(v(A5),Ce(v(s),{class:v(ke)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border border-zinc-200 bg-white p-1 text-zinc-950 shadow-md dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50",n.class)}),{default:D(()=>[Q(o.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),b_=z({__name:"AppDropdownMenuGroup",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(T(),L(v(k5),Yn(Pr(e)),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),Wh=z({__name:"AppDropdownMenuItem",props:{class:{},inset:{type:Boolean},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=q(()=>{const{class:i,...s}=e;return s}),r=P0(n);return(i,s)=>(T(),L(v(T5),Ce(v(r),{class:v(ke)("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-zinc-800 dark:focus:text-zinc-50 [&>svg]:size-4 [&>svg]:shrink-0",t.inset&&"pl-8",e.class)}),{default:D(()=>[Q(i.$slots,"default")]),_:3},16,["class"]))}}),y_=z({__name:"AppDropdownMenuLabel",props:{class:{},inset:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=q(()=>{const{class:i,...s}=e;return s}),r=P0(n);return(i,s)=>(T(),L(v(P5),Ce(v(r),{class:v(ke)("px-2 py-1.5 text-xs",t.inset&&"pl-8",e.class)}),{default:D(()=>[Q(i.$slots,"default")]),_:3},16,["class"]))}}),_y=z({__name:"AppDropdownMenuSeparator",props:{class:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=q(()=>{const{class:r,...i}=e;return i});return(r,i)=>(T(),L(v(F5),Ce(n.value,{class:v(ke)("-mx-1 my-1 h-px bg-zinc-100 dark:bg-zinc-800",e.class)}),null,16,["class"]))}}),o8=z({__name:"AppDropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const n=P0(t);return(r,i)=>(T(),L(v(B5),Ce({class:"outline-none"},v(n)),{default:D(()=>[Q(r.$slots,"default")]),_:3},16))}});/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const qZ=4,v_=0,x_=1,GZ=2;function bu(t){let e=t.length;for(;--e>=0;)t[e]=0}const WZ=0,a8=1,KZ=2,XZ=3,YZ=258,L2=29,td=256,ff=td+1+L2,El=30,B2=19,l8=2*ff+1,Qo=15,y1=16,JZ=7,$2=256,u8=16,c8=17,f8=18,Cy=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Kh=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),ZZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),d8=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),QZ=512,os=new Array((ff+2)*2);bu(os);const xc=new Array(El*2);bu(xc);const df=new Array(QZ);bu(df);const hf=new Array(YZ-XZ+1);bu(hf);const z2=new Array(L2);bu(z2);const m0=new Array(El);bu(m0);function v1(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}let h8,p8,m8;function x1(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}const g8=t=>t<256?df[t]:df[256+(t>>>7)],pf=(t,e)=>{t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255},lr=(t,e,n)=>{t.bi_valid>y1-n?(t.bi_buf|=e<<t.bi_valid&65535,pf(t,t.bi_buf),t.bi_buf=e>>y1-t.bi_valid,t.bi_valid+=n-y1):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)},Ti=(t,e,n)=>{lr(t,n[e*2],n[e*2+1])},b8=(t,e)=>{let n=0;do n|=t&1,t>>>=1,n<<=1;while(--e>0);return n>>>1},eQ=t=>{t.bi_valid===16?(pf(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},tQ=(t,e)=>{const n=e.dyn_tree,r=e.max_code,i=e.stat_desc.static_tree,s=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,l=e.stat_desc.max_length;let u,c,f,d,h,p,m=0;for(d=0;d<=Qo;d++)t.bl_count[d]=0;for(n[t.heap[t.heap_max]*2+1]=0,u=t.heap_max+1;u<l8;u++)c=t.heap[u],d=n[n[c*2+1]*2+1]+1,d>l&&(d=l,m++),n[c*2+1]=d,!(c>r)&&(t.bl_count[d]++,h=0,c>=a&&(h=o[c-a]),p=n[c*2],t.opt_len+=p*(d+h),s&&(t.static_len+=p*(i[c*2+1]+h)));if(m!==0){do{for(d=l-1;t.bl_count[d]===0;)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[l]--,m-=2}while(m>0);for(d=l;d!==0;d--)for(c=t.bl_count[d];c!==0;)f=t.heap[--u],!(f>r)&&(n[f*2+1]!==d&&(t.opt_len+=(d-n[f*2+1])*n[f*2],n[f*2+1]=d),c--)}},y8=(t,e,n)=>{const r=new Array(Qo+1);let i=0,s,o;for(s=1;s<=Qo;s++)i=i+n[s-1]<<1,r[s]=i;for(o=0;o<=e;o++){let a=t[o*2+1];a!==0&&(t[o*2]=b8(r[a]++,a))}},nQ=()=>{let t,e,n,r,i;const s=new Array(Qo+1);for(n=0,r=0;r<L2-1;r++)for(z2[r]=n,t=0;t<1<<Cy[r];t++)hf[n++]=r;for(hf[n-1]=r,i=0,r=0;r<16;r++)for(m0[r]=i,t=0;t<1<<Kh[r];t++)df[i++]=r;for(i>>=7;r<El;r++)for(m0[r]=i<<7,t=0;t<1<<Kh[r]-7;t++)df[256+i++]=r;for(e=0;e<=Qo;e++)s[e]=0;for(t=0;t<=143;)os[t*2+1]=8,t++,s[8]++;for(;t<=255;)os[t*2+1]=9,t++,s[9]++;for(;t<=279;)os[t*2+1]=7,t++,s[7]++;for(;t<=287;)os[t*2+1]=8,t++,s[8]++;for(y8(os,ff+1,s),t=0;t<El;t++)xc[t*2+1]=5,xc[t*2]=b8(t,5);h8=new v1(os,Cy,td+1,ff,Qo),p8=new v1(xc,Kh,0,El,Qo),m8=new v1(new Array(0),ZZ,0,B2,JZ)},v8=t=>{let e;for(e=0;e<ff;e++)t.dyn_ltree[e*2]=0;for(e=0;e<El;e++)t.dyn_dtree[e*2]=0;for(e=0;e<B2;e++)t.bl_tree[e*2]=0;t.dyn_ltree[$2*2]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x8=t=>{t.bi_valid>8?pf(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S_=(t,e,n,r)=>{const i=e*2,s=n*2;return t[i]<t[s]||t[i]===t[s]&&r[e]<=r[n]},S1=(t,e,n)=>{const r=t.heap[n];let i=n<<1;for(;i<=t.heap_len&&(i<t.heap_len&&S_(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!S_(e,r,t.heap[i],t.depth));)t.heap[n]=t.heap[i],n=i,i<<=1;t.heap[n]=r},E_=(t,e,n)=>{let r,i,s=0,o,a;if(t.sym_next!==0)do r=t.pending_buf[t.sym_buf+s++]&255,r+=(t.pending_buf[t.sym_buf+s++]&255)<<8,i=t.pending_buf[t.sym_buf+s++],r===0?Ti(t,i,e):(o=hf[i],Ti(t,o+td+1,e),a=Cy[o],a!==0&&(i-=z2[o],lr(t,i,a)),r--,o=g8(r),Ti(t,o,n),a=Kh[o],a!==0&&(r-=m0[o],lr(t,r,a)));while(s<t.sym_next);Ti(t,$2,e)},Ay=(t,e)=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.has_stree,s=e.stat_desc.elems;let o,a,l=-1,u;for(t.heap_len=0,t.heap_max=l8,o=0;o<s;o++)n[o*2]!==0?(t.heap[++t.heap_len]=l=o,t.depth[o]=0):n[o*2+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=l<2?++l:0,n[u*2]=1,t.depth[u]=0,t.opt_len--,i&&(t.static_len-=r[u*2+1]);for(e.max_code=l,o=t.heap_len>>1;o>=1;o--)S1(t,n,o);u=s;do o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S1(t,n,1),a=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=a,n[u*2]=n[o*2]+n[a*2],t.depth[u]=(t.depth[o]>=t.depth[a]?t.depth[o]:t.depth[a])+1,n[o*2+1]=n[a*2+1]=u,t.heap[1]=u++,S1(t,n,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],tQ(t,e),y8(n,l,t.bl_count)},w_=(t,e,n)=>{let r,i=-1,s,o=e[1],a=0,l=7,u=4;for(o===0&&(l=138,u=3),e[(n+1)*2+1]=65535,r=0;r<=n;r++)s=o,o=e[(r+1)*2+1],!(++a<l&&s===o)&&(a<u?t.bl_tree[s*2]+=a:s!==0?(s!==i&&t.bl_tree[s*2]++,t.bl_tree[u8*2]++):a<=10?t.bl_tree[c8*2]++:t.bl_tree[f8*2]++,a=0,i=s,o===0?(l=138,u=3):s===o?(l=6,u=3):(l=7,u=4))},__=(t,e,n)=>{let r,i=-1,s,o=e[1],a=0,l=7,u=4;for(o===0&&(l=138,u=3),r=0;r<=n;r++)if(s=o,o=e[(r+1)*2+1],!(++a<l&&s===o)){if(a<u)do Ti(t,s,t.bl_tree);while(--a!==0);else s!==0?(s!==i&&(Ti(t,s,t.bl_tree),a--),Ti(t,u8,t.bl_tree),lr(t,a-3,2)):a<=10?(Ti(t,c8,t.bl_tree),lr(t,a-3,3)):(Ti(t,f8,t.bl_tree),lr(t,a-11,7));a=0,i=s,o===0?(l=138,u=3):s===o?(l=6,u=3):(l=7,u=4)}},rQ=t=>{let e;for(w_(t,t.dyn_ltree,t.l_desc.max_code),w_(t,t.dyn_dtree,t.d_desc.max_code),Ay(t,t.bl_desc),e=B2-1;e>=3&&t.bl_tree[d8[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e},iQ=(t,e,n,r)=>{let i;for(lr(t,e-257,5),lr(t,n-1,5),lr(t,r-4,4),i=0;i<r;i++)lr(t,t.bl_tree[d8[i]*2+1],3);__(t,t.dyn_ltree,e-1),__(t,t.dyn_dtree,n-1)},sQ=t=>{let e=4093624447,n;for(n=0;n<=31;n++,e>>>=1)if(e&1&&t.dyn_ltree[n*2]!==0)return v_;if(t.dyn_ltree[18]!==0||t.dyn_ltree[20]!==0||t.dyn_ltree[26]!==0)return x_;for(n=32;n<td;n++)if(t.dyn_ltree[n*2]!==0)return x_;return v_};let C_=!1;const oQ=t=>{C_||(nQ(),C_=!0),t.l_desc=new x1(t.dyn_ltree,h8),t.d_desc=new x1(t.dyn_dtree,p8),t.bl_desc=new x1(t.bl_tree,m8),t.bi_buf=0,t.bi_valid=0,v8(t)},S8=(t,e,n,r)=>{lr(t,(WZ<<1)+(r?1:0),3),x8(t),pf(t,n),pf(t,~n),n&&t.pending_buf.set(t.window.subarray(e,e+n),t.pending),t.pending+=n},aQ=t=>{lr(t,a8<<1,3),Ti(t,$2,os),eQ(t)},lQ=(t,e,n,r)=>{let i,s,o=0;t.level>0?(t.strm.data_type===GZ&&(t.strm.data_type=sQ(t)),Ay(t,t.l_desc),Ay(t,t.d_desc),o=rQ(t),i=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&e!==-1?S8(t,e,n,r):t.strategy===qZ||s===i?(lr(t,(a8<<1)+(r?1:0),3),E_(t,os,xc)):(lr(t,(KZ<<1)+(r?1:0),3),iQ(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),E_(t,t.dyn_ltree,t.dyn_dtree)),v8(t),r&&x8(t)},uQ=(t,e,n)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,e===0?t.dyn_ltree[n*2]++:(t.matches++,e--,t.dyn_ltree[(hf[n]+td+1)*2]++,t.dyn_dtree[g8(e)*2]++),t.sym_next===t.sym_end);var cQ=oQ,fQ=S8,dQ=lQ,hQ=uQ,pQ=aQ,mQ={_tr_init:cQ,_tr_stored_block:fQ,_tr_flush_block:dQ,_tr_tally:hQ,_tr_align:pQ};const gQ=(t,e,n,r)=>{let i=t&65535|0,s=t>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+e[r++]|0,s=s+i|0;while(--o);i%=65521,s%=65521}return i|s<<16|0};var mf=gQ;const bQ=()=>{let t,e=[];for(var n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e},yQ=new Uint32Array(bQ()),vQ=(t,e,n,r)=>{const i=yQ,s=r+n;t^=-1;for(let o=r;o<s;o++)t=t>>>8^i[(t^e[o])&255];return t^-1};var dn=vQ,ba={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},nd={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:xQ,_tr_stored_block:Dy,_tr_flush_block:SQ,_tr_tally:oo,_tr_align:EQ}=mQ,{Z_NO_FLUSH:ao,Z_PARTIAL_FLUSH:wQ,Z_FULL_FLUSH:_Q,Z_FINISH:Br,Z_BLOCK:A_,Z_OK:vn,Z_STREAM_END:D_,Z_STREAM_ERROR:$i,Z_DATA_ERROR:CQ,Z_BUF_ERROR:E1,Z_DEFAULT_COMPRESSION:AQ,Z_FILTERED:DQ,Z_HUFFMAN_ONLY:lh,Z_RLE:kQ,Z_FIXED:OQ,Z_DEFAULT_STRATEGY:TQ,Z_UNKNOWN:IQ,Z_DEFLATED:Nm}=nd,PQ=9,RQ=15,NQ=8,MQ=29,FQ=256,ky=FQ+1+MQ,LQ=30,BQ=19,$Q=2*ky+1,zQ=15,Ke=3,Js=258,zi=Js+Ke+1,jQ=32,jl=42,j2=57,Oy=69,Ty=73,Iy=91,Py=103,ea=113,tc=666,Gn=1,yu=2,ya=3,vu=4,VQ=3,ta=(t,e)=>(t.msg=ba[e],e),k_=t=>t*2-(t>4?9:0),Us=t=>{let e=t.length;for(;--e>=0;)t[e]=0},UQ=t=>{let e,n,r,i=t.w_size;e=t.hash_size,r=e;do n=t.head[--r],t.head[r]=n>=i?n-i:0;while(--e);e=i,r=e;do n=t.prev[--r],t.prev[r]=n>=i?n-i:0;while(--e)};let HQ=(t,e,n)=>(e<<t.hash_shift^n)&t.hash_mask,lo=HQ;const vr=t=>{const e=t.state;let n=e.pending;n>t.avail_out&&(n=t.avail_out),n!==0&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+n),t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,e.pending===0&&(e.pending_out=0))},Ar=(t,e)=>{SQ(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,vr(t.strm)},st=(t,e)=>{t.pending_buf[t.pending++]=e},ju=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255},Ry=(t,e,n,r)=>{let i=t.avail_in;return i>r&&(i=r),i===0?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),n),t.state.wrap===1?t.adler=mf(t.adler,e,i,n):t.state.wrap===2&&(t.adler=dn(t.adler,e,i,n)),t.next_in+=i,t.total_in+=i,i)},E8=(t,e)=>{let n=t.max_chain_length,r=t.strstart,i,s,o=t.prev_length,a=t.nice_match;const l=t.strstart>t.w_size-zi?t.strstart-(t.w_size-zi):0,u=t.window,c=t.w_mask,f=t.prev,d=t.strstart+Js;let h=u[r+o-1],p=u[r+o];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do if(i=e,!(u[i+o]!==p||u[i+o-1]!==h||u[i]!==u[r]||u[++i]!==u[r+1])){r+=2,i++;do;while(u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&r<d);if(s=Js-(d-r),r=d-Js,s>o){if(t.match_start=e,o=s,s>=a)break;h=u[r+o-1],p=u[r+o]}}while((e=f[e&c])>l&&--n!==0);return o<=t.lookahead?o:t.lookahead},Vl=t=>{const e=t.w_size;let n,r,i;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-zi)&&(t.window.set(t.window.subarray(e,e+e-r),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),UQ(t),r+=e),t.strm.avail_in===0)break;if(n=Ry(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=n,t.lookahead+t.insert>=Ke)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=lo(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=lo(t,t.ins_h,t.window[i+Ke-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<Ke)););}while(t.lookahead<zi&&t.strm.avail_in!==0)},w8=(t,e)=>{let n=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r,i,s,o=0,a=t.strm.avail_in;do{if(r=65535,s=t.bi_valid+42>>3,t.strm.avail_out<s||(s=t.strm.avail_out-s,i=t.strstart-t.block_start,r>i+t.strm.avail_in&&(r=i+t.strm.avail_in),r>s&&(r=s),r<n&&(r===0&&e!==Br||e===ao||r!==i+t.strm.avail_in)))break;o=e===Br&&r===i+t.strm.avail_in?1:0,Dy(t,0,0,o),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,vr(t.strm),i&&(i>r&&(i=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,r-=i),r&&(Ry(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(o===0);return a-=t.strm.avail_in,a&&(a>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=a&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-a,t.strm.next_in),t.strstart),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),o?vu:e!==ao&&e!==Br&&t.strm.avail_in===0&&t.strstart===t.block_start?yu:(s=t.window_size-t.strstart,t.strm.avail_in>s&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,s+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),s>t.strm.avail_in&&(s=t.strm.avail_in),s&&(Ry(t.strm,t.window,t.strstart,s),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.high_water<t.strstart&&(t.high_water=t.strstart),s=t.bi_valid+42>>3,s=t.pending_buf_size-s>65535?65535:t.pending_buf_size-s,n=s>t.w_size?t.w_size:s,i=t.strstart-t.block_start,(i>=n||(i||e===Br)&&e!==ao&&t.strm.avail_in===0&&i<=s)&&(r=i>s?s:i,o=e===Br&&t.strm.avail_in===0&&r===i?1:0,Dy(t,t.block_start,r,o),t.block_start+=r,vr(t.strm)),o?ya:Gn)},w1=(t,e)=>{let n,r;for(;;){if(t.lookahead<zi){if(Vl(t),t.lookahead<zi&&e===ao)return Gn;if(t.lookahead===0)break}if(n=0,t.lookahead>=Ke&&(t.ins_h=lo(t,t.ins_h,t.window[t.strstart+Ke-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),n!==0&&t.strstart-n<=t.w_size-zi&&(t.match_length=E8(t,n)),t.match_length>=Ke)if(r=oo(t,t.strstart-t.match_start,t.match_length-Ke),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=Ke){t.match_length--;do t.strstart++,t.ins_h=lo(t,t.ins_h,t.window[t.strstart+Ke-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=lo(t,t.ins_h,t.window[t.strstart+1]);else r=oo(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(Ar(t,!1),t.strm.avail_out===0))return Gn}return t.insert=t.strstart<Ke-1?t.strstart:Ke-1,e===Br?(Ar(t,!0),t.strm.avail_out===0?ya:vu):t.sym_next&&(Ar(t,!1),t.strm.avail_out===0)?Gn:yu},ja=(t,e)=>{let n,r,i;for(;;){if(t.lookahead<zi){if(Vl(t),t.lookahead<zi&&e===ao)return Gn;if(t.lookahead===0)break}if(n=0,t.lookahead>=Ke&&(t.ins_h=lo(t,t.ins_h,t.window[t.strstart+Ke-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=Ke-1,n!==0&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-zi&&(t.match_length=E8(t,n),t.match_length<=5&&(t.strategy===DQ||t.match_length===Ke&&t.strstart-t.match_start>4096)&&(t.match_length=Ke-1)),t.prev_length>=Ke&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-Ke,r=oo(t,t.strstart-1-t.prev_match,t.prev_length-Ke),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(t.ins_h=lo(t,t.ins_h,t.window[t.strstart+Ke-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!==0);if(t.match_available=0,t.match_length=Ke-1,t.strstart++,r&&(Ar(t,!1),t.strm.avail_out===0))return Gn}else if(t.match_available){if(r=oo(t,0,t.window[t.strstart-1]),r&&Ar(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return Gn}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=oo(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<Ke-1?t.strstart:Ke-1,e===Br?(Ar(t,!0),t.strm.avail_out===0?ya:vu):t.sym_next&&(Ar(t,!1),t.strm.avail_out===0)?Gn:yu},qQ=(t,e)=>{let n,r,i,s;const o=t.window;for(;;){if(t.lookahead<=Js){if(Vl(t),t.lookahead<=Js&&e===ao)return Gn;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=Ke&&t.strstart>0&&(i=t.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){s=t.strstart+Js;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<s);t.match_length=Js-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=Ke?(n=oo(t,1,t.match_length-Ke),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=oo(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(Ar(t,!1),t.strm.avail_out===0))return Gn}return t.insert=0,e===Br?(Ar(t,!0),t.strm.avail_out===0?ya:vu):t.sym_next&&(Ar(t,!1),t.strm.avail_out===0)?Gn:yu},GQ=(t,e)=>{let n;for(;;){if(t.lookahead===0&&(Vl(t),t.lookahead===0)){if(e===ao)return Gn;break}if(t.match_length=0,n=oo(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(Ar(t,!1),t.strm.avail_out===0))return Gn}return t.insert=0,e===Br?(Ar(t,!0),t.strm.avail_out===0?ya:vu):t.sym_next&&(Ar(t,!1),t.strm.avail_out===0)?Gn:yu};function Si(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}const nc=[new Si(0,0,0,0,w8),new Si(4,4,8,4,w1),new Si(4,5,16,8,w1),new Si(4,6,32,32,w1),new Si(4,4,16,16,ja),new Si(8,16,32,32,ja),new Si(8,16,128,128,ja),new Si(8,32,128,256,ja),new Si(32,128,258,1024,ja),new Si(32,258,258,4096,ja)],WQ=t=>{t.window_size=2*t.w_size,Us(t.head),t.max_lazy_match=nc[t.level].max_lazy,t.good_match=nc[t.level].good_length,t.nice_match=nc[t.level].nice_length,t.max_chain_length=nc[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=Ke-1,t.match_available=0,t.ins_h=0};function KQ(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Nm,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array($Q*2),this.dyn_dtree=new Uint16Array((2*LQ+1)*2),this.bl_tree=new Uint16Array((2*BQ+1)*2),Us(this.dyn_ltree),Us(this.dyn_dtree),Us(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(zQ+1),this.heap=new Uint16Array(2*ky+1),Us(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*ky+1),Us(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const rd=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==jl&&e.status!==j2&&e.status!==Oy&&e.status!==Ty&&e.status!==Iy&&e.status!==Py&&e.status!==ea&&e.status!==tc?1:0},_8=t=>{if(rd(t))return ta(t,$i);t.total_in=t.total_out=0,t.data_type=IQ;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap===2?j2:e.wrap?jl:ea,t.adler=e.wrap===2?0:1,e.last_flush=-2,xQ(e),vn},C8=t=>{const e=_8(t);return e===vn&&WQ(t.state),e},XQ=(t,e)=>rd(t)||t.state.wrap!==2?$i:(t.state.gzhead=e,vn),A8=(t,e,n,r,i,s)=>{if(!t)return $i;let o=1;if(e===AQ&&(e=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>PQ||n!==Nm||r<8||r>15||e<0||e>9||s<0||s>OQ||r===8&&o!==1)return ta(t,$i);r===8&&(r=9);const a=new KQ;return t.state=a,a.strm=t,a.status=jl,a.wrap=o,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+Ke-1)/Ke),a.window=new Uint8Array(a.w_size*2),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=a.lit_bufsize*4,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=(a.lit_bufsize-1)*3,a.level=e,a.strategy=s,a.method=n,C8(t)},YQ=(t,e)=>A8(t,e,Nm,RQ,NQ,TQ),JQ=(t,e)=>{if(rd(t)||e>A_||e<0)return t?ta(t,$i):$i;const n=t.state;if(!t.output||t.avail_in!==0&&!t.input||n.status===tc&&e!==Br)return ta(t,t.avail_out===0?E1:$i);const r=n.last_flush;if(n.last_flush=e,n.pending!==0){if(vr(t),t.avail_out===0)return n.last_flush=-1,vn}else if(t.avail_in===0&&k_(e)<=k_(r)&&e!==Br)return ta(t,E1);if(n.status===tc&&t.avail_in!==0)return ta(t,E1);if(n.status===jl&&n.wrap===0&&(n.status=ea),n.status===jl){let i=Nm+(n.w_bits-8<<4)<<8,s=-1;if(n.strategy>=lh||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,i|=s<<6,n.strstart!==0&&(i|=jQ),i+=31-i%31,ju(n,i),n.strstart!==0&&(ju(n,t.adler>>>16),ju(n,t.adler&65535)),t.adler=1,n.status=ea,vr(t),n.pending!==0)return n.last_flush=-1,vn}if(n.status===j2){if(t.adler=0,st(n,31),st(n,139),st(n,8),n.gzhead)st(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),st(n,n.gzhead.time&255),st(n,n.gzhead.time>>8&255),st(n,n.gzhead.time>>16&255),st(n,n.gzhead.time>>24&255),st(n,n.level===9?2:n.strategy>=lh||n.level<2?4:0),st(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(st(n,n.gzhead.extra.length&255),st(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=dn(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Oy;else if(st(n,0),st(n,0),st(n,0),st(n,0),st(n,0),st(n,n.level===9?2:n.strategy>=lh||n.level<2?4:0),st(n,VQ),n.status=ea,vr(t),n.pending!==0)return n.last_flush=-1,vn}if(n.status===Oy){if(n.gzhead.extra){let i=n.pending,s=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+s>n.pending_buf_size;){let a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(t.adler=dn(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=a,vr(t),n.pending!==0)return n.last_flush=-1,vn;i=0,s-=a}let o=new Uint8Array(n.gzhead.extra);n.pending_buf.set(o.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending+=s,n.gzhead.hcrc&&n.pending>i&&(t.adler=dn(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Ty}if(n.status===Ty){if(n.gzhead.name){let i=n.pending,s;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(t.adler=dn(t.adler,n.pending_buf,n.pending-i,i)),vr(t),n.pending!==0)return n.last_flush=-1,vn;i=0}n.gzindex<n.gzhead.name.length?s=n.gzhead.name.charCodeAt(n.gzindex++)&255:s=0,st(n,s)}while(s!==0);n.gzhead.hcrc&&n.pending>i&&(t.adler=dn(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Iy}if(n.status===Iy){if(n.gzhead.comment){let i=n.pending,s;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(t.adler=dn(t.adler,n.pending_buf,n.pending-i,i)),vr(t),n.pending!==0)return n.last_flush=-1,vn;i=0}n.gzindex<n.gzhead.comment.length?s=n.gzhead.comment.charCodeAt(n.gzindex++)&255:s=0,st(n,s)}while(s!==0);n.gzhead.hcrc&&n.pending>i&&(t.adler=dn(t.adler,n.pending_buf,n.pending-i,i))}n.status=Py}if(n.status===Py){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(vr(t),n.pending!==0))return n.last_flush=-1,vn;st(n,t.adler&255),st(n,t.adler>>8&255),t.adler=0}if(n.status=ea,vr(t),n.pending!==0)return n.last_flush=-1,vn}if(t.avail_in!==0||n.lookahead!==0||e!==ao&&n.status!==tc){let i=n.level===0?w8(n,e):n.strategy===lh?GQ(n,e):n.strategy===kQ?qQ(n,e):nc[n.level].func(n,e);if((i===ya||i===vu)&&(n.status=tc),i===Gn||i===ya)return t.avail_out===0&&(n.last_flush=-1),vn;if(i===yu&&(e===wQ?EQ(n):e!==A_&&(Dy(n,0,0,!1),e===_Q&&(Us(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),vr(t),t.avail_out===0))return n.last_flush=-1,vn}return e!==Br?vn:n.wrap<=0?D_:(n.wrap===2?(st(n,t.adler&255),st(n,t.adler>>8&255),st(n,t.adler>>16&255),st(n,t.adler>>24&255),st(n,t.total_in&255),st(n,t.total_in>>8&255),st(n,t.total_in>>16&255),st(n,t.total_in>>24&255)):(ju(n,t.adler>>>16),ju(n,t.adler&65535)),vr(t),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?vn:D_)},ZQ=t=>{if(rd(t))return $i;const e=t.state.status;return t.state=null,e===ea?ta(t,CQ):vn},QQ=(t,e)=>{let n=e.length;if(rd(t))return $i;const r=t.state,i=r.wrap;if(i===2||i===1&&r.status!==jl||r.lookahead)return $i;if(i===1&&(t.adler=mf(t.adler,e,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Us(r.head),r.strstart=0,r.block_start=0,r.insert=0);let l=new Uint8Array(r.w_size);l.set(e.subarray(n-r.w_size,n),0),e=l,n=r.w_size}const s=t.avail_in,o=t.next_in,a=t.input;for(t.avail_in=n,t.next_in=0,t.input=e,Vl(r);r.lookahead>=Ke;){let l=r.strstart,u=r.lookahead-(Ke-1);do r.ins_h=lo(r,r.ins_h,r.window[l+Ke-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++;while(--u);r.strstart=l,r.lookahead=Ke-1,Vl(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=Ke-1,r.match_available=0,t.next_in=o,t.input=a,t.avail_in=s,r.wrap=i,vn};var eee=YQ,tee=A8,nee=C8,ree=_8,iee=XQ,see=JQ,oee=ZQ,aee=QQ,lee="pako deflate (from Nodeca project)",Sc={deflateInit:eee,deflateInit2:tee,deflateReset:nee,deflateResetKeep:ree,deflateSetHeader:iee,deflate:see,deflateEnd:oee,deflateSetDictionary:aee,deflateInfo:lee};const uee=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var cee=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)uee(n,r)&&(t[r]=n[r])}}return t},fee=t=>{let e=0;for(let r=0,i=t.length;r<i;r++)e+=t[r].length;const n=new Uint8Array(e);for(let r=0,i=0,s=t.length;r<s;r++){let o=t[r];n.set(o,i),i+=o.length}return n},Mm={assign:cee,flattenChunks:fee};let D8=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{D8=!1}const gf=new Uint8Array(256);for(let t=0;t<256;t++)gf[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;gf[254]=gf[254]=1;var dee=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,n,r,i,s,o=t.length,a=0;for(i=0;i<o;i++)n=t.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(a),s=0,i=0;s<a;i++)n=t.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?e[s++]=n:n<2048?(e[s++]=192|n>>>6,e[s++]=128|n&63):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|n&63):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|n&63);return e};const hee=(t,e)=>{if(e<65534&&t.subarray&&D8)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let n="";for(let r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n};var pee=(t,e)=>{const n=e||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let r,i;const s=new Array(n*2);for(i=0,r=0;r<n;){let o=t[r++];if(o<128){s[i++]=o;continue}let a=gf[o];if(a>4){s[i++]=65533,r+=a-1;continue}for(o&=a===2?31:a===3?15:7;a>1&&r<n;)o=o<<6|t[r++]&63,a--;if(a>1){s[i++]=65533;continue}o<65536?s[i++]=o:(o-=65536,s[i++]=55296|o>>10&1023,s[i++]=56320|o&1023)}return hee(s,i)},mee=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let n=e-1;for(;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+gf[t[n]]>e?n:e},bf={string2buf:dee,buf2string:pee,utf8border:mee};function gee(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var k8=gee;const O8=Object.prototype.toString,{Z_NO_FLUSH:bee,Z_SYNC_FLUSH:yee,Z_FULL_FLUSH:vee,Z_FINISH:xee,Z_OK:g0,Z_STREAM_END:See,Z_DEFAULT_COMPRESSION:Eee,Z_DEFAULT_STRATEGY:wee,Z_DEFLATED:_ee}=nd;function id(t){this.options=Mm.assign({level:Eee,method:_ee,chunkSize:16384,windowBits:15,memLevel:8,strategy:wee},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k8,this.strm.avail_out=0;let n=Sc.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==g0)throw new Error(ba[n]);if(e.header&&Sc.deflateSetHeader(this.strm,e.header),e.dictionary){let r;if(typeof e.dictionary=="string"?r=bf.string2buf(e.dictionary):O8.call(e.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(e.dictionary):r=e.dictionary,n=Sc.deflateSetDictionary(this.strm,r),n!==g0)throw new Error(ba[n]);this._dict_set=!0}}id.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize;let i,s;if(this.ended)return!1;for(e===~~e?s=e:s=e===!0?xee:bee,typeof t=="string"?n.input=bf.string2buf(t):O8.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(s===yee||s===vee)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Sc.deflate(n,s),i===See)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Sc.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===g0;if(n.avail_out===0){this.onData(n.output);continue}if(s>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};id.prototype.onData=function(t){this.chunks.push(t)};id.prototype.onEnd=function(t){t===g0&&(this.result=Mm.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function V2(t,e){const n=new id(e);if(n.push(t,!0),n.err)throw n.msg||ba[n.err];return n.result}function Cee(t,e){return e=e||{},e.raw=!0,V2(t,e)}function Aee(t,e){return e=e||{},e.gzip=!0,V2(t,e)}var Dee=id,kee=V2,Oee=Cee,Tee=Aee,Iee={Deflate:Dee,deflate:kee,deflateRaw:Oee,gzip:Tee};const uh=16209,Pee=16191;var Ree=function(e,n){let r,i,s,o,a,l,u,c,f,d,h,p,m,g,b,y,x,S,E,C,w,A,_,O;const I=e.state;r=e.next_in,_=e.input,i=r+(e.avail_in-5),s=e.next_out,O=e.output,o=s-(n-e.avail_out),a=s+(e.avail_out-257),l=I.dmax,u=I.wsize,c=I.whave,f=I.wnext,d=I.window,h=I.hold,p=I.bits,m=I.lencode,g=I.distcode,b=(1<<I.lenbits)-1,y=(1<<I.distbits)-1;e:do{p<15&&(h+=_[r++]<<p,p+=8,h+=_[r++]<<p,p+=8),x=m[h&b];t:for(;;){if(S=x>>>24,h>>>=S,p-=S,S=x>>>16&255,S===0)O[s++]=x&65535;else if(S&16){E=x&65535,S&=15,S&&(p<S&&(h+=_[r++]<<p,p+=8),E+=h&(1<<S)-1,h>>>=S,p-=S),p<15&&(h+=_[r++]<<p,p+=8,h+=_[r++]<<p,p+=8),x=g[h&y];n:for(;;){if(S=x>>>24,h>>>=S,p-=S,S=x>>>16&255,S&16){if(C=x&65535,S&=15,p<S&&(h+=_[r++]<<p,p+=8,p<S&&(h+=_[r++]<<p,p+=8)),C+=h&(1<<S)-1,C>l){e.msg="invalid distance too far back",I.mode=uh;break e}if(h>>>=S,p-=S,S=s-o,C>S){if(S=C-S,S>c&&I.sane){e.msg="invalid distance too far back",I.mode=uh;break e}if(w=0,A=d,f===0){if(w+=u-S,S<E){E-=S;do O[s++]=d[w++];while(--S);w=s-C,A=O}}else if(f<S){if(w+=u+f-S,S-=f,S<E){E-=S;do O[s++]=d[w++];while(--S);if(w=0,f<E){S=f,E-=S;do O[s++]=d[w++];while(--S);w=s-C,A=O}}}else if(w+=f-S,S<E){E-=S;do O[s++]=d[w++];while(--S);w=s-C,A=O}for(;E>2;)O[s++]=A[w++],O[s++]=A[w++],O[s++]=A[w++],E-=3;E&&(O[s++]=A[w++],E>1&&(O[s++]=A[w++]))}else{w=s-C;do O[s++]=O[w++],O[s++]=O[w++],O[s++]=O[w++],E-=3;while(E>2);E&&(O[s++]=O[w++],E>1&&(O[s++]=O[w++]))}}else if((S&64)===0){x=g[(x&65535)+(h&(1<<S)-1)];continue n}else{e.msg="invalid distance code",I.mode=uh;break e}break}}else if((S&64)===0){x=m[(x&65535)+(h&(1<<S)-1)];continue t}else if(S&32){I.mode=Pee;break e}else{e.msg="invalid literal/length code",I.mode=uh;break e}break}}while(r<i&&s<a);E=p>>3,r-=E,p-=E<<3,h&=(1<<p)-1,e.next_in=r,e.next_out=s,e.avail_in=r<i?5+(i-r):5-(r-i),e.avail_out=s<a?257+(a-s):257-(s-a),I.hold=h,I.bits=p};const Va=15,O_=852,T_=592,I_=0,_1=1,P_=2,Nee=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Mee=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Fee=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Lee=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Bee=(t,e,n,r,i,s,o,a)=>{const l=a.bits;let u=0,c=0,f=0,d=0,h=0,p=0,m=0,g=0,b=0,y=0,x,S,E,C,w,A=null,_;const O=new Uint16Array(Va+1),I=new Uint16Array(Va+1);let N=null,P,R,F;for(u=0;u<=Va;u++)O[u]=0;for(c=0;c<r;c++)O[e[n+c]]++;for(h=l,d=Va;d>=1&&O[d]===0;d--);if(h>d&&(h=d),d===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,a.bits=1,0;for(f=1;f<d&&O[f]===0;f++);for(h<f&&(h=f),g=1,u=1;u<=Va;u++)if(g<<=1,g-=O[u],g<0)return-1;if(g>0&&(t===I_||d!==1))return-1;for(I[1]=0,u=1;u<Va;u++)I[u+1]=I[u]+O[u];for(c=0;c<r;c++)e[n+c]!==0&&(o[I[e[n+c]]++]=c);if(t===I_?(A=N=o,_=20):t===_1?(A=Nee,N=Mee,_=257):(A=Fee,N=Lee,_=0),y=0,c=0,u=f,w=s,p=h,m=0,E=-1,b=1<<h,C=b-1,t===_1&&b>O_||t===P_&&b>T_)return 1;for(;;){P=u-m,o[c]+1<_?(R=0,F=o[c]):o[c]>=_?(R=N[o[c]-_],F=A[o[c]-_]):(R=96,F=0),x=1<<u-m,S=1<<p,f=S;do S-=x,i[w+(y>>m)+S]=P<<24|R<<16|F|0;while(S!==0);for(x=1<<u-1;y&x;)x>>=1;if(x!==0?(y&=x-1,y+=x):y=0,c++,--O[u]===0){if(u===d)break;u=e[n+o[c]]}if(u>h&&(y&C)!==E){for(m===0&&(m=h),w+=f,p=u-m,g=1<<p;p+m<d&&(g-=O[p+m],!(g<=0));)p++,g<<=1;if(b+=1<<p,t===_1&&b>O_||t===P_&&b>T_)return 1;E=y&C,i[E]=h<<24|p<<16|w-s|0}}return y!==0&&(i[w+y]=u-m<<24|64<<16|0),a.bits=h,0};var Ec=Bee;const $ee=0,T8=1,I8=2,{Z_FINISH:R_,Z_BLOCK:zee,Z_TREES:ch,Z_OK:va,Z_STREAM_END:jee,Z_NEED_DICT:Vee,Z_STREAM_ERROR:Kr,Z_DATA_ERROR:P8,Z_MEM_ERROR:R8,Z_BUF_ERROR:Uee,Z_DEFLATED:N_}=nd,Fm=16180,M_=16181,F_=16182,L_=16183,B_=16184,$_=16185,z_=16186,j_=16187,V_=16188,U_=16189,b0=16190,es=16191,C1=16192,H_=16193,A1=16194,q_=16195,G_=16196,W_=16197,K_=16198,fh=16199,dh=16200,X_=16201,Y_=16202,J_=16203,Z_=16204,Q_=16205,D1=16206,eC=16207,tC=16208,wt=16209,N8=16210,M8=16211,Hee=852,qee=592,Gee=15,Wee=Gee,nC=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function Kee(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Na=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<Fm||e.mode>M8?1:0},F8=t=>{if(Na(t))return Kr;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=Fm,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(Hee),e.distcode=e.distdyn=new Int32Array(qee),e.sane=1,e.back=-1,va},L8=t=>{if(Na(t))return Kr;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,F8(t)},B8=(t,e)=>{let n;if(Na(t))return Kr;const r=t.state;return e<0?(n=0,e=-e):(n=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Kr:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,L8(t))},$8=(t,e)=>{if(!t)return Kr;const n=new Kee;t.state=n,n.strm=t,n.window=null,n.mode=Fm;const r=B8(t,e);return r!==va&&(t.state=null),r},Xee=t=>$8(t,Wee);let rC=!0,k1,O1;const Yee=t=>{if(rC){k1=new Int32Array(512),O1=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Ec(T8,t.lens,0,288,k1,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Ec(I8,t.lens,0,32,O1,0,t.work,{bits:5}),rC=!1}t.lencode=k1,t.lenbits=9,t.distcode=O1,t.distbits=5},z8=(t,e,n,r)=>{let i;const s=t.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(e.subarray(n-s.wsize,n),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(e.subarray(n-r,n-r+i),s.wnext),r-=i,r?(s.window.set(e.subarray(n-r,n),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0},Jee=(t,e)=>{let n,r,i,s,o,a,l,u,c,f,d,h,p,m,g=0,b,y,x,S,E,C,w,A;const _=new Uint8Array(4);let O,I;const N=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Na(t)||!t.output||!t.input&&t.avail_in!==0)return Kr;n=t.state,n.mode===es&&(n.mode=C1),o=t.next_out,i=t.output,l=t.avail_out,s=t.next_in,r=t.input,a=t.avail_in,u=n.hold,c=n.bits,f=a,d=l,A=va;e:for(;;)switch(n.mode){case Fm:if(n.wrap===0){n.mode=C1;break}for(;c<16;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}if(n.wrap&2&&u===35615){n.wbits===0&&(n.wbits=15),n.check=0,_[0]=u&255,_[1]=u>>>8&255,n.check=dn(n.check,_,2,0),u=0,c=0,n.mode=M_;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((u&255)<<8)+(u>>8))%31){t.msg="incorrect header check",n.mode=wt;break}if((u&15)!==N_){t.msg="unknown compression method",n.mode=wt;break}if(u>>>=4,c-=4,w=(u&15)+8,n.wbits===0&&(n.wbits=w),w>15||w>n.wbits){t.msg="invalid window size",n.mode=wt;break}n.dmax=1<<n.wbits,n.flags=0,t.adler=n.check=1,n.mode=u&512?U_:es,u=0,c=0;break;case M_:for(;c<16;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}if(n.flags=u,(n.flags&255)!==N_){t.msg="unknown compression method",n.mode=wt;break}if(n.flags&57344){t.msg="unknown header flags set",n.mode=wt;break}n.head&&(n.head.text=u>>8&1),n.flags&512&&n.wrap&4&&(_[0]=u&255,_[1]=u>>>8&255,n.check=dn(n.check,_,2,0)),u=0,c=0,n.mode=F_;case F_:for(;c<32;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}n.head&&(n.head.time=u),n.flags&512&&n.wrap&4&&(_[0]=u&255,_[1]=u>>>8&255,_[2]=u>>>16&255,_[3]=u>>>24&255,n.check=dn(n.check,_,4,0)),u=0,c=0,n.mode=L_;case L_:for(;c<16;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}n.head&&(n.head.xflags=u&255,n.head.os=u>>8),n.flags&512&&n.wrap&4&&(_[0]=u&255,_[1]=u>>>8&255,n.check=dn(n.check,_,2,0)),u=0,c=0,n.mode=B_;case B_:if(n.flags&1024){for(;c<16;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}n.length=u,n.head&&(n.head.extra_len=u),n.flags&512&&n.wrap&4&&(_[0]=u&255,_[1]=u>>>8&255,n.check=dn(n.check,_,2,0)),u=0,c=0}else n.head&&(n.head.extra=null);n.mode=$_;case $_:if(n.flags&1024&&(h=n.length,h>a&&(h=a),h&&(n.head&&(w=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(s,s+h),w)),n.flags&512&&n.wrap&4&&(n.check=dn(n.check,r,h,s)),a-=h,s+=h,n.length-=h),n.length))break e;n.length=0,n.mode=z_;case z_:if(n.flags&2048){if(a===0)break e;h=0;do w=r[s+h++],n.head&&w&&n.length<65536&&(n.head.name+=String.fromCharCode(w));while(w&&h<a);if(n.flags&512&&n.wrap&4&&(n.check=dn(n.check,r,h,s)),a-=h,s+=h,w)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=j_;case j_:if(n.flags&4096){if(a===0)break e;h=0;do w=r[s+h++],n.head&&w&&n.length<65536&&(n.head.comment+=String.fromCharCode(w));while(w&&h<a);if(n.flags&512&&n.wrap&4&&(n.check=dn(n.check,r,h,s)),a-=h,s+=h,w)break e}else n.head&&(n.head.comment=null);n.mode=V_;case V_:if(n.flags&512){for(;c<16;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}if(n.wrap&4&&u!==(n.check&65535)){t.msg="header crc mismatch",n.mode=wt;break}u=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=es;break;case U_:for(;c<32;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}t.adler=n.check=nC(u),u=0,c=0,n.mode=b0;case b0:if(n.havedict===0)return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=u,n.bits=c,Vee;t.adler=n.check=1,n.mode=es;case es:if(e===zee||e===ch)break e;case C1:if(n.last){u>>>=c&7,c-=c&7,n.mode=D1;break}for(;c<3;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}switch(n.last=u&1,u>>>=1,c-=1,u&3){case 0:n.mode=H_;break;case 1:if(Yee(n),n.mode=fh,e===ch){u>>>=2,c-=2;break e}break;case 2:n.mode=G_;break;case 3:t.msg="invalid block type",n.mode=wt}u>>>=2,c-=2;break;case H_:for(u>>>=c&7,c-=c&7;c<32;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}if((u&65535)!==(u>>>16^65535)){t.msg="invalid stored block lengths",n.mode=wt;break}if(n.length=u&65535,u=0,c=0,n.mode=A1,e===ch)break e;case A1:n.mode=q_;case q_:if(h=n.length,h){if(h>a&&(h=a),h>l&&(h=l),h===0)break e;i.set(r.subarray(s,s+h),o),a-=h,s+=h,l-=h,o+=h,n.length-=h;break}n.mode=es;break;case G_:for(;c<14;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}if(n.nlen=(u&31)+257,u>>>=5,c-=5,n.ndist=(u&31)+1,u>>>=5,c-=5,n.ncode=(u&15)+4,u>>>=4,c-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=wt;break}n.have=0,n.mode=W_;case W_:for(;n.have<n.ncode;){for(;c<3;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}n.lens[N[n.have++]]=u&7,u>>>=3,c-=3}for(;n.have<19;)n.lens[N[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,O={bits:n.lenbits},A=Ec($ee,n.lens,0,19,n.lencode,0,n.work,O),n.lenbits=O.bits,A){t.msg="invalid code lengths set",n.mode=wt;break}n.have=0,n.mode=K_;case K_:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[u&(1<<n.lenbits)-1],b=g>>>24,y=g>>>16&255,x=g&65535,!(b<=c);){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}if(x<16)u>>>=b,c-=b,n.lens[n.have++]=x;else{if(x===16){for(I=b+2;c<I;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}if(u>>>=b,c-=b,n.have===0){t.msg="invalid bit length repeat",n.mode=wt;break}w=n.lens[n.have-1],h=3+(u&3),u>>>=2,c-=2}else if(x===17){for(I=b+3;c<I;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}u>>>=b,c-=b,w=0,h=3+(u&7),u>>>=3,c-=3}else{for(I=b+7;c<I;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}u>>>=b,c-=b,w=0,h=11+(u&127),u>>>=7,c-=7}if(n.have+h>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=wt;break}for(;h--;)n.lens[n.have++]=w}}if(n.mode===wt)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=wt;break}if(n.lenbits=9,O={bits:n.lenbits},A=Ec(T8,n.lens,0,n.nlen,n.lencode,0,n.work,O),n.lenbits=O.bits,A){t.msg="invalid literal/lengths set",n.mode=wt;break}if(n.distbits=6,n.distcode=n.distdyn,O={bits:n.distbits},A=Ec(I8,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,O),n.distbits=O.bits,A){t.msg="invalid distances set",n.mode=wt;break}if(n.mode=fh,e===ch)break e;case fh:n.mode=dh;case dh:if(a>=6&&l>=258){t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=u,n.bits=c,Ree(t,d),o=t.next_out,i=t.output,l=t.avail_out,s=t.next_in,r=t.input,a=t.avail_in,u=n.hold,c=n.bits,n.mode===es&&(n.back=-1);break}for(n.back=0;g=n.lencode[u&(1<<n.lenbits)-1],b=g>>>24,y=g>>>16&255,x=g&65535,!(b<=c);){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}if(y&&(y&240)===0){for(S=b,E=y,C=x;g=n.lencode[C+((u&(1<<S+E)-1)>>S)],b=g>>>24,y=g>>>16&255,x=g&65535,!(S+b<=c);){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}u>>>=S,c-=S,n.back+=S}if(u>>>=b,c-=b,n.back+=b,n.length=x,y===0){n.mode=Q_;break}if(y&32){n.back=-1,n.mode=es;break}if(y&64){t.msg="invalid literal/length code",n.mode=wt;break}n.extra=y&15,n.mode=X_;case X_:if(n.extra){for(I=n.extra;c<I;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Y_;case Y_:for(;g=n.distcode[u&(1<<n.distbits)-1],b=g>>>24,y=g>>>16&255,x=g&65535,!(b<=c);){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}if((y&240)===0){for(S=b,E=y,C=x;g=n.distcode[C+((u&(1<<S+E)-1)>>S)],b=g>>>24,y=g>>>16&255,x=g&65535,!(S+b<=c);){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}u>>>=S,c-=S,n.back+=S}if(u>>>=b,c-=b,n.back+=b,y&64){t.msg="invalid distance code",n.mode=wt;break}n.offset=x,n.extra=y&15,n.mode=J_;case J_:if(n.extra){for(I=n.extra;c<I;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=wt;break}n.mode=Z_;case Z_:if(l===0)break e;if(h=d-l,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=wt;break}h>n.wnext?(h-=n.wnext,p=n.wsize-h):p=n.wnext-h,h>n.length&&(h=n.length),m=n.window}else m=i,p=o-n.offset,h=n.length;h>l&&(h=l),l-=h,n.length-=h;do i[o++]=m[p++];while(--h);n.length===0&&(n.mode=dh);break;case Q_:if(l===0)break e;i[o++]=n.length,l--,n.mode=dh;break;case D1:if(n.wrap){for(;c<32;){if(a===0)break e;a--,u|=r[s++]<<c,c+=8}if(d-=l,t.total_out+=d,n.total+=d,n.wrap&4&&d&&(t.adler=n.check=n.flags?dn(n.check,i,d,o-d):mf(n.check,i,d,o-d)),d=l,n.wrap&4&&(n.flags?u:nC(u))!==n.check){t.msg="incorrect data check",n.mode=wt;break}u=0,c=0}n.mode=eC;case eC:if(n.wrap&&n.flags){for(;c<32;){if(a===0)break e;a--,u+=r[s++]<<c,c+=8}if(n.wrap&4&&u!==(n.total&4294967295)){t.msg="incorrect length check",n.mode=wt;break}u=0,c=0}n.mode=tC;case tC:A=jee;break e;case wt:A=P8;break e;case N8:return R8;case M8:default:return Kr}return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=u,n.bits=c,(n.wsize||d!==t.avail_out&&n.mode<wt&&(n.mode<D1||e!==R_))&&z8(t,t.output,t.next_out,d-t.avail_out),f-=t.avail_in,d-=t.avail_out,t.total_in+=f,t.total_out+=d,n.total+=d,n.wrap&4&&d&&(t.adler=n.check=n.flags?dn(n.check,i,d,t.next_out-d):mf(n.check,i,d,t.next_out-d)),t.data_type=n.bits+(n.last?64:0)+(n.mode===es?128:0)+(n.mode===fh||n.mode===A1?256:0),(f===0&&d===0||e===R_)&&A===va&&(A=Uee),A},Zee=t=>{if(Na(t))return Kr;let e=t.state;return e.window&&(e.window=null),t.state=null,va},Qee=(t,e)=>{if(Na(t))return Kr;const n=t.state;return(n.wrap&2)===0?Kr:(n.head=e,e.done=!1,va)},ete=(t,e)=>{const n=e.length;let r,i,s;return Na(t)||(r=t.state,r.wrap!==0&&r.mode!==b0)?Kr:r.mode===b0&&(i=1,i=mf(i,e,n,0),i!==r.check)?P8:(s=z8(t,e,n,n),s?(r.mode=N8,R8):(r.havedict=1,va))};var tte=L8,nte=B8,rte=F8,ite=Xee,ste=$8,ote=Jee,ate=Zee,lte=Qee,ute=ete,cte="pako inflate (from Nodeca project)",as={inflateReset:tte,inflateReset2:nte,inflateResetKeep:rte,inflateInit:ite,inflateInit2:ste,inflate:ote,inflateEnd:ate,inflateGetHeader:lte,inflateSetDictionary:ute,inflateInfo:cte};function fte(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var dte=fte;const j8=Object.prototype.toString,{Z_NO_FLUSH:hte,Z_FINISH:pte,Z_OK:yf,Z_STREAM_END:T1,Z_NEED_DICT:I1,Z_STREAM_ERROR:mte,Z_DATA_ERROR:iC,Z_MEM_ERROR:gte}=nd;function sd(t){this.options=Mm.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k8,this.strm.avail_out=0;let n=as.inflateInit2(this.strm,e.windowBits);if(n!==yf)throw new Error(ba[n]);if(this.header=new dte,as.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=bf.string2buf(e.dictionary):j8.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=as.inflateSetDictionary(this.strm,e.dictionary),n!==yf)))throw new Error(ba[n])}sd.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let s,o,a;if(this.ended)return!1;for(e===~~e?o=e:o=e===!0?pte:hte,j8.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),s=as.inflate(n,o),s===I1&&i&&(s=as.inflateSetDictionary(n,i),s===yf?s=as.inflate(n,o):s===iC&&(s=I1));n.avail_in>0&&s===T1&&n.state.wrap>0&&t[n.next_in]!==0;)as.inflateReset(n),s=as.inflate(n,o);switch(s){case mte:case iC:case I1:case gte:return this.onEnd(s),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||s===T1))if(this.options.to==="string"){let l=bf.utf8border(n.output,n.next_out),u=n.next_out-l,c=bf.buf2string(n.output,l);n.next_out=u,n.avail_out=r-u,u&&n.output.set(n.output.subarray(l,l+u),0),this.onData(c)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(s===yf&&a===0)){if(s===T1)return s=as.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};sd.prototype.onData=function(t){this.chunks.push(t)};sd.prototype.onEnd=function(t){t===yf&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Mm.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function U2(t,e){const n=new sd(e);if(n.push(t),n.err)throw n.msg||ba[n.err];return n.result}function bte(t,e){return e=e||{},e.raw=!0,U2(t,e)}var yte=sd,vte=U2,xte=bte,Ste=U2,Ete={Inflate:yte,inflate:vte,inflateRaw:xte,ungzip:Ste};const{Deflate:wte,deflate:_te,deflateRaw:Cte,gzip:Ate}=Iee,{Inflate:Dte,inflate:kte,inflateRaw:Ote,ungzip:Tte}=Ete;var Ite=wte,Pte=_te,Rte=Cte,Nte=Ate,Mte=Dte,Fte=kte,Lte=Ote,Bte=Tte,$te=nd,zte={Deflate:Ite,deflate:Pte,deflateRaw:Rte,gzip:Nte,Inflate:Mte,inflate:Fte,inflateRaw:Lte,ungzip:Bte,constants:$te};function jte(t,e,n,r){const i={method:t.method,endpoint:t.endpoint,headers:t.headers.map(u=>({key:u.key,value:u.value})),queryParameters:t.queryParameters.map(u=>({key:u.key,value:u.value,type:u.type})),body:t.body,payloadType:t.payloadType,authorization:{type:t.authorization.type,value:t.authorization.value},applicationKey:r};e&&(i.response={status:e.status,statusCode:e.statusCode,statusText:e.statusText,body:e.body,sizeInBytes:e.sizeInBytes,headers:e.headers.map(u=>({key:u.key,value:u.value})),cookies:e.cookies.map(u=>({key:u.key,value:u.value})),timestamp:e.timestamp,durationInMs:(n==null?void 0:n.durationInMs)??0}),n&&(i.requestLog=n);const s=JSON.stringify(i),o=zte.deflate(s);return btoa(String.fromCharCode.apply(null,Array.from(o))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Vte(t,e){const n=window.location.origin,r=t.startsWith("/")?t:`/${t}`;return`${n}${r}?share=${e}`}const Ute={class:"flex min-h-0 flex-1 flex-col space-y-2.5"},Hte={key:0,class:"bg-warning/10 dark:bg-warning/20 rounded-md p-2.5"},qte={class:"flex min-h-0 flex-1 flex-col space-y-2.5"},Gte={class:"flex items-center justify-end"},Wte={class:"bg-subtle text-foreground h-full min-h-0 flex-1 overflow-auto rounded-md border p-2.5 font-mono text-xs leading-relaxed break-all whitespace-break-spaces"},Kte={class:"flex justify-end border-t pt-2.5"},Xte=z({__name:"CurlExportDialog",props:{open:{type:Boolean},command:{},hasSpecialAuth:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{copy:i,copied:s}=Co(),o=()=>{i(n.command)},a=()=>{r("update:open",!1)};return(l,u)=>(T(),L(v(Cf),{open:t.open,"onUpdate:open":u[0]||(u[0]=c=>r("update:open",c))},{default:D(()=>[k(v(Af),{class:"flex max-h-[90vh] max-w-2xl flex-col overflow-hidden sm:max-w-2xl"},{default:D(()=>[k(v(Df),null,{default:D(()=>[k(v(kf),null,{default:D(()=>[...u[1]||(u[1]=[ne("cURL Command",-1)])]),_:1}),k(v(N0),null,{default:D(()=>[...u[2]||(u[2]=[ne(" Copy the generated cURL command to use in your terminal or scripts. ",-1)])]),_:1})]),_:1}),M("div",Ute,[t.hasSpecialAuth?(T(),K("div",Hte,[...u[3]||(u[3]=[M("p",{class:"text-warning text-xs"}," Authorization has been dropped as special authorization types (Current User, Impersonate) are not supported in cURL commands. ",-1)])])):we("",!0),M("div",qte,[M("div",Gte,[k(v(gt),{variant:"outline",size:"sm",class:"flex items-center gap-2",onClick:o},{default:D(()=>[v(s)?(T(),L(v(QC),{key:0,class:"h-4 w-4"})):(T(),L(v(eA),{key:1,class:"h-4 w-4"})),ne(" "+de(v(s)?"Copied!":"Copy"),1)]),_:1})]),M("pre",Wte,de(t.command),1)])]),M("div",Kte,[k(v(gt),{variant:"outline",onClick:a},{default:D(()=>[...u[4]||(u[4]=[ne("Close",-1)])]),_:1})])]),_:1})]),_:1},8,["open"]))}}),Yte={class:"flex flex-1 flex-col space-y-4 overflow-hidden"},Jte={class:"flex min-h-0 flex-1 flex-col space-y-3"},Zte={class:"mb-2 flex items-center justify-between"},Qte={class:"bg-subtle-background text-foreground flex-1 overflow-auto rounded-md border p-4 font-mono text-sm leading-relaxed break-all whitespace-break-spaces","data-testid":"shareable-link-content"},ene={class:"flex justify-end border-t pt-4 dark:border-gray-700"},tne=z({__name:"ShareableLinkDialog",props:{open:{type:Boolean},link:{}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{copy:i,copied:s}=Co(),o=()=>{i(n.link)},a=()=>{r("update:open",!1)};return(l,u)=>(T(),L(v(Cf),{open:t.open,"onUpdate:open":u[0]||(u[0]=c=>r("update:open",c))},{default:D(()=>[k(v(Af),{class:"flex max-h-[90vh] max-w-2xl flex-col overflow-hidden sm:max-w-2xl"},{default:D(()=>[k(v(Df),null,{default:D(()=>[k(v(kf),{class:"flex items-center gap-2"},{default:D(()=>[k(v(PA),{class:"size-5"}),u[1]||(u[1]=ne(" Shareable Link ",-1))]),_:1}),k(v(N0),null,{default:D(()=>[...u[2]||(u[2]=[ne(" Share this link with your teammates to restore the exact request state and response. ",-1)])]),_:1})]),_:1}),M("div",Yte,[u[4]||(u[4]=M("div",{class:"rounded-md bg-indigo-50 p-3 dark:bg-indigo-900/20"},[M("p",{class:"text-sm text-indigo-800 dark:text-indigo-200"}," This link contains the full request configuration and the latest response. Anyone with this link can restore the exact state in their Nimbus instance. ")],-1)),M("div",Jte,[M("div",Zte,[u[3]||(u[3]=M("h4",{class:"text-sm font-medium text-gray-700 dark:text-gray-300"}," Link ",-1)),k(v(gt),{variant:"outline",size:"sm",class:"flex items-center gap-2",onClick:o},{default:D(()=>[v(s)?(T(),L(v(QC),{key:0,class:"h-4 w-4"})):(T(),L(v(eA),{key:1,class:"h-4 w-4"})),ne(" "+de(v(s)?"Copied!":"Copy"),1)]),_:1})]),M("pre",Qte,de(t.link),1)])]),M("div",ene,[k(v(gt),{variant:"outline",onClick:a},{default:D(()=>[...u[5]||(u[5]=[ne("Close",-1)])]),_:1})])]),_:1})]),_:1},8,["open"]))}}),nne={class:"flex w-full items-center justify-between"},rne={class:"flex items-center gap-1.5 font-normal"},ine=z({__name:"RequestBuilderOptionsMenu",setup(t){const e=Rr(),n=Xi(),r=G0(),i=Z(!1),s=Z(""),o=Z(!1),a=Z(!1),l=Z(""),u=q(()=>e.pendingRequestData),c=q({get:()=>{var h;return((h=u.value)==null?void 0:h.transactionMode)??!1},set:h=>e.updateTransactionMode(h)}),f=()=>{if(!e.pendingRequestData)return;const h=sM(e.pendingRequestData,n.apiUrl);s.value=h.command,o.value=h.hasSpecialAuth,i.value=!0},d=()=>{if(e.pendingRequestData)try{const h=r.lastLog,p=h==null?void 0:h.response,m=n.activeApplication??void 0,g=jte(e.pendingRequestData,p,h??void 0,m);l.value=Vte(n.appBasePath,g),a.value=!0}catch(h){console.error("Failed to generate shareable link:",h),Eh.error("Failed to generate shareable link",{description:"An unexpected error occurred."})}};return(h,p)=>(T(),K(Qe,null,[k(v(i8),null,{default:D(()=>[k(v(o8),{"as-child":""},{default:D(()=>[k(v(gt),{variant:"outline",size:"xs",disabled:!u.value,"data-testid":"request-options-button",title:"Request Options"},{default:D(()=>[k(v(Yy),{class:"size-4"})]),_:1},8,["disabled"])]),_:1}),k(v(s8),{align:"end",class:"w-48"},{default:D(()=>[k(v(y_),null,{default:D(()=>[...p[6]||(p[6]=[ne("Options",-1)])]),_:1}),k(v(b_),null,{default:D(()=>[k(v(Wh),{class:"cursor-pointer text-xs","data-testid":"transaction-mode-option",onSelect:p[3]||(p[3]=eo(()=>{},["prevent"]))},{default:D(()=>[M("div",nne,[M("div",rne,[p[8]||(p[8]=M("span",null,"Transaction Mode",-1)),k(v(kP),null,{default:D(()=>[k(v(OP),{ref:"transaction-mode-option","as-child":"",onClick:p[0]||(p[0]=eo(()=>{},["stop","prevent"]))},{default:D(()=>[k(v(bN),{class:"h-3.5 w-3.5 cursor-help text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200"})]),_:1},512),k(v(TP),{class:"w-80",side:"right","side-offset":5},{default:D(()=>[...p[7]||(p[7]=[M("div",{class:"space-y-2"},[M("h4",{class:"text-sm leading-none font-medium"}," Transaction Mode "),M("p",{class:"text-muted-foreground text-xs leading-relaxed"}," Executes the request within a database transaction that is automatically rolled back after completion. This allows you to test operations without affecting your persistent data. ")],-1)])]),_:1})]),_:1})]),k(v(qA),{modelValue:c.value,"onUpdate:modelValue":p[1]||(p[1]=m=>c.value=m),variant:{type:"compact",default:"default"},class:"ml-2",onClick:p[2]||(p[2]=eo(()=>{},["stop"]))},null,8,["modelValue"])])]),_:1})]),_:1}),k(v(_y)),k(v(y_),null,{default:D(()=>[...p[9]||(p[9]=[ne("Export",-1)])]),_:1}),k(v(b_),null,{default:D(()=>[k(v(Wh),{class:"cursor-pointer text-xs","data-testid":"export-curl-option",onSelect:f},{default:D(()=>[k(v(vN),{class:"mr-2 size-4"}),p[10]||(p[10]=M("span",null,"Export to cURL",-1))]),_:1}),k(v(Wh),{class:"cursor-pointer text-xs","data-testid":"copy-shareable-link-option",onSelect:d},{default:D(()=>[k(v(PA),{class:"mr-2 size-4"}),p[11]||(p[11]=M("span",null,"Copy Shareable Link",-1))]),_:1})]),_:1})]),_:1})]),_:1}),k(Xte,{open:i.value,"onUpdate:open":p[4]||(p[4]=m=>i.value=m),command:s.value,"has-special-auth":o.value},null,8,["open","command","has-special-auth"]),k(tne,{open:a.value,"onUpdate:open":p[5]||(p[5]=m=>a.value=m),link:l.value},null,8,["open","link"])],64))}}),sne=z({__name:"RequestBuilderEndpoint",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("div",{class:Se(v(ke)("flex",e.class)),"data-testid":"request-builder-endpoint"},[k(HZ),k(UZ,null,{"options-menu":D(()=>[k(ine)]),_:1})],2))}}),one={class:"px-panel bg-subtle flex border-b py-2 text-xs"},ane={class:"flex-1"},lne={key:0},une={key:1,class:"text-subtle-foreground"},cne=z({__name:"RequestParameters",setup(t){const e=Rr(),{copy:n,copied:r}=Co(),i=q(()=>e.pendingRequestData),s=q(()=>{var u;return((u=i.value)==null?void 0:u.queryParameters)??[]}),o=q(()=>i.value?e.getRequestUrl(i.value):""),a=u=>{e.updateQueryParameters(u)},l=()=>n(o.value);return(u,c)=>(T(),K(Qe,null,[k(Oa,{class:"border-b"},{default:D(()=>[...c[0]||(c[0]=[ne("Query Parameters",-1)])]),_:1}),M("div",one,[M("div",ane,[c[1]||(c[1]=M("small",{class:"font-medium"},"URL Preview",-1)),o.value.length?(T(),K("p",lne,de(o.value),1)):(T(),K("p",une,"Pick an endpoint to start"))]),M("div",null,[k(nu,{"on-click":l,copied:v(r)},null,8,["copied"])])]),k(fv,{"model-value":s.value,class:"flex-1","onUpdate:parameters":a},null,8,["model-value"])],64))}}),fne={class:"relative flex h-full max-h-full flex-1 flex-col","data-testid":"request-builder-root"},dne={class:"bg-subtle border-b"},hne={class:"relative"},pne={class:"from-subtle via-subtle/80 pointer-events-none absolute top-0 bottom-0 left-0 w-8 bg-gradient-to-r to-transparent transition-opacity duration-200"},mne={class:"from-subtle via-subtle/80 pointer-events-none absolute top-0 right-0 bottom-0 w-8 bg-gradient-to-l to-transparent transition-opacity duration-200"},gne=z({__name:"RequestBuilder",setup(t){const e=Cl(Tf("request-builder-tab"),"body"),{scrollContainer:n,showLeftMask:r,showRightMask:i,updateScrollMasks:s,scrollTabIntoView:o}=qC(),a=l=>{o(l.currentTarget)};return(l,u)=>(T(),K("div",fne,[k(v(sne),{class:"h-toolbar border-b"}),k(v(UA),{"default-value":v(e),class:"mt-0 flex flex-1 flex-col overflow-hidden","data-testid":"app-tabs-container","onUpdate:modelValue":u[1]||(u[1]=c=>e.value=c)},{default:D(()=>[M("div",dne,[M("div",hne,[M("div",{ref_key:"scrollContainer",ref:n,class:"scrollbar-hide overflow-x-auto",style:{"scrollbar-width":"none","-ms-overflow-style":"none"},onScroll:u[0]||(u[0]=(...c)=>v(s)&&v(s)(...c))},[k(v(HA),{class:"h-toolbar px-panel rounded-none"},{default:D(()=>[k(v(Ho),{value:"parameters",label:"Parameters",onClick:a}),k(v(Ho),{value:"body",label:"Body",onClick:a}),k(v(Ho),{value:"authorization",label:"Authorization",onClick:a}),k(v(Ho),{value:"headers",label:"Headers",onClick:a})]),_:1})],544),ua(M("div",pne,null,512),[[Al,v(r)]]),ua(M("div",mne,null,512),[[Al,v(i)]])])]),k(v(Uo),{value:"parameters",class:"mt-0 flex max-h-full min-h-0 flex-1 flex-col","data-testid":"request-parameters"},{default:D(()=>[k(v(cne))]),_:1}),k(v(Uo),{value:"body",class:"mt-0 flex max-h-full min-h-0 flex-1 flex-col","data-testid":"request-body"},{default:D(()=>[k(v(NZ))]),_:1}),k(v(Uo),{value:"authorization",class:"mt-0 flex max-h-full min-h-0 flex-1 flex-col","data-testid":"request-authorization"},{default:D(()=>[k(v(oF))]),_:1}),k(v(Uo),{value:"headers",class:"mt-0 flex max-h-full min-h-0 flex-1 flex-col","data-testid":"request-headers"},{default:D(()=>[k(v(jM))]),_:1})]),_:1},8,["default-value"])]))}}),bne=z({__name:"AppInputGroup",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("div",{"data-slot":"input-group",role:"group",class:Se(v(ke)("group/input-group relative flex w-full items-center rounded-sm border border-zinc-200 outline-none dark:border-zinc-800 dark:bg-zinc-200/30 dark:dark:bg-zinc-800/30","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-zinc-950 dark:has-[[data-slot=input-group-control]:focus-visible]:ring-zinc-300",e.class))},[Q(n.$slots,"default")],2))}}),yne=["data-align"],vne=z({__name:"AppInputGroupAddon",props:{align:{default:"inline-start"},class:{default:void 0}},setup(t){const e=t;function n(r){var o,a;const i=r.currentTarget,s=r.target;s&&s.closest("button")||i&&(i!=null&&i.parentElement)&&((a=(o=i.parentElement)==null?void 0:o.querySelector("input"))==null||a.focus())}return(r,i)=>(T(),K("div",{role:"group","data-slot":"input-group-addon","data-align":e.align,class:Se(v(ke)(v(Sne)({align:e.align}),e.class)),onClick:n},[Q(r.$slots,"default")],10,yne))}}),xne=z({__name:"AppInputGroupInput",props:{class:{}},setup(t,{expose:e}){const n=t,r=Z(null);return e({focus:()=>{var s;const i=(s=r.value)==null?void 0:s.$el;i==null||i.focus()}}),(i,s)=>(T(),L(v(ws),{ref_key:"inputRef",ref:r,"data-slot":"input-group-control",class:Se(v(ke)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-offset-transparent focus-visible:ring-0 focus-visible:ring-transparent dark:bg-transparent",n.class))},null,8,["class"]))}}),Sne=VC("text-zinc-500 flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50 dark:text-zinc-400",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}}),Ene=z({__name:"AppSpinner",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("svg",{class:Se(v(ke)("size-4 text-zinc-900",e.class)),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...r[0]||(r[0]=[M("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),M("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])],2))}}),Xh=z({__name:"AppRoundIndicator",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("div",{class:Se(v(ke)(e.class,"bg-background relative z-10 flex size-[12px] items-center justify-center rounded-full"))},[...r[0]||(r[0]=[M("div",{class:"size-[8px] rounded-full border-[1px] border-[currentColor] bg-[radial-gradient(circle_at_bottom,currentColor_75%,rgb(255,255,255)_100%)]"},null,-1),M("div",{class:"absolute z-[-1] size-[5px] rounded-full opacity-40 shadow-[5px_0_5px_currentColor,-5px_0_5px_currentColor]"},null,-1)])],2))}}),V8=z({__name:"StatusIndicator",props:{status:{}},setup(t){const e=t,n={[xt.INFORMATION]:"text-zinc-500",[xt.SUCCESS]:"text-emerald-600",[xt.REDIRECT]:"text-blue-500",[xt.CLIENT_ERROR]:"text-amber-500",[xt.SERVER_ERROR]:"text-rose-500",[xt.OTHER]:"text-zinc-500",[xt.EMPTY]:"text-zinc-900",[xt.DUMP_AND_DIE]:"text-violet-600",[xt.PENDING]:""},r=q(()=>n[e.status]);return(i,s)=>e.status===v(xt).PENDING?(T(),L(Ene,{key:0,"data-testid":"pending-request-spinner",class:"text-accent-foreground size-4 animate-spin"})):(T(),L(Xh,{key:1,class:Se(r.value)},null,8,["class"]))}}),Lm=z({__name:"HttpVerbLabel",props:{method:{},size:{default:"sm"},variant:{default:"outline"}},setup(t){const e=t,n=q(()=>({POST:"text-success",PUT:"text-success",DELETE:"text-destructive"})[e.method]??null),r=q(()=>({sm:"min-w-[50px] text-xxs",md:"min-w-[60px] text-xs",lg:"min-w-[70px] text-sm"})[e.size]);return(i,s)=>(T(),L(v(fo),{variant:t.variant,class:Se(v(ke)("justify-center",r.value))},{default:D(()=>[M("span",{class:Se(n.value)},de(t.method),3)]),_:1},8,["variant","class"]))}}),wne=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],_ne=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Cne=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Ane=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],sC=(t,e,n)=>{let r=t;return typeof e=="string"||Array.isArray(e)?r=t.toLocaleString(e,n):(e===!0||n!==void 0)&&(r=t.toLocaleString(void 0,n)),r},U8=t=>{if(typeof t=="number")return Math.log10(t);const e=t.toString(10);return e.length+Math.log10(`0.${e.slice(0,15)}`)},Dne=t=>typeof t=="number"?Math.log(t):U8(t)*Math.log(10),kne=(t,e)=>{if(typeof t=="number")return t/e;const n=t/BigInt(e),r=t%BigInt(e);return Number(n)+Number(r)/e},oC=(t,e)=>{if(e===void 0)return t;if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof e}: ${e}`);return e===0?t:t.length<e?t.padStart(e," "):t},One=t=>{const{minimumFractionDigits:e,maximumFractionDigits:n}=t;if(!(e===void 0&&n===void 0))return{...e!==void 0&&{minimumFractionDigits:e},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function H8(t,e){if(typeof t!="bigint"&&!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);e={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...e};const n=e.bits?e.binary?Ane:Cne:e.binary?_ne:wne,r=e.space?e.nonBreakingSpace?" ":" ":"",i=typeof t=="number"?t===0:t===0n;if(e.signed&&i){const u=` 0${r}${n[0]}`;return oC(u,e.fixedWidth)}const s=t<0,o=s?"-":e.signed?"+":"";s&&(t=-t);const a=One(e);let l;if(t<1){const u=sC(t,e.locale,a);l=o+u+r+n[0]}else{const u=Math.min(Math.floor(e.binary?Dne(t)/Math.log(1024):U8(t)/3),n.length-1);if(t=kne(t,(e.binary?1024:1e3)**u),!a){const d=Math.max(3,Math.floor(t).toString().length);t=t.toPrecision(d)}const c=sC(Number(t),e.locale,a),f=n[u];l=o+c+r+f}return oC(l,e.fixedWidth)}const aC=t=>Number.isFinite(t)?t:0;function Tne(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(aC(t*1e3)%1e3),nanoseconds:Math.trunc(aC(t*1e6)%1e3)}}function Ine(t){return{days:t/86400000n,hours:t/3600000n%24n,minutes:t/60000n%60n,seconds:t/1000n%60n,milliseconds:t%1000n,microseconds:0n,nanoseconds:0n}}function Pne(t){switch(typeof t){case"number":{if(Number.isFinite(t))return Tne(t);break}case"bigint":return Ine(t)}throw new TypeError("Expected a finite number or bigint")}const Rne=t=>t===0||t===0n,Nne=(t,e)=>e===1||e===1n?t:`${t}s`,Mne=1e-7,Fne=24n*60n*60n*1000n;function q8(t,e){const n=typeof t=="bigint";if(!n&&!Number.isFinite(t))throw new TypeError("Expected a finite number or bigint");e={...e};const r=t<0?"-":"";t=t<0?-t:t,e.colonNotation&&(e.compact=!1,e.formatSubMilliseconds=!1,e.separateMilliseconds=!1,e.verbose=!1),e.compact&&(e.unitCount=1,e.secondsDecimalDigits=0,e.millisecondsDecimalDigits=0);let i=[];const s=(c,f)=>{const d=Math.floor(c*10**f+Mne);return(Math.round(d)/10**f).toFixed(f)},o=(c,f,d,h)=>{if(!((i.length===0||!e.colonNotation)&&Rne(c)&&!(e.colonNotation&&d==="m"))){if(h??(h=String(c)),e.colonNotation){const p=h.includes(".")?h.split(".")[0].length:h.length,m=i.length>0?2:1;h="0".repeat(Math.max(0,m-p))+h}else h+=e.verbose?" "+Nne(f,c):d;i.push(h)}},a=Pne(t),l=BigInt(a.days);if(e.hideYearAndDays?o(BigInt(l)*24n+BigInt(a.hours),"hour","h"):(e.hideYear?o(l,"day","d"):(o(l/365n,"year","y"),o(l%365n,"day","d")),o(Number(a.hours),"hour","h")),o(Number(a.minutes),"minute","m"),!e.hideSeconds)if(e.separateMilliseconds||e.formatSubMilliseconds||!e.colonNotation&&t<1e3&&!e.subSecondsAsDecimals){const c=Number(a.seconds),f=Number(a.milliseconds),d=Number(a.microseconds),h=Number(a.nanoseconds);if(o(c,"second","s"),e.formatSubMilliseconds)o(f,"millisecond","ms"),o(d,"microsecond","µs"),o(h,"nanosecond","ns");else{const p=f+d/1e3+h/1e6,m=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,g=p>=1?Math.round(p):Math.ceil(p),b=m?p.toFixed(m):g;o(Number.parseFloat(b),"millisecond","ms",b)}}else{const c=(n?Number(t%Fne):t)/1e3%60,f=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,d=s(c,f),h=e.keepDecimalsOnWholeSeconds?d:d.replace(/\.0+$/,"");o(Number.parseFloat(h),"second","s",h)}if(i.length===0)return r+"0"+(e.verbose?" milliseconds":"ms");const u=e.colonNotation?":":" ";return typeof e.unitCount=="number"&&(i=i.slice(0,Math.max(e.unitCount,1))),r+i.join(u)}const Lne={class:"flex w-full gap-2"},Bne={class:"flex flex-1 flex-col gap-2"},$ne=["title"],zne={class:"flex-1 truncate"},jne={class:"ml-1 text-xs","data-testid":"history-item-endpoint"},Vne={class:"text-xxs flex min-w-0 flex-1 items-center gap-2"},Une={class:"text-nowrap","data-testid":"response-status-badge"},Hne={class:"flex w-full items-center justify-between"},qne={class:"text-subtle-foreground whitespace-nowrap"},Gne={key:0,class:"text-subtle-foreground text-xxs whitespace-nowrap"},Wne={class:"text-subtle-foreground text-xxs whitespace-nowrap"},Kne=z({__name:"HistoryItem",props:{log:{},index:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,i=s=>GC(new Date(s*1e3)).value;return(s,o)=>(T(),L(v(Wh),{class:"p-panel p-panel flex cursor-pointer flex-col items-start transition-colors",onSelect:o[0]||(o[0]=a=>r("select",n.index))},{default:D(()=>[M("div",Lne,[M("div",Bne,[M("div",{class:"flex w-full justify-between gap-1 leading-tight",title:n.log.request.endpoint},[M("div",zne,[k(Lm,{method:n.log.request.method,"data-testid":"history-item-method"},null,8,["method"]),M("span",jne,de(n.log.request.endpoint),1)]),k(V8,{status:n.log.response.status??v(xt).EMPTY,"data-testid":"history-item-status"},null,8,["status"])],8,$ne),M("div",Vne,[M("span",Une,de(n.log.response.statusCode)+" - "+de(n.log.response.statusText),1),o[1]||(o[1]=M("div",{class:"border-border w-8 border-b"},null,-1)),M("div",Hne,[M("div",null,[M("span",qne,de(v(q8)(n.log.durationInMs,{compact:!0})),1),n.log.response?(T(),K("span",Gne,"  / "+de(v(H8)(n.log.response.sizeInBytes)),1)):we("",!0)]),M("small",Wne,de(i(n.log.response.timestamp)),1)])])])])]),_:1}))}}),Xne=["title"],Yne={class:"px-panel my-2 flex gap-2"},Jne={key:1,class:"text-subtle-foreground flex flex-col items-center justify-center gap-2 py-8 text-center text-sm","data-testid":"history-empty-state"},Zne=z({__name:"RequestHistory",setup(t){const e=Rr(),n=G0(),r=Z(!1),i=Z(""),s=Z(null),o=Z(!1),a=Z(null),l=q(()=>n.lastLog),u=y=>GC(new Date(y*1e3)).value,c=q(()=>{var y;return((y=l.value)==null?void 0:y.response)===void 0?"":u(l.value.response.timestamp)}),f=q(()=>{var x;return((x=l.value)==null?void 0:x.response)===void 0?"":new Date(l.value.response.timestamp*1e3).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}),d=y=>{const x=n.allLogs[y];x&&(n.setActiveLog(y),e.restoreFromHistory(x))},h=q(()=>[...n.allLogs].filter(y=>y.response!==void 0).reverse()),p=q(()=>{if(!i.value.trim())return h.value;const y=i.value.toLowerCase();return h.value.filter(x=>x.request.endpoint.toLowerCase().includes(y))}),m=y=>{const x=n.allLogs.filter(E=>E.response!==void 0),S=x[x.length-1-y];return n.allLogs.indexOf(S)},g=()=>{o.value=!1,a.value&&(window.clearTimeout(a.value),a.value=null)},b=()=>{if(o.value){n.clearLogs(),g(),r.value=!1;return}o.value=!0,a.value&&window.clearTimeout(a.value),a.value=window.setTimeout(()=>{g()},1e3)};return nt(r,async y=>{var x;y?(await kr(),(x=s.value)==null||x.focus()):i.value=""}),(y,x)=>h.value.length?(T(),L(v(i8),{key:0,open:r.value,"onUpdate:open":x[1]||(x[1]=S=>r.value=S)},{default:D(()=>[k(v(o8),{"as-child":""},{default:D(()=>[k(v(gt),{variant:"ghost",size:"xs",class:"rounded px-1 transition-colors hover:bg-zinc-100 focus:outline-none focus-visible:ring-0 dark:hover:bg-zinc-800 dark:focus-visible:ring-0","data-testid":"response-history-trigger"},{default:D(()=>[M("small",{class:"text-subtle-foreground text-xs",title:f.value},de(c.value),9,Xne),k(v(DN),{class:"size-3"})]),_:1})]),_:1}),k(v(s8),{align:"end",class:"w-sm p-0"},{default:D(()=>[k(v(If),{class:"max-h-96 overflow-y-auto"},{default:D(()=>[M("div",Yne,[k(v(gt),{variant:"outline",size:"xs",class:Se(["h-sub-toolbar justify-start shadow-none transition-colors",v(ke)(o.value&&"text-rose-500 hover:text-rose-600 dark:text-rose-400 dark:hover:text-rose-300")]),"data-testid":"clear-history-button",onClick:b},{default:D(()=>[k(v(cp),{class:"size-3"}),x[2]||(x[2]=ne(" Clear History ",-1))]),_:1},8,["class"]),k(v(bne),{class:"h-sub-toolbar"},{default:D(()=>[k(v(xne),{ref_key:"searchInputRef",ref:s,modelValue:i.value,"onUpdate:modelValue":x[0]||(x[0]=S=>i.value=S),placeholder:"Type to search","data-testid":"history-search-input"},null,8,["modelValue"]),k(v(vne),null,{default:D(()=>[k(v(Ox),{class:"size-3"})]),_:1})]),_:1})]),k(v(_y)),p.value.length?(T(!0),K(Qe,{key:0},_n(p.value,(S,E)=>(T(),K(Qe,{key:S.request.endpoint+S.response.timestamp},[k(Kne,{log:S,index:m(h.value.indexOf(S)),"data-testid":"history-item","data-endpoint":S.request.endpoint,"data-method":S.request.method,onSelect:d},null,8,["log","index","data-endpoint","data-method"]),E<p.value.length-1?(T(),L(v(_y),{key:0})):we("",!0)],64))),128)):(T(),K("div",Jne,[k(v(Ox),{class:"size-8 opacity-20"}),x[3]||(x[3]=M("p",null,"No results found matching your keyword",-1))]))]),_:1})]),_:1})]),_:1},8,["open"])):we("",!0)}}),Qne={class:"flex items-center space-x-2"},ere={class:"text-xs text-nowrap","data-testid":"response-status-text"},tre=z({__name:"ResponseStatusCode",props:{status:{},response:{}},setup(t){const e=t;return(n,r)=>(T(),K("div",Qne,[k(V8,{status:e.status,"data-testid":"response-status-indicator"},null,8,["status"]),M("span",ere,de(e.status),1),e.response&&e.status!==v(xt).DUMP_AND_DIE?(T(),L(v(fo),{key:0,variant:"outline",class:"text-nowrap","data-testid":"response-status-badge"},{default:D(()=>[ne(de(e.response.statusCode)+" - "+de(e.response.statusText),1)]),_:1})):e.status===v(xt).PENDING?(T(),L(v(fo),{key:1,variant:"outline",class:"text-nowrap"},{default:D(()=>[...r[0]||(r[0]=[ne(" - ",-1)])]),_:1})):we("",!0)]))}}),nre={class:"relative flex h-full flex-1 items-center justify-between p-2"},rre={class:"flex w-full items-center justify-between gap-1"},ire={class:"flex items-center space-x-2"},sre={class:"text-xs"},ore={"data-testid":"response-status-duration"},are={"data-testid":"response-status-size"},lre={key:0,class:"flex items-center"},ure={key:0},cre={class:"flex h-full items-center gap-1 rounded-none border-indigo-500/50 bg-indigo-500/5 p-3.5 text-xs text-indigo-600 dark:text-indigo-400","data-testid":"imported-badge"},fre=z({__name:"ResponseStatus",props:{class:{},response:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=Rr(),r=q(()=>n.pendingRequestData),i=q(()=>e.response),s=q(()=>{var c;return(c=r.value)!=null&&c.isProcessing?xt.PENDING:!i.value||!i.value.response?xt.EMPTY:i.value.response.status??xt.EMPTY}),o=q(()=>{var c,f;return H8(((f=(c=i.value)==null?void 0:c.response)==null?void 0:f.sizeInBytes)??0,{space:!1})}),a=q(()=>{var c,f,d;return q8((c=r.value)!=null&&c.isProcessing?((f=r.value)==null?void 0:f.durationInMs)??0:((d=i.value)==null?void 0:d.durationInMs)??0,{verbose:!1,secondsDecimalDigits:2,keepDecimalsOnWholeSeconds:!0})}),l=()=>{n.cancelCurrentRequest()},u=q(()=>{var c;return((c=i.value)==null?void 0:c.importedFromShare)===!0});return(c,f)=>{var d,h,p,m,g;return T(),K("div",{class:Se(v(ke)("h-toolbar flex",e.class))},[M("div",nre,[M("div",rre,[M("div",ire,[k(tre,{status:s.value,response:(d=r.value)!=null&&d.isProcessing||(h=i.value)==null?void 0:h.response},null,8,["status","response"]),f[1]||(f[1]=M("div",{class:"w-8 border-b border-zinc-200"},null,-1)),M("span",sre,[M("span",ore,de(a.value),1),(p=r.value)!=null&&p.isProcessing?we("",!0):(T(),K(Qe,{key:0},[f[0]||(f[0]=M("span",{class:"text-color-muted mx-1 text-xs"},"/",-1)),M("span",are,de(o.value),1)],64))])]),(m=r.value)!=null&&m.isProcessing?we("",!0):(T(),K("div",lre,[k(Zne)]))]),(g=r.value)!=null&&g.isProcessing?(T(),K("div",ure,[k(v(gt),{variant:"outline",size:"xs",onClick:l},{default:D(()=>[k(v(MN)),f[2]||(f[2]=ne(" Cancel ",-1))]),_:1})])):we("",!0)]),u.value?(T(),L(dp,{key:0,value:"This response was imported from a shareable link"},{default:D(()=>[M("div",cre,[k(v(kN),{class:"size-4"})])]),_:1})):we("",!0)],2)}}}),dre=z({__name:"AppRippleCircle",props:{size:{default:210},class:{default:""},opacity:{default:.24},animationDelay:{default:0},borderStyle:{default:""}},setup(t){HC(n=>({v732789d8:e.size+"px",v4c367f18:e.animationDelay+"ms",v7e87f0da:e.opacity,v511a806d:e.borderStyle}));const e=t;return(n,r)=>(T(),K("div",{class:Se(v(ke)("absolute shadow-xl","animate-ripple-circle",e.class))},null,2))}}),hre=Rm(dre,[["__scopeId","data-v-91da32f6"]]),pre={class:"absolute inset-0"},mre=z({__name:"AppRipple",props:{baseCircleSize:{default:210},baseCircleOpacity:{default:.24},spaceBetweenCircle:{default:70},circleOpacityDowngradeRatio:{default:.03},circleClass:{default:""},waveSpeed:{default:80},numberOfCircles:{default:7}},setup(t){return(e,n)=>(T(),K("div",pre,[(T(!0),K(Qe,null,_n(t.numberOfCircles,r=>(T(),L(hre,{key:r,opacity:t.baseCircleOpacity-r*t.circleOpacityDowngradeRatio,size:t.baseCircleSize+r*t.spaceBetweenCircle,"animation-delay":r*t.waveSpeed,"border-style":r===t.numberOfCircles-1?"dashed":"solid",class:Se(t.circleClass)},null,8,["opacity","size","animation-delay","border-style","class"]))),128))]))}}),gre=z({__name:"AppPanelRipple",setup(t){return(e,n)=>(T(),L(mre,{class:"bottom-0 translate-x-2/5 translate-y-1/2 scale-150 bg-white/5 opacity-25 dark:bg-zinc-950/5","circle-class":"border-[hsl(var(--primary))] bg-primary/25 blobed"}))}}),Bm=Rm(gre,[["__scopeId","data-v-b3bb6b43"]]),bre={class:"max-w-md"},yre=z({__name:"AppPanelStateContainer",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("div",{class:Se(v(ke)("relative h-full flex-1 overflow-hidden p-2",e.class))},[M("div",bre,[Q(n.$slots,"default")]),k(Bm)],2))}}),vre=z({__name:"ResponseViewerEmptyState",setup(t){return(e,n)=>(T(),L(yre,null,{default:D(()=>[n[0]||(n[0]=M("h2",{class:"text-lg font-medium"},"You didn't perform any requests yet",-1)),n[1]||(n[1]=M("p",{class:"mb-2 text-sm"}," Make request and the result will appear here. Make sure to check the Wiki in case of doubts. ",-1)),k(GA)]),_:1}))}}),xre={class:"via-background from-destructive/10 dark:from-destructive/15 relative max-h-full flex-1 overflow-hidden bg-gradient-to-br from-10% p-4"},Sre={class:"relative z-10 flex max-h-full flex-col p-2"},Ere={class:"text-destructive text-lg font-medium"},wre={class:"text-sm"},_re={key:0},Cre={key:1},Are={key:0,class:"bg-background mt-2 ml-0.5 overflow-scroll rounded-sm p-2 text-sm shadow-[0_0_0_5px_rgba(0,0,0,0.2)]"},Dre=z({__name:"ResponseViewerErrorState",props:{error:{}},setup(t){const e=t,n=q({get:()=>e.error.body,set:()=>{}});return(r,i)=>(T(),K("div",xre,[M("div",Sre,[M("div",null,[k(v(fo),{variant:"outline",class:"p-0 px-1 text-xs"},{default:D(()=>[...i[1]||(i[1]=[ne(" Internal Error ",-1)])]),_:1}),M("h2",Ere,de(e.error.message),1)]),M("p",wre,[i[2]||(i[2]=ne(" It wasn't possible to relay the request via the internal proxy. ",-1)),e.error.message?(T(),K("span",_re," The below information might help, otherwise, check the console for more details. ")):(T(),K("span",Cre,"Check the console for more details."))]),e.error.body?(T(),K("div",Are,[k(Pm,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),language:"json",readonly:!0},null,8,["modelValue"])])):we("",!0)]),k(Bm)]))}}),kre=z({__name:"ResponseBody",props:{content:{}},setup(t){return(e,n)=>(T(),L(Pm,{language:"json",readonly:!0,placeholder:t.content===""?"Empty":"Response JSON Payload","model-value":t.content,disabled:t.content==="","auto-height":!1},null,8,["placeholder","model-value","disabled"]))}}),Ore=z({__name:"ConstDumpRenderer",props:{dump:{}},setup(t){return(e,n)=>(T(),K("span",{class:Se(v(ke)(v(qi).value,"italic"))},de(String(t.dump.value)),3))}}),Tre=z({__name:"NumberDumpRenderer",props:{dump:{}},setup(t){return(e,n)=>(T(),K("span",{class:Se(v(qi).value)},de(t.dump.value),3))}}),H2=z({__name:"AppCollapsible",props:{defaultOpen:{type:Boolean},open:{type:Boolean},disabled:{type:Boolean},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["update:open"],setup(t,{emit:e}){const i=Yr(t,e);return(s,o)=>(T(),L(v(FP),Yn(Pr(v(i))),{default:D(({open:a})=>[Q(s.$slots,"default",{open:a})]),_:3},16))}}),q2=z({__name:"AppCollapsibleContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(T(),L(v(BP),Ce(e,{class:"data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down transition-all"}),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),G2=z({__name:"AppCollapsibleTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(T(),L(v(zP),Yn(Pr(e)),{default:D(()=>[Q(n.$slots,"default")]),_:3},16))}}),lC=z({__name:"DumpKeyRenderer",props:{keyName:{},numerical:{type:Boolean,default:!1}},setup(t){return(e,n)=>t.keyName&&!t.numerical?(T(),K("span",{key:0,class:Se(v(qi).key)},'"'+de(t.keyName)+'": ',3)):t.keyName?(T(),K("span",{key:1,class:Se(v(qi).numericalKey)},de(String(t.keyName))+":  ",3)):we("",!0)}}),Ire=z({__name:"ObjectDumpValuePropertyKey",props:{property:{},keyName:{}},setup(t){const e=r=>({public:"text-emerald-600 dark:text-emerald-500",protected:"text-amber-600 dark:text-amber-500",private:"text-zinc-500 dark:text-zinc-400"})[r],n=r=>({public:"+",protected:"#",private:"-"})[r];return(r,i)=>(T(),K("span",{class:Se(v(qi).key)},[M("span",{class:Se(v(ke)("text-xs",e(t.property.visibility)))},de(n(t.property.visibility)),3),M("span",{class:Se(v(qi).objectProperty)},de(t.keyName)+":",3)],2))}}),Pre=z({__name:"UninitializedDumpRenderer",props:{dump:{}},setup(t){return(e,n)=>(T(),K("span",{class:Se(v(ke)(v(qi).value,"italic"))},[ne(de(String(t.dump.value))+" ",1),n[0]||(n[0]=M("i",{class:"text-xs"},"(Uninitialized Prop)",-1))],2))}}),Rre={key:0,class:"flex gap-0.5"},Nre={key:4},Mre={class:"text-rose-500 dark:text-rose-700"},Fre={class:"flex w-full items-center text-left"},Lre={class:"ml-1 text-xs text-zinc-500 dark:text-zinc-400"},Bre={class:"ml-2 border-l border-zinc-200 pl-2 dark:border-zinc-800"},$re={key:2},zre={class:"text-rose-500 dark:text-rose-700"},jre=z({__name:"SingleDumpRenderer",props:{dump:{},depth:{default:0},keyName:{default:void 0},numericalKey:{type:Boolean,default:!1}},setup(t){const e=t,n=q(()=>e.dump.type===jt.Object||e.dump.type===jt.Closure||e.dump.type===jt.Array),r=q(()=>{if(e.dump.type===jt.Closure)return e.dump.value.signature;if(e.dump.type===jt.Object){const s=e.dump.value.class,o=e.dump.value.propertiesCount;return o===0?"{}":`${s}: ${o} ${o===1?"property":"properties"}`}if(e.dump.type===jt.Array){const s=e.dump.value.length;return s===0?"[]":`array: ${s} ${s===1?"item":"items"}`}throw new Error("Node is not nestable")}),i=q(()=>{if(e.dump.type===jt.Closure){const s=e.dump.value.this,o=e.dump.value.class;return{class:{type:o?jt.String:jt.Constant,value:o||"null"},this:{type:s?jt.String:jt.Constant,value:s||"null"}}}return e.dump.type===jt.Object?e.dump.value.properties:e.dump.type===jt.Array?e.dump.value.items:[]});return(s,o)=>{const a=KI("SingleDumpRenderer",!0);return n.value?(T(),L(v(H2),{key:1,class:"flex flex-col","default-open":t.depth===0,"data-testid":"app-collapsible"},{default:D(()=>[k(v(G2),{class:"group/collapsible-trigger -mx-1 flex items-center gap-1 rounded-sm px-1 text-sm hover:bg-zinc-100/50 dark:hover:bg-zinc-800/50","data-testid":"collapsible-trigger",disabled:i.value.length===0},{default:D(()=>[Q(s.$slots,"key",{},()=>[t.keyName!==void 0?(T(),L(lC,{key:0,"key-name":t.keyName,numerical:t.numericalKey},null,8,["key-name","numerical"])):we("",!0)]),M("span",Fre,[k(v(U0),{class:"size-3 text-zinc-500 transition-transform group-data-[state=open]/collapsible-trigger:rotate-90"}),M("span",Lre,de(r.value),1)])]),_:3},8,["disabled"]),k(v(q2),null,{default:D(()=>[M("div",Bre,[(T(!0),K(Qe,null,_n(i.value,(l,u)=>(T(),K("div",{key:`${t.keyName??"root"}-${u}`,class:"flex items-center gap-1 py-0.5"},[t.dump.type===v(jt).Object?(T(),L(a,{key:0,dump:l.value,depth:t.depth+1},{key:D(()=>[k(Ire,{"key-name":u,property:l},null,8,["key-name","property"])]),_:2},1032,["dump","depth"])):t.dump.type===v(jt).Array||t.dump.type===v(jt).Closure?(T(),L(a,{key:1,dump:l,"key-name":String(u),"numerical-key":t.dump.value.numericallyIndexed,depth:t.depth+1},null,8,["dump","key-name","numerical-key","depth"])):(T(),K("div",$re,[M("small",zre,[ne(" Invalid nested value type `"+de(t.dump.type)+"` received. Please create a ",1),o[2]||(o[2]=M("a",{class:"underline",href:"https://github.com/sunchayn/nimbus/issues/new/choose"}," Bug ",-1)),o[3]||(o[3]=ne(" card. ",-1))])]))]))),128))])]),_:1})]),_:3},8,["default-open"])):(T(),K("div",Rre,[Q(s.$slots,"key",{},()=>[t.keyName!==void 0?(T(),L(lC,{key:0,"key-name":t.keyName,numerical:t.numericalKey},null,8,["key-name","numerical"])):we("",!0)]),M("div",{class:Se(v(qi).value)},[t.dump.type===v(jt).String?(T(),L(v(Vre),{key:0,dump:t.dump},null,8,["dump"])):t.dump.type===v(jt).Number?(T(),L(v(Tre),{key:1,dump:t.dump},null,8,["dump"])):t.dump.type===v(jt).Constant?(T(),L(v(Ore),{key:2,dump:t.dump},null,8,["dump"])):t.dump.type===v(jt).Uninitialized?(T(),L(Pre,{key:3,dump:t.dump},null,8,["dump"])):(T(),K("div",Nre,[M("small",Mre,[ne(" Invalid dump value type `"+de(t.dump.type)+"` received. Please create a ",1),o[0]||(o[0]=M("a",{class:"underline",href:"https://github.com/sunchayn/nimbus/issues/new/choose"}," Bug ",-1)),o[1]||(o[1]=ne(" card. ",-1))])]))],2)]))}}}),Vre=z({__name:"StringDumpRenderer",props:{dump:{}},setup(t){return(e,n)=>(T(),K("span",{class:Se(v(qi).stringValue)},[ne(' "'+de(t.dump.value)+'" ',1),M("span",{class:Se(v(qi).meta)},"("+de(t.dump.value.length)+")",3)],2))}}),qi={key:"text-success font-mono text-xs",numericalKey:"text-info font-mono text-xs",objectProperty:"text-subtle-foreground font-mono text-xs",value:"text-foreground font-mono text-xs",stringValue:"text-success font-mono text-xs",meta:"text-subtle-foreground"},Ure={class:"gap-.5 flex flex-col"},Hre={class:"text-foreground text-xs"},qre={class:"flex items-center gap-2"},Gre={key:0,class:"flex items-center gap-1"},Wre={class:"text-xxs text-subtle-foreground select-none"},Kre={class:"p-panel bg-subtle flex h-full min-h-0 flex-1 flex-col gap-1 overflow-y-auto"},Xre={key:0,class:"text-xxs text-subtle-foreground my-1"},Yre={key:1,class:"border-subtle bg-card rounded-md border text-sm"},Jre={class:"px-panel flex items-center gap-1.5 border-b py-1"},Zre={key:2,class:"border-subtle bg-card rounded-md border text-sm"},Qre={class:"px-panel flex items-center gap-1.5 border-b py-1"},eie=["data-testid"],tie={class:"px-panel relative z-10 flex gap-1.5 border-b py-1"},nie={class:"inline-flex flex-col","data-testid":"dump-value-title"},rie={class:"text-xs"},iie={class:"p-panel w-full overflow-x-auto whitespace-nowrap","data-testid":"dump-value-content"},sie=1200,oie=z({__name:"ResponseDumpAndDie",props:{rawContent:{}},emits:["update:dumps"],setup(t,{emit:e}){const n=t,r=e,i=Z([]),s=Z(0),o=UC(new Map),a=q(()=>i.value.length===0?null:i.value[s.value]??null),l=q(()=>i.value.length>1),u=q(()=>s.value>0),c=q(()=>s.value<i.value.length-1),f=y=>{const x=o.get(y);x!=null&&x.timeoutId&&clearTimeout(x.timeoutId),o.delete(y)},d=y=>{const x=window.setTimeout(()=>{o.delete(y)},sie);o.set(y,{deleting:!0,timeoutId:x})},h=y=>{const x=o.get(y);return x!=null&&x.deleting?(f(y),!0):(d(y),!1)},p=y=>{var x;return((x=o.get(y))==null?void 0:x.deleting)??!1},m=()=>{const y=a.value;if(!y||!h(y.id))return;const S=s.value,E=[...i.value];E.splice(S,1),i.value=E,r("update:dumps",E),E.length>0?s.value=Math.min(S,E.length-1):s.value=0,f(y.id)},g=()=>{u.value&&s.value--},b=()=>{c.value&&s.value++};return nt(()=>n.rawContent,y=>{if(y)try{const x=JSON.parse(String(y)),S=i.value.findIndex(E=>E.id===x.id);if(S!==-1){s.value=S;return}i.value=[x,...i.value],s.value=0}catch(x){console.error("Failed to parse dump snapshot:",x)}},{immediate:!0}),(y,x)=>{var S,E,C;return T(),K(Qe,null,[k(Oa,{class:"border-b"},{toolbox:D(()=>[M("div",qre,[l.value?(T(),K("div",Gre,[k(v(gt),{variant:"ghost",size:"xs",disabled:!u.value,"data-testid":"previous-dump-button",onClick:g},{default:D(()=>[k(v(mN),{class:"size-3"})]),_:1},8,["disabled"]),M("span",Wre,de(s.value+1)+" / "+de(i.value.length),1),k(v(gt),{variant:"ghost",size:"xs",disabled:!c.value,"data-testid":"next-dump-button",onClick:b},{default:D(()=>[k(v(U0),{class:"size-3"})]),_:1},8,["disabled"]),a.value?(T(),L(v(gt),{key:0,variant:"outline",size:"xs",class:"shadow-none","data-testid":"delete-dump-button",onClick:m},{default:D(()=>[k(v(cp),{class:Se(["size-3",{"text-destructive":p(a.value.id)}])},null,8,["class"])]),_:1})):we("",!0)])):we("",!0)])]),default:D(()=>{var w;return[M("div",Ure,[M("span",Hre,de(((w=a.value)==null?void 0:w.source)??"Unknown Source"),1)])]}),_:1}),M("div",Kre,[(S=a.value)!=null&&S.timestamp?(T(),K("div",Xre," Dumped At: "+de(((E=a.value)==null?void 0:E.timestamp)??""),1)):we("",!0),a.value===void 0||a.value===null?(T(),K("div",Yre,[M("div",Jre,[k(Xh,{class:"text-subtle-foreground"}),x[0]||(x[0]=ne(" Info ",-1))]),x[1]||(x[1]=M("div",{class:"p-panel"},"Please make sure one dump snapshot is selected.",-1))])):a.value.dumps.length===0?(T(),K("div",Zre,[M("div",Qre,[k(Xh,{class:"text-destructive"}),x[2]||(x[2]=ne(" Error ",-1))]),x[3]||(x[3]=M("div",{class:"p-panel"},[M("p",null," Something Went Wrong! Die and Dump is detected but there is no dumps. "),M("small",null,[ne(" If you think this is a bug, please open a "),M("a",{class:"underline",href:"https://github.com/sunchayn/nimbus/issues/new/choose"}," Bug "),ne(" card. ")])],-1))])):(T(),K("div",{key:a.value.id,class:"flex flex-col gap-2.5"},[(T(!0),K(Qe,null,_n(((C=a.value)==null?void 0:C.dumps)??[],(w,A)=>(T(),K("div",{key:A,class:"border-subtle bg-card rounded-md border","data-testid":`dump-value-${A}`},[M("div",tie,[k(Xh,{class:"text-subtle-foreground pt-1"}),M("span",nie,[M("span",rie,"Dump #"+de(A+1),1)])]),M("div",iie,[a.value?(T(),L(v(jre),{key:0,class:"w-full max-w-full",dump:w},null,8,["dump"])):we("",!0)])],8,eie))),128))]))])],64)}}}),aie={class:"relative w-full overflow-auto"},lie=z({__name:"AppTable",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("div",aie,[M("table",{class:Se(v(ke)("w-full caption-bottom text-sm",e.class))},[Q(n.$slots,"default")],2)]))}}),uie=z({__name:"AppTableBody",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("tbody",{class:Se(v(ke)("[&_tr:last-child]:border-0",e.class))},[Q(n.$slots,"default")],2))}}),P1=z({__name:"AppTableCell",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("td",{class:Se(v(ke)("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-0.5",e.class))},[Q(n.$slots,"default")],2))}}),cie=z({__name:"AppTableRow",props:{class:{}},setup(t){const e=t;return(n,r)=>(T(),K("tr",{class:Se(v(ke)("border-b transition-colors hover:bg-zinc-100/50 data-[state=selected]:bg-zinc-100 dark:hover:bg-zinc-800/50 dark:data-[state=selected]:bg-zinc-800",e.class))},[Q(n.$slots,"default")],2))}}),fie=z({__name:"KeyValueDisplayListItem",props:{item:{}},setup(t){const e=t,{copy:n,copied:r}=Co(),i=()=>{n(String(e.item.value))};return(s,o)=>(T(),L(v(cie),{class:"flex-wrap border-0"},{default:D(()=>[k(v(P1),{class:"pl-panel w-1/4 border-b-1 border-b-transparent align-top font-medium"},{default:D(()=>[ne(de(t.item.key),1)]),_:1}),k(v(P1),{class:"border-border border-b-1 align-top break-words"},{default:D(()=>[Q(s.$slots,"value",{item:e.item},()=>[ne(de(t.item.value),1)])]),_:3}),k(v(P1),{class:"px-panel border-border w-10 border-b-1 align-top"},{default:D(()=>[k(nu,{"on-click":i,copied:v(r)},null,8,["copied"])]),_:1})]),_:3}))}}),G8=z({__name:"KeyValueDisplayList",props:{items:{}},setup(t){return(e,n)=>(T(),L(v(lie),{class:"table-fixed text-xs"},{default:D(()=>[k(v(uie),{class:"max-w-full"},{default:D(()=>[(T(!0),K(Qe,null,_n(t.items,(r,i)=>(T(),L(fie,{key:i,item:r},{value:D(({item:s})=>[Q(e.$slots,"value",{item:s})]),_:3},8,["item"]))),128))]),_:3})]),_:3}))}}),die={class:"flex translate-x-2 items-center space-x-2"},hie={class:"px-panel flex-start flex w-10 items-center"},pie={class:"min-h-0 flex-1 overflow-y-auto"},mie={key:0,class:"text-success mb-1 flex items-center gap-1"},gie=z({__name:"ResponseCookies",props:{cookies:{}},setup(t){var u;const e=t,n=ka(),r=Cl(Tf("response-viewer-cookies-decrypted-"+((u=n.activeTab)==null?void 0:u.id)),!1),{copy:i,copied:s}=Co(),o=q(()=>e.cookies.map(c=>{const f=c.value.decrypted!==null,d=r.value?c.value.decrypted??c.value.raw:c.value.raw;return{key:c.key,value:d,isDecryptable:f}})),a=q(()=>{var c;return((c=e.cookies)==null?void 0:c.length)??!1}),l=()=>{const c=o.value.reduce((f,d)=>`${f}${d.key}: ${d.value}
`,"");i(c)};return(c,f)=>(T(),K(Qe,null,[k(Oa,{class:"border-b"},{toolbox:D(()=>[M("div",die,[k(r8,{disabled:!a.value,onClick:f[0]||(f[0]=()=>r.value=!v(r))},{default:D(()=>[v(r)?(T(),K(Qe,{key:0},[k(v(RN),{class:"size-5"}),f[1]||(f[1]=ne(" Encrypt ",-1))],64)):(T(),K(Qe,{key:1},[k(v(Lx),{class:"size-5"}),f[2]||(f[2]=ne(" Decrypt ",-1))],64))]),_:1},8,["disabled"]),M("div",hie,[k(nu,{disabled:!a.value,"on-click":l,copied:v(s)},null,8,["disabled","copied"])])])]),default:D(()=>[ne(" Cookies ("+de(o.value.length)+") ",1)]),_:1}),M("div",pie,[(T(),L(XI(G8),{items:o.value},{value:D(({item:d})=>[M("span",null,[d.isDecryptable?we("",!0):(T(),K("small",mie,[k(v(Lx),{size:10}),f[3]||(f[3]=ne(" Non-Encrypted Value ",-1))])),ne(" "+de(d.value),1)])]),_:1},8,["items"]))])],64))}}),bie={class:"px-panel flex-start flex w-10 translate-x-2 items-center"},yie={class:"min-h-0 flex-1 overflow-y-auto"},vie=z({__name:"ResponseHeaders",props:{headers:{}},setup(t){const e=t,{copy:n,copied:r}=Co(),i=q(()=>e.headers.map(o=>({key:o.key,value:o.value??""}))),s=()=>{const o=e.headers.reduce((a,l)=>`${a}${l.key}: ${l.value??""}
`,"");n(o)};return(o,a)=>(T(),K(Qe,null,[k(Oa,{class:"border-b"},{toolbox:D(()=>[M("div",bie,[k(nu,{"on-click":s,copied:v(r)},null,8,["copied"])])]),default:D(()=>[ne(" Headers ("+de(t.headers.length)+") ",1)]),_:1}),M("div",yie,[k(G8,{items:i.value},null,8,["items"])])],64))}}),xie={class:"relative min-h-0 flex-1"},Sie={key:0,class:"bg-background absolute top-0 left-0 z-[100] h-full w-full animate-pulse opacity-75"},Eie={class:"bg-subtle flex items-center justify-between border-b"},wie={class:"relative min-w-0 flex-1"},_ie={class:"from-subtle via-subtle/80 pointer-events-none absolute top-0 bottom-0 left-0 w-8 bg-gradient-to-r to-transparent transition-opacity duration-200"},Cie={class:"from-subtle via-subtle/80 pointer-events-none absolute top-0 right-0 bottom-0 w-8 bg-gradient-to-l to-transparent transition-opacity duration-200"},Aie={class:"pr-panel"},Die={class:"flex items-center"},kie=z({__name:"ResponseViewerResponse",props:{response:{}},setup(t){const e=t,n=Rr(),r=Cl(Tf("response-viewer-tab"),"response"),{scrollContainer:i,showLeftMask:s,showRightMask:o,updateScrollMasks:a,scrollTabIntoView:l}=qC(),u=q(()=>e.response),c=q(()=>n.pendingRequestData),f=q(()=>{var h;return(h=u.value)==null?void 0:h.request.transactionMode}),d=h=>{l(h.currentTarget)};return(h,p)=>{var m;return T(),K("div",xie,[(m=c.value)!=null&&m.isProcessing?(T(),K("div",Sie)):we("",!0),k(v(UA),{"default-value":v(r),class:"mt-0 flex h-full flex-col overflow-auto","onUpdate:modelValue":p[1]||(p[1]=g=>r.value=g)},{default:D(()=>[M("div",Eie,[M("div",wie,[M("div",{ref_key:"scrollContainer",ref:i,class:"scrollbar-hide flex items-center justify-between overflow-x-auto",style:{"scrollbar-width":"none","-ms-overflow-style":"none"},onScroll:p[0]||(p[0]=(...g)=>v(a)&&v(a)(...g))},[k(v(HA),{class:"h-toolbar px-panel rounded-none"},{default:D(()=>[k(v(Ho),{value:"response",label:"Response",onClick:d}),k(v(Ho),{value:"response-headers",label:"Headers",onClick:d}),k(v(Ho),{value:"response-cookies",label:"Cookies",onClick:d})]),_:1})],544),ua(M("div",_ie,null,512),[[Al,v(s)]]),ua(M("div",Cie,null,512),[[Al,v(o)]])]),M("div",Aie,[f.value?(T(),L(v(dp),{key:0,value:"Changes were automatically rolled back for this request"},{default:D(()=>[M("div",Die,[k(v(fo),{variant:"outline",class:"gap-1"},{default:D(()=>[k(v(SN),{class:"size-3 min-w-3"}),p[2]||(p[2]=ne(" Transaction Mode ",-1))]),_:1})])]),_:1})):we("",!0)])]),k(v(Uo),{value:"response",class:"mt-0 flex min-h-0 flex-1 flex-col overflow-hidden"},{default:D(()=>{var g,b,y,x;return[((b=(g=u.value)==null?void 0:g.response)==null?void 0:b.status)!==v(xt).DUMP_AND_DIE?(T(),L(v(If),{key:0,class:"min-h-0 flex-1"},{default:D(()=>{var S,E;return[k(kre,{class:"min-h-0",content:((E=(S=u.value)==null?void 0:S.response)==null?void 0:E.body)??""},null,8,["content"])]}),_:1})):(T(),L(oie,{key:1,"raw-content":((x=(y=u.value)==null?void 0:y.response)==null?void 0:x.body)??"[]"},null,8,["raw-content"]))]}),_:1}),k(v(Uo),{value:"response-headers",class:"mt-0 flex min-h-0 flex-1 flex-col overflow-hidden"},{default:D(()=>{var g,b;return[k(vie,{headers:((b=(g=u.value)==null?void 0:g.response)==null?void 0:b.headers)??[]},null,8,["headers"])]}),_:1}),k(v(Uo),{value:"response-cookies",class:"mt-0 flex min-h-0 flex-1 flex-col overflow-hidden"},{default:D(()=>{var g,b;return[k(gie,{cookies:((b=(g=u.value)==null?void 0:g.response)==null?void 0:b.cookies)??[]},null,8,["cookies"])]}),_:1})]),_:1},8,["default-value"])])}}}),Oie=z({__name:"ResponseViewer",props:{class:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=ka(),r=q(()=>n.activeResponse);return(i,s)=>(T(),K("div",{class:Se(v(ke)("bg-background flex h-full flex-col",e.class)),"data-testid":"response-content"},[k(fre,{response:r.value,class:"border-b"},null,8,["response"]),r.value?r.value.error?(T(),L(Dre,{key:1,"data-testid":"response-error",error:r.value.error},null,8,["error"])):(T(),L(kie,{key:2,response:r.value},null,8,["response"])):(T(),L(vre,{key:0,"data-testid":"response-empty"}))],2))}}),Tie={class:"from-destructive/10 relative z-10 border-b bg-gradient-to-r to-transparent"},Iie={class:"flex"},Pie={class:"bg-destructive/10 dark:bg-destructive/20 flex items-center px-4"},Rie={class:"p-2.5"},Nie={class:"text-md leading-tight font-semibold"},W8=z({__name:"ErrorCardHeader",props:{message:{}},setup(t){const e=t;return(n,r)=>(T(),K("div",Tie,[M("div",Iie,[M("div",Pie,[k(v(H0),{class:"text-destructive dark:text-foreground size-4"})]),M("div",Rie,[M("h2",Nie,de(e.message),1),r[0]||(r[0]=M("p",{class:"text-subtle-foreground text-sm"},"Route extraction failed",-1))])])]))}}),Mie={class:"flex items-start gap-2.5"},Fie={class:"flex-1"},Lie=["innerHTML"],K8=z({__name:"SuggestedSolutionCallout",props:{solution:{},class:{}},setup(t){const e=t;return(n,r)=>(T(),K("div",{class:Se(v(ke)("bg-subtle rounded-lg border p-2",e.class))},[M("div",Mie,[k(v(TN),{class:"mt-1 size-5 flex-shrink-0"}),M("div",Fie,[r[0]||(r[0]=M("h3",{class:"font-semibold"},"Suggested Solution",-1)),M("p",{class:"text-sm",innerHTML:t.solution},null,8,Lie)])])],2))}}),Bie={class:"text-foreground mb-2 font-semibold"},$ie={class:"bg-destructive/10 dark:bg-destructive/30 rounded-lg p-4"},zie={class:"text-destructive font-mono text-sm"},jie={key:0,class:"text-destructive mt-2 text-sm wrap-break-word"},Vie={key:0,class:"mt-2"},Uie=["innerHTML"],X8=z({__name:"TechnicalDetailsSection",props:{previousError:{}},setup(t){const e=t,{copy:n,copied:r}=Co(),i=()=>{let s=e.previousError.message;e.previousError.file&&(s+=`
${e.previousError.file}::${e.previousError.line}`),e.previousError.trace&&(s+=`
${e.previousError.trace}`),n(String(s))};return(s,o)=>(T(),K("div",null,[M("h3",Bie,[o[0]||(o[0]=ne(" Technical Details ",-1)),k(nu,{"on-click":i,copied:v(r)},null,8,["copied"])]),M("div",$ie,[M("p",zie,de(t.previousError.message),1),t.previousError.file?(T(),K("div",jie,[M("p",null,de(t.previousError.file)+":"+de(t.previousError.line),1),t.previousError.trace?(T(),K("div",Vie,[o[1]||(o[1]=ne(" Trace: ",-1)),o[2]||(o[2]=M("br",null,null,-1)),M("span",{class:"text-subtle-foreground block",innerHTML:t.previousError.trace},null,8,Uie)])):we("",!0)])):we("",!0)])]))}}),Hie={class:"from-destructive/5 dark:from-destructive/15 relative h-full max-h-full w-full bg-gradient-to-br to-transparent p-4"},qie={class:"relative z-10 flex h-full w-full items-center justify-center overflow-auto py-2"},Gie={class:"flex h-full flex-col space-y-4"},Wie={class:"space-y-2"},Kie={class:"bg-subtle/10 relative flex flex-col overflow-hidden rounded-md border-1 break-words backdrop-blur-md"},Xie={key:1,class:"relative z-10 flex flex-1 flex-col space-y-4 overflow-auto p-4"},Yie={class:"flex gap-4"},Jie=z({__name:"GlobalErrorRenderer",props:{error:{}},setup(t){const e=()=>{window.location.reload()};return(n,r)=>(T(),K("div",Hie,[M("div",qie,[M("div",Gie,[M("div",Wie,[k(v(fo),{variant:"outline",class:"p-0 px-1 text-xs"},{default:D(()=>[...r[0]||(r[0]=[ne(" Internal Error ",-1)])]),_:1}),r[1]||(r[1]=M("h1",{class:"text-destructive text-xl font-medium"}," An error occurred while processing your application routes ",-1))]),M("div",Kie,[k(W8,{message:t.error.exception.message},null,8,["message"]),t.error.suggestedSolution?(T(),L(K8,{key:0,solution:t.error.suggestedSolution,class:"rounded-none border-0"},null,8,["solution"])):we("",!0),t.error.exception.previous?(T(),K("div",Xie,[k(X8,{class:"flex-1","previous-error":t.error.exception.previous},null,8,["previous-error"])])):we("",!0)]),M("div",Yie,[k(v(gt),{variant:"outline",size:"xs",onClick:e},{default:D(()=>[k(v(RA)),r[2]||(r[2]=ne(" Retry ",-1))]),_:1})])])]),k(Bm)]))}}),Zie={class:"space-y-2 rounded-lg border p-4"},Qie={key:0,class:"flex items-center gap-2"},ese={class:"bg-subtle rounded border px-2 py-1 text-sm"},tse={key:1,class:"flex items-center gap-2"},nse={class:"flex gap-1"},rse={key:2,class:"flex items-center gap-2"},ise={class:"bg-subtle rounded border px-2 py-1 text-sm"},sse={key:3,class:"flex items-center gap-2"},ose={class:"bg-subtle rounded border px-2 py-1 text-sm"},ase=z({__name:"RouteInformationSection",props:{routeContext:{}},setup(t){return(e,n)=>(T(),K("div",null,[n[4]||(n[4]=M("h3",{class:"mb-2 font-semibold"},"Route Information",-1)),M("div",Zie,[t.routeContext.uri?(T(),K("div",Qie,[n[0]||(n[0]=M("span",{class:"text-subtle-foreground w-20 text-sm font-medium"},"URI:",-1)),M("code",ese,de(t.routeContext.uri),1)])):we("",!0),t.routeContext.methods?(T(),K("div",tse,[n[1]||(n[1]=M("span",{class:"text-subtle-foreground w-20 text-sm font-medium"}," Methods: ",-1)),M("div",nse,[(T(!0),K(Qe,null,_n(t.routeContext.methods,r=>(T(),L(Lm,{key:r,method:r},null,8,["method"]))),128))])])):we("",!0),t.routeContext.controllerClass?(T(),K("div",rse,[n[2]||(n[2]=M("span",{class:"text-subtle-foreground w-20 text-sm font-medium"}," Controller: ",-1)),M("code",ise,de(t.routeContext.controllerClass),1)])):we("",!0),t.routeContext.controllerMethod?(T(),K("div",sse,[n[3]||(n[3]=M("span",{class:"text-subtle-foreground w-20 text-sm font-medium"}," Method: ",-1)),M("code",ose,de(t.routeContext.controllerMethod),1)])):we("",!0)])]))}}),lse={class:"from-destructive/5 dark:from-destructive/15 relative h-full max-h-full w-full bg-gradient-to-br to-transparent p-4"},use={class:"relative z-10 flex h-full w-full justify-center overflow-auto py-2"},cse={class:"flex h-full flex-col space-y-4"},fse={class:"space-y-2"},dse={class:"bg-subtle/10 relative flex flex-1 flex-col overflow-hidden rounded-md border-1 break-words backdrop-blur-md"},hse={class:"relative z-10 flex flex-1 flex-col space-y-4 overflow-auto p-4"},pse={class:"flex gap-4 px-4 py-2"},mse=z({__name:"RouteSpecificExtractorExceptionRenderer",props:{error:{}},setup(t){const e=t,n=Z(!1),r=()=>{window.location.reload()},i=()=>{if(n.value||!e.error.ignoreData)return;n.value=!0;const s=new URL(window.location.href);s.searchParams.set("ignore",e.error.ignoreData),window.location.href=s.toString()};return(s,o)=>(T(),K("div",lse,[M("div",use,[M("div",cse,[M("div",fse,[k(v(fo),{variant:"outline",class:"p-0 px-1 text-xs"},{default:D(()=>[...o[0]||(o[0]=[ne(" Internal Error ",-1)])]),_:1}),o[1]||(o[1]=M("h1",{class:"text-destructive text-xl font-medium"}," An error occurred while processing your application routes ",-1))]),t.error.suggestedSolution?(T(),L(K8,{key:0,solution:t.error.suggestedSolution},null,8,["solution"])):we("",!0),M("div",dse,[k(W8,{message:t.error.exception.message},null,8,["message"]),M("div",hse,[k(ase,{"route-context":t.error.routeContext},null,8,["route-context"]),t.error.exception.previous?(T(),L(X8,{key:0,class:"flex-1","previous-error":t.error.exception.previous},null,8,["previous-error"])):we("",!0)]),M("div",pse,[k(v(gt),{variant:"outline",size:"xs",disabled:n.value,onClick:r},{default:D(()=>[k(v(RA)),o[2]||(o[2]=ne(" Retry ",-1))]),_:1},8,["disabled"]),k(v(gt),{variant:"default",disabled:n.value,size:"xs",onClick:i},{default:D(()=>[n.value?(T(),L(v(IN),{key:0,class:"animate-spin"})):(T(),L(v(FN),{key:1})),ne(" "+de(n.value?"Ignoring...":"Ignore this Endpoint"),1)]),_:1},8,["disabled"])])])])]),k(Bm)]))}}),gse=z({__name:"RouteExtractorExceptionRenderer",props:{error:{}},setup(t){return(e,n)=>(T(),L(mse,{error:t.error},null,8,["error"]))}}),bse={class:"w-full"},yse={class:"flex items-center gap-2 overflow-hidden"},vse=z({__name:"ApplicationSwitcher",setup(t){const e=Xi(),n=r=>{if(r===null)return;const i=new URL(window.location.href);i.searchParams.set("application",String(r)),window.location.href=i.toString()};return(r,i)=>(T(),K("div",bse,[k(v(tu),{"model-value":v(e).activeApplication||"","onUpdate:modelValue":n},{default:D(()=>[k(v(Zl),{class:"px-panel w-full border-none text-xs shadow-none focus:ring-0 active:ring-0"},{default:D(()=>[M("div",yse,[k(v(ON),{class:"text-subtle-foreground size-3.5 shrink-0"}),k(v(Ql),{placeholder:"Select an application",class:"truncate"})])]),_:1}),k(v(eu),{class:"min-w-52","align-offset":2},{default:D(()=>[k(v(Pc),null,{default:D(()=>[k(v(Rc),null,{default:D(()=>[...i[0]||(i[0]=[ne("Applications",-1)])]),_:1}),(T(!0),K(Qe,null,_n(v(e).applications,(s,o)=>(T(),L(v(Es),{key:o,value:o,class:"text-xs"},{default:D(()=>[ne(de(s),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["model-value"])]))}});function Y8(t){const e=t.MASK_HEIGHT,n=t.MASK_HEIGHT,r=(t==null?void 0:t.SCROLL_THRESHOLD)??md.SCROLL_THRESHOLD,i=(t==null?void 0:t.SCROLL_PADDING)??md.SCROLL_PADDING,s=(t==null?void 0:t.ANIMATION_DURATION)??md.ANIMATION_DURATION,o=(t==null?void 0:t.DEBOUNCE_DELAY)??md.DEBOUNCE_DELAY,a=Z(null),l=Z(!1),u=Z(!1),c=q(()=>{if(!a.value)return null;const{scrollTop:S,scrollHeight:E,clientHeight:C}=a.value,w=Math.round(S),A=Math.max(0,Math.round(E)-Math.round(C));return{current:w,max:A,isAtStart:w<=r,isAtEnd:A<=r||w>=A-r}}),f=()=>{if(!a.value)return;const{scrollTop:S,scrollHeight:E,clientHeight:C}=a.value,w=Math.round(S),A=Math.round(E),_=Math.round(C),O=Math.max(0,A-_),I=O<=r,N=w<=r,P=I||w>=O-r;l.value=!N&&!I,u.value=!P&&!I},d=Wy(f,o),h=S=>{if(!a.value)return;const E=a.value,C=E.getBoundingClientRect(),w=S.getBoundingClientRect(),A=w.top-C.top+E.scrollTop,_=A+w.height,O=E.clientHeight<e*2.5?E.clientHeight/4:e,I=E.clientHeight<n*2.5?E.clientHeight/4:n,N=E.scrollTop+O,P=E.scrollTop+E.clientHeight-I;let R=E.scrollTop;A<N?R=Math.max(0,A-O-i):_>P&&(R=_-E.clientHeight+I+i),R!==E.scrollTop&&(E.scrollTo({top:R,behavior:"smooth"}),setTimeout(()=>{f()},s))},p=()=>{if(a.value)return a.value.addEventListener("scroll",d,{passive:!0}),()=>{var S;(S=a.value)==null||S.removeEventListener("scroll",d)}},m=()=>co(a,d),g=()=>YI(a,d,{childList:!0,subtree:!0});let b=null,y=null,x=null;return gn(()=>{b=p()??null,y=m().stop,x=g().stop,kr(()=>{f()})}),wo(()=>{b==null||b(),y==null||y(),x==null||x()}),{scrollContainer:a,showTopMask:kc(l),showBottomMask:kc(u),scrollBounds:c,updateScrollMasks:f,scrollTabIntoView:h}}var Yh={exports:{}},R1={exports:{}},N1={};/**
* @vue/compiler-core v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Ul=Symbol(""),wl=Symbol(""),$m=Symbol(""),vf=Symbol(""),W2=Symbol(""),Eo=Symbol(""),K2=Symbol(""),X2=Symbol(""),zm=Symbol(""),jm=Symbol(""),xu=Symbol(""),Vm=Symbol(""),Y2=Symbol(""),Um=Symbol(""),Hm=Symbol(""),qm=Symbol(""),Gm=Symbol(""),Wm=Symbol(""),Km=Symbol(""),J2=Symbol(""),Z2=Symbol(""),od=Symbol(""),xf=Symbol(""),Xm=Symbol(""),Ym=Symbol(""),Hl=Symbol(""),Su=Symbol(""),Jm=Symbol(""),y0=Symbol(""),J8=Symbol(""),v0=Symbol(""),Sf=Symbol(""),Z8=Symbol(""),Q8=Symbol(""),Zm=Symbol(""),e4=Symbol(""),t4=Symbol(""),Qm=Symbol(""),Q2=Symbol(""),xa={[Ul]:"Fragment",[wl]:"Teleport",[$m]:"Suspense",[vf]:"KeepAlive",[W2]:"BaseTransition",[Eo]:"openBlock",[K2]:"createBlock",[X2]:"createElementBlock",[zm]:"createVNode",[jm]:"createElementVNode",[xu]:"createCommentVNode",[Vm]:"createTextVNode",[Y2]:"createStaticVNode",[Um]:"resolveComponent",[Hm]:"resolveDynamicComponent",[qm]:"resolveDirective",[Gm]:"resolveFilter",[Wm]:"withDirectives",[Km]:"renderList",[J2]:"renderSlot",[Z2]:"createSlots",[od]:"toDisplayString",[xf]:"mergeProps",[Xm]:"normalizeClass",[Ym]:"normalizeStyle",[Hl]:"normalizeProps",[Su]:"guardReactiveProps",[Jm]:"toHandlers",[y0]:"camelize",[J8]:"capitalize",[v0]:"toHandlerKey",[Sf]:"setBlockTracking",[Z8]:"pushScopeId",[Q8]:"popScopeId",[Zm]:"withCtx",[e4]:"unref",[t4]:"isRef",[Qm]:"withMemo",[Q2]:"isMemoSame"};function n4(t){Object.getOwnPropertySymbols(t).forEach(e=>{xa[e]=t[e]})}const xse={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},Sse={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},Ese={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},wse={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_CACHE:2,2:"CAN_CACHE",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},ln={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function r4(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:ln}}function ql(t,e,n,r,i,s,o,a=!1,l=!1,u=!1,c=ln){return t&&(a?(t.helper(Eo),t.helper(wa(t.inSSR,u))):t.helper(Ea(t.inSSR,u)),o&&t.helper(Wm)),{type:13,tag:e,props:n,children:r,patchFlag:i,dynamicProps:s,directives:o,isBlock:a,disableTracking:l,isComponent:u,loc:c}}function uo(t,e=ln){return{type:17,loc:e,elements:t}}function Dr(t,e=ln){return{type:15,loc:e,properties:t}}function Gt(t,e){return{type:16,loc:ln,key:on(t)?Pe(t,!0):t,value:e}}function Pe(t,e=!1,n=ln,r=0){return{type:4,loc:n,content:t,isStatic:e,constType:e?3:r}}function _se(t,e){return{type:5,loc:e,content:on(t)?Pe(t,!1,e):t}}function Hr(t,e=ln){return{type:8,loc:e,children:t}}function Zt(t,e=[],n=ln){return{type:14,loc:n,callee:t,arguments:e}}function Sa(t,e=void 0,n=!1,r=!1,i=ln){return{type:18,params:t,returns:e,newline:n,isSlot:r,loc:i}}function x0(t,e,n,r=!0){return{type:19,test:t,consequent:e,alternate:n,newline:r,loc:ln}}function i4(t,e,n=!1,r=!1){return{type:20,index:t,value:e,needPauseTracking:n,inVOnce:r,needArraySpread:!1,loc:ln}}function s4(t){return{type:21,body:t,loc:ln}}function Cse(t){return{type:22,elements:t,loc:ln}}function Ase(t,e,n){return{type:23,test:t,consequent:e,alternate:n,loc:ln}}function Dse(t,e){return{type:24,left:t,right:e,loc:ln}}function kse(t){return{type:25,expressions:t,loc:ln}}function Ose(t){return{type:26,returns:t,loc:ln}}function Ea(t,e){return t||e?zm:jm}function wa(t,e){return t||e?K2:X2}function eg(t,{helper:e,removeHelper:n,inSSR:r}){t.isBlock||(t.isBlock=!0,n(Ea(r,t.isComponent)),e(Eo),e(wa(r,t.isComponent)))}const uC=new Uint8Array([123,123]),cC=new Uint8Array([125,125]);function fC(t){return t>=97&&t<=122||t>=65&&t<=90}function Er(t){return t===32||t===10||t===9||t===12||t===13}function Is(t){return t===47||t===62||Er(t)}function S0(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}const Cn={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class Tse{constructor(e,n){this.stack=e,this.cbs=n,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=uC,this.delimiterClose=cC,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=uC,this.delimiterClose=cC}getPos(e){let n=1,r=e+1;for(let i=this.newlines.length-1;i>=0;i--){const s=this.newlines[i];if(e>s){n=i+2,r=e-s;break}}return{column:r,line:n,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const n=this.index+1-this.delimiterOpen.length;n>this.sectionStart&&this.cbs.ontext(this.sectionStart,n),this.state=3,this.sectionStart=n}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?Is(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||Er(e)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const r=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=r}this.sectionStart=n+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Cn.TitleEnd||this.currentSequence===Cn.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(e===60)}stateCDATASequence(e){e===Cn.Cdata[this.sequenceIndex]?++this.sequenceIndex===Cn.Cdata.length&&(this.state=28,this.currentSequence=Cn.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);if(n===10&&this.newlines.push(this.index),n===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Cn.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,n){this.enterRCDATA(e,n),this.state=31}enterRCDATA(e,n){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=n}stateBeforeTagName(e){e===33?(this.state=22,this.sectionStart=this.index+1):e===63?(this.state=24,this.sectionStart=this.index+1):fC(e)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:e===116?this.state=30:this.state=e===115?29:6):e===47?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){Is(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(Is(e)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(S0("</"+n),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){Er(e)||(e===62?(this.state=1,this.sectionStart=this.index+1):(this.state=fC(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(e===62||Er(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){e===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){e===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):e===47?this.state=7:e===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):Er(e)||this.handleAttrStart(e)}handleAttrStart(e){e===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):e===46||e===58||e===64||e===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):Er(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(e===61||Is(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){e===61||Is(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):e===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){e===61||Is(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===91?this.state=15:e===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){e===93?this.state=14:(e===61||Is(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){e===61||Is(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){e===61?this.state=18:e===47||e===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):Er(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){e===34?(this.state=19,this.sectionStart=this.index+1):e===39?(this.state=20,this.sectionStart=this.index+1):Er(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,n){(e===n||this.fastForwardTo(n))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){Er(e)||e===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(e===39||e===60||e===61||e===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){e===91?(this.state=26,this.sequenceIndex=0):this.state=e===45?25:23}stateInDeclaration(e){(e===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){e===45?(this.state=28,this.currentSequence=Cn.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(e===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===Cn.ScriptEnd[3]?this.startSpecial(Cn.ScriptEnd,4):e===Cn.StyleEnd[3]?this.startSpecial(Cn.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===Cn.TitleEnd[3]?this.startSpecial(Cn.TitleEnd,4):e===Cn.TextareaEnd[3]?this.startSpecial(Cn.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);switch(n===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(n);break}case 2:{this.stateInterpolationOpen(n);break}case 3:{this.stateInterpolation(n);break}case 4:{this.stateInterpolationClose(n);break}case 31:{this.stateSpecialStartSequence(n);break}case 32:{this.stateInRCDATA(n);break}case 26:{this.stateCDATASequence(n);break}case 19:{this.stateInAttrValueDoubleQuotes(n);break}case 12:{this.stateInAttrName(n);break}case 13:{this.stateInDirName(n);break}case 14:{this.stateInDirArg(n);break}case 15:{this.stateInDynamicDirArg(n);break}case 16:{this.stateInDirModifier(n);break}case 28:{this.stateInCommentLike(n);break}case 27:{this.stateInSpecialComment(n);break}case 11:{this.stateBeforeAttrName(n);break}case 6:{this.stateInTagName(n);break}case 34:{this.stateInSFCRootTagName(n);break}case 9:{this.stateInClosingTagName(n);break}case 5:{this.stateBeforeTagName(n);break}case 17:{this.stateAfterAttrName(n);break}case 20:{this.stateInAttrValueSingleQuotes(n);break}case 18:{this.stateBeforeAttrValue(n);break}case 8:{this.stateBeforeClosingTagName(n);break}case 10:{this.stateAfterClosingTagName(n);break}case 29:{this.stateBeforeSpecialS(n);break}case 30:{this.stateBeforeSpecialT(n);break}case 21:{this.stateInAttrValueNoQuotes(n);break}case 7:{this.stateInSelfClosingTag(n);break}case 23:{this.stateInDeclaration(n);break}case 22:{this.stateBeforeDeclaration(n);break}case 25:{this.stateBeforeComment(n);break}case 24:{this.stateInProcessingInstruction(n);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(this.state===28?this.currentSequence===Cn.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,n){}}const Ise={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},Pse={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:t=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${t}.sync\` should be changed to \`v-model:${t}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function Ny(t,{compatConfig:e}){const n=e&&e[t];return t==="MODE"?n||3:n}function oa(t,e){const n=Ny("MODE",e),r=Ny(t,e);return n===3?r===!0:r!==!1}function Gl(t,e,n,...r){return oa(t,e)}function Rse(t,e,n,...r){if(Ny(t,e)==="suppress-warning")return;const{message:s,link:o}=Pse[t],a=`(deprecation ${t}) ${typeof s=="function"?s(...r):s}${o?`
Details: ${o}`:""}`,l=new SyntaxError(a);l.code=t,n&&(l.loc=n),e.onWarn(l)}function ex(t){throw t}function o4(t){}function St(t,e,n,r){const i=`https://vuejs.org/error-reference/#compiler-${t}`,s=new SyntaxError(String(i));return s.code=t,s.loc=e,s}const Nse={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_INVALID_EXPRESSION:45,45:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:46,46:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:47,47:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:48,48:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:49,49:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:50,50:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:51,51:"X_VNODE_HOOKS",X_V_BIND_INVALID_SAME_NAME_ARGUMENT:52,52:"X_V_BIND_INVALID_SAME_NAME_ARGUMENT",__EXTEND_POINT__:53,53:"__EXTEND_POINT__"},Mse={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '&lt;' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:`Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",52:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable.
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""};function Fse(t,e,n=!1,r=[],i=Object.create(null)){}function Lse(t,e,n){return!1}function Bse(t,e){if(t&&(t.type==="ObjectProperty"||t.type==="ArrayPattern")){let n=e.length;for(;n--;){const r=e[n];if(r.type==="AssignmentExpression")return!0;if(r.type!=="ObjectProperty"&&!r.type.endsWith("Pattern"))break}}return!1}function $se(t){let e=t.length;for(;e--;){const n=t[e];if(n.type==="NewExpression")return!0;if(n.type!=="MemberExpression")break}return!1}function zse(t,e){for(const n of t.params)for(const r of Ii(n))e(r)}function a4(t,e){const n=t.type==="SwitchCase"?t.consequent:t.body;for(const r of n)if(r.type==="VariableDeclaration"){if(r.declare)continue;for(const i of r.declarations)for(const s of Ii(i.id))e(s)}else if(r.type==="FunctionDeclaration"||r.type==="ClassDeclaration"){if(r.declare||!r.id)continue;e(r.id)}else jse(r)?Vse(r,!0,e):r.type==="SwitchStatement"&&Use(r,!0,e)}function jse(t){return t.type==="ForOfStatement"||t.type==="ForInStatement"||t.type==="ForStatement"}function Vse(t,e,n){const r=t.type==="ForStatement"?t.init:t.left;if(r&&r.type==="VariableDeclaration"&&(r.kind==="var"?e:!e))for(const i of r.declarations)for(const s of Ii(i.id))n(s)}function Use(t,e,n){for(const r of t.cases){for(const i of r.consequent)if(i.type==="VariableDeclaration"&&(i.kind==="var"?e:!e))for(const s of i.declarations)for(const o of Ii(s.id))n(o);a4(r,n)}}function Ii(t,e=[]){switch(t.type){case"Identifier":e.push(t);break;case"MemberExpression":let n=t;for(;n.type==="MemberExpression";)n=n.object;e.push(n);break;case"ObjectPattern":for(const r of t.properties)r.type==="RestElement"?Ii(r.argument,e):Ii(r.value,e);break;case"ArrayPattern":t.elements.forEach(r=>{r&&Ii(r,e)});break;case"RestElement":Ii(t.argument,e);break;case"AssignmentPattern":Ii(t.left,e);break}return e}const Hse=t=>/Function(?:Expression|Declaration)$|Method$/.test(t.type),l4=t=>t&&(t.type==="ObjectProperty"||t.type==="ObjectMethod")&&!t.computed,qse=(t,e)=>l4(e)&&e.key===t,u4=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];function c4(t){return u4.includes(t.type)?c4(t.expression):t}const Wn=t=>t.type===4&&t.isStatic;function tx(t){switch(t){case"Teleport":case"teleport":return wl;case"Suspense":case"suspense":return $m;case"KeepAlive":case"keep-alive":return vf;case"BaseTransition":case"base-transition":return W2}}const Gse=/^$|^\d|[^\$\w\xA0-\uFFFF]/,ad=t=>!Gse.test(t),nx=/[A-Za-z_$\xA0-\uFFFF]/,Wse=/[\.\?\w$\xA0-\uFFFF]/,Kse=/\s+[.[]\s*|\s*[.[]\s+/g,f4=t=>t.type===4?t.content:t.loc.source,d4=t=>{const e=f4(t).trim().replace(Kse,a=>a.trim());let n=0,r=[],i=0,s=0,o=null;for(let a=0;a<e.length;a++){const l=e.charAt(a);switch(n){case 0:if(l==="[")r.push(n),n=1,i++;else if(l==="(")r.push(n),n=2,s++;else if(!(a===0?nx:Wse).test(l))return!1;break;case 1:l==="'"||l==='"'||l==="`"?(r.push(n),n=3,o=l):l==="["?i++:l==="]"&&(--i||(n=r.pop()));break;case 2:if(l==="'"||l==='"'||l==="`")r.push(n),n=3,o=l;else if(l==="(")s++;else if(l===")"){if(a===e.length-1)return!1;--s||(n=r.pop())}break;case 3:l===o&&(n=r.pop(),o=null);break}}return!i&&!s},Xse=ac,rx=d4,Yse=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,h4=t=>Yse.test(f4(t)),Jse=ac,p4=h4;function Zse(t,e,n=e.length){return m4({offset:t.offset,line:t.line,column:t.column},e,n)}function m4(t,e,n=e.length){let r=0,i=-1;for(let s=0;s<n;s++)e.charCodeAt(s)===10&&(r++,i=s);return t.offset+=n,t.line+=r,t.column=i===-1?t.column+n:n-i,t}function Qse(t,e){if(!t)throw new Error(e||"unexpected compiler condition")}function Un(t,e,n=!1){for(let r=0;r<t.props.length;r++){const i=t.props[r];if(i.type===7&&(n||i.exp)&&(on(e)?i.name===e:e.test(i.name)))return i}}function ld(t,e,n=!1,r=!1){for(let i=0;i<t.props.length;i++){const s=t.props[i];if(s.type===6){if(n)continue;if(s.name===e&&(s.value||r))return s}else if(s.name==="bind"&&(s.exp||r)&&Zs(s.arg,e))return s}}function Zs(t,e){return!!(t&&Wn(t)&&t.content===e)}function g4(t){return t.props.some(e=>e.type===7&&e.name==="bind"&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function Jh(t){return t.type===5||t.type===2}function My(t){return t.type===7&&t.name==="pre"}function ix(t){return t.type===7&&t.name==="slot"}function Wl(t){return t.type===1&&t.tagType===3}function Ef(t){return t.type===1&&t.tagType===2}const eoe=new Set([Hl,Su]);function b4(t,e=[]){if(t&&!on(t)&&t.type===14){const n=t.callee;if(!on(n)&&eoe.has(n))return b4(t.arguments[0],e.concat(t))}return[t,e]}function wf(t,e,n){let r,i=t.type===13?t.props:t.arguments[2],s=[],o;if(i&&!on(i)&&i.type===14){const a=b4(i);i=a[0],s=a[1],o=s[s.length-1]}if(i==null||on(i))r=Dr([e]);else if(i.type===14){const a=i.arguments[0];!on(a)&&a.type===15?dC(e,a)||a.properties.unshift(e):i.callee===Jm?r=Zt(n.helper(xf),[Dr([e]),i]):i.arguments.unshift(Dr([e])),!r&&(r=i)}else i.type===15?(dC(e,i)||i.properties.unshift(e),r=i):(r=Zt(n.helper(xf),[Dr([e]),i]),o&&o.callee===Su&&(o=s[s.length-2]));t.type===13?o?o.arguments[0]=r:t.props=r:o?o.arguments[0]=r:t.arguments[2]=r}function dC(t,e){let n=!1;if(t.key.type===4){const r=t.key.content;n=e.properties.some(i=>i.key.type===4&&i.key.content===r)}return n}function Kl(t,e){return`_${e}_${t.replace(/[^\w]/g,(n,r)=>n==="-"?"_":t.charCodeAt(r).toString())}`}function ii(t,e){if(!t||Object.keys(e).length===0)return!1;switch(t.type){case 1:for(let n=0;n<t.props.length;n++){const r=t.props[n];if(r.type===7&&(ii(r.arg,e)||ii(r.exp,e)))return!0}return t.children.some(n=>ii(n,e));case 11:return ii(t.source,e)?!0:t.children.some(n=>ii(n,e));case 9:return t.branches.some(n=>ii(n,e));case 10:return ii(t.condition,e)?!0:t.children.some(n=>ii(n,e));case 4:return!t.isStatic&&ad(t.content)&&!!e[t.content];case 8:return t.children.some(n=>KC(n)&&ii(n,e));case 5:case 12:return ii(t.content,e);case 2:case 3:case 20:return!1;default:return!1}}function y4(t){return t.type===14&&t.callee===Qm?t.arguments[1].returns:t}const v4=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,x4={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:gd,isPreTag:gd,isIgnoreNewlineTag:gd,isCustomElement:gd,onError:ex,onWarn:o4,comments:!1,prefixIdentifiers:!1};let ot=x4,_f=null,vs="",kn=null,qe=null,nr="",rs=-1,Lo=-1,sx=0,Ls=!1,Fy=null;const Ct=[],Bt=new Tse(Ct,{onerr:ts,ontext(t,e){hh(yn(t,e),t,e)},ontextentity(t,e,n){hh(t,e,n)},oninterpolation(t,e){if(Ls)return hh(yn(t,e),t,e);let n=t+Bt.delimiterOpen.length,r=e-Bt.delimiterClose.length;for(;Er(vs.charCodeAt(n));)n++;for(;Er(vs.charCodeAt(r-1));)r--;let i=yn(n,r);i.includes("&")&&(i=ot.decodeEntities(i,!1)),Ly({type:5,content:Qh(i,!1,Ut(n,r)),loc:Ut(t,e)})},onopentagname(t,e){const n=yn(t,e);kn={type:1,tag:n,ns:ot.getNamespace(n,Ct[0],ot.ns),tagType:0,props:[],children:[],loc:Ut(t-1,e),codegenNode:void 0}},onopentagend(t){pC(t)},onclosetag(t,e){const n=yn(t,e);if(!ot.isVoidTag(n)){let r=!1;for(let i=0;i<Ct.length;i++)if(Ct[i].tag.toLowerCase()===n.toLowerCase()){r=!0,i>0&&ts(24,Ct[0].loc.start.offset);for(let o=0;o<=i;o++){const a=Ct.shift();Zh(a,e,o<i)}break}r||ts(23,S4(t,60))}},onselfclosingtag(t){const e=kn.tag;kn.isSelfClosing=!0,pC(t),Ct[0]&&Ct[0].tag===e&&Zh(Ct.shift(),t)},onattribname(t,e){qe={type:6,name:yn(t,e),nameLoc:Ut(t,e),value:void 0,loc:Ut(t)}},ondirname(t,e){const n=yn(t,e),r=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!Ls&&r===""&&ts(26,t),Ls||r==="")qe={type:6,name:n,nameLoc:Ut(t,e),value:void 0,loc:Ut(t)};else if(qe={type:7,name:r,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?[Pe("prop")]:[],loc:Ut(t)},r==="pre"){Ls=Bt.inVPre=!0,Fy=kn;const i=kn.props;for(let s=0;s<i.length;s++)i[s].type===7&&(i[s]=foe(i[s]))}},ondirarg(t,e){if(t===e)return;const n=yn(t,e);if(Ls&&!My(qe))qe.name+=n,na(qe.nameLoc,e);else{const r=n[0]!=="[";qe.arg=Qh(r?n:n.slice(1,-1),r,Ut(t,e),r?3:0)}},ondirmodifier(t,e){const n=yn(t,e);if(Ls&&!My(qe))qe.name+="."+n,na(qe.nameLoc,e);else if(qe.name==="slot"){const r=qe.arg;r&&(r.content+="."+n,na(r.loc,e))}else{const r=Pe(n,!0,Ut(t,e));qe.modifiers.push(r)}},onattribdata(t,e){nr+=yn(t,e),rs<0&&(rs=t),Lo=e},onattribentity(t,e,n){nr+=t,rs<0&&(rs=e),Lo=n},onattribnameend(t){const e=qe.loc.start.offset,n=yn(e,t);qe.type===7&&(qe.rawName=n),kn.props.some(r=>(r.type===7?r.rawName:r.name)===n)&&ts(2,e)},onattribend(t,e){if(kn&&qe){if(na(qe.loc,e),t!==0)if(nr.includes("&")&&(nr=ot.decodeEntities(nr,!0)),qe.type===6)qe.name==="class"&&(nr=w4(nr).trim()),t===1&&!nr&&ts(13,e),qe.value={type:2,content:nr,loc:t===1?Ut(rs,Lo):Ut(rs-1,Lo+1)},Bt.inSFCRoot&&kn.tag==="template"&&qe.name==="lang"&&nr&&nr!=="html"&&Bt.enterRCDATA(S0("</template"),0);else{let n=0;qe.exp=Qh(nr,!1,Ut(rs,Lo),0,n),qe.name==="for"&&(qe.forParseResult=noe(qe.exp));let r=-1;qe.name==="bind"&&(r=qe.modifiers.findIndex(i=>i.content==="sync"))>-1&&Gl("COMPILER_V_BIND_SYNC",ot,qe.loc,qe.arg.loc.source)&&(qe.name="model",qe.modifiers.splice(r,1))}(qe.type!==7||qe.name!=="pre")&&kn.props.push(qe)}nr="",rs=Lo=-1},oncomment(t,e){ot.comments&&Ly({type:3,content:yn(t,e),loc:Ut(t-4,e+3)})},onend(){const t=vs.length;for(let e=0;e<Ct.length;e++)Zh(Ct[e],t-1),ts(24,Ct[e].loc.start.offset)},oncdata(t,e){Ct[0].ns!==0?hh(yn(t,e),t,e):ts(1,t-9)},onprocessinginstruction(t){(Ct[0]?Ct[0].ns:ot.ns)===0&&ts(21,t-1)}}),hC=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,toe=/^\(|\)$/g;function noe(t){const e=t.loc,n=t.content,r=n.match(v4);if(!r)return;const[,i,s]=r,o=(f,d,h=!1)=>{const p=e.start.offset+d,m=p+f.length;return Qh(f,!1,Ut(p,m),0,h?1:0)},a={source:o(s.trim(),n.indexOf(s,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let l=i.trim().replace(toe,"").trim();const u=i.indexOf(l),c=l.match(hC);if(c){l=l.replace(hC,"").trim();const f=c[1].trim();let d;if(f&&(d=n.indexOf(f,u+l.length),a.key=o(f,d,!0)),c[2]){const h=c[2].trim();h&&(a.index=o(h,n.indexOf(h,a.key?d+f.length:u+l.length),!0))}}return l&&(a.value=o(l,u,!0)),a}function yn(t,e){return vs.slice(t,e)}function pC(t){Bt.inSFCRoot&&(kn.innerLoc=Ut(t+1,t+1)),Ly(kn);const{tag:e,ns:n}=kn;n===0&&ot.isPreTag(e)&&sx++,ot.isVoidTag(e)?Zh(kn,t):(Ct.unshift(kn),(n===1||n===2)&&(Bt.inXML=!0)),kn=null}function hh(t,e,n){{const s=Ct[0]&&Ct[0].tag;s!=="script"&&s!=="style"&&t.includes("&")&&(t=ot.decodeEntities(t,!1))}const r=Ct[0]||_f,i=r.children[r.children.length-1];i&&i.type===2?(i.content+=t,na(i.loc,n)):r.children.push({type:2,content:t,loc:Ut(e,n)})}function Zh(t,e,n=!1){n?na(t.loc,S4(e,60)):na(t.loc,roe(e,62)+1),Bt.inSFCRoot&&(t.children.length?t.innerLoc.end=ms({},t.children[t.children.length-1].loc.end):t.innerLoc.end=ms({},t.innerLoc.start),t.innerLoc.source=yn(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:r,ns:i,children:s}=t;if(Ls||(r==="slot"?t.tagType=2:mC(t)?t.tagType=3:soe(t)&&(t.tagType=1)),Bt.inRCDATA||(t.children=E4(s)),i===0&&ot.isIgnoreNewlineTag(r)){const o=s[0];o&&o.type===2&&(o.content=o.content.replace(/^\r?\n/,""))}i===0&&ot.isPreTag(r)&&sx--,Fy===t&&(Ls=Bt.inVPre=!1,Fy=null),Bt.inXML&&(Ct[0]?Ct[0].ns:ot.ns)===0&&(Bt.inXML=!1);{const o=t.props;if(!Bt.inSFCRoot&&oa("COMPILER_NATIVE_TEMPLATE",ot)&&t.tag==="template"&&!mC(t)){const l=Ct[0]||_f,u=l.children.indexOf(t);l.children.splice(u,1,...t.children)}const a=o.find(l=>l.type===6&&l.name==="inline-template");a&&Gl("COMPILER_INLINE_TEMPLATE",ot,a.loc)&&t.children.length&&(a.value={type:2,content:yn(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function roe(t,e){let n=t;for(;vs.charCodeAt(n)!==e&&n<vs.length-1;)n++;return n}function S4(t,e){let n=t;for(;vs.charCodeAt(n)!==e&&n>=0;)n--;return n}const ioe=new Set(["if","else","else-if","for","slot"]);function mC({tag:t,props:e}){if(t==="template"){for(let n=0;n<e.length;n++)if(e[n].type===7&&ioe.has(e[n].name))return!0}return!1}function soe({tag:t,props:e}){if(ot.isCustomElement(t))return!1;if(t==="component"||ooe(t.charCodeAt(0))||tx(t)||ot.isBuiltInComponent&&ot.isBuiltInComponent(t)||ot.isNativeTag&&!ot.isNativeTag(t))return!0;for(let n=0;n<e.length;n++){const r=e[n];if(r.type===6){if(r.name==="is"&&r.value){if(r.value.content.startsWith("vue:"))return!0;if(Gl("COMPILER_IS_ON_ELEMENT",ot,r.loc))return!0}}else if(r.name==="bind"&&Zs(r.arg,"is")&&Gl("COMPILER_IS_ON_ELEMENT",ot,r.loc))return!0}return!1}function ooe(t){return t>64&&t<91}const aoe=/\r\n/g;function E4(t){const e=ot.whitespace!=="preserve";let n=!1;for(let r=0;r<t.length;r++){const i=t[r];if(i.type===2)if(sx)i.content=i.content.replace(aoe,`
`);else if(loe(i.content)){const s=t[r-1]&&t[r-1].type,o=t[r+1]&&t[r+1].type;!s||!o||e&&(s===3&&(o===3||o===1)||s===1&&(o===3||o===1&&uoe(i.content)))?(n=!0,t[r]=null):i.content=" "}else e&&(i.content=w4(i.content))}return n?t.filter(Boolean):t}function loe(t){for(let e=0;e<t.length;e++)if(!Er(t.charCodeAt(e)))return!1;return!0}function uoe(t){for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n===10||n===13)return!0}return!1}function w4(t){let e="",n=!1;for(let r=0;r<t.length;r++)Er(t.charCodeAt(r))?n||(e+=" ",n=!0):(e+=t[r],n=!1);return e}function Ly(t){(Ct[0]||_f).children.push(t)}function Ut(t,e){return{start:Bt.getPos(t),end:e==null?e:Bt.getPos(e),source:e==null?e:yn(t,e)}}function coe(t){return Ut(t.start.offset,t.end.offset)}function na(t,e){t.end=Bt.getPos(e),t.source=yn(t.start.offset,e)}function foe(t){const e={type:6,name:t.rawName,nameLoc:Ut(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const n=t.exp.loc;n.end.offset<t.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),e.value={type:2,content:t.exp.content,loc:n}}return e}function Qh(t,e=!1,n,r=0,i=0){return Pe(t,e,n,r)}function ts(t,e,n){ot.onError(St(t,Ut(e,e)))}function doe(){Bt.reset(),kn=null,qe=null,nr="",rs=-1,Lo=-1,Ct.length=0}function ox(t,e){if(doe(),vs=t,ot=ms({},x4),e){let i;for(i in e)e[i]!=null&&(ot[i]=e[i])}Bt.mode=ot.parseMode==="html"?1:ot.parseMode==="sfc"?2:0,Bt.inXML=ot.ns===1||ot.ns===2;const n=e&&e.delimiters;n&&(Bt.delimiterOpen=S0(n[0]),Bt.delimiterClose=S0(n[1]));const r=_f=r4([],t);return Bt.parse(vs),r.loc=Ut(0,t.length),r.children=E4(r.children),_f=null,r}function hoe(t,e){ep(t,void 0,e,!!_4(t))}function _4(t){const e=t.children.filter(n=>n.type!==3);return e.length===1&&e[0].type===1&&!Ef(e[0])?e[0]:null}function ep(t,e,n,r=!1,i=!1){const{children:s}=t,o=[];for(let c=0;c<s.length;c++){const f=s[c];if(f.type===1&&f.tagType===0){const d=r?0:ur(f,n);if(d>0){if(d>=2){f.codegenNode.patchFlag=-1,o.push(f);continue}}else{const h=f.codegenNode;if(h.type===13){const p=h.patchFlag;if((p===void 0||p===512||p===1)&&A4(f,n)>=2){const m=D4(f);m&&(h.props=n.hoist(m))}h.dynamicProps&&(h.dynamicProps=n.hoist(h.dynamicProps))}}}else if(f.type===12&&(r?0:ur(f,n))>=2){f.codegenNode.type===14&&f.codegenNode.arguments.length>0&&f.codegenNode.arguments.push("-1"),o.push(f);continue}if(f.type===1){const d=f.tagType===1;d&&n.scopes.vSlot++,ep(f,t,n,!1,i),d&&n.scopes.vSlot--}else if(f.type===11)ep(f,t,n,f.children.length===1,!0);else if(f.type===9)for(let d=0;d<f.branches.length;d++)ep(f.branches[d],t,n,f.branches[d].children.length===1,i)}let a=!1;if(o.length===s.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&qs(t.codegenNode.children))t.codegenNode.children=l(uo(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!qs(t.codegenNode.children)&&t.codegenNode.children.type===15){const c=u(t.codegenNode,"default");c&&(c.returns=l(uo(c.returns)),a=!0)}else if(t.tagType===3&&e&&e.type===1&&e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!qs(e.codegenNode.children)&&e.codegenNode.children.type===15){const c=Un(t,"slot",!0),f=c&&c.arg&&u(e.codegenNode,c.arg);f&&(f.returns=l(uo(f.returns)),a=!0)}}if(!a)for(const c of o)c.codegenNode=n.cache(c.codegenNode);function l(c){const f=n.cache(c);return f.needArraySpread=!0,f}function u(c,f){if(c.children&&!qs(c.children)&&c.children.type===15){const d=c.children.properties.find(h=>h.key===f||h.key.content===f);return d&&d.value}}o.length&&n.transformHoist&&n.transformHoist(s,n,t)}function ur(t,e){const{constantCache:n}=e;switch(t.type){case 1:if(t.tagType!==0)return 0;const r=n.get(t);if(r!==void 0)return r;const i=t.codegenNode;if(i.type!==13||i.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(i.patchFlag===void 0){let o=3;const a=A4(t,e);if(a===0)return n.set(t,0),0;a<o&&(o=a);for(let l=0;l<t.children.length;l++){const u=ur(t.children[l],e);if(u===0)return n.set(t,0),0;u<o&&(o=u)}if(o>1)for(let l=0;l<t.props.length;l++){const u=t.props[l];if(u.type===7&&u.name==="bind"&&u.exp){const c=ur(u.exp,e);if(c===0)return n.set(t,0),0;c<o&&(o=c)}}if(i.isBlock){for(let l=0;l<t.props.length;l++)if(t.props[l].type===7)return n.set(t,0),0;e.removeHelper(Eo),e.removeHelper(wa(e.inSSR,i.isComponent)),i.isBlock=!1,e.helper(Ea(e.inSSR,i.isComponent))}return n.set(t,o),o}else return n.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return ur(t.content,e);case 4:return t.constType;case 8:let s=3;for(let o=0;o<t.children.length;o++){const a=t.children[o];if(on(a)||Zy(a))continue;const l=ur(a,e);if(l===0)return 0;l<s&&(s=l)}return s;case 20:return 2;default:return 0}}const poe=new Set([Xm,Ym,Hl,Su]);function C4(t,e){if(t.type===14&&!on(t.callee)&&poe.has(t.callee)){const n=t.arguments[0];if(n.type===4)return ur(n,e);if(n.type===14)return C4(n,e)}return 0}function A4(t,e){let n=3;const r=D4(t);if(r&&r.type===15){const{properties:i}=r;for(let s=0;s<i.length;s++){const{key:o,value:a}=i[s],l=ur(o,e);if(l===0)return l;l<n&&(n=l);let u;if(a.type===4?u=ur(a,e):a.type===14?u=C4(a,e):u=0,u===0)return u;u<n&&(n=u)}}return n}function D4(t){const e=t.codegenNode;if(e.type===13)return e.props}function k4(t,{filename:e="",prefixIdentifiers:n=!1,hoistStatic:r=!1,hmr:i=!1,cacheHandlers:s=!1,nodeTransforms:o=[],directiveTransforms:a={},transformHoist:l=null,isBuiltInComponent:u=ac,isCustomElement:c=ac,expressionPlugins:f=[],scopeId:d=null,slotted:h=!0,ssr:p=!1,inSSR:m=!1,ssrCssVars:g="",bindingMetadata:b=ZI,inline:y=!1,isTS:x=!1,onError:S=ex,onWarn:E=o4,compatConfig:C}){const w=e.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),A={filename:e,selfName:w&&WC(to(w[1])),prefixIdentifiers:n,hoistStatic:r,hmr:i,cacheHandlers:s,nodeTransforms:o,directiveTransforms:a,transformHoist:l,isBuiltInComponent:u,isCustomElement:c,expressionPlugins:f,scopeId:d,slotted:h,ssr:p,inSSR:m,ssrCssVars:g,bindingMetadata:b,inline:y,isTS:x,onError:S,onWarn:E,compatConfig:C,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:t,childIndex:0,inVOnce:!1,helper(_){const O=A.helpers.get(_)||0;return A.helpers.set(_,O+1),_},removeHelper(_){const O=A.helpers.get(_);if(O){const I=O-1;I?A.helpers.set(_,I):A.helpers.delete(_)}},helperString(_){return`_${xa[A.helper(_)]}`},replaceNode(_){A.parent.children[A.childIndex]=A.currentNode=_},removeNode(_){const O=A.parent.children,I=_?O.indexOf(_):A.currentNode?A.childIndex:-1;!_||_===A.currentNode?(A.currentNode=null,A.onNodeRemoved()):A.childIndex>I&&(A.childIndex--,A.onNodeRemoved()),A.parent.children.splice(I,1)},onNodeRemoved:ac,addIdentifiers(_){},removeIdentifiers(_){},hoist(_){on(_)&&(_=Pe(_)),A.hoists.push(_);const O=Pe(`_hoisted_${A.hoists.length}`,!1,_.loc,2);return O.hoisted=_,O},cache(_,O=!1,I=!1){const N=i4(A.cached.length,_,O,I);return A.cached.push(N),N}};return A.filters=new Set,A}function O4(t,e){const n=k4(t,e);ud(t,n),e.hoistStatic&&hoe(t,n),e.ssr||moe(t,n),t.helpers=new Set([...n.helpers.keys()]),t.components=[...n.components],t.directives=[...n.directives],t.imports=n.imports,t.hoists=n.hoists,t.temps=n.temps,t.cached=n.cached,t.transformed=!0,t.filters=[...n.filters]}function moe(t,e){const{helper:n}=e,{children:r}=t;if(r.length===1){const i=_4(t);if(i&&i.codegenNode){const s=i.codegenNode;s.type===13&&eg(s,e),t.codegenNode=s}else t.codegenNode=r[0]}else if(r.length>1){let i=64;t.codegenNode=ql(e,n(Ul),void 0,t.children,i,void 0,void 0,!0,void 0,!1)}}function goe(t,e){let n=0;const r=()=>{n--};for(;n<t.children.length;n++){const i=t.children[n];on(i)||(e.grandParent=e.parent,e.parent=t,e.childIndex=n,e.onNodeRemoved=r,ud(i,e))}}function ud(t,e){e.currentNode=t;const{nodeTransforms:n}=e,r=[];for(let s=0;s<n.length;s++){const o=n[s](t,e);if(o&&(qs(o)?r.push(...o):r.push(o)),e.currentNode)t=e.currentNode;else return}switch(t.type){case 3:e.ssr||e.helper(xu);break;case 5:e.ssr||e.helper(od);break;case 9:for(let s=0;s<t.branches.length;s++)ud(t.branches[s],e);break;case 10:case 11:case 1:case 0:goe(t,e);break}e.currentNode=t;let i=r.length;for(;i--;)r[i]()}function ax(t,e){const n=on(t)?r=>r===t:r=>t.test(r);return(r,i)=>{if(r.type===1){const{props:s}=r;if(r.tagType===3&&s.some(ix))return;const o=[];for(let a=0;a<s.length;a++){const l=s[a];if(l.type===7&&n(l.name)){s.splice(a,1),a--;const u=e(r,l,i);u&&o.push(u)}}return o}}}const tg="/*@__PURE__*/",T4=t=>`${xa[t]}: _${xa[t]}`;function boe(t,{mode:e="function",prefixIdentifiers:n=e==="module",sourceMap:r=!1,filename:i="template.vue.html",scopeId:s=null,optimizeImports:o=!1,runtimeGlobalName:a="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:u="vue/server-renderer",ssr:c=!1,isTS:f=!1,inSSR:d=!1}){const h={mode:e,prefixIdentifiers:n,sourceMap:r,filename:i,scopeId:s,optimizeImports:o,runtimeGlobalName:a,runtimeModuleName:l,ssrRuntimeModuleName:u,ssr:c,isTS:f,inSSR:d,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(m){return`_${xa[m]}`},push(m,g=-2,b){h.code+=m},indent(){p(++h.indentLevel)},deindent(m=!1){m?--h.indentLevel:p(--h.indentLevel)},newline(){p(h.indentLevel)}};function p(m){h.push(`
`+" ".repeat(m),0)}return h}function I4(t,e={}){const n=boe(t,e);e.onContextCreated&&e.onContextCreated(n);const{mode:r,push:i,prefixIdentifiers:s,indent:o,deindent:a,newline:l,scopeId:u,ssr:c}=n,f=Array.from(t.helpers),d=f.length>0,h=!s&&r!=="module";yoe(t,n);const m=c?"ssrRender":"render",b=(c?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(i(`function ${m}(${b}) {`),o(),h&&(i("with (_ctx) {"),o(),d&&(i(`const { ${f.map(T4).join(", ")} } = _Vue
`,-1),l())),t.components.length&&(M1(t.components,"component",n),(t.directives.length||t.temps>0)&&l()),t.directives.length&&(M1(t.directives,"directive",n),t.temps>0&&l()),t.filters&&t.filters.length&&(l(),M1(t.filters,"filter",n),l()),t.temps>0){i("let ");for(let y=0;y<t.temps;y++)i(`${y>0?", ":""}_temp${y}`)}return(t.components.length||t.directives.length||t.temps)&&(i(`
`,0),l()),c||i("return "),t.codegenNode?Rn(t.codegenNode,n):i("null"),h&&(a(),i("}")),a(),i("}"),{ast:t,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function yoe(t,e){const{ssr:n,prefixIdentifiers:r,push:i,newline:s,runtimeModuleName:o,runtimeGlobalName:a,ssrRuntimeModuleName:l}=e,u=a,c=Array.from(t.helpers);if(c.length>0&&(i(`const _Vue = ${u}
`,-1),t.hoists.length)){const f=[zm,jm,xu,Vm,Y2].filter(d=>c.includes(d)).map(T4).join(", ");i(`const { ${f} } = _Vue
`,-1)}voe(t.hoists,e),s(),i("return ")}function M1(t,e,{helper:n,push:r,newline:i,isTS:s}){const o=n(e==="filter"?Gm:e==="component"?Um:qm);for(let a=0;a<t.length;a++){let l=t[a];const u=l.endsWith("__self");u&&(l=l.slice(0,-6)),r(`const ${Kl(l,e)} = ${o}(${JSON.stringify(l)}${u?", true":""})${s?"!":""}`),a<t.length-1&&i()}}function voe(t,e){if(!t.length)return;e.pure=!0;const{push:n,newline:r}=e;r();for(let i=0;i<t.length;i++){const s=t[i];s&&(n(`const _hoisted_${i+1} = `),Rn(s,e),r())}e.pure=!1}function lx(t,e){const n=t.length>3||!1;e.push("["),n&&e.indent(),cd(t,e,n),n&&e.deindent(),e.push("]")}function cd(t,e,n=!1,r=!0){const{push:i,newline:s}=e;for(let o=0;o<t.length;o++){const a=t[o];on(a)?i(a,-3):qs(a)?lx(a,e):Rn(a,e),o<t.length-1&&(n?(r&&i(","),s()):r&&i(", "))}}function Rn(t,e){if(on(t)){e.push(t,-3);return}if(Zy(t)){e.push(e.helper(t));return}switch(t.type){case 1:case 9:case 11:Rn(t.codegenNode,e);break;case 2:xoe(t,e);break;case 4:P4(t,e);break;case 5:Soe(t,e);break;case 12:Rn(t.codegenNode,e);break;case 8:R4(t,e);break;case 3:woe(t,e);break;case 13:_oe(t,e);break;case 14:Aoe(t,e);break;case 15:Doe(t,e);break;case 17:koe(t,e);break;case 18:Ooe(t,e);break;case 19:Toe(t,e);break;case 20:Ioe(t,e);break;case 21:cd(t.body,e,!0,!1);break}}function xoe(t,e){e.push(JSON.stringify(t.content),-3,t)}function P4(t,e){const{content:n,isStatic:r}=t;e.push(r?JSON.stringify(n):n,-3,t)}function Soe(t,e){const{push:n,helper:r,pure:i}=e;i&&n(tg),n(`${r(od)}(`),Rn(t.content,e),n(")")}function R4(t,e){for(let n=0;n<t.children.length;n++){const r=t.children[n];on(r)?e.push(r,-3):Rn(r,e)}}function Eoe(t,e){const{push:n}=e;if(t.type===8)n("["),R4(t,e),n("]");else if(t.isStatic){const r=ad(t.content)?t.content:JSON.stringify(t.content);n(r,-2,t)}else n(`[${t.content}]`,-3,t)}function woe(t,e){const{push:n,helper:r,pure:i}=e;i&&n(tg),n(`${r(xu)}(${JSON.stringify(t.content)})`,-3,t)}function _oe(t,e){const{push:n,helper:r,pure:i}=e,{tag:s,props:o,children:a,patchFlag:l,dynamicProps:u,directives:c,isBlock:f,disableTracking:d,isComponent:h}=t;let p;l&&(p=String(l)),c&&n(r(Wm)+"("),f&&n(`(${r(Eo)}(${d?"true":""}), `),i&&n(tg);const m=f?wa(e.inSSR,h):Ea(e.inSSR,h);n(r(m)+"(",-2,t),cd(Coe([s,o,a,p,u]),e),n(")"),f&&n(")"),c&&(n(", "),Rn(c,e),n(")"))}function Coe(t){let e=t.length;for(;e--&&t[e]==null;);return t.slice(0,e+1).map(n=>n||"null")}function Aoe(t,e){const{push:n,helper:r,pure:i}=e,s=on(t.callee)?t.callee:r(t.callee);i&&n(tg),n(s+"(",-2,t),cd(t.arguments,e),n(")")}function Doe(t,e){const{push:n,indent:r,deindent:i,newline:s}=e,{properties:o}=t;if(!o.length){n("{}",-2,t);return}const a=o.length>1||!1;n(a?"{":"{ "),a&&r();for(let l=0;l<o.length;l++){const{key:u,value:c}=o[l];Eoe(u,e),n(": "),Rn(c,e),l<o.length-1&&(n(","),s())}a&&i(),n(a?"}":" }")}function koe(t,e){lx(t.elements,e)}function Ooe(t,e){const{push:n,indent:r,deindent:i}=e,{params:s,returns:o,body:a,newline:l,isSlot:u}=t;u&&n(`_${xa[Zm]}(`),n("(",-2,t),qs(s)?cd(s,e):s&&Rn(s,e),n(") => "),(l||a)&&(n("{"),r()),o?(l&&n("return "),qs(o)?lx(o,e):Rn(o,e)):a&&Rn(a,e),(l||a)&&(i(),n("}")),u&&(t.isNonScopedSlot&&n(", undefined, true"),n(")"))}function Toe(t,e){const{test:n,consequent:r,alternate:i,newline:s}=t,{push:o,indent:a,deindent:l,newline:u}=e;if(n.type===4){const f=!ad(n.content);f&&o("("),P4(n,e),f&&o(")")}else o("("),Rn(n,e),o(")");s&&a(),e.indentLevel++,s||o(" "),o("? "),Rn(r,e),e.indentLevel--,s&&u(),s||o(" "),o(": ");const c=i.type===19;c||e.indentLevel++,Rn(i,e),c||e.indentLevel--,s&&l(!0)}function Ioe(t,e){const{push:n,helper:r,indent:i,deindent:s,newline:o}=e,{needPauseTracking:a,needArraySpread:l}=t;l&&n("[...("),n(`_cache[${t.index}] || (`),a&&(i(),n(`${r(Sf)}(-1`),t.inVOnce&&n(", true"),n("),"),o(),n("(")),n(`_cache[${t.index}] = `),Rn(t.value,e),a&&(n(`).cacheIndex = ${t.index},`),o(),n(`${r(Sf)}(1),`),o(),n(`_cache[${t.index}]`),s()),n(")"),l&&n(")]")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const Poe=(t,e)=>{if(t.type===5)t.content=tp(t.content,e);else if(t.type===1){const n=Un(t,"memo");for(let r=0;r<t.props.length;r++){const i=t.props[r];if(i.type===7&&i.name!=="for"){const s=i.exp,o=i.arg;s&&s.type===4&&!(i.name==="on"&&o)&&!(n&&o&&o.type===4&&o.content==="key")&&(i.exp=tp(s,e,i.name==="slot")),o&&o.type===4&&!o.isStatic&&(i.arg=tp(o,e))}}}};function tp(t,e,n=!1,r=!1,i=Object.create(e.identifiers)){return t}function N4(t){return on(t)?t:t.type===4?t.content:t.children.map(N4).join("")}const Roe=ax(/^(?:if|else|else-if)$/,(t,e,n)=>M4(t,e,n,(r,i,s)=>{const o=n.parent.children;let a=o.indexOf(r),l=0;for(;a-->=0;){const u=o[a];u&&u.type===9&&(l+=u.branches.length)}return()=>{if(s)r.codegenNode=bC(i,l,n);else{const u=Noe(r.codegenNode);u.alternate=bC(i,l+r.branches.length-1,n)}}}));function M4(t,e,n,r){if(e.name!=="else"&&(!e.exp||!e.exp.content.trim())){const i=e.exp?e.exp.loc:t.loc;n.onError(St(28,e.loc)),e.exp=Pe("true",!1,i)}if(e.name==="if"){const i=gC(t,e),s={type:9,loc:coe(t.loc),branches:[i]};if(n.replaceNode(s),r)return r(s,i,!0)}else{const i=n.parent.children;let s=i.indexOf(t);for(;s-->=-1;){const o=i[s];if(o&&o.type===3){n.removeNode(o);continue}if(o&&o.type===2&&!o.content.trim().length){n.removeNode(o);continue}if(o&&o.type===9){(e.name==="else-if"||e.name==="else")&&o.branches[o.branches.length-1].condition===void 0&&n.onError(St(30,t.loc)),n.removeNode();const a=gC(t,e);o.branches.push(a);const l=r&&r(o,a,!1);ud(a,n),l&&l(),n.currentNode=null}else n.onError(St(30,t.loc));break}}}function gC(t,e){const n=t.tagType===3;return{type:10,loc:t.loc,condition:e.name==="else"?void 0:e.exp,children:n&&!Un(t,"for")?t.children:[t],userKey:ld(t,"key"),isTemplateIf:n}}function bC(t,e,n){return t.condition?x0(t.condition,yC(t,e,n),Zt(n.helper(xu),['""',"true"])):yC(t,e,n)}function yC(t,e,n){const{helper:r}=n,i=Gt("key",Pe(`${e}`,!1,ln,2)),{children:s}=t,o=s[0];if(s.length!==1||o.type!==1)if(s.length===1&&o.type===11){const l=o.codegenNode;return wf(l,i,n),l}else return ql(n,r(Ul),Dr([i]),s,64,void 0,void 0,!0,!1,!1,t.loc);else{const l=o.codegenNode,u=y4(l);return u.type===13&&eg(u,n),wf(u,i,n),l}}function Noe(t){for(;;)if(t.type===19)if(t.alternate.type===19)t=t.alternate;else return t;else t.type===20&&(t=t.value)}const Moe=ax("for",(t,e,n)=>{const{helper:r,removeHelper:i}=n;return F4(t,e,n,s=>{const o=Zt(r(Km),[s.source]),a=Wl(t),l=Un(t,"memo"),u=ld(t,"key",!1,!0);u&&u.type;let c=u&&(u.type===6?u.value?Pe(u.value.content,!0):void 0:u.exp);const f=u&&c?Gt("key",c):null,d=s.source.type===4&&s.source.constType>0,h=d?64:u?128:256;return s.codegenNode=ql(n,r(Ul),void 0,o,h,void 0,void 0,!0,!d,!1,t.loc),()=>{let p;const{children:m}=s,g=m.length!==1||m[0].type!==1,b=Ef(t)?t:a&&t.children.length===1&&Ef(t.children[0])?t.children[0]:null;if(b?(p=b.codegenNode,a&&f&&wf(p,f,n)):g?p=ql(n,r(Ul),f?Dr([f]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(p=m[0].codegenNode,a&&f&&wf(p,f,n),p.isBlock!==!d&&(p.isBlock?(i(Eo),i(wa(n.inSSR,p.isComponent))):i(Ea(n.inSSR,p.isComponent))),p.isBlock=!d,p.isBlock?(r(Eo),r(wa(n.inSSR,p.isComponent))):r(Ea(n.inSSR,p.isComponent))),l){const y=Sa(E0(s.parseResult,[Pe("_cached")]));y.body=s4([Hr(["const _memo = (",l.exp,")"]),Hr(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(Q2)}(_cached, _memo)) return _cached`]),Hr(["const _item = ",p]),Pe("_item.memo = _memo"),Pe("return _item")]),o.arguments.push(y,Pe("_cache"),Pe(String(n.cached.length))),n.cached.push(null)}else o.arguments.push(Sa(E0(s.parseResult),p,!0))}})});function F4(t,e,n,r){if(!e.exp){n.onError(St(31,e.loc));return}const i=e.forParseResult;if(!i){n.onError(St(32,e.loc));return}ux(i);const{addIdentifiers:s,removeIdentifiers:o,scopes:a}=n,{source:l,value:u,key:c,index:f}=i,d={type:11,loc:e.loc,source:l,valueAlias:u,keyAlias:c,objectIndexAlias:f,parseResult:i,children:Wl(t)?t.children:[t]};n.replaceNode(d),a.vFor++;const h=r&&r(d);return()=>{a.vFor--,h&&h()}}function ux(t,e){t.finalized||(t.finalized=!0)}function E0({value:t,key:e,index:n},r=[]){return Foe([t,e,n,...r])}function Foe(t){let e=t.length;for(;e--&&!t[e];);return t.slice(0,e+1).map((n,r)=>n||Pe("_".repeat(r+1),!1))}const vC=Pe("undefined",!1),L4=(t,e)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const n=Un(t,"slot");if(n)return n.exp,e.scopes.vSlot++,()=>{e.scopes.vSlot--}}},Loe=(t,e)=>{let n;if(Wl(t)&&t.props.some(ix)&&(n=Un(t,"for"))){const r=n.forParseResult;if(r){ux(r);const{value:i,key:s,index:o}=r,{addIdentifiers:a,removeIdentifiers:l}=e;return i&&a(i),s&&a(s),o&&a(o),()=>{i&&l(i),s&&l(s),o&&l(o)}}}},Boe=(t,e,n,r)=>Sa(t,n,!1,!0,n.length?n[0].loc:r);function B4(t,e,n=Boe){e.helper(Zm);const{children:r,loc:i}=t,s=[],o=[];let a=e.scopes.vSlot>0||e.scopes.vFor>0;const l=Un(t,"slot",!0);if(l){const{arg:g,exp:b}=l;g&&!Wn(g)&&(a=!0),s.push(Gt(g||Pe("default",!0),n(b,void 0,r,i)))}let u=!1,c=!1;const f=[],d=new Set;let h=0;for(let g=0;g<r.length;g++){const b=r[g];let y;if(!Wl(b)||!(y=Un(b,"slot",!0))){b.type!==3&&f.push(b);continue}if(l){e.onError(St(37,y.loc));break}u=!0;const{children:x,loc:S}=b,{arg:E=Pe("default",!0),exp:C,loc:w}=y;let A;Wn(E)?A=E?E.content:"default":a=!0;const _=Un(b,"for"),O=n(C,_,x,S);let I,N;if(I=Un(b,"if"))a=!0,o.push(x0(I.exp,ph(E,O,h++),vC));else if(N=Un(b,/^else(?:-if)?$/,!0)){let P=g,R;for(;P--&&(R=r[P],!(R.type!==3&&By(R))););if(R&&Wl(R)&&Un(R,/^(?:else-)?if$/)){let F=o[o.length-1];for(;F.alternate.type===19;)F=F.alternate;F.alternate=N.exp?x0(N.exp,ph(E,O,h++),vC):ph(E,O,h++)}else e.onError(St(30,N.loc))}else if(_){a=!0;const P=_.forParseResult;P?(ux(P),o.push(Zt(e.helper(Km),[P.source,Sa(E0(P),ph(E,O),!0)]))):e.onError(St(32,_.loc))}else{if(A){if(d.has(A)){e.onError(St(38,w));continue}d.add(A),A==="default"&&(c=!0)}s.push(Gt(E,O))}}if(!l){const g=(b,y)=>{const x=n(b,void 0,y,i);return e.compatConfig&&(x.isNonScopedSlot=!0),Gt("default",x)};u?f.length&&f.some(b=>By(b))&&(c?e.onError(St(39,f[0].loc)):s.push(g(void 0,f))):s.push(g(void 0,r))}const p=a?2:np(t.children)?3:1;let m=Dr(s.concat(Gt("_",Pe(p+"",!1))),i);return o.length&&(m=Zt(e.helper(Z2),[m,uo(o)])),{slots:m,hasDynamicSlots:a}}function ph(t,e,n){const r=[Gt("name",t),Gt("fn",e)];return n!=null&&r.push(Gt("key",Pe(String(n),!0))),Dr(r)}function np(t){for(let e=0;e<t.length;e++){const n=t[e];switch(n.type){case 1:if(n.tagType===2||np(n.children))return!0;break;case 9:if(np(n.branches))return!0;break;case 10:case 11:if(np(n.children))return!0;break}}return!1}function By(t){return t.type!==2&&t.type!==12?!0:t.type===2?!!t.content.trim():By(t.content)}const $4=new WeakMap,z4=(t,e)=>function(){if(t=e.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:r,props:i}=t,s=t.tagType===1;let o=s?j4(t,e):`"${r}"`;const a=KC(o)&&o.callee===Hm;let l,u,c=0,f,d,h,p=a||o===wl||o===$m||!s&&(r==="svg"||r==="foreignObject"||r==="math");if(i.length>0){const m=cx(t,e,void 0,s,a);l=m.props,c=m.patchFlag,d=m.dynamicPropNames;const g=m.directives;h=g&&g.length?uo(g.map(b=>V4(b,e))):void 0,m.shouldUseBlock&&(p=!0)}if(t.children.length>0)if(o===vf&&(p=!0,c|=1024),s&&o!==wl&&o!==vf){const{slots:g,hasDynamicSlots:b}=B4(t,e);u=g,b&&(c|=1024)}else if(t.children.length===1&&o!==wl){const g=t.children[0],b=g.type,y=b===5||b===8;y&&ur(g,e)===0&&(c|=1),y||b===2?u=g:u=t.children}else u=t.children;d&&d.length&&(f=zoe(d)),t.codegenNode=ql(e,o,l,u,c===0?void 0:c,f,h,!!p,!1,s,t.loc)};function j4(t,e,n=!1){let{tag:r}=t;const i=$y(r),s=ld(t,"is",!1,!0);if(s)if(i||oa("COMPILER_IS_ON_ELEMENT",e)){let a;if(s.type===6?a=s.value&&Pe(s.value.content,!0):(a=s.exp,a||(a=Pe("is",!1,s.arg.loc))),a)return Zt(e.helper(Hm),[a])}else s.type===6&&s.value.content.startsWith("vue:")&&(r=s.value.content.slice(4));const o=tx(r)||e.isBuiltInComponent(r);return o?(n||e.helper(o),o):(e.helper(Um),e.components.add(r),Kl(r,"component"))}function cx(t,e,n=t.props,r,i,s=!1){const{tag:o,loc:a,children:l}=t;let u=[];const c=[],f=[],d=l.length>0;let h=!1,p=0,m=!1,g=!1,b=!1,y=!1,x=!1,S=!1;const E=[],C=O=>{u.length&&(c.push(Dr(xC(u),a)),u=[]),O&&c.push(O)},w=()=>{e.scopes.vFor>0&&u.push(Gt(Pe("ref_for",!0),Pe("true")))},A=({key:O,value:I})=>{if(Wn(O)){const N=O.content,P=XC(N);if(P&&(!r||i)&&N.toLowerCase()!=="onclick"&&N!=="onUpdate:modelValue"&&!Tx(N)&&(y=!0),P&&Tx(N)&&(S=!0),P&&I.type===14&&(I=I.arguments[0]),I.type===20||(I.type===4||I.type===8)&&ur(I,e)>0)return;N==="ref"?m=!0:N==="class"?g=!0:N==="style"?b=!0:N!=="key"&&!E.includes(N)&&E.push(N),r&&(N==="class"||N==="style")&&!E.includes(N)&&E.push(N)}else x=!0};for(let O=0;O<n.length;O++){const I=n[O];if(I.type===6){const{loc:N,name:P,nameLoc:R,value:F}=I;let V=!0;if(P==="ref"&&(m=!0,w()),P==="is"&&($y(o)||F&&F.content.startsWith("vue:")||oa("COMPILER_IS_ON_ELEMENT",e)))continue;u.push(Gt(Pe(P,!0,R),Pe(F?F.content:"",V,F?F.loc:N)))}else{const{name:N,arg:P,exp:R,loc:F,modifiers:V}=I,B=N==="bind",G=N==="on";if(N==="slot"){r||e.onError(St(40,F));continue}if(N==="once"||N==="memo"||N==="is"||B&&Zs(P,"is")&&($y(o)||oa("COMPILER_IS_ON_ELEMENT",e))||G&&s)continue;if((B&&Zs(P,"key")||G&&d&&Zs(P,"vue:before-update"))&&(h=!0),B&&Zs(P,"ref")&&w(),!P&&(B||G)){if(x=!0,R)if(B){if(C(),oa("COMPILER_V_BIND_OBJECT_ORDER",e)){c.unshift(R);continue}w(),C(),c.push(R)}else C({type:14,loc:F,callee:e.helper(Jm),arguments:r?[R]:[R,"true"]});else e.onError(St(B?34:35,F));continue}B&&V.some(ie=>ie.content==="prop")&&(p|=32);const H=e.directiveTransforms[N];if(H){const{props:ie,needRuntime:se}=H(I,t,e);!s&&ie.forEach(A),G&&P&&!Wn(P)?C(Dr(ie,a)):u.push(...ie),se&&(f.push(I),Zy(se)&&$4.set(I,se))}else JI(N)||(f.push(I),d&&(h=!0))}}let _;if(c.length?(C(),c.length>1?_=Zt(e.helper(xf),c,a):_=c[0]):u.length&&(_=Dr(xC(u),a)),x?p|=16:(g&&!r&&(p|=2),b&&!r&&(p|=4),E.length&&(p|=8),y&&(p|=32)),!h&&(p===0||p===32)&&(m||S||f.length>0)&&(p|=512),!e.inSSR&&_)switch(_.type){case 15:let O=-1,I=-1,N=!1;for(let F=0;F<_.properties.length;F++){const V=_.properties[F].key;Wn(V)?V.content==="class"?O=F:V.content==="style"&&(I=F):V.isHandlerKey||(N=!0)}const P=_.properties[O],R=_.properties[I];N?_=Zt(e.helper(Hl),[_]):(P&&!Wn(P.value)&&(P.value=Zt(e.helper(Xm),[P.value])),R&&(b||R.value.type===4&&R.value.content.trim()[0]==="["||R.value.type===17)&&(R.value=Zt(e.helper(Ym),[R.value])));break;case 14:break;default:_=Zt(e.helper(Hl),[Zt(e.helper(Su),[_])]);break}return{props:_,directives:f,patchFlag:p,dynamicPropNames:E,shouldUseBlock:h}}function xC(t){const e=new Map,n=[];for(let r=0;r<t.length;r++){const i=t[r];if(i.key.type===8||!i.key.isStatic){n.push(i);continue}const s=i.key.content,o=e.get(s);o?(s==="style"||s==="class"||XC(s))&&$oe(o,i):(e.set(s,i),n.push(i))}return n}function $oe(t,e){t.value.type===17?t.value.elements.push(e.value):t.value=uo([t.value,e.value],t.loc)}function V4(t,e){const n=[],r=$4.get(t);r?n.push(e.helperString(r)):(e.helper(qm),e.directives.add(t.name),n.push(Kl(t.name,"directive")));const{loc:i}=t;if(t.exp&&n.push(t.exp),t.arg&&(t.exp||n.push("void 0"),n.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||n.push("void 0"),n.push("void 0"));const s=Pe("true",!1,i);n.push(Dr(t.modifiers.map(o=>Gt(o,s)),i))}return uo(n,t.loc)}function zoe(t){let e="[";for(let n=0,r=t.length;n<r;n++)e+=JSON.stringify(t[n]),n<r-1&&(e+=", ");return e+"]"}function $y(t){return t==="component"||t==="Component"}const joe=(t,e)=>{if(Ef(t)){const{children:n,loc:r}=t,{slotName:i,slotProps:s}=U4(t,e),o=[e.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let a=2;s&&(o[2]=s,a=3),n.length&&(o[3]=Sa([],n,!1,!1,r),a=4),e.scopeId&&!e.slotted&&(a=5),o.splice(a),t.codegenNode=Zt(e.helper(J2),o,r)}};function U4(t,e){let n='"default"',r;const i=[];for(let s=0;s<t.props.length;s++){const o=t.props[s];if(o.type===6)o.value&&(o.name==="name"?n=JSON.stringify(o.value.content):(o.name=to(o.name),i.push(o)));else if(o.name==="bind"&&Zs(o.arg,"name")){if(o.exp)n=o.exp;else if(o.arg&&o.arg.type===4){const a=to(o.arg.content);n=o.exp=Pe(a,!1,o.arg.loc)}}else o.name==="bind"&&o.arg&&Wn(o.arg)&&(o.arg.content=to(o.arg.content)),i.push(o)}if(i.length>0){const{props:s,directives:o}=cx(t,e,i,!1,!1);r=s,o.length&&e.onError(St(36,o[0].loc))}return{slotName:n,slotProps:r}}const fx=(t,e,n,r)=>{const{loc:i,modifiers:s,arg:o}=t;!t.exp&&!s.length&&n.onError(St(35,i));let a;if(o.type===4)if(o.isStatic){let f=o.content;f.startsWith("vue:")&&(f=`vnode-${f.slice(4)}`);const d=e.tagType!==0||f.startsWith("vnode")||!/[A-Z]/.test(f)?QI(to(f)):`on:${f}`;a=Pe(d,!0,o.loc)}else a=Hr([`${n.helperString(v0)}(`,o,")"]);else a=o,a.children.unshift(`${n.helperString(v0)}(`),a.children.push(")");let l=t.exp;l&&!l.content.trim()&&(l=void 0);let u=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const f=rx(l),d=!(f||p4(l)),h=l.content.includes(";");(d||u&&f)&&(l=Hr([`${d?"$event":"(...args)"} => ${h?"{":"("}`,l,h?"}":")"]))}let c={props:[Gt(a,l||Pe("() => {}",!1,i))]};return r&&(c=r(c)),u&&(c.props[0].value=n.cache(c.props[0].value)),c.props.forEach(f=>f.key.isHandlerKey=!0),c},H4=(t,e,n)=>{const{modifiers:r,loc:i}=t,s=t.arg;let{exp:o}=t;return o&&o.type===4&&!o.content.trim()&&(o=void 0),s.type!==4?(s.children.unshift("("),s.children.push(') || ""')):s.isStatic||(s.content=s.content?`${s.content} || ""`:'""'),r.some(a=>a.content==="camel")&&(s.type===4?s.isStatic?s.content=to(s.content):s.content=`${n.helperString(y0)}(${s.content})`:(s.children.unshift(`${n.helperString(y0)}(`),s.children.push(")"))),n.inSSR||(r.some(a=>a.content==="prop")&&SC(s,"."),r.some(a=>a.content==="attr")&&SC(s,"^")),{props:[Gt(s,o)]}},SC=(t,e)=>{t.type===4?t.isStatic?t.content=e+t.content:t.content=`\`${e}\${${t.content}}\``:(t.children.unshift(`'${e}' + (`),t.children.push(")"))},Voe=(t,e)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const n=t.children;let r,i=!1;for(let s=0;s<n.length;s++){const o=n[s];if(Jh(o)){i=!0;for(let a=s+1;a<n.length;a++){const l=n[a];if(Jh(l))r||(r=n[s]=Hr([o],o.loc)),r.children.push(" + ",l),n.splice(a,1),a--;else{r=void 0;break}}}}if(!(!i||n.length===1&&(t.type===0||t.type===1&&t.tagType===0&&!t.props.find(s=>s.type===7&&!e.directiveTransforms[s.name])&&t.tag!=="template")))for(let s=0;s<n.length;s++){const o=n[s];if(Jh(o)||o.type===8){const a=[];(o.type!==2||o.content!==" ")&&a.push(o),!e.ssr&&ur(o,e)===0&&a.push("1"),n[s]={type:12,content:o,loc:o.loc,codegenNode:Zt(e.helper(Vm),a)}}}}},EC=new WeakSet,Uoe=(t,e)=>{if(t.type===1&&Un(t,"once",!0))return EC.has(t)||e.inVOnce||e.inSSR?void 0:(EC.add(t),e.inVOnce=!0,e.helper(Sf),()=>{e.inVOnce=!1;const n=e.currentNode;n.codegenNode&&(n.codegenNode=e.cache(n.codegenNode,!0,!0))})},dx=(t,e,n)=>{const{exp:r,arg:i}=t;if(!r)return n.onError(St(41,t.loc)),mh();const s=r.loc.source.trim(),o=r.type===4?r.content:s,a=n.bindingMetadata[s];if(a==="props"||a==="props-aliased")return n.onError(St(44,r.loc)),mh();if(!o.trim()||!rx(r))return n.onError(St(42,r.loc)),mh();const l=i||Pe("modelValue",!0),u=i?Wn(i)?`onUpdate:${to(i.content)}`:Hr(['"onUpdate:" + ',i]):"onUpdate:modelValue";let c;const f=n.isTS?"($event: any)":"$event";c=Hr([`${f} => ((`,r,") = $event)"]);const d=[Gt(l,t.exp),Gt(u,c)];if(t.modifiers.length&&e.tagType===1){const h=t.modifiers.map(m=>m.content).map(m=>(ad(m)?m:JSON.stringify(m))+": true").join(", "),p=i?Wn(i)?`${i.content}Modifiers`:Hr([i,' + "Modifiers"']):"modelModifiers";d.push(Gt(p,Pe(`{ ${h} }`,!1,t.loc,2)))}return mh(d)};function mh(t=[]){return{props:t}}const Hoe=/[\w).+\-_$\]]/,qoe=(t,e)=>{oa("COMPILER_FILTERS",e)&&(t.type===5?w0(t.content,e):t.type===1&&t.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&w0(n.exp,e)}))};function w0(t,e){if(t.type===4)wC(t,e);else for(let n=0;n<t.children.length;n++){const r=t.children[n];typeof r=="object"&&(r.type===4?wC(r,e):r.type===8?w0(t,e):r.type===5&&w0(r.content,e))}}function wC(t,e){const n=t.content;let r=!1,i=!1,s=!1,o=!1,a=0,l=0,u=0,c=0,f,d,h,p,m=[];for(h=0;h<n.length;h++)if(d=f,f=n.charCodeAt(h),r)f===39&&d!==92&&(r=!1);else if(i)f===34&&d!==92&&(i=!1);else if(s)f===96&&d!==92&&(s=!1);else if(o)f===47&&d!==92&&(o=!1);else if(f===124&&n.charCodeAt(h+1)!==124&&n.charCodeAt(h-1)!==124&&!a&&!l&&!u)p===void 0?(c=h+1,p=n.slice(0,h).trim()):g();else{switch(f){case 34:i=!0;break;case 39:r=!0;break;case 96:s=!0;break;case 40:u++;break;case 41:u--;break;case 91:l++;break;case 93:l--;break;case 123:a++;break;case 125:a--;break}if(f===47){let b=h-1,y;for(;b>=0&&(y=n.charAt(b),y===" ");b--);(!y||!Hoe.test(y))&&(o=!0)}}p===void 0?p=n.slice(0,h).trim():c!==0&&g();function g(){m.push(n.slice(c,h).trim()),c=h+1}if(m.length){for(h=0;h<m.length;h++)p=Goe(p,m[h],e);t.content=p,t.ast=void 0}}function Goe(t,e,n){n.helper(Gm);const r=e.indexOf("(");if(r<0)return n.filters.add(e),`${Kl(e,"filter")}(${t})`;{const i=e.slice(0,r),s=e.slice(r+1);return n.filters.add(i),`${Kl(i,"filter")}(${t}${s!==")"?","+s:s}`}}const _C=new WeakSet,Woe=(t,e)=>{if(t.type===1){const n=Un(t,"memo");return!n||_C.has(t)||e.inSSR?void 0:(_C.add(t),()=>{const r=t.codegenNode||e.currentNode.codegenNode;r&&r.type===13&&(t.tagType!==1&&eg(r,e),t.codegenNode=Zt(e.helper(Qm),[n.exp,Sa(void 0,r),"_cache",String(e.cached.length)]),e.cached.push(null))})}},q4=(t,e)=>{if(t.type===1){for(const n of t.props)if(n.type===7&&n.name==="bind"&&!n.exp){const r=n.arg;if(r.type!==4||!r.isStatic)e.onError(St(52,r.loc)),n.exp=Pe("",!0,r.loc);else{const i=to(r.content);(nx.test(i[0])||i[0]==="-")&&(n.exp=Pe(i,!1,r.loc))}}}};function G4(t){return[[q4,Uoe,Roe,Woe,Moe,qoe,joe,z4,L4,Voe],{on:fx,bind:H4,model:dx}]}function W4(t,e={}){const n=e.onError||ex,r=e.mode==="module";e.prefixIdentifiers===!0?n(St(47)):r&&n(St(48));const i=!1;e.cacheHandlers&&n(St(49)),e.scopeId&&!r&&n(St(50));const s=ms({},e,{prefixIdentifiers:i}),o=on(t)?ox(t,s):t,[a,l]=G4();return O4(o,ms({},s,{nodeTransforms:[...a,...e.nodeTransforms||[]],directiveTransforms:ms({},l,e.directiveTransforms||{})})),I4(o,s)}const Koe={DATA:"data",PROPS:"props",PROPS_ALIASED:"props-aliased",SETUP_LET:"setup-let",SETUP_CONST:"setup-const",SETUP_REACTIVE_CONST:"setup-reactive-const",SETUP_MAYBE_REF:"setup-maybe-ref",SETUP_REF:"setup-ref",OPTIONS:"options",LITERAL_CONST:"literal-const"},K4=()=>({props:[]});/**
* @vue/compiler-dom v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const hx=Symbol(""),px=Symbol(""),mx=Symbol(""),gx=Symbol(""),_0=Symbol(""),bx=Symbol(""),yx=Symbol(""),vx=Symbol(""),xx=Symbol(""),Sx=Symbol("");n4({[hx]:"vModelRadio",[px]:"vModelCheckbox",[mx]:"vModelText",[gx]:"vModelSelect",[_0]:"vModelDynamic",[bx]:"withModifiers",[yx]:"withKeys",[vx]:"vShow",[xx]:"Transition",[Sx]:"TransitionGroup"});let Ua;function Xoe(t,e=!1){return Ua||(Ua=document.createElement("div")),e?(Ua.innerHTML=`<div foo="${t.replace(/"/g,"&quot;")}">`,Ua.children[0].getAttribute("foo")):(Ua.innerHTML=t,Ua.textContent)}const Ex={parseMode:"html",isVoidTag:rP,isNativeTag:t=>eP(t)||tP(t)||nP(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:Xoe,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return xx;if(t==="TransitionGroup"||t==="transition-group")return Sx},getNamespace(t,e,n){let r=e?e.ns:n;if(e&&r===2)if(e.tag==="annotation-xml"){if(t==="svg")return 1;e.props.some(i=>i.type===6&&i.name==="encoding"&&i.value!=null&&(i.value.content==="text/html"||i.value.content==="application/xhtml+xml"))&&(r=0)}else/^m(?:[ions]|text)$/.test(e.tag)&&t!=="mglyph"&&t!=="malignmark"&&(r=0);else e&&r===1&&(e.tag==="foreignObject"||e.tag==="desc"||e.tag==="title")&&(r=0);if(r===0){if(t==="svg")return 1;if(t==="math")return 2}return r}},X4=t=>{t.type===1&&t.props.forEach((e,n)=>{e.type===6&&e.name==="style"&&e.value&&(t.props[n]={type:7,name:"bind",arg:Pe("style",!0,e.loc),exp:Yoe(e.value.content,e.loc),modifiers:[],loc:e.loc})})},Yoe=(t,e)=>{const n=iP(t);return Pe(JSON.stringify(n),!1,e,3)};function xs(t,e){return St(t,e)}const Joe={X_V_HTML_NO_EXPRESSION:53,53:"X_V_HTML_NO_EXPRESSION",X_V_HTML_WITH_CHILDREN:54,54:"X_V_HTML_WITH_CHILDREN",X_V_TEXT_NO_EXPRESSION:55,55:"X_V_TEXT_NO_EXPRESSION",X_V_TEXT_WITH_CHILDREN:56,56:"X_V_TEXT_WITH_CHILDREN",X_V_MODEL_ON_INVALID_ELEMENT:57,57:"X_V_MODEL_ON_INVALID_ELEMENT",X_V_MODEL_ARG_ON_ELEMENT:58,58:"X_V_MODEL_ARG_ON_ELEMENT",X_V_MODEL_ON_FILE_INPUT_ELEMENT:59,59:"X_V_MODEL_ON_FILE_INPUT_ELEMENT",X_V_MODEL_UNNECESSARY_VALUE:60,60:"X_V_MODEL_UNNECESSARY_VALUE",X_V_SHOW_NO_EXPRESSION:61,61:"X_V_SHOW_NO_EXPRESSION",X_TRANSITION_INVALID_CHILDREN:62,62:"X_TRANSITION_INVALID_CHILDREN",X_IGNORED_SIDE_EFFECT_TAG:63,63:"X_IGNORED_SIDE_EFFECT_TAG",__EXTEND_POINT__:64,64:"__EXTEND_POINT__"},Zoe={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},Qoe=(t,e,n)=>{const{exp:r,loc:i}=t;return r||n.onError(xs(53,i)),e.children.length&&(n.onError(xs(54,i)),e.children.length=0),{props:[Gt(Pe("innerHTML",!0,i),r||Pe("",!0))]}},eae=(t,e,n)=>{const{exp:r,loc:i}=t;return r||n.onError(xs(55,i)),e.children.length&&(n.onError(xs(56,i)),e.children.length=0),{props:[Gt(Pe("textContent",!0),r?ur(r,n)>0?r:Zt(n.helperString(od),[r],i):Pe("",!0))]}},tae=(t,e,n)=>{const r=dx(t,e,n);if(!r.props.length||e.tagType===1)return r;t.arg&&n.onError(xs(58,t.arg.loc));const{tag:i}=e,s=n.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||s){let o=mx,a=!1;if(i==="input"||s){const l=ld(e,"type");if(l){if(l.type===7)o=_0;else if(l.value)switch(l.value.content){case"radio":o=hx;break;case"checkbox":o=px;break;case"file":a=!0,n.onError(xs(59,t.loc));break}}else g4(e)&&(o=_0)}else i==="select"&&(o=gx);a||(r.needRuntime=n.helper(o))}else n.onError(xs(57,t.loc));return r.props=r.props.filter(o=>!(o.key.type===4&&o.key.content==="modelValue")),r},nae=R0("passive,once,capture"),rae=R0("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),iae=R0("left,right"),Y4=R0("onkeyup,onkeydown,onkeypress"),sae=(t,e,n,r)=>{const i=[],s=[],o=[];for(let a=0;a<e.length;a++){const l=e[a].content;l==="native"&&Gl("COMPILER_V_ON_NATIVE",n)||nae(l)?o.push(l):iae(l)?Wn(t)?Y4(t.content.toLowerCase())?i.push(l):s.push(l):(i.push(l),s.push(l)):rae(l)?s.push(l):i.push(l)}return{keyModifiers:i,nonKeyModifiers:s,eventOptionModifiers:o}},CC=(t,e)=>Wn(t)&&t.content.toLowerCase()==="onclick"?Pe(e,!0):t.type!==4?Hr(["(",t,`) === "onClick" ? "${e}" : (`,t,")"]):t,oae=(t,e,n)=>fx(t,e,n,r=>{const{modifiers:i}=t;if(!i.length)return r;let{key:s,value:o}=r.props[0];const{keyModifiers:a,nonKeyModifiers:l,eventOptionModifiers:u}=sae(s,i,n,t.loc);if(l.includes("right")&&(s=CC(s,"onContextmenu")),l.includes("middle")&&(s=CC(s,"onMouseup")),l.length&&(o=Zt(n.helper(bx),[o,JSON.stringify(l)])),a.length&&(!Wn(s)||Y4(s.content.toLowerCase()))&&(o=Zt(n.helper(yx),[o,JSON.stringify(a)])),u.length){const c=u.map(WC).join("");s=Wn(s)?Pe(`${s.content}${c}`,!0):Hr(["(",s,`) + "${c}"`])}return{props:[Gt(s,o)]}}),aae=(t,e,n)=>{const{exp:r,loc:i}=t;return r||n.onError(xs(61,i)),{props:[],needRuntime:n.helper(vx)}},lae=(t,e)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&e.removeNode()},J4=[X4],Z4={cloak:K4,html:Qoe,text:eae,model:tae,on:oae,show:aae};function uae(t,e={}){return W4(t,ms({},Ex,e,{nodeTransforms:[lae,...J4,...e.nodeTransforms||[]],directiveTransforms:ms({},Z4,e.directiveTransforms||{}),transformHoist:null}))}function cae(t,e={}){return ox(t,ms({},Ex,e))}const fae=Object.freeze(Object.defineProperty({__proto__:null,BASE_TRANSITION:W2,BindingTypes:Koe,CAMELIZE:y0,CAPITALIZE:J8,CREATE_BLOCK:K2,CREATE_COMMENT:xu,CREATE_ELEMENT_BLOCK:X2,CREATE_ELEMENT_VNODE:jm,CREATE_SLOTS:Z2,CREATE_STATIC:Y2,CREATE_TEXT:Vm,CREATE_VNODE:zm,CompilerDeprecationTypes:Ise,ConstantTypes:wse,DOMDirectiveTransforms:Z4,DOMErrorCodes:Joe,DOMErrorMessages:Zoe,DOMNodeTransforms:J4,ElementTypes:Ese,ErrorCodes:Nse,FRAGMENT:Ul,GUARD_REACTIVE_PROPS:Su,IS_MEMO_SAME:Q2,IS_REF:t4,KEEP_ALIVE:vf,MERGE_PROPS:xf,NORMALIZE_CLASS:Xm,NORMALIZE_PROPS:Hl,NORMALIZE_STYLE:Ym,Namespaces:xse,NodeTypes:Sse,OPEN_BLOCK:Eo,POP_SCOPE_ID:Q8,PUSH_SCOPE_ID:Z8,RENDER_LIST:Km,RENDER_SLOT:J2,RESOLVE_COMPONENT:Um,RESOLVE_DIRECTIVE:qm,RESOLVE_DYNAMIC_COMPONENT:Hm,RESOLVE_FILTER:Gm,SET_BLOCK_TRACKING:Sf,SUSPENSE:$m,TELEPORT:wl,TO_DISPLAY_STRING:od,TO_HANDLERS:Jm,TO_HANDLER_KEY:v0,TRANSITION:xx,TRANSITION_GROUP:Sx,TS_NODE_TYPES:u4,UNREF:e4,V_MODEL_CHECKBOX:px,V_MODEL_DYNAMIC:_0,V_MODEL_RADIO:hx,V_MODEL_SELECT:gx,V_MODEL_TEXT:mx,V_ON_WITH_KEYS:yx,V_ON_WITH_MODIFIERS:bx,V_SHOW:vx,WITH_CTX:Zm,WITH_DIRECTIVES:Wm,WITH_MEMO:Qm,advancePositionWithClone:Zse,advancePositionWithMutation:m4,assert:Qse,baseCompile:W4,baseParse:ox,buildDirectiveArgs:V4,buildProps:cx,buildSlots:B4,checkCompatEnabled:Gl,compile:uae,convertToBlock:eg,createArrayExpression:uo,createAssignmentExpression:Dse,createBlockStatement:s4,createCacheExpression:i4,createCallExpression:Zt,createCompilerError:St,createCompoundExpression:Hr,createConditionalExpression:x0,createDOMCompilerError:xs,createForLoopParams:E0,createFunctionExpression:Sa,createIfStatement:Ase,createInterpolation:_se,createObjectExpression:Dr,createObjectProperty:Gt,createReturnStatement:Ose,createRoot:r4,createSequenceExpression:kse,createSimpleExpression:Pe,createStructuralDirectiveTransform:ax,createTemplateLiteral:Cse,createTransformContext:k4,createVNodeCall:ql,errorMessages:Mse,extractIdentifiers:Ii,findDir:Un,findProp:ld,forAliasRE:v4,generate:I4,generateCodeFrame:sP,getBaseTransformPreset:G4,getConstantType:ur,getMemoedVNodeCall:y4,getVNodeBlockHelper:wa,getVNodeHelper:Ea,hasDynamicKeyVBind:g4,hasScopeRef:ii,helperNameMap:xa,injectProp:wf,isCoreComponent:tx,isFnExpression:p4,isFnExpressionBrowser:h4,isFnExpressionNode:Jse,isFunctionType:Hse,isInDestructureAssignment:Bse,isInNewExpression:$se,isMemberExpression:rx,isMemberExpressionBrowser:d4,isMemberExpressionNode:Xse,isReferencedIdentifier:Lse,isSimpleIdentifier:ad,isSlotOutlet:Ef,isStaticArgOf:Zs,isStaticExp:Wn,isStaticProperty:l4,isStaticPropertyKey:qse,isTemplateNode:Wl,isText:Jh,isVPre:My,isVSlot:ix,locStub:ln,noopDirectiveTransform:K4,parse:cae,parserOptions:Ex,processExpression:tp,processFor:F4,processIf:M4,processSlotOutlet:U4,registerRuntimeHelpers:n4,resolveComponentType:j4,stringifyExpression:N4,toValidAssetId:Kl,trackSlotScopes:L4,trackVForSlotScopes:Loe,transform:O4,transformBind:H4,transformElement:z4,transformExpression:Poe,transformModel:dx,transformOn:fx,transformStyle:X4,transformVBindShorthand:q4,traverseNode:ud,unwrapTSNode:c4,validFirstIdentCharRE:nx,walkBlockDeclarations:a4,walkFunctionParams:zse,walkIdentifiers:Fse,warnDeprecation:Rse},Symbol.toStringTag,{value:"Module"})),dae=rm(fae),hae=rm(oP),pae=rm(aP);/**
* vue v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/var AC;function mae(){return AC||(AC=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=dae,n=hae,r=pae;function i(l){var u=Object.create(null);if(l)for(var c in l)u[c]=l[c];return u.default=l,Object.freeze(u)}var s=i(n);const o=Object.create(null);function a(l,u){if(!r.isString(l))if(l.nodeType)l=l.innerHTML;else return r.NOOP;const c=r.genCacheKey(l,u),f=o[c];if(f)return f;if(l[0]==="#"){const m=document.querySelector(l);l=m?m.innerHTML:""}const d=r.extend({hoistStatic:!0,onError:void 0,onWarn:r.NOOP},u);!d.isCustomElement&&typeof customElements<"u"&&(d.isCustomElement=m=>!!customElements.get(m));const{code:h}=e.compile(l,d),p=new Function("Vue",h)(s);return p._rc=!0,o[c]=p}n.registerRuntimeCompiler(a),t.compile=a,Object.keys(n).forEach(function(l){l!=="default"&&!Object.prototype.hasOwnProperty.call(t,l)&&(t[l]=n[l])})})(N1)),N1}var DC;function gae(){return DC||(DC=1,R1.exports=mae()),R1.exports}/**!
* Sortable 1.14.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function kC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Gi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?kC(Object(n),!0).forEach(function(r){bae(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kC(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function rp(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rp=function(e){return typeof e}:rp=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rp(t)}function bae(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xr(){return Xr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xr.apply(this,arguments)}function yae(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function vae(t,e){if(t==null)return{};var n=yae(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function xae(t){return Sae(t)||Eae(t)||wae(t)||_ae()}function Sae(t){if(Array.isArray(t))return zy(t)}function Eae(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function wae(t,e){if(t){if(typeof t=="string")return zy(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zy(t,e)}}function zy(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _ae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Cae="1.14.0";function Ss(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Ds=Ss(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),fd=Ss(/Edge/i),OC=Ss(/firefox/i),wc=Ss(/safari/i)&&!Ss(/chrome/i)&&!Ss(/android/i),Q4=Ss(/iP(ad|od|hone)/i),Aae=Ss(/chrome/i)&&Ss(/android/i),eI={capture:!1,passive:!1};function Ge(t,e,n){t.addEventListener(e,n,!Ds&&eI)}function je(t,e,n){t.removeEventListener(e,n,!Ds&&eI)}function C0(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function Dae(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function oi(t,e,n,r){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&C0(t,e):C0(t,e))||r&&t===n)return t;if(t===n)break}while(t=Dae(t))}return null}var TC=/\s+/g;function It(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(TC," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(TC," ")}}function be(t,e,n){var r=t&&t.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=n+(typeof n=="string"?"":"px")}}function aa(t,e){var n="";if(typeof t=="string")n=t;else do{var r=be(t,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function tI(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,s=r.length;if(n)for(;i<s;i++)n(r[i],i);return r}return[]}function ji(){var t=document.scrollingElement;return t||document.documentElement}function Dt(t,e,n,r,i){if(!(!t.getBoundingClientRect&&t!==window)){var s,o,a,l,u,c,f;if(t!==window&&t.parentNode&&t!==ji()?(s=t.getBoundingClientRect(),o=s.top,a=s.left,l=s.bottom,u=s.right,c=s.height,f=s.width):(o=0,a=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Ds))do if(i&&i.getBoundingClientRect&&(be(i,"transform")!=="none"||n&&be(i,"position")!=="static")){var d=i.getBoundingClientRect();o-=d.top+parseInt(be(i,"border-top-width")),a-=d.left+parseInt(be(i,"border-left-width")),l=o+s.height,u=a+s.width;break}while(i=i.parentNode);if(r&&t!==window){var h=aa(i||t),p=h&&h.a,m=h&&h.d;h&&(o/=m,a/=p,f/=p,c/=m,l=o+c,u=a+f)}return{top:o,left:a,bottom:l,right:u,width:f,height:c}}}function IC(t,e,n){for(var r=Qs(t,!0),i=Dt(t)[e];r;){var s=Dt(r)[n],o=void 0;if(o=i>=s,!o)return r;if(r===ji())break;r=Qs(r,!1)}return!1}function Xl(t,e,n,r){for(var i=0,s=0,o=t.children;s<o.length;){if(o[s].style.display!=="none"&&o[s]!==_e.ghost&&(r||o[s]!==_e.dragged)&&oi(o[s],n.draggable,t,!1)){if(i===e)return o[s];i++}s++}return null}function wx(t,e){for(var n=t.lastElementChild;n&&(n===_e.ghost||be(n,"display")==="none"||e&&!C0(n,e));)n=n.previousElementSibling;return n||null}function Lt(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==_e.clone&&(!e||C0(t,e))&&n++;return n}function PC(t){var e=0,n=0,r=ji();if(t)do{var i=aa(t),s=i.a,o=i.d;e+=t.scrollLeft*s,n+=t.scrollTop*o}while(t!==r&&(t=t.parentNode));return[e,n]}function kae(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n)}return-1}function Qs(t,e){if(!t||!t.getBoundingClientRect)return ji();var n=t,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=be(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return ji();if(r||e)return n;r=!0}}while(n=n.parentNode);return ji()}function Oae(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function F1(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var _c;function nI(t,e){return function(){if(!_c){var n=arguments,r=this;n.length===1?t.call(r,n[0]):t.apply(r,n),_c=setTimeout(function(){_c=void 0},e)}}}function Tae(){clearTimeout(_c),_c=void 0}function rI(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function _x(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function RC(t,e){be(t,"position","absolute"),be(t,"top",e.top),be(t,"left",e.left),be(t,"width",e.width),be(t,"height",e.height)}function L1(t){be(t,"position",""),be(t,"top",""),be(t,"left",""),be(t,"width",""),be(t,"height","")}var In="Sortable"+new Date().getTime();function Iae(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(i){if(!(be(i,"display")==="none"||i===_e.ghost)){t.push({target:i,rect:Dt(i)});var s=Gi({},t[t.length-1].rect);if(i.thisAnimationDuration){var o=aa(i,!0);o&&(s.top-=o.f,s.left-=o.e)}i.fromRect=s}})}},addAnimationState:function(r){t.push(r)},removeAnimationState:function(r){t.splice(kae(t,{target:r}),1)},animateAll:function(r){var i=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var s=!1,o=0;t.forEach(function(a){var l=0,u=a.target,c=u.fromRect,f=Dt(u),d=u.prevFromRect,h=u.prevToRect,p=a.rect,m=aa(u,!0);m&&(f.top-=m.f,f.left-=m.e),u.toRect=f,u.thisAnimationDuration&&F1(d,f)&&!F1(c,f)&&(p.top-f.top)/(p.left-f.left)===(c.top-f.top)/(c.left-f.left)&&(l=Rae(p,d,h,i.options)),F1(f,c)||(u.prevFromRect=c,u.prevToRect=f,l||(l=i.options.animation),i.animate(u,p,f,l)),l&&(s=!0,o=Math.max(o,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(e),s?e=setTimeout(function(){typeof r=="function"&&r()},o):typeof r=="function"&&r(),t=[]},animate:function(r,i,s,o){if(o){be(r,"transition",""),be(r,"transform","");var a=aa(this.el),l=a&&a.a,u=a&&a.d,c=(i.left-s.left)/(l||1),f=(i.top-s.top)/(u||1);r.animatingX=!!c,r.animatingY=!!f,be(r,"transform","translate3d("+c+"px,"+f+"px,0)"),this.forRepaintDummy=Pae(r),be(r,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),be(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){be(r,"transition",""),be(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},o)}}}}function Pae(t){return t.offsetWidth}function Rae(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var Ha=[],B1={initializeByDefault:!0},dd={mount:function(e){for(var n in B1)B1.hasOwnProperty(n)&&!(n in e)&&(e[n]=B1[n]);Ha.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Ha.push(e)},pluginEvent:function(e,n,r){var i=this;this.eventCanceled=!1,r.cancel=function(){i.eventCanceled=!0};var s=e+"Global";Ha.forEach(function(o){n[o.pluginName]&&(n[o.pluginName][s]&&n[o.pluginName][s](Gi({sortable:n},r)),n.options[o.pluginName]&&n[o.pluginName][e]&&n[o.pluginName][e](Gi({sortable:n},r)))})},initializePlugins:function(e,n,r,i){Ha.forEach(function(a){var l=a.pluginName;if(!(!e.options[l]&&!a.initializeByDefault)){var u=new a(e,n,e.options);u.sortable=e,u.options=e.options,e[l]=u,Xr(r,u.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var o=this.modifyOption(e,s,e.options[s]);typeof o<"u"&&(e.options[s]=o)}},getEventProperties:function(e,n){var r={};return Ha.forEach(function(i){typeof i.eventProperties=="function"&&Xr(r,i.eventProperties.call(n[i.pluginName],e))}),r},modifyOption:function(e,n,r){var i;return Ha.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[n]=="function"&&(i=s.optionListeners[n].call(e[s.pluginName],r))}),i}};function rc(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,s=t.cloneEl,o=t.toEl,a=t.fromEl,l=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,d=t.originalEvent,h=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[In],!!e){var m,g=e.options,b="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Ds&&!fd?m=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(r,!0,!0)),m.to=o||n,m.from=a||n,m.item=i||n,m.clone=s,m.oldIndex=l,m.newIndex=u,m.oldDraggableIndex=c,m.newDraggableIndex=f,m.originalEvent=d,m.pullMode=h?h.lastPutMode:void 0;var y=Gi(Gi({},p),dd.getEventProperties(r,e));for(var x in y)m[x]=y[x];n&&n.dispatchEvent(m),g[b]&&g[b].call(e,m)}}var Nae=["evt"],er=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,s=vae(r,Nae);dd.pluginEvent.bind(_e)(e,n,Gi({dragEl:ae,parentEl:Mt,ghostEl:Fe,rootEl:_t,nextEl:Bo,lastDownEl:ip,cloneEl:Ft,cloneHidden:Hs,dragStarted:ic,putSortable:bn,activeSortable:_e.active,originalEvent:i,oldIndex:al,oldDraggableIndex:Cc,newIndex:yr,newDraggableIndex:Bs,hideGhostForTarget:aI,unhideGhostForTarget:lI,cloneNowHidden:function(){Hs=!0},cloneNowShown:function(){Hs=!1},dispatchSortableEvent:function(a){Ln({sortable:n,name:a,originalEvent:i})}},s))};function Ln(t){rc(Gi({putSortable:bn,cloneEl:Ft,targetEl:ae,rootEl:_t,oldIndex:al,oldDraggableIndex:Cc,newIndex:yr,newDraggableIndex:Bs},t))}var ae,Mt,Fe,_t,Bo,ip,Ft,Hs,al,yr,Cc,Bs,gh,bn,Ja=!1,A0=!1,D0=[],Ro,ni,$1,z1,NC,MC,ic,qa,Ac,Dc=!1,bh=!1,sp,An,j1=[],jy=!1,k0=[],ng=typeof document<"u",yh=Q4,FC=fd||Ds?"cssFloat":"float",Mae=ng&&!Aae&&!Q4&&"draggable"in document.createElement("div"),iI=(function(){if(ng){if(Ds)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}})(),sI=function(e,n){var r=be(e),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),s=Xl(e,0,n),o=Xl(e,1,n),a=s&&be(s),l=o&&be(o),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Dt(s).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Dt(o).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var f=a.float==="left"?"left":"right";return o&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=i&&r[FC]==="none"||o&&r[FC]==="none"&&u+c>i)?"vertical":"horizontal"},Fae=function(e,n,r){var i=r?e.left:e.top,s=r?e.right:e.bottom,o=r?e.width:e.height,a=r?n.left:n.top,l=r?n.right:n.bottom,u=r?n.width:n.height;return i===a||s===l||i+o/2===a+u/2},Lae=function(e,n){var r;return D0.some(function(i){var s=i[In].options.emptyInsertThreshold;if(!(!s||wx(i))){var o=Dt(i),a=e>=o.left-s&&e<=o.right+s,l=n>=o.top-s&&n<=o.bottom+s;if(a&&l)return r=i}}),r},oI=function(e){function n(s,o){return function(a,l,u,c){var f=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(o||f))return!0;if(s==null||s===!1)return!1;if(o&&s==="clone")return s;if(typeof s=="function")return n(s(a,l,u,c),o)(a,l,u,c);var d=(o?a:l).options.group.name;return s===!0||typeof s=="string"&&s===d||s.join&&s.indexOf(d)>-1}}var r={},i=e.group;(!i||rp(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,e.group=r},aI=function(){!iI&&Fe&&be(Fe,"display","none")},lI=function(){!iI&&Fe&&be(Fe,"display","")};ng&&document.addEventListener("click",function(t){if(A0)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),A0=!1,!1},!0);var No=function(e){if(ae){e=e.touches?e.touches[0]:e;var n=Lae(e.clientX,e.clientY);if(n){var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=e[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[In]._onDragOver(r)}}},Bae=function(e){ae&&ae.parentNode[In]._isOutsideThisEl(e.target)};function _e(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Xr({},e),t[In]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return sI(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,a){o.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:_e.supportPointer!==!1&&"PointerEvent"in window&&!wc,emptyInsertThreshold:5};dd.initializePlugins(this,t,n);for(var r in n)!(r in e)&&(e[r]=n[r]);oI(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:Mae,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ge(t,"pointerdown",this._onTapStart):(Ge(t,"mousedown",this._onTapStart),Ge(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ge(t,"dragover",this),Ge(t,"dragenter",this)),D0.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Xr(this,Iae())}_e.prototype={constructor:_e,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(qa=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,ae):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,r=this.el,i=this.options,s=i.preventOnFilter,o=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(a||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=i.filter;if(Gae(r),!ae&&!(/mousedown|pointerdown/.test(o)&&e.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&wc&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=oi(l,i.draggable,r,!1),!(l&&l.animated)&&ip!==l)){if(al=Lt(l),Cc=Lt(l,i.draggable),typeof c=="function"){if(c.call(this,e,l,this)){Ln({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:r,fromEl:r}),er("filter",n,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=oi(u,f.trim(),r,!1),f)return Ln({sortable:n,rootEl:f,name:"filter",targetEl:l,fromEl:r,toEl:r}),er("filter",n,{evt:e}),!0}),c)){s&&e.cancelable&&e.preventDefault();return}i.handle&&!oi(u,i.handle,r,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,n,r){var i=this,s=i.el,o=i.options,a=s.ownerDocument,l;if(r&&!ae&&r.parentNode===s){var u=Dt(r);if(_t=s,ae=r,Mt=ae.parentNode,Bo=ae.nextSibling,ip=r,gh=o.group,_e.dragged=ae,Ro={target:ae,clientX:(n||e).clientX,clientY:(n||e).clientY},NC=Ro.clientX-u.left,MC=Ro.clientY-u.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,ae.style["will-change"]="all",l=function(){if(er("delayEnded",i,{evt:e}),_e.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!OC&&i.nativeDraggable&&(ae.draggable=!0),i._triggerDragStart(e,n),Ln({sortable:i,name:"choose",originalEvent:e}),It(ae,o.chosenClass,!0)},o.ignore.split(",").forEach(function(c){tI(ae,c.trim(),V1)}),Ge(a,"dragover",No),Ge(a,"mousemove",No),Ge(a,"touchmove",No),Ge(a,"mouseup",i._onDrop),Ge(a,"touchend",i._onDrop),Ge(a,"touchcancel",i._onDrop),OC&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ae.draggable=!0),er("delayStart",this,{evt:e}),o.delay&&(!o.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(fd||Ds))){if(_e.eventCanceled){this._onDrop();return}Ge(a,"mouseup",i._disableDelayedDrag),Ge(a,"touchend",i._disableDelayedDrag),Ge(a,"touchcancel",i._disableDelayedDrag),Ge(a,"mousemove",i._delayedDragTouchMoveHandler),Ge(a,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&Ge(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,o.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ae&&V1(ae),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;je(e,"mouseup",this._disableDelayedDrag),je(e,"touchend",this._disableDelayedDrag),je(e,"touchcancel",this._disableDelayedDrag),je(e,"mousemove",this._delayedDragTouchMoveHandler),je(e,"touchmove",this._delayedDragTouchMoveHandler),je(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?Ge(document,"pointermove",this._onTouchMove):n?Ge(document,"touchmove",this._onTouchMove):Ge(document,"mousemove",this._onTouchMove):(Ge(ae,"dragend",this),Ge(_t,"dragstart",this._onDragStart));try{document.selection?op(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(Ja=!1,_t&&ae){er("dragStarted",this,{evt:n}),this.nativeDraggable&&Ge(document,"dragover",Bae);var r=this.options;!e&&It(ae,r.dragClass,!1),It(ae,r.ghostClass,!0),_e.active=this,e&&this._appendGhost(),Ln({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ni){this._lastX=ni.clientX,this._lastY=ni.clientY,aI();for(var e=document.elementFromPoint(ni.clientX,ni.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ni.clientX,ni.clientY),e!==n);)n=e;if(ae.parentNode[In]._isOutsideThisEl(e),n)do{if(n[In]){var r=void 0;if(r=n[In]._onDragOver({clientX:ni.clientX,clientY:ni.clientY,target:e,rootEl:n}),r&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);lI()}},_onTouchMove:function(e){if(Ro){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,s=e.touches?e.touches[0]:e,o=Fe&&aa(Fe,!0),a=Fe&&o&&o.a,l=Fe&&o&&o.d,u=yh&&An&&PC(An),c=(s.clientX-Ro.clientX+i.x)/(a||1)+(u?u[0]-j1[0]:0)/(a||1),f=(s.clientY-Ro.clientY+i.y)/(l||1)+(u?u[1]-j1[1]:0)/(l||1);if(!_e.active&&!Ja){if(r&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(Fe){o?(o.e+=c-($1||0),o.f+=f-(z1||0)):o={a:1,b:0,c:0,d:1,e:c,f};var d="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");be(Fe,"webkitTransform",d),be(Fe,"mozTransform",d),be(Fe,"msTransform",d),be(Fe,"transform",d),$1=c,z1=f,ni=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Fe){var e=this.options.fallbackOnBody?document.body:_t,n=Dt(ae,!0,yh,!0,e),r=this.options;if(yh){for(An=e;be(An,"position")==="static"&&be(An,"transform")==="none"&&An!==document;)An=An.parentNode;An!==document.body&&An!==document.documentElement?(An===document&&(An=ji()),n.top+=An.scrollTop,n.left+=An.scrollLeft):An=ji(),j1=PC(An)}Fe=ae.cloneNode(!0),It(Fe,r.ghostClass,!1),It(Fe,r.fallbackClass,!0),It(Fe,r.dragClass,!0),be(Fe,"transition",""),be(Fe,"transform",""),be(Fe,"box-sizing","border-box"),be(Fe,"margin",0),be(Fe,"top",n.top),be(Fe,"left",n.left),be(Fe,"width",n.width),be(Fe,"height",n.height),be(Fe,"opacity","0.8"),be(Fe,"position",yh?"absolute":"fixed"),be(Fe,"zIndex","100000"),be(Fe,"pointerEvents","none"),_e.ghost=Fe,e.appendChild(Fe),be(Fe,"transform-origin",NC/parseInt(Fe.style.width)*100+"% "+MC/parseInt(Fe.style.height)*100+"%")}},_onDragStart:function(e,n){var r=this,i=e.dataTransfer,s=r.options;if(er("dragStart",this,{evt:e}),_e.eventCanceled){this._onDrop();return}er("setupClone",this),_e.eventCanceled||(Ft=_x(ae),Ft.draggable=!1,Ft.style["will-change"]="",this._hideClone(),It(Ft,this.options.chosenClass,!1),_e.clone=Ft),r.cloneId=op(function(){er("clone",r),!_e.eventCanceled&&(r.options.removeCloneOnHide||_t.insertBefore(Ft,ae),r._hideClone(),Ln({sortable:r,name:"clone"}))}),!n&&It(ae,s.dragClass,!0),n?(A0=!0,r._loopId=setInterval(r._emulateDragOver,50)):(je(document,"mouseup",r._onDrop),je(document,"touchend",r._onDrop),je(document,"touchcancel",r._onDrop),i&&(i.effectAllowed="move",s.setData&&s.setData.call(r,i,ae)),Ge(document,"drop",r),be(ae,"transform","translateZ(0)")),Ja=!0,r._dragStartId=op(r._dragStarted.bind(r,n,e)),Ge(document,"selectstart",r),ic=!0,wc&&be(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,r=e.target,i,s,o,a=this.options,l=a.group,u=_e.active,c=gh===l,f=a.sort,d=bn||u,h,p=this,m=!1;if(jy)return;function g(G,H){er(G,p,Gi({evt:e,isOwner:c,axis:h?"vertical":"horizontal",revert:o,dragRect:i,targetRect:s,canSort:f,fromSortable:d,target:r,completed:y,onMove:function(se,$){return vh(_t,n,ae,i,se,Dt(se),e,$)},changed:x},H))}function b(){g("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function y(G){return g("dragOverCompleted",{insertion:G}),G&&(c?u._hideClone():u._showClone(p),p!==d&&(It(ae,bn?bn.options.ghostClass:u.options.ghostClass,!1),It(ae,a.ghostClass,!0)),bn!==p&&p!==_e.active?bn=p:p===_e.active&&bn&&(bn=null),d===p&&(p._ignoreWhileAnimating=r),p.animateAll(function(){g("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(r===ae&&!ae.animated||r===n&&!r.animated)&&(qa=null),!a.dragoverBubble&&!e.rootEl&&r!==document&&(ae.parentNode[In]._isOutsideThisEl(e.target),!G&&No(e)),!a.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function x(){yr=Lt(ae),Bs=Lt(ae,a.draggable),Ln({sortable:p,name:"change",toEl:n,newIndex:yr,newDraggableIndex:Bs,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=oi(r,a.draggable,n,!0),g("dragOver"),_e.eventCanceled)return m;if(ae.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||p._ignoreWhileAnimating===r)return y(!1);if(A0=!1,u&&!a.disabled&&(c?f||(o=Mt!==_t):bn===this||(this.lastPutMode=gh.checkPull(this,u,ae,e))&&l.checkPut(this,u,ae,e))){if(h=this._getDirection(e,r)==="vertical",i=Dt(ae),g("dragOverValid"),_e.eventCanceled)return m;if(o)return Mt=_t,b(),this._hideClone(),g("revert"),_e.eventCanceled||(Bo?_t.insertBefore(ae,Bo):_t.appendChild(ae)),y(!0);var S=wx(n,a.draggable);if(!S||Vae(e,h,this)&&!S.animated){if(S===ae)return y(!1);if(S&&n===e.target&&(r=S),r&&(s=Dt(r)),vh(_t,n,ae,i,r,s,e,!!r)!==!1)return b(),n.appendChild(ae),Mt=n,x(),y(!0)}else if(S&&jae(e,h,this)){var E=Xl(n,0,a,!0);if(E===ae)return y(!1);if(r=E,s=Dt(r),vh(_t,n,ae,i,r,s,e,!1)!==!1)return b(),n.insertBefore(ae,E),Mt=n,x(),y(!0)}else if(r.parentNode===n){s=Dt(r);var C=0,w,A=ae.parentNode!==n,_=!Fae(ae.animated&&ae.toRect||i,r.animated&&r.toRect||s,h),O=h?"top":"left",I=IC(r,"top","top")||IC(ae,"top","top"),N=I?I.scrollTop:void 0;qa!==r&&(w=s[O],Dc=!1,bh=!_&&a.invertSwap||A),C=Uae(e,r,s,h,_?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,bh,qa===r);var P;if(C!==0){var R=Lt(ae);do R-=C,P=Mt.children[R];while(P&&(be(P,"display")==="none"||P===Fe))}if(C===0||P===r)return y(!1);qa=r,Ac=C;var F=r.nextElementSibling,V=!1;V=C===1;var B=vh(_t,n,ae,i,r,s,e,V);if(B!==!1)return(B===1||B===-1)&&(V=B===1),jy=!0,setTimeout(zae,30),b(),V&&!F?n.appendChild(ae):r.parentNode.insertBefore(ae,V?F:r),I&&rI(I,0,N-I.scrollTop),Mt=ae.parentNode,w!==void 0&&!bh&&(sp=Math.abs(w-Dt(r)[O])),x(),y(!0)}if(n.contains(ae))return y(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){je(document,"mousemove",this._onTouchMove),je(document,"touchmove",this._onTouchMove),je(document,"pointermove",this._onTouchMove),je(document,"dragover",No),je(document,"mousemove",No),je(document,"touchmove",No)},_offUpEvents:function(){var e=this.el.ownerDocument;je(e,"mouseup",this._onDrop),je(e,"touchend",this._onDrop),je(e,"pointerup",this._onDrop),je(e,"touchcancel",this._onDrop),je(document,"selectstart",this)},_onDrop:function(e){var n=this.el,r=this.options;if(yr=Lt(ae),Bs=Lt(ae,r.draggable),er("drop",this,{evt:e}),Mt=ae&&ae.parentNode,yr=Lt(ae),Bs=Lt(ae,r.draggable),_e.eventCanceled){this._nulling();return}Ja=!1,bh=!1,Dc=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vy(this.cloneId),Vy(this._dragStartId),this.nativeDraggable&&(je(document,"drop",this),je(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),wc&&be(document.body,"user-select",""),be(ae,"transform",""),e&&(ic&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),Fe&&Fe.parentNode&&Fe.parentNode.removeChild(Fe),(_t===Mt||bn&&bn.lastPutMode!=="clone")&&Ft&&Ft.parentNode&&Ft.parentNode.removeChild(Ft),ae&&(this.nativeDraggable&&je(ae,"dragend",this),V1(ae),ae.style["will-change"]="",ic&&!Ja&&It(ae,bn?bn.options.ghostClass:this.options.ghostClass,!1),It(ae,this.options.chosenClass,!1),Ln({sortable:this,name:"unchoose",toEl:Mt,newIndex:null,newDraggableIndex:null,originalEvent:e}),_t!==Mt?(yr>=0&&(Ln({rootEl:Mt,name:"add",toEl:Mt,fromEl:_t,originalEvent:e}),Ln({sortable:this,name:"remove",toEl:Mt,originalEvent:e}),Ln({rootEl:Mt,name:"sort",toEl:Mt,fromEl:_t,originalEvent:e}),Ln({sortable:this,name:"sort",toEl:Mt,originalEvent:e})),bn&&bn.save()):yr!==al&&yr>=0&&(Ln({sortable:this,name:"update",toEl:Mt,originalEvent:e}),Ln({sortable:this,name:"sort",toEl:Mt,originalEvent:e})),_e.active&&((yr==null||yr===-1)&&(yr=al,Bs=Cc),Ln({sortable:this,name:"end",toEl:Mt,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){er("nulling",this),_t=ae=Mt=Fe=Bo=Ft=ip=Hs=Ro=ni=ic=yr=Bs=al=Cc=qa=Ac=bn=gh=_e.dragged=_e.ghost=_e.clone=_e.active=null,k0.forEach(function(e){e.checked=!0}),k0.length=$1=z1=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":ae&&(this._onDragOver(e),$ae(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,r=this.el.children,i=0,s=r.length,o=this.options;i<s;i++)n=r[i],oi(n,o.draggable,this.el,!1)&&e.push(n.getAttribute(o.dataIdAttr)||qae(n));return e},sort:function(e,n){var r={},i=this.el;this.toArray().forEach(function(s,o){var a=i.children[o];oi(a,this.options.draggable,i,!1)&&(r[s]=a)},this),n&&this.captureAnimationState(),e.forEach(function(s){r[s]&&(i.removeChild(r[s]),i.appendChild(r[s]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return oi(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var r=this.options;if(n===void 0)return r[e];var i=dd.modifyOption(this,e,n);typeof i<"u"?r[e]=i:r[e]=n,e==="group"&&oI(r)},destroy:function(){er("destroy",this);var e=this.el;e[In]=null,je(e,"mousedown",this._onTapStart),je(e,"touchstart",this._onTapStart),je(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(je(e,"dragover",this),je(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),D0.splice(D0.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Hs){if(er("hideClone",this),_e.eventCanceled)return;be(Ft,"display","none"),this.options.removeCloneOnHide&&Ft.parentNode&&Ft.parentNode.removeChild(Ft),Hs=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Hs){if(er("showClone",this),_e.eventCanceled)return;ae.parentNode==_t&&!this.options.group.revertClone?_t.insertBefore(Ft,ae):Bo?_t.insertBefore(Ft,Bo):_t.appendChild(Ft),this.options.group.revertClone&&this.animate(ae,Ft),be(Ft,"display",""),Hs=!1}}};function $ae(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function vh(t,e,n,r,i,s,o,a){var l,u=t[In],c=u.options.onMove,f;return window.CustomEvent&&!Ds&&!fd?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=i||e,l.relatedRect=s||Dt(e),l.willInsertAfter=a,l.originalEvent=o,t.dispatchEvent(l),c&&(f=c.call(u,l,o)),f}function V1(t){t.draggable=!1}function zae(){jy=!1}function jae(t,e,n){var r=Dt(Xl(n.el,0,n.options,!0)),i=10;return e?t.clientX<r.left-i||t.clientY<r.top&&t.clientX<r.right:t.clientY<r.top-i||t.clientY<r.bottom&&t.clientX<r.left}function Vae(t,e,n){var r=Dt(wx(n.el,n.options.draggable)),i=10;return e?t.clientX>r.right+i||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+i}function Uae(t,e,n,r,i,s,o,a){var l=r?t.clientY:t.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=!1;if(!o){if(a&&sp<u*i){if(!Dc&&(Ac===1?l>c+u*s/2:l<f-u*s/2)&&(Dc=!0),Dc)d=!0;else if(Ac===1?l<c+sp:l>f-sp)return-Ac}else if(l>c+u*(1-i)/2&&l<f-u*(1-i)/2)return Hae(e)}return d=d||o,d&&(l<c+u*s/2||l>f-u*s/2)?l>c+u/2?1:-1:0}function Hae(t){return Lt(ae)<Lt(t)?1:-1}function qae(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Gae(t){k0.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&k0.push(r)}}function op(t){return setTimeout(t,0)}function Vy(t){return clearTimeout(t)}ng&&Ge(document,"touchmove",function(t){(_e.active||Ja)&&t.cancelable&&t.preventDefault()});_e.utils={on:Ge,off:je,css:be,find:tI,is:function(e,n){return!!oi(e,n,e,!1)},extend:Oae,throttle:nI,closest:oi,toggleClass:It,clone:_x,index:Lt,nextTick:op,cancelNextTick:Vy,detectDirection:sI,getChild:Xl};_e.get=function(t){return t[In]};_e.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(_e.utils=Gi(Gi({},_e.utils),r.utils)),dd.mount(r)})};_e.create=function(t,e){return new _e(t,e)};_e.version=Cae;var Xt=[],sc,Uy,Hy=!1,U1,H1,O0,oc;function Wae(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?Ge(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ge(document,"pointermove",this._handleFallbackAutoScroll):r.touches?Ge(document,"touchmove",this._handleFallbackAutoScroll):Ge(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?je(document,"dragover",this._handleAutoScroll):(je(document,"pointermove",this._handleFallbackAutoScroll),je(document,"touchmove",this._handleFallbackAutoScroll),je(document,"mousemove",this._handleFallbackAutoScroll)),LC(),ap(),Tae()},nulling:function(){O0=Uy=sc=Hy=oc=U1=H1=null,Xt.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var i=this,s=(n.touches?n.touches[0]:n).clientX,o=(n.touches?n.touches[0]:n).clientY,a=document.elementFromPoint(s,o);if(O0=n,r||this.options.forceAutoScrollFallback||fd||Ds||wc){q1(n,this.options,a,r);var l=Qs(a,!0);Hy&&(!oc||s!==U1||o!==H1)&&(oc&&LC(),oc=setInterval(function(){var u=Qs(document.elementFromPoint(s,o),!0);u!==l&&(l=u,ap()),q1(n,i.options,u,r)},10),U1=s,H1=o)}else{if(!this.options.bubbleScroll||Qs(a,!0)===ji()){ap();return}q1(n,this.options,Qs(a,!1),!1)}}},Xr(t,{pluginName:"scroll",initializeByDefault:!0})}function ap(){Xt.forEach(function(t){clearInterval(t.pid)}),Xt=[]}function LC(){clearInterval(oc)}var q1=nI(function(t,e,n,r){if(e.scroll){var i=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,o=e.scrollSensitivity,a=e.scrollSpeed,l=ji(),u=!1,c;Uy!==n&&(Uy=n,ap(),sc=e.scroll,c=e.scrollFn,sc===!0&&(sc=Qs(n,!0)));var f=0,d=sc;do{var h=d,p=Dt(h),m=p.top,g=p.bottom,b=p.left,y=p.right,x=p.width,S=p.height,E=void 0,C=void 0,w=h.scrollWidth,A=h.scrollHeight,_=be(h),O=h.scrollLeft,I=h.scrollTop;h===l?(E=x<w&&(_.overflowX==="auto"||_.overflowX==="scroll"||_.overflowX==="visible"),C=S<A&&(_.overflowY==="auto"||_.overflowY==="scroll"||_.overflowY==="visible")):(E=x<w&&(_.overflowX==="auto"||_.overflowX==="scroll"),C=S<A&&(_.overflowY==="auto"||_.overflowY==="scroll"));var N=E&&(Math.abs(y-i)<=o&&O+x<w)-(Math.abs(b-i)<=o&&!!O),P=C&&(Math.abs(g-s)<=o&&I+S<A)-(Math.abs(m-s)<=o&&!!I);if(!Xt[f])for(var R=0;R<=f;R++)Xt[R]||(Xt[R]={});(Xt[f].vx!=N||Xt[f].vy!=P||Xt[f].el!==h)&&(Xt[f].el=h,Xt[f].vx=N,Xt[f].vy=P,clearInterval(Xt[f].pid),(N!=0||P!=0)&&(u=!0,Xt[f].pid=setInterval((function(){r&&this.layer===0&&_e.active._onTouchMove(O0);var F=Xt[this.layer].vy?Xt[this.layer].vy*a:0,V=Xt[this.layer].vx?Xt[this.layer].vx*a:0;typeof c=="function"&&c.call(_e.dragged.parentNode[In],V,F,t,O0,Xt[this.layer].el)!=="continue"||rI(Xt[this.layer].el,V,F)}).bind({layer:f}),24))),f++}while(e.bubbleScroll&&d!==l&&(d=Qs(d,!1)));Hy=u}},30),uI=function(e){var n=e.originalEvent,r=e.putSortable,i=e.dragEl,s=e.activeSortable,o=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(n){var u=r||s;a();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,f=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(f)&&(o("spill"),this.onSpill({dragEl:i,putSortable:r}))}};function Cx(){}Cx.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var i=Xl(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:uI};Xr(Cx,{pluginName:"revertOnSpill"});function Ax(){}Ax.prototype={onSpill:function(e){var n=e.dragEl,r=e.putSortable,i=r||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:uI};Xr(Ax,{pluginName:"removeOnSpill"});var Nr;function Kae(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(n){var r=n.dragEl;Nr=r},dragOverValid:function(n){var r=n.completed,i=n.target,s=n.onMove,o=n.activeSortable,a=n.changed,l=n.cancel;if(o.options.swap){var u=this.sortable.el,c=this.options;if(i&&i!==u){var f=Nr;s(i)!==!1?(It(i,c.swapClass,!0),Nr=i):Nr=null,f&&f!==Nr&&It(f,c.swapClass,!1)}a(),r(!0),l()}},drop:function(n){var r=n.activeSortable,i=n.putSortable,s=n.dragEl,o=i||this.sortable,a=this.options;Nr&&It(Nr,a.swapClass,!1),Nr&&(a.swap||i&&i.options.swap)&&s!==Nr&&(o.captureAnimationState(),o!==r&&r.captureAnimationState(),Xae(s,Nr),o.animateAll(),o!==r&&r.animateAll())},nulling:function(){Nr=null}},Xr(t,{pluginName:"swap",eventProperties:function(){return{swapItem:Nr}}})}function Xae(t,e){var n=t.parentNode,r=e.parentNode,i,s;!n||!r||n.isEqualNode(e)||r.isEqualNode(t)||(i=Lt(t),s=Lt(e),n.isEqualNode(r)&&i<s&&s++,n.insertBefore(e,n.children[i]),r.insertBefore(t,r.children[s]))}var Te=[],br=[],Vu,ri,Uu=!1,tr=!1,Ga=!1,ht,Hu,xh;function Yae(){function t(e){for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this));e.options.supportPointer?Ge(document,"pointerup",this._deselectMultiDrag):(Ge(document,"mouseup",this._deselectMultiDrag),Ge(document,"touchend",this._deselectMultiDrag)),Ge(document,"keydown",this._checkKeyDown),Ge(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(i,s){var o="";Te.length&&ri===e?Te.forEach(function(a,l){o+=(l?", ":"")+a.textContent}):o=s.textContent,i.setData("Text",o)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(n){var r=n.dragEl;ht=r},delayEnded:function(){this.isMultiDrag=~Te.indexOf(ht)},setupClone:function(n){var r=n.sortable,i=n.cancel;if(this.isMultiDrag){for(var s=0;s<Te.length;s++)br.push(_x(Te[s])),br[s].sortableIndex=Te[s].sortableIndex,br[s].draggable=!1,br[s].style["will-change"]="",It(br[s],this.options.selectedClass,!1),Te[s]===ht&&It(br[s],this.options.chosenClass,!1);r._hideClone(),i()}},clone:function(n){var r=n.sortable,i=n.rootEl,s=n.dispatchSortableEvent,o=n.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||Te.length&&ri===r&&(BC(!0,i),s("clone"),o()))},showClone:function(n){var r=n.cloneNowShown,i=n.rootEl,s=n.cancel;this.isMultiDrag&&(BC(!1,i),br.forEach(function(o){be(o,"display","")}),r(),xh=!1,s())},hideClone:function(n){var r=this;n.sortable;var i=n.cloneNowHidden,s=n.cancel;this.isMultiDrag&&(br.forEach(function(o){be(o,"display","none"),r.options.removeCloneOnHide&&o.parentNode&&o.parentNode.removeChild(o)}),i(),xh=!0,s())},dragStartGlobal:function(n){n.sortable,!this.isMultiDrag&&ri&&ri.multiDrag._deselectMultiDrag(),Te.forEach(function(r){r.sortableIndex=Lt(r)}),Te=Te.sort(function(r,i){return r.sortableIndex-i.sortableIndex}),Ga=!0},dragStarted:function(n){var r=this,i=n.sortable;if(this.isMultiDrag){if(this.options.sort&&(i.captureAnimationState(),this.options.animation)){Te.forEach(function(o){o!==ht&&be(o,"position","absolute")});var s=Dt(ht,!1,!0,!0);Te.forEach(function(o){o!==ht&&RC(o,s)}),tr=!0,Uu=!0}i.animateAll(function(){tr=!1,Uu=!1,r.options.animation&&Te.forEach(function(o){L1(o)}),r.options.sort&&Sh()})}},dragOver:function(n){var r=n.target,i=n.completed,s=n.cancel;tr&&~Te.indexOf(r)&&(i(!1),s())},revert:function(n){var r=n.fromSortable,i=n.rootEl,s=n.sortable,o=n.dragRect;Te.length>1&&(Te.forEach(function(a){s.addAnimationState({target:a,rect:tr?Dt(a):o}),L1(a),a.fromRect=o,r.removeAnimationState(a)}),tr=!1,Jae(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(n){var r=n.sortable,i=n.isOwner,s=n.insertion,o=n.activeSortable,a=n.parentEl,l=n.putSortable,u=this.options;if(s){if(i&&o._hideClone(),Uu=!1,u.animation&&Te.length>1&&(tr||!i&&!o.options.sort&&!l)){var c=Dt(ht,!1,!0,!0);Te.forEach(function(d){d!==ht&&(RC(d,c),a.appendChild(d))}),tr=!0}if(!i)if(tr||Sh(),Te.length>1){var f=xh;o._showClone(r),o.options.animation&&!xh&&f&&br.forEach(function(d){o.addAnimationState({target:d,rect:Hu}),d.fromRect=Hu,d.thisAnimationDuration=null})}else o._showClone(r)}},dragOverAnimationCapture:function(n){var r=n.dragRect,i=n.isOwner,s=n.activeSortable;if(Te.forEach(function(a){a.thisAnimationDuration=null}),s.options.animation&&!i&&s.multiDrag.isMultiDrag){Hu=Xr({},r);var o=aa(ht,!0);Hu.top-=o.f,Hu.left-=o.e}},dragOverAnimationComplete:function(){tr&&(tr=!1,Sh())},drop:function(n){var r=n.originalEvent,i=n.rootEl,s=n.parentEl,o=n.sortable,a=n.dispatchSortableEvent,l=n.oldIndex,u=n.putSortable,c=u||this.sortable;if(r){var f=this.options,d=s.children;if(!Ga)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),It(ht,f.selectedClass,!~Te.indexOf(ht)),~Te.indexOf(ht))Te.splice(Te.indexOf(ht),1),Vu=null,rc({sortable:o,rootEl:i,name:"deselect",targetEl:ht});else{if(Te.push(ht),rc({sortable:o,rootEl:i,name:"select",targetEl:ht}),r.shiftKey&&Vu&&o.el.contains(Vu)){var h=Lt(Vu),p=Lt(ht);if(~h&&~p&&h!==p){var m,g;for(p>h?(g=h,m=p):(g=p,m=h+1);g<m;g++)~Te.indexOf(d[g])||(It(d[g],f.selectedClass,!0),Te.push(d[g]),rc({sortable:o,rootEl:i,name:"select",targetEl:d[g]}))}}else Vu=ht;ri=c}if(Ga&&this.isMultiDrag){if(tr=!1,(s[In].options.sort||s!==i)&&Te.length>1){var b=Dt(ht),y=Lt(ht,":not(."+this.options.selectedClass+")");if(!Uu&&f.animation&&(ht.thisAnimationDuration=null),c.captureAnimationState(),!Uu&&(f.animation&&(ht.fromRect=b,Te.forEach(function(S){if(S.thisAnimationDuration=null,S!==ht){var E=tr?Dt(S):b;S.fromRect=E,c.addAnimationState({target:S,rect:E})}})),Sh(),Te.forEach(function(S){d[y]?s.insertBefore(S,d[y]):s.appendChild(S),y++}),l===Lt(ht))){var x=!1;Te.forEach(function(S){if(S.sortableIndex!==Lt(S)){x=!0;return}}),x&&a("update")}Te.forEach(function(S){L1(S)}),c.animateAll()}ri=c}(i===s||u&&u.lastPutMode!=="clone")&&br.forEach(function(S){S.parentNode&&S.parentNode.removeChild(S)})}},nullingGlobal:function(){this.isMultiDrag=Ga=!1,br.length=0},destroyGlobal:function(){this._deselectMultiDrag(),je(document,"pointerup",this._deselectMultiDrag),je(document,"mouseup",this._deselectMultiDrag),je(document,"touchend",this._deselectMultiDrag),je(document,"keydown",this._checkKeyDown),je(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof Ga<"u"&&Ga)&&ri===this.sortable&&!(n&&oi(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;Te.length;){var r=Te[0];It(r,this.options.selectedClass,!1),Te.shift(),rc({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Xr(t,{pluginName:"multiDrag",utils:{select:function(n){var r=n.parentNode[In];!r||!r.options.multiDrag||~Te.indexOf(n)||(ri&&ri!==r&&(ri.multiDrag._deselectMultiDrag(),ri=r),It(n,r.options.selectedClass,!0),Te.push(n))},deselect:function(n){var r=n.parentNode[In],i=Te.indexOf(n);!r||!r.options.multiDrag||!~i||(It(n,r.options.selectedClass,!1),Te.splice(i,1))}},eventProperties:function(){var n=this,r=[],i=[];return Te.forEach(function(s){r.push({multiDragElement:s,index:s.sortableIndex});var o;tr&&s!==ht?o=-1:tr?o=Lt(s,":not(."+n.options.selectedClass+")"):o=Lt(s),i.push({multiDragElement:s,index:o})}),{items:xae(Te),clones:[].concat(br),oldIndicies:r,newIndicies:i}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function Jae(t,e){Te.forEach(function(n,r){var i=e.children[n.sortableIndex+(t?Number(r):0)];i?e.insertBefore(n,i):e.appendChild(n)})}function BC(t,e){br.forEach(function(n,r){var i=e.children[n.sortableIndex+(t?Number(r):0)];i?e.insertBefore(n,i):e.appendChild(n)})}function Sh(){Te.forEach(function(t){t!==ht&&t.parentNode&&t.parentNode.removeChild(t)})}_e.mount(new Wae);_e.mount(Ax,Cx);const Zae=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:Yae,Sortable:_e,Swap:Kae,default:_e},Symbol.toStringTag,{value:"Module"})),Qae=rm(Zae);var ele=Yh.exports,$C;function tle(){return $C||($C=1,(function(t,e){(function(r,i){t.exports=i(gae(),Qae)})(typeof self<"u"?self:ele,function(n,r){return(function(i){var s={};function o(a){if(s[a])return s[a].exports;var l=s[a]={i:a,l:!1,exports:{}};return i[a].call(l.exports,l,l.exports,o),l.l=!0,l.exports}return o.m=i,o.c=s,o.d=function(a,l,u){o.o(a,l)||Object.defineProperty(a,l,{enumerable:!0,get:u})},o.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},o.t=function(a,l){if(l&1&&(a=o(a)),l&8||l&4&&typeof a=="object"&&a&&a.__esModule)return a;var u=Object.create(null);if(o.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:a}),l&2&&typeof a!="string")for(var c in a)o.d(u,c,(function(f){return a[f]}).bind(null,c));return u},o.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(l,"a",l),l},o.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},o.p="",o(o.s="fb15")})({"00ee":(function(i,s,o){var a=o("b622"),l=a("toStringTag"),u={};u[l]="z",i.exports=String(u)==="[object z]"}),"0366":(function(i,s,o){var a=o("1c0b");i.exports=function(l,u,c){if(a(l),u===void 0)return l;switch(c){case 0:return function(){return l.call(u)};case 1:return function(f){return l.call(u,f)};case 2:return function(f,d){return l.call(u,f,d)};case 3:return function(f,d,h){return l.call(u,f,d,h)}}return function(){return l.apply(u,arguments)}}}),"057f":(function(i,s,o){var a=o("fc6a"),l=o("241c").f,u={}.toString,c=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function(d){try{return l(d)}catch{return c.slice()}};i.exports.f=function(h){return c&&u.call(h)=="[object Window]"?f(h):l(a(h))}}),"06cf":(function(i,s,o){var a=o("83ab"),l=o("d1e7"),u=o("5c6c"),c=o("fc6a"),f=o("c04e"),d=o("5135"),h=o("0cfb"),p=Object.getOwnPropertyDescriptor;s.f=a?p:function(g,b){if(g=c(g),b=f(b,!0),h)try{return p(g,b)}catch{}if(d(g,b))return u(!l.f.call(g,b),g[b])}}),"0cfb":(function(i,s,o){var a=o("83ab"),l=o("d039"),u=o("cc12");i.exports=!a&&!l(function(){return Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a!=7})}),"13d5":(function(i,s,o){var a=o("23e7"),l=o("d58f").left,u=o("a640"),c=o("ae40"),f=u("reduce"),d=c("reduce",{1:0});a({target:"Array",proto:!0,forced:!f||!d},{reduce:function(p){return l(this,p,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),"14c3":(function(i,s,o){var a=o("c6b6"),l=o("9263");i.exports=function(u,c){var f=u.exec;if(typeof f=="function"){var d=f.call(u,c);if(typeof d!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return d}if(a(u)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return l.call(u,c)}}),"159b":(function(i,s,o){var a=o("da84"),l=o("fdbc"),u=o("17c2"),c=o("9112");for(var f in l){var d=a[f],h=d&&d.prototype;if(h&&h.forEach!==u)try{c(h,"forEach",u)}catch{h.forEach=u}}}),"17c2":(function(i,s,o){var a=o("b727").forEach,l=o("a640"),u=o("ae40"),c=l("forEach"),f=u("forEach");i.exports=!c||!f?function(h){return a(this,h,arguments.length>1?arguments[1]:void 0)}:[].forEach}),"1be4":(function(i,s,o){var a=o("d066");i.exports=a("document","documentElement")}),"1c0b":(function(i,s){i.exports=function(o){if(typeof o!="function")throw TypeError(String(o)+" is not a function");return o}}),"1c7e":(function(i,s,o){var a=o("b622"),l=a("iterator"),u=!1;try{var c=0,f={next:function(){return{done:!!c++}},return:function(){u=!0}};f[l]=function(){return this},Array.from(f,function(){throw 2})}catch{}i.exports=function(d,h){if(!h&&!u)return!1;var p=!1;try{var m={};m[l]=function(){return{next:function(){return{done:p=!0}}}},d(m)}catch{}return p}}),"1d80":(function(i,s){i.exports=function(o){if(o==null)throw TypeError("Can't call method on "+o);return o}}),"1dde":(function(i,s,o){var a=o("d039"),l=o("b622"),u=o("2d00"),c=l("species");i.exports=function(f){return u>=51||!a(function(){var d=[],h=d.constructor={};return h[c]=function(){return{foo:1}},d[f](Boolean).foo!==1})}}),"23cb":(function(i,s,o){var a=o("a691"),l=Math.max,u=Math.min;i.exports=function(c,f){var d=a(c);return d<0?l(d+f,0):u(d,f)}}),"23e7":(function(i,s,o){var a=o("da84"),l=o("06cf").f,u=o("9112"),c=o("6eeb"),f=o("ce4e"),d=o("e893"),h=o("94ca");i.exports=function(p,m){var g=p.target,b=p.global,y=p.stat,x,S,E,C,w,A;if(b?S=a:y?S=a[g]||f(g,{}):S=(a[g]||{}).prototype,S)for(E in m){if(w=m[E],p.noTargetGet?(A=l(S,E),C=A&&A.value):C=S[E],x=h(b?E:g+(y?".":"#")+E,p.forced),!x&&C!==void 0){if(typeof w==typeof C)continue;d(w,C)}(p.sham||C&&C.sham)&&u(w,"sham",!0),c(S,E,w,p)}}}),"241c":(function(i,s,o){var a=o("ca84"),l=o("7839"),u=l.concat("length","prototype");s.f=Object.getOwnPropertyNames||function(f){return a(f,u)}}),"25f0":(function(i,s,o){var a=o("6eeb"),l=o("825a"),u=o("d039"),c=o("ad6d"),f="toString",d=RegExp.prototype,h=d[f],p=u(function(){return h.call({source:"a",flags:"b"})!="/a/b"}),m=h.name!=f;(p||m)&&a(RegExp.prototype,f,function(){var b=l(this),y=String(b.source),x=b.flags,S=String(x===void 0&&b instanceof RegExp&&!("flags"in d)?c.call(b):x);return"/"+y+"/"+S},{unsafe:!0})}),"2ca0":(function(i,s,o){var a=o("23e7"),l=o("06cf").f,u=o("50c4"),c=o("5a34"),f=o("1d80"),d=o("ab13"),h=o("c430"),p="".startsWith,m=Math.min,g=d("startsWith"),b=!h&&!g&&!!(function(){var y=l(String.prototype,"startsWith");return y&&!y.writable})();a({target:"String",proto:!0,forced:!b&&!g},{startsWith:function(x){var S=String(f(this));c(x);var E=u(m(arguments.length>1?arguments[1]:void 0,S.length)),C=String(x);return p?p.call(S,C,E):S.slice(E,E+C.length)===C}})}),"2d00":(function(i,s,o){var a=o("da84"),l=o("342f"),u=a.process,c=u&&u.versions,f=c&&c.v8,d,h;f?(d=f.split("."),h=d[0]+d[1]):l&&(d=l.match(/Edge\/(\d+)/),(!d||d[1]>=74)&&(d=l.match(/Chrome\/(\d+)/),d&&(h=d[1]))),i.exports=h&&+h}),"342f":(function(i,s,o){var a=o("d066");i.exports=a("navigator","userAgent")||""}),"35a1":(function(i,s,o){var a=o("f5df"),l=o("3f8c"),u=o("b622"),c=u("iterator");i.exports=function(f){if(f!=null)return f[c]||f["@@iterator"]||l[a(f)]}}),"37e8":(function(i,s,o){var a=o("83ab"),l=o("9bf2"),u=o("825a"),c=o("df75");i.exports=a?Object.defineProperties:function(d,h){u(d);for(var p=c(h),m=p.length,g=0,b;m>g;)l.f(d,b=p[g++],h[b]);return d}}),"3bbe":(function(i,s,o){var a=o("861d");i.exports=function(l){if(!a(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype");return l}}),"3ca3":(function(i,s,o){var a=o("6547").charAt,l=o("69f3"),u=o("7dd0"),c="String Iterator",f=l.set,d=l.getterFor(c);u(String,"String",function(h){f(this,{type:c,string:String(h),index:0})},function(){var p=d(this),m=p.string,g=p.index,b;return g>=m.length?{value:void 0,done:!0}:(b=a(m,g),p.index+=b.length,{value:b,done:!1})})}),"3f8c":(function(i,s){i.exports={}}),4160:(function(i,s,o){var a=o("23e7"),l=o("17c2");a({target:"Array",proto:!0,forced:[].forEach!=l},{forEach:l})}),"428f":(function(i,s,o){var a=o("da84");i.exports=a}),"44ad":(function(i,s,o){var a=o("d039"),l=o("c6b6"),u="".split;i.exports=a(function(){return!Object("z").propertyIsEnumerable(0)})?function(c){return l(c)=="String"?u.call(c,""):Object(c)}:Object}),"44d2":(function(i,s,o){var a=o("b622"),l=o("7c73"),u=o("9bf2"),c=a("unscopables"),f=Array.prototype;f[c]==null&&u.f(f,c,{configurable:!0,value:l(null)}),i.exports=function(d){f[c][d]=!0}}),"44e7":(function(i,s,o){var a=o("861d"),l=o("c6b6"),u=o("b622"),c=u("match");i.exports=function(f){var d;return a(f)&&((d=f[c])!==void 0?!!d:l(f)=="RegExp")}}),4930:(function(i,s,o){var a=o("d039");i.exports=!!Object.getOwnPropertySymbols&&!a(function(){return!String(Symbol())})}),"4d64":(function(i,s,o){var a=o("fc6a"),l=o("50c4"),u=o("23cb"),c=function(f){return function(d,h,p){var m=a(d),g=l(m.length),b=u(p,g),y;if(f&&h!=h){for(;g>b;)if(y=m[b++],y!=y)return!0}else for(;g>b;b++)if((f||b in m)&&m[b]===h)return f||b||0;return!f&&-1}};i.exports={includes:c(!0),indexOf:c(!1)}}),"4de4":(function(i,s,o){var a=o("23e7"),l=o("b727").filter,u=o("1dde"),c=o("ae40"),f=u("filter"),d=c("filter");a({target:"Array",proto:!0,forced:!f||!d},{filter:function(p){return l(this,p,arguments.length>1?arguments[1]:void 0)}})}),"4df4":(function(i,s,o){var a=o("0366"),l=o("7b0b"),u=o("9bdd"),c=o("e95a"),f=o("50c4"),d=o("8418"),h=o("35a1");i.exports=function(m){var g=l(m),b=typeof this=="function"?this:Array,y=arguments.length,x=y>1?arguments[1]:void 0,S=x!==void 0,E=h(g),C=0,w,A,_,O,I,N;if(S&&(x=a(x,y>2?arguments[2]:void 0,2)),E!=null&&!(b==Array&&c(E)))for(O=E.call(g),I=O.next,A=new b;!(_=I.call(O)).done;C++)N=S?u(O,x,[_.value,C],!0):_.value,d(A,C,N);else for(w=f(g.length),A=new b(w);w>C;C++)N=S?x(g[C],C):g[C],d(A,C,N);return A.length=C,A}}),"4fad":(function(i,s,o){var a=o("23e7"),l=o("6f53").entries;a({target:"Object",stat:!0},{entries:function(c){return l(c)}})}),"50c4":(function(i,s,o){var a=o("a691"),l=Math.min;i.exports=function(u){return u>0?l(a(u),9007199254740991):0}}),5135:(function(i,s){var o={}.hasOwnProperty;i.exports=function(a,l){return o.call(a,l)}}),5319:(function(i,s,o){var a=o("d784"),l=o("825a"),u=o("7b0b"),c=o("50c4"),f=o("a691"),d=o("1d80"),h=o("8aa5"),p=o("14c3"),m=Math.max,g=Math.min,b=Math.floor,y=/\$([$&'`]|\d\d?|<[^>]*>)/g,x=/\$([$&'`]|\d\d?)/g,S=function(E){return E===void 0?E:String(E)};a("replace",2,function(E,C,w,A){var _=A.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,O=A.REPLACE_KEEPS_$0,I=_?"$":"$0";return[function(R,F){var V=d(this),B=R==null?void 0:R[E];return B!==void 0?B.call(R,V,F):C.call(String(V),R,F)},function(P,R){if(!_&&O||typeof R=="string"&&R.indexOf(I)===-1){var F=w(C,P,this,R);if(F.done)return F.value}var V=l(P),B=String(this),G=typeof R=="function";G||(R=String(R));var H=V.global;if(H){var ie=V.unicode;V.lastIndex=0}for(var se=[];;){var $=p(V,B);if($===null||(se.push($),!H))break;var ee=String($[0]);ee===""&&(V.lastIndex=h(B,c(V.lastIndex),ie))}for(var pe="",fe=0,me=0;me<se.length;me++){$=se[me];for(var Me=String($[0]),Nt=m(g(f($.index),B.length),0),at=[],Qr=1;Qr<$.length;Qr++)at.push(S($[Qr]));var Qi=$.groups;if(G){var Jn=[Me].concat(at,Nt,B);Qi!==void 0&&Jn.push(Qi);var Kt=String(R.apply(void 0,Jn))}else Kt=N(Me,B,Nt,at,Qi,R);Nt>=fe&&(pe+=B.slice(fe,Nt)+Kt,fe=Nt+Me.length)}return pe+B.slice(fe)}];function N(P,R,F,V,B,G){var H=F+P.length,ie=V.length,se=x;return B!==void 0&&(B=u(B),se=y),C.call(G,se,function($,ee){var pe;switch(ee.charAt(0)){case"$":return"$";case"&":return P;case"`":return R.slice(0,F);case"'":return R.slice(H);case"<":pe=B[ee.slice(1,-1)];break;default:var fe=+ee;if(fe===0)return $;if(fe>ie){var me=b(fe/10);return me===0?$:me<=ie?V[me-1]===void 0?ee.charAt(1):V[me-1]+ee.charAt(1):$}pe=V[fe-1]}return pe===void 0?"":pe})}})}),5692:(function(i,s,o){var a=o("c430"),l=o("c6cd");(i.exports=function(u,c){return l[u]||(l[u]=c!==void 0?c:{})})("versions",[]).push({version:"3.6.5",mode:a?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),"56ef":(function(i,s,o){var a=o("d066"),l=o("241c"),u=o("7418"),c=o("825a");i.exports=a("Reflect","ownKeys")||function(d){var h=l.f(c(d)),p=u.f;return p?h.concat(p(d)):h}}),"5a34":(function(i,s,o){var a=o("44e7");i.exports=function(l){if(a(l))throw TypeError("The method doesn't accept regular expressions");return l}}),"5c6c":(function(i,s){i.exports=function(o,a){return{enumerable:!(o&1),configurable:!(o&2),writable:!(o&4),value:a}}}),"5db7":(function(i,s,o){var a=o("23e7"),l=o("a2bf"),u=o("7b0b"),c=o("50c4"),f=o("1c0b"),d=o("65f0");a({target:"Array",proto:!0},{flatMap:function(p){var m=u(this),g=c(m.length),b;return f(p),b=d(m,0),b.length=l(b,m,m,g,0,1,p,arguments.length>1?arguments[1]:void 0),b}})}),6547:(function(i,s,o){var a=o("a691"),l=o("1d80"),u=function(c){return function(f,d){var h=String(l(f)),p=a(d),m=h.length,g,b;return p<0||p>=m?c?"":void 0:(g=h.charCodeAt(p),g<55296||g>56319||p+1===m||(b=h.charCodeAt(p+1))<56320||b>57343?c?h.charAt(p):g:c?h.slice(p,p+2):(g-55296<<10)+(b-56320)+65536)}};i.exports={codeAt:u(!1),charAt:u(!0)}}),"65f0":(function(i,s,o){var a=o("861d"),l=o("e8b5"),u=o("b622"),c=u("species");i.exports=function(f,d){var h;return l(f)&&(h=f.constructor,typeof h=="function"&&(h===Array||l(h.prototype))?h=void 0:a(h)&&(h=h[c],h===null&&(h=void 0))),new(h===void 0?Array:h)(d===0?0:d)}}),"69f3":(function(i,s,o){var a=o("7f9a"),l=o("da84"),u=o("861d"),c=o("9112"),f=o("5135"),d=o("f772"),h=o("d012"),p=l.WeakMap,m,g,b,y=function(_){return b(_)?g(_):m(_,{})},x=function(_){return function(O){var I;if(!u(O)||(I=g(O)).type!==_)throw TypeError("Incompatible receiver, "+_+" required");return I}};if(a){var S=new p,E=S.get,C=S.has,w=S.set;m=function(_,O){return w.call(S,_,O),O},g=function(_){return E.call(S,_)||{}},b=function(_){return C.call(S,_)}}else{var A=d("state");h[A]=!0,m=function(_,O){return c(_,A,O),O},g=function(_){return f(_,A)?_[A]:{}},b=function(_){return f(_,A)}}i.exports={set:m,get:g,has:b,enforce:y,getterFor:x}}),"6eeb":(function(i,s,o){var a=o("da84"),l=o("9112"),u=o("5135"),c=o("ce4e"),f=o("8925"),d=o("69f3"),h=d.get,p=d.enforce,m=String(String).split("String");(i.exports=function(g,b,y,x){var S=x?!!x.unsafe:!1,E=x?!!x.enumerable:!1,C=x?!!x.noTargetGet:!1;if(typeof y=="function"&&(typeof b=="string"&&!u(y,"name")&&l(y,"name",b),p(y).source=m.join(typeof b=="string"?b:"")),g===a){E?g[b]=y:c(b,y);return}else S?!C&&g[b]&&(E=!0):delete g[b];E?g[b]=y:l(g,b,y)})(Function.prototype,"toString",function(){return typeof this=="function"&&h(this).source||f(this)})}),"6f53":(function(i,s,o){var a=o("83ab"),l=o("df75"),u=o("fc6a"),c=o("d1e7").f,f=function(d){return function(h){for(var p=u(h),m=l(p),g=m.length,b=0,y=[],x;g>b;)x=m[b++],(!a||c.call(p,x))&&y.push(d?[x,p[x]]:p[x]);return y}};i.exports={entries:f(!0),values:f(!1)}}),"73d9":(function(i,s,o){var a=o("44d2");a("flatMap")}),7418:(function(i,s){s.f=Object.getOwnPropertySymbols}),"746f":(function(i,s,o){var a=o("428f"),l=o("5135"),u=o("e538"),c=o("9bf2").f;i.exports=function(f){var d=a.Symbol||(a.Symbol={});l(d,f)||c(d,f,{value:u.f(f)})}}),7839:(function(i,s){i.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),"7b0b":(function(i,s,o){var a=o("1d80");i.exports=function(l){return Object(a(l))}}),"7c73":(function(i,s,o){var a=o("825a"),l=o("37e8"),u=o("7839"),c=o("d012"),f=o("1be4"),d=o("cc12"),h=o("f772"),p=">",m="<",g="prototype",b="script",y=h("IE_PROTO"),x=function(){},S=function(_){return m+b+p+_+m+"/"+b+p},E=function(_){_.write(S("")),_.close();var O=_.parentWindow.Object;return _=null,O},C=function(){var _=d("iframe"),O="java"+b+":",I;return _.style.display="none",f.appendChild(_),_.src=String(O),I=_.contentWindow.document,I.open(),I.write(S("document.F=Object")),I.close(),I.F},w,A=function(){try{w=document.domain&&new ActiveXObject("htmlfile")}catch{}A=w?E(w):C();for(var _=u.length;_--;)delete A[g][u[_]];return A()};c[y]=!0,i.exports=Object.create||function(O,I){var N;return O!==null?(x[g]=a(O),N=new x,x[g]=null,N[y]=O):N=A(),I===void 0?N:l(N,I)}}),"7dd0":(function(i,s,o){var a=o("23e7"),l=o("9ed3"),u=o("e163"),c=o("d2bb"),f=o("d44e"),d=o("9112"),h=o("6eeb"),p=o("b622"),m=o("c430"),g=o("3f8c"),b=o("ae93"),y=b.IteratorPrototype,x=b.BUGGY_SAFARI_ITERATORS,S=p("iterator"),E="keys",C="values",w="entries",A=function(){return this};i.exports=function(_,O,I,N,P,R,F){l(I,O,N);var V=function(me){if(me===P&&se)return se;if(!x&&me in H)return H[me];switch(me){case E:return function(){return new I(this,me)};case C:return function(){return new I(this,me)};case w:return function(){return new I(this,me)}}return function(){return new I(this)}},B=O+" Iterator",G=!1,H=_.prototype,ie=H[S]||H["@@iterator"]||P&&H[P],se=!x&&ie||V(P),$=O=="Array"&&H.entries||ie,ee,pe,fe;if($&&(ee=u($.call(new _)),y!==Object.prototype&&ee.next&&(!m&&u(ee)!==y&&(c?c(ee,y):typeof ee[S]!="function"&&d(ee,S,A)),f(ee,B,!0,!0),m&&(g[B]=A))),P==C&&ie&&ie.name!==C&&(G=!0,se=function(){return ie.call(this)}),(!m||F)&&H[S]!==se&&d(H,S,se),g[O]=se,P)if(pe={values:V(C),keys:R?se:V(E),entries:V(w)},F)for(fe in pe)(x||G||!(fe in H))&&h(H,fe,pe[fe]);else a({target:O,proto:!0,forced:x||G},pe);return pe}}),"7f9a":(function(i,s,o){var a=o("da84"),l=o("8925"),u=a.WeakMap;i.exports=typeof u=="function"&&/native code/.test(l(u))}),"825a":(function(i,s,o){var a=o("861d");i.exports=function(l){if(!a(l))throw TypeError(String(l)+" is not an object");return l}}),"83ab":(function(i,s,o){var a=o("d039");i.exports=!a(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})}),8418:(function(i,s,o){var a=o("c04e"),l=o("9bf2"),u=o("5c6c");i.exports=function(c,f,d){var h=a(f);h in c?l.f(c,h,u(0,d)):c[h]=d}}),"861d":(function(i,s){i.exports=function(o){return typeof o=="object"?o!==null:typeof o=="function"}}),8875:(function(i,s,o){var a,l,u;(function(c,f){l=[],a=f,u=typeof a=="function"?a.apply(s,l):a,u!==void 0&&(i.exports=u)})(typeof self<"u"?self:this,function(){function c(){var f=Object.getOwnPropertyDescriptor(document,"currentScript");if(!f&&"currentScript"in document&&document.currentScript||f&&f.get!==c&&document.currentScript)return document.currentScript;try{throw new Error}catch(w){var d=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,h=/@([^@]*):(\d+):(\d+)\s*$/ig,p=d.exec(w.stack)||h.exec(w.stack),m=p&&p[1]||!1,g=p&&p[2]||!1,b=document.location.href.replace(document.location.hash,""),y,x,S,E=document.getElementsByTagName("script");m===b&&(y=document.documentElement.outerHTML,x=new RegExp("(?:[^\\n]+?\\n){0,"+(g-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),S=y.replace(x,"$1").trim());for(var C=0;C<E.length;C++)if(E[C].readyState==="interactive"||E[C].src===m||m===b&&E[C].innerHTML&&E[C].innerHTML.trim()===S)return E[C];return null}}return c})}),8925:(function(i,s,o){var a=o("c6cd"),l=Function.toString;typeof a.inspectSource!="function"&&(a.inspectSource=function(u){return l.call(u)}),i.exports=a.inspectSource}),"8aa5":(function(i,s,o){var a=o("6547").charAt;i.exports=function(l,u,c){return u+(c?a(l,u).length:1)}}),"8bbf":(function(i,s){i.exports=n}),"90e3":(function(i,s){var o=0,a=Math.random();i.exports=function(l){return"Symbol("+String(l===void 0?"":l)+")_"+(++o+a).toString(36)}}),9112:(function(i,s,o){var a=o("83ab"),l=o("9bf2"),u=o("5c6c");i.exports=a?function(c,f,d){return l.f(c,f,u(1,d))}:function(c,f,d){return c[f]=d,c}}),9263:(function(i,s,o){var a=o("ad6d"),l=o("9f7f"),u=RegExp.prototype.exec,c=String.prototype.replace,f=u,d=(function(){var g=/a/,b=/b*/g;return u.call(g,"a"),u.call(b,"a"),g.lastIndex!==0||b.lastIndex!==0})(),h=l.UNSUPPORTED_Y||l.BROKEN_CARET,p=/()??/.exec("")[1]!==void 0,m=d||p||h;m&&(f=function(b){var y=this,x,S,E,C,w=h&&y.sticky,A=a.call(y),_=y.source,O=0,I=b;return w&&(A=A.replace("y",""),A.indexOf("g")===-1&&(A+="g"),I=String(b).slice(y.lastIndex),y.lastIndex>0&&(!y.multiline||y.multiline&&b[y.lastIndex-1]!==`
`)&&(_="(?: "+_+")",I=" "+I,O++),S=new RegExp("^(?:"+_+")",A)),p&&(S=new RegExp("^"+_+"$(?!\\s)",A)),d&&(x=y.lastIndex),E=u.call(w?S:y,I),w?E?(E.input=E.input.slice(O),E[0]=E[0].slice(O),E.index=y.lastIndex,y.lastIndex+=E[0].length):y.lastIndex=0:d&&E&&(y.lastIndex=y.global?E.index+E[0].length:x),p&&E&&E.length>1&&c.call(E[0],S,function(){for(C=1;C<arguments.length-2;C++)arguments[C]===void 0&&(E[C]=void 0)}),E}),i.exports=f}),"94ca":(function(i,s,o){var a=o("d039"),l=/#|\.prototype\./,u=function(p,m){var g=f[c(p)];return g==h?!0:g==d?!1:typeof m=="function"?a(m):!!m},c=u.normalize=function(p){return String(p).replace(l,".").toLowerCase()},f=u.data={},d=u.NATIVE="N",h=u.POLYFILL="P";i.exports=u}),"99af":(function(i,s,o){var a=o("23e7"),l=o("d039"),u=o("e8b5"),c=o("861d"),f=o("7b0b"),d=o("50c4"),h=o("8418"),p=o("65f0"),m=o("1dde"),g=o("b622"),b=o("2d00"),y=g("isConcatSpreadable"),x=9007199254740991,S="Maximum allowed index exceeded",E=b>=51||!l(function(){var _=[];return _[y]=!1,_.concat()[0]!==_}),C=m("concat"),w=function(_){if(!c(_))return!1;var O=_[y];return O!==void 0?!!O:u(_)},A=!E||!C;a({target:"Array",proto:!0,forced:A},{concat:function(O){var I=f(this),N=p(I,0),P=0,R,F,V,B,G;for(R=-1,V=arguments.length;R<V;R++)if(G=R===-1?I:arguments[R],w(G)){if(B=d(G.length),P+B>x)throw TypeError(S);for(F=0;F<B;F++,P++)F in G&&h(N,P,G[F])}else{if(P>=x)throw TypeError(S);h(N,P++,G)}return N.length=P,N}})}),"9bdd":(function(i,s,o){var a=o("825a");i.exports=function(l,u,c,f){try{return f?u(a(c)[0],c[1]):u(c)}catch(h){var d=l.return;throw d!==void 0&&a(d.call(l)),h}}}),"9bf2":(function(i,s,o){var a=o("83ab"),l=o("0cfb"),u=o("825a"),c=o("c04e"),f=Object.defineProperty;s.f=a?f:function(h,p,m){if(u(h),p=c(p,!0),u(m),l)try{return f(h,p,m)}catch{}if("get"in m||"set"in m)throw TypeError("Accessors not supported");return"value"in m&&(h[p]=m.value),h}}),"9ed3":(function(i,s,o){var a=o("ae93").IteratorPrototype,l=o("7c73"),u=o("5c6c"),c=o("d44e"),f=o("3f8c"),d=function(){return this};i.exports=function(h,p,m){var g=p+" Iterator";return h.prototype=l(a,{next:u(1,m)}),c(h,g,!1,!0),f[g]=d,h}}),"9f7f":(function(i,s,o){var a=o("d039");function l(u,c){return RegExp(u,c)}s.UNSUPPORTED_Y=a(function(){var u=l("a","y");return u.lastIndex=2,u.exec("abcd")!=null}),s.BROKEN_CARET=a(function(){var u=l("^r","gy");return u.lastIndex=2,u.exec("str")!=null})}),a2bf:(function(i,s,o){var a=o("e8b5"),l=o("50c4"),u=o("0366"),c=function(f,d,h,p,m,g,b,y){for(var x=m,S=0,E=b?u(b,y,3):!1,C;S<p;){if(S in h){if(C=E?E(h[S],S,d):h[S],g>0&&a(C))x=c(f,d,C,l(C.length),x,g-1)-1;else{if(x>=9007199254740991)throw TypeError("Exceed the acceptable array length");f[x]=C}x++}S++}return x};i.exports=c}),a352:(function(i,s){i.exports=r}),a434:(function(i,s,o){var a=o("23e7"),l=o("23cb"),u=o("a691"),c=o("50c4"),f=o("7b0b"),d=o("65f0"),h=o("8418"),p=o("1dde"),m=o("ae40"),g=p("splice"),b=m("splice",{ACCESSORS:!0,0:0,1:2}),y=Math.max,x=Math.min,S=9007199254740991,E="Maximum allowed length exceeded";a({target:"Array",proto:!0,forced:!g||!b},{splice:function(w,A){var _=f(this),O=c(_.length),I=l(w,O),N=arguments.length,P,R,F,V,B,G;if(N===0?P=R=0:N===1?(P=0,R=O-I):(P=N-2,R=x(y(u(A),0),O-I)),O+P-R>S)throw TypeError(E);for(F=d(_,R),V=0;V<R;V++)B=I+V,B in _&&h(F,V,_[B]);if(F.length=R,P<R){for(V=I;V<O-R;V++)B=V+R,G=V+P,B in _?_[G]=_[B]:delete _[G];for(V=O;V>O-R+P;V--)delete _[V-1]}else if(P>R)for(V=O-R;V>I;V--)B=V+R-1,G=V+P-1,B in _?_[G]=_[B]:delete _[G];for(V=0;V<P;V++)_[V+I]=arguments[V+2];return _.length=O-R+P,F}})}),a4d3:(function(i,s,o){var a=o("23e7"),l=o("da84"),u=o("d066"),c=o("c430"),f=o("83ab"),d=o("4930"),h=o("fdbf"),p=o("d039"),m=o("5135"),g=o("e8b5"),b=o("861d"),y=o("825a"),x=o("7b0b"),S=o("fc6a"),E=o("c04e"),C=o("5c6c"),w=o("7c73"),A=o("df75"),_=o("241c"),O=o("057f"),I=o("7418"),N=o("06cf"),P=o("9bf2"),R=o("d1e7"),F=o("9112"),V=o("6eeb"),B=o("5692"),G=o("f772"),H=o("d012"),ie=o("90e3"),se=o("b622"),$=o("e538"),ee=o("746f"),pe=o("d44e"),fe=o("69f3"),me=o("b727").forEach,Me=G("hidden"),Nt="Symbol",at="prototype",Qr=se("toPrimitive"),Qi=fe.set,Jn=fe.getterFor(Nt),Kt=Object[at],nn=l.Symbol,Oo=u("JSON","stringify"),gi=N.f,bi=P.f,hd=O.f,rg=R.f,ei=B("symbols"),ks=B("op-symbols"),Ma=B("string-to-symbol-registry"),Eu=B("symbol-to-string-registry"),wu=B("wks"),_u=l.QObject,Cu=!_u||!_u[at]||!_u[at].findChild,Au=f&&p(function(){return w(bi({},"a",{get:function(){return bi(this,"a",{value:7}).a}})).a!=7})?function(Oe,ye,Ee){var We=gi(Kt,ye);We&&delete Kt[ye],bi(Oe,ye,Ee),We&&Oe!==Kt&&bi(Kt,ye,We)}:bi,Du=function(Oe,ye){var Ee=ei[Oe]=w(nn[at]);return Qi(Ee,{type:Nt,tag:Oe,description:ye}),f||(Ee.description=ye),Ee},U=h?function(Oe){return typeof Oe=="symbol"}:function(Oe){return Object(Oe)instanceof nn},j=function(ye,Ee,We){ye===Kt&&j(ks,Ee,We),y(ye);var et=E(Ee,!0);return y(We),m(ei,et)?(We.enumerable?(m(ye,Me)&&ye[Me][et]&&(ye[Me][et]=!1),We=w(We,{enumerable:C(0,!1)})):(m(ye,Me)||bi(ye,Me,C(1,{})),ye[Me][et]=!0),Au(ye,et,We)):bi(ye,et,We)},W=function(ye,Ee){y(ye);var We=S(Ee),et=A(We).concat(it(We));return me(et,function(Zn){(!f||ge.call(We,Zn))&&j(ye,Zn,We[Zn])}),ye},te=function(ye,Ee){return Ee===void 0?w(ye):W(w(ye),Ee)},ge=function(ye){var Ee=E(ye,!0),We=rg.call(this,Ee);return this===Kt&&m(ei,Ee)&&!m(ks,Ee)?!1:We||!m(this,Ee)||!m(ei,Ee)||m(this,Me)&&this[Me][Ee]?We:!0},Ae=function(ye,Ee){var We=S(ye),et=E(Ee,!0);if(!(We===Kt&&m(ei,et)&&!m(ks,et))){var Zn=gi(We,et);return Zn&&m(ei,et)&&!(m(We,Me)&&We[Me][et])&&(Zn.enumerable=!0),Zn}},Le=function(ye){var Ee=hd(S(ye)),We=[];return me(Ee,function(et){!m(ei,et)&&!m(H,et)&&We.push(et)}),We},it=function(ye){var Ee=ye===Kt,We=hd(Ee?ks:S(ye)),et=[];return me(We,function(Zn){m(ei,Zn)&&(!Ee||m(Kt,Zn))&&et.push(ei[Zn])}),et};if(d||(nn=function(){if(this instanceof nn)throw TypeError("Symbol is not a constructor");var ye=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),Ee=ie(ye),We=function(et){this===Kt&&We.call(ks,et),m(this,Me)&&m(this[Me],Ee)&&(this[Me][Ee]=!1),Au(this,Ee,C(1,et))};return f&&Cu&&Au(Kt,Ee,{configurable:!0,set:We}),Du(Ee,ye)},V(nn[at],"toString",function(){return Jn(this).tag}),V(nn,"withoutSetter",function(Oe){return Du(ie(Oe),Oe)}),R.f=ge,P.f=j,N.f=Ae,_.f=O.f=Le,I.f=it,$.f=function(Oe){return Du(se(Oe),Oe)},f&&(bi(nn[at],"description",{configurable:!0,get:function(){return Jn(this).description}}),c||V(Kt,"propertyIsEnumerable",ge,{unsafe:!0}))),a({global:!0,wrap:!0,forced:!d,sham:!d},{Symbol:nn}),me(A(wu),function(Oe){ee(Oe)}),a({target:Nt,stat:!0,forced:!d},{for:function(Oe){var ye=String(Oe);if(m(Ma,ye))return Ma[ye];var Ee=nn(ye);return Ma[ye]=Ee,Eu[Ee]=ye,Ee},keyFor:function(ye){if(!U(ye))throw TypeError(ye+" is not a symbol");if(m(Eu,ye))return Eu[ye]},useSetter:function(){Cu=!0},useSimple:function(){Cu=!1}}),a({target:"Object",stat:!0,forced:!d,sham:!f},{create:te,defineProperty:j,defineProperties:W,getOwnPropertyDescriptor:Ae}),a({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:Le,getOwnPropertySymbols:it}),a({target:"Object",stat:!0,forced:p(function(){I.f(1)})},{getOwnPropertySymbols:function(ye){return I.f(x(ye))}}),Oo){var zt=!d||p(function(){var Oe=nn();return Oo([Oe])!="[null]"||Oo({a:Oe})!="{}"||Oo(Object(Oe))!="{}"});a({target:"JSON",stat:!0,forced:zt},{stringify:function(ye,Ee,We){for(var et=[ye],Zn=1,ig;arguments.length>Zn;)et.push(arguments[Zn++]);if(ig=Ee,!(!b(Ee)&&ye===void 0||U(ye)))return g(Ee)||(Ee=function(cI,pd){if(typeof ig=="function"&&(pd=ig.call(this,cI,pd)),!U(pd))return pd}),et[1]=Ee,Oo.apply(null,et)}})}nn[at][Qr]||F(nn[at],Qr,nn[at].valueOf),pe(nn,Nt),H[Me]=!0}),a630:(function(i,s,o){var a=o("23e7"),l=o("4df4"),u=o("1c7e"),c=!u(function(f){Array.from(f)});a({target:"Array",stat:!0,forced:c},{from:l})}),a640:(function(i,s,o){var a=o("d039");i.exports=function(l,u){var c=[][l];return!!c&&a(function(){c.call(null,u||function(){throw 1},1)})}}),a691:(function(i,s){var o=Math.ceil,a=Math.floor;i.exports=function(l){return isNaN(l=+l)?0:(l>0?a:o)(l)}}),ab13:(function(i,s,o){var a=o("b622"),l=a("match");i.exports=function(u){var c=/./;try{"/./"[u](c)}catch{try{return c[l]=!1,"/./"[u](c)}catch{}}return!1}}),ac1f:(function(i,s,o){var a=o("23e7"),l=o("9263");a({target:"RegExp",proto:!0,forced:/./.exec!==l},{exec:l})}),ad6d:(function(i,s,o){var a=o("825a");i.exports=function(){var l=a(this),u="";return l.global&&(u+="g"),l.ignoreCase&&(u+="i"),l.multiline&&(u+="m"),l.dotAll&&(u+="s"),l.unicode&&(u+="u"),l.sticky&&(u+="y"),u}}),ae40:(function(i,s,o){var a=o("83ab"),l=o("d039"),u=o("5135"),c=Object.defineProperty,f={},d=function(h){throw h};i.exports=function(h,p){if(u(f,h))return f[h];p||(p={});var m=[][h],g=u(p,"ACCESSORS")?p.ACCESSORS:!1,b=u(p,0)?p[0]:d,y=u(p,1)?p[1]:void 0;return f[h]=!!m&&!l(function(){if(g&&!a)return!0;var x={length:-1};g?c(x,1,{enumerable:!0,get:d}):x[1]=1,m.call(x,b,y)})}}),ae93:(function(i,s,o){var a=o("e163"),l=o("9112"),u=o("5135"),c=o("b622"),f=o("c430"),d=c("iterator"),h=!1,p=function(){return this},m,g,b;[].keys&&(b=[].keys(),"next"in b?(g=a(a(b)),g!==Object.prototype&&(m=g)):h=!0),m==null&&(m={}),!f&&!u(m,d)&&l(m,d,p),i.exports={IteratorPrototype:m,BUGGY_SAFARI_ITERATORS:h}}),b041:(function(i,s,o){var a=o("00ee"),l=o("f5df");i.exports=a?{}.toString:function(){return"[object "+l(this)+"]"}}),b0c0:(function(i,s,o){var a=o("83ab"),l=o("9bf2").f,u=Function.prototype,c=u.toString,f=/^\s*function ([^ (]*)/,d="name";a&&!(d in u)&&l(u,d,{configurable:!0,get:function(){try{return c.call(this).match(f)[1]}catch{return""}}})}),b622:(function(i,s,o){var a=o("da84"),l=o("5692"),u=o("5135"),c=o("90e3"),f=o("4930"),d=o("fdbf"),h=l("wks"),p=a.Symbol,m=d?p:p&&p.withoutSetter||c;i.exports=function(g){return u(h,g)||(f&&u(p,g)?h[g]=p[g]:h[g]=m("Symbol."+g)),h[g]}}),b64b:(function(i,s,o){var a=o("23e7"),l=o("7b0b"),u=o("df75"),c=o("d039"),f=c(function(){u(1)});a({target:"Object",stat:!0,forced:f},{keys:function(h){return u(l(h))}})}),b727:(function(i,s,o){var a=o("0366"),l=o("44ad"),u=o("7b0b"),c=o("50c4"),f=o("65f0"),d=[].push,h=function(p){var m=p==1,g=p==2,b=p==3,y=p==4,x=p==6,S=p==5||x;return function(E,C,w,A){for(var _=u(E),O=l(_),I=a(C,w,3),N=c(O.length),P=0,R=A||f,F=m?R(E,N):g?R(E,0):void 0,V,B;N>P;P++)if((S||P in O)&&(V=O[P],B=I(V,P,_),p)){if(m)F[P]=B;else if(B)switch(p){case 3:return!0;case 5:return V;case 6:return P;case 2:d.call(F,V)}else if(y)return!1}return x?-1:b||y?y:F}};i.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6)}}),c04e:(function(i,s,o){var a=o("861d");i.exports=function(l,u){if(!a(l))return l;var c,f;if(u&&typeof(c=l.toString)=="function"&&!a(f=c.call(l))||typeof(c=l.valueOf)=="function"&&!a(f=c.call(l))||!u&&typeof(c=l.toString)=="function"&&!a(f=c.call(l)))return f;throw TypeError("Can't convert object to primitive value")}}),c430:(function(i,s){i.exports=!1}),c6b6:(function(i,s){var o={}.toString;i.exports=function(a){return o.call(a).slice(8,-1)}}),c6cd:(function(i,s,o){var a=o("da84"),l=o("ce4e"),u="__core-js_shared__",c=a[u]||l(u,{});i.exports=c}),c740:(function(i,s,o){var a=o("23e7"),l=o("b727").findIndex,u=o("44d2"),c=o("ae40"),f="findIndex",d=!0,h=c(f);f in[]&&Array(1)[f](function(){d=!1}),a({target:"Array",proto:!0,forced:d||!h},{findIndex:function(m){return l(this,m,arguments.length>1?arguments[1]:void 0)}}),u(f)}),c8ba:(function(i,s){var o;o=(function(){return this})();try{o=o||new Function("return this")()}catch{typeof window=="object"&&(o=window)}i.exports=o}),c975:(function(i,s,o){var a=o("23e7"),l=o("4d64").indexOf,u=o("a640"),c=o("ae40"),f=[].indexOf,d=!!f&&1/[1].indexOf(1,-0)<0,h=u("indexOf"),p=c("indexOf",{ACCESSORS:!0,1:0});a({target:"Array",proto:!0,forced:d||!h||!p},{indexOf:function(g){return d?f.apply(this,arguments)||0:l(this,g,arguments.length>1?arguments[1]:void 0)}})}),ca84:(function(i,s,o){var a=o("5135"),l=o("fc6a"),u=o("4d64").indexOf,c=o("d012");i.exports=function(f,d){var h=l(f),p=0,m=[],g;for(g in h)!a(c,g)&&a(h,g)&&m.push(g);for(;d.length>p;)a(h,g=d[p++])&&(~u(m,g)||m.push(g));return m}}),caad:(function(i,s,o){var a=o("23e7"),l=o("4d64").includes,u=o("44d2"),c=o("ae40"),f=c("indexOf",{ACCESSORS:!0,1:0});a({target:"Array",proto:!0,forced:!f},{includes:function(h){return l(this,h,arguments.length>1?arguments[1]:void 0)}}),u("includes")}),cc12:(function(i,s,o){var a=o("da84"),l=o("861d"),u=a.document,c=l(u)&&l(u.createElement);i.exports=function(f){return c?u.createElement(f):{}}}),ce4e:(function(i,s,o){var a=o("da84"),l=o("9112");i.exports=function(u,c){try{l(a,u,c)}catch{a[u]=c}return c}}),d012:(function(i,s){i.exports={}}),d039:(function(i,s){i.exports=function(o){try{return!!o()}catch{return!0}}}),d066:(function(i,s,o){var a=o("428f"),l=o("da84"),u=function(c){return typeof c=="function"?c:void 0};i.exports=function(c,f){return arguments.length<2?u(a[c])||u(l[c]):a[c]&&a[c][f]||l[c]&&l[c][f]}}),d1e7:(function(i,s,o){var a={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,u=l&&!a.call({1:2},1);s.f=u?function(f){var d=l(this,f);return!!d&&d.enumerable}:a}),d28b:(function(i,s,o){var a=o("746f");a("iterator")}),d2bb:(function(i,s,o){var a=o("825a"),l=o("3bbe");i.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var u=!1,c={},f;try{f=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,f.call(c,[]),u=c instanceof Array}catch{}return function(h,p){return a(h),l(p),u?f.call(h,p):h.__proto__=p,h}})():void 0)}),d3b7:(function(i,s,o){var a=o("00ee"),l=o("6eeb"),u=o("b041");a||l(Object.prototype,"toString",u,{unsafe:!0})}),d44e:(function(i,s,o){var a=o("9bf2").f,l=o("5135"),u=o("b622"),c=u("toStringTag");i.exports=function(f,d,h){f&&!l(f=h?f:f.prototype,c)&&a(f,c,{configurable:!0,value:d})}}),d58f:(function(i,s,o){var a=o("1c0b"),l=o("7b0b"),u=o("44ad"),c=o("50c4"),f=function(d){return function(h,p,m,g){a(p);var b=l(h),y=u(b),x=c(b.length),S=d?x-1:0,E=d?-1:1;if(m<2)for(;;){if(S in y){g=y[S],S+=E;break}if(S+=E,d?S<0:x<=S)throw TypeError("Reduce of empty array with no initial value")}for(;d?S>=0:x>S;S+=E)S in y&&(g=p(g,y[S],S,b));return g}};i.exports={left:f(!1),right:f(!0)}}),d784:(function(i,s,o){o("ac1f");var a=o("6eeb"),l=o("d039"),u=o("b622"),c=o("9263"),f=o("9112"),d=u("species"),h=!l(function(){var y=/./;return y.exec=function(){var x=[];return x.groups={a:"7"},x},"".replace(y,"$<a>")!=="7"}),p=(function(){return"a".replace(/./,"$0")==="$0"})(),m=u("replace"),g=(function(){return/./[m]?/./[m]("a","$0")==="":!1})(),b=!l(function(){var y=/(?:)/,x=y.exec;y.exec=function(){return x.apply(this,arguments)};var S="ab".split(y);return S.length!==2||S[0]!=="a"||S[1]!=="b"});i.exports=function(y,x,S,E){var C=u(y),w=!l(function(){var P={};return P[C]=function(){return 7},""[y](P)!=7}),A=w&&!l(function(){var P=!1,R=/a/;return y==="split"&&(R={},R.constructor={},R.constructor[d]=function(){return R},R.flags="",R[C]=/./[C]),R.exec=function(){return P=!0,null},R[C](""),!P});if(!w||!A||y==="replace"&&!(h&&p&&!g)||y==="split"&&!b){var _=/./[C],O=S(C,""[y],function(P,R,F,V,B){return R.exec===c?w&&!B?{done:!0,value:_.call(R,F,V)}:{done:!0,value:P.call(F,R,V)}:{done:!1}},{REPLACE_KEEPS_$0:p,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:g}),I=O[0],N=O[1];a(String.prototype,y,I),a(RegExp.prototype,C,x==2?function(P,R){return N.call(P,this,R)}:function(P){return N.call(P,this)})}E&&f(RegExp.prototype[C],"sham",!0)}}),d81d:(function(i,s,o){var a=o("23e7"),l=o("b727").map,u=o("1dde"),c=o("ae40"),f=u("map"),d=c("map");a({target:"Array",proto:!0,forced:!f||!d},{map:function(p){return l(this,p,arguments.length>1?arguments[1]:void 0)}})}),da84:(function(i,s,o){(function(a){var l=function(u){return u&&u.Math==Math&&u};i.exports=l(typeof globalThis=="object"&&globalThis)||l(typeof window=="object"&&window)||l(typeof self=="object"&&self)||l(typeof a=="object"&&a)||Function("return this")()}).call(this,o("c8ba"))}),dbb4:(function(i,s,o){var a=o("23e7"),l=o("83ab"),u=o("56ef"),c=o("fc6a"),f=o("06cf"),d=o("8418");a({target:"Object",stat:!0,sham:!l},{getOwnPropertyDescriptors:function(p){for(var m=c(p),g=f.f,b=u(m),y={},x=0,S,E;b.length>x;)E=g(m,S=b[x++]),E!==void 0&&d(y,S,E);return y}})}),dbf1:(function(i,s,o){(function(a){o.d(s,"a",function(){return u});function l(){return typeof window<"u"?window.console:a.console}var u=l()}).call(this,o("c8ba"))}),ddb0:(function(i,s,o){var a=o("da84"),l=o("fdbc"),u=o("e260"),c=o("9112"),f=o("b622"),d=f("iterator"),h=f("toStringTag"),p=u.values;for(var m in l){var g=a[m],b=g&&g.prototype;if(b){if(b[d]!==p)try{c(b,d,p)}catch{b[d]=p}if(b[h]||c(b,h,m),l[m]){for(var y in u)if(b[y]!==u[y])try{c(b,y,u[y])}catch{b[y]=u[y]}}}}}),df75:(function(i,s,o){var a=o("ca84"),l=o("7839");i.exports=Object.keys||function(c){return a(c,l)}}),e01a:(function(i,s,o){var a=o("23e7"),l=o("83ab"),u=o("da84"),c=o("5135"),f=o("861d"),d=o("9bf2").f,h=o("e893"),p=u.Symbol;if(l&&typeof p=="function"&&(!("description"in p.prototype)||p().description!==void 0)){var m={},g=function(){var C=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),w=this instanceof g?new p(C):C===void 0?p():p(C);return C===""&&(m[w]=!0),w};h(g,p);var b=g.prototype=p.prototype;b.constructor=g;var y=b.toString,x=String(p("test"))=="Symbol(test)",S=/^Symbol\((.*)\)[^)]+$/;d(b,"description",{configurable:!0,get:function(){var C=f(this)?this.valueOf():this,w=y.call(C);if(c(m,C))return"";var A=x?w.slice(7,-1):w.replace(S,"$1");return A===""?void 0:A}}),a({global:!0,forced:!0},{Symbol:g})}}),e163:(function(i,s,o){var a=o("5135"),l=o("7b0b"),u=o("f772"),c=o("e177"),f=u("IE_PROTO"),d=Object.prototype;i.exports=c?Object.getPrototypeOf:function(h){return h=l(h),a(h,f)?h[f]:typeof h.constructor=="function"&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?d:null}}),e177:(function(i,s,o){var a=o("d039");i.exports=!a(function(){function l(){}return l.prototype.constructor=null,Object.getPrototypeOf(new l)!==l.prototype})}),e260:(function(i,s,o){var a=o("fc6a"),l=o("44d2"),u=o("3f8c"),c=o("69f3"),f=o("7dd0"),d="Array Iterator",h=c.set,p=c.getterFor(d);i.exports=f(Array,"Array",function(m,g){h(this,{type:d,target:a(m),index:0,kind:g})},function(){var m=p(this),g=m.target,b=m.kind,y=m.index++;return!g||y>=g.length?(m.target=void 0,{value:void 0,done:!0}):b=="keys"?{value:y,done:!1}:b=="values"?{value:g[y],done:!1}:{value:[y,g[y]],done:!1}},"values"),u.Arguments=u.Array,l("keys"),l("values"),l("entries")}),e439:(function(i,s,o){var a=o("23e7"),l=o("d039"),u=o("fc6a"),c=o("06cf").f,f=o("83ab"),d=l(function(){c(1)}),h=!f||d;a({target:"Object",stat:!0,forced:h,sham:!f},{getOwnPropertyDescriptor:function(m,g){return c(u(m),g)}})}),e538:(function(i,s,o){var a=o("b622");s.f=a}),e893:(function(i,s,o){var a=o("5135"),l=o("56ef"),u=o("06cf"),c=o("9bf2");i.exports=function(f,d){for(var h=l(d),p=c.f,m=u.f,g=0;g<h.length;g++){var b=h[g];a(f,b)||p(f,b,m(d,b))}}}),e8b5:(function(i,s,o){var a=o("c6b6");i.exports=Array.isArray||function(u){return a(u)=="Array"}}),e95a:(function(i,s,o){var a=o("b622"),l=o("3f8c"),u=a("iterator"),c=Array.prototype;i.exports=function(f){return f!==void 0&&(l.Array===f||c[u]===f)}}),f5df:(function(i,s,o){var a=o("00ee"),l=o("c6b6"),u=o("b622"),c=u("toStringTag"),f=l((function(){return arguments})())=="Arguments",d=function(h,p){try{return h[p]}catch{}};i.exports=a?l:function(h){var p,m,g;return h===void 0?"Undefined":h===null?"Null":typeof(m=d(p=Object(h),c))=="string"?m:f?l(p):(g=l(p))=="Object"&&typeof p.callee=="function"?"Arguments":g}}),f772:(function(i,s,o){var a=o("5692"),l=o("90e3"),u=a("keys");i.exports=function(c){return u[c]||(u[c]=l(c))}}),fb15:(function(i,s,o){if(o.r(s),typeof window<"u"){var a=window.document.currentScript;{var l=o("8875");a=l(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:l})}var u=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);u&&(o.p=u[1])}o("99af"),o("4de4"),o("4160"),o("c975"),o("d81d"),o("a434"),o("159b"),o("a4d3"),o("e439"),o("dbb4"),o("b64b");function c(U,j,W){return j in U?Object.defineProperty(U,j,{value:W,enumerable:!0,configurable:!0,writable:!0}):U[j]=W,U}function f(U,j){var W=Object.keys(U);if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(U);j&&(te=te.filter(function(ge){return Object.getOwnPropertyDescriptor(U,ge).enumerable})),W.push.apply(W,te)}return W}function d(U){for(var j=1;j<arguments.length;j++){var W=arguments[j]!=null?arguments[j]:{};j%2?f(Object(W),!0).forEach(function(te){c(U,te,W[te])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(W)):f(Object(W)).forEach(function(te){Object.defineProperty(U,te,Object.getOwnPropertyDescriptor(W,te))})}return U}function h(U){if(Array.isArray(U))return U}o("e01a"),o("d28b"),o("e260"),o("d3b7"),o("3ca3"),o("ddb0");function p(U,j){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(U)))){var W=[],te=!0,ge=!1,Ae=void 0;try{for(var Le=U[Symbol.iterator](),it;!(te=(it=Le.next()).done)&&(W.push(it.value),!(j&&W.length===j));te=!0);}catch(zt){ge=!0,Ae=zt}finally{try{!te&&Le.return!=null&&Le.return()}finally{if(ge)throw Ae}}return W}}o("a630"),o("fb6a"),o("b0c0"),o("25f0");function m(U,j){(j==null||j>U.length)&&(j=U.length);for(var W=0,te=new Array(j);W<j;W++)te[W]=U[W];return te}function g(U,j){if(U){if(typeof U=="string")return m(U,j);var W=Object.prototype.toString.call(U).slice(8,-1);if(W==="Object"&&U.constructor&&(W=U.constructor.name),W==="Map"||W==="Set")return Array.from(U);if(W==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(W))return m(U,j)}}function b(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(U,j){return h(U)||p(U,j)||g(U,j)||b()}function x(U){if(Array.isArray(U))return m(U)}function S(U){if(typeof Symbol<"u"&&Symbol.iterator in Object(U))return Array.from(U)}function E(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C(U){return x(U)||S(U)||g(U)||E()}var w=o("a352"),A=o.n(w);function _(U){U.parentElement!==null&&U.parentElement.removeChild(U)}function O(U,j,W){var te=W===0?U.children[0]:U.children[W-1].nextSibling;U.insertBefore(j,te)}var I=o("dbf1");o("13d5"),o("4fad"),o("ac1f"),o("5319");function N(U){var j=Object.create(null);return function(te){var ge=j[te];return ge||(j[te]=U(te))}}var P=/-(\w)/g,R=N(function(U){return U.replace(P,function(j,W){return W.toUpperCase()})});o("5db7"),o("73d9");var F=["Start","Add","Remove","Update","End"],V=["Choose","Unchoose","Sort","Filter","Clone"],B=["Move"],G=[B,F,V].flatMap(function(U){return U}).map(function(U){return"on".concat(U)}),H={manage:B,manageAndEmit:F,emit:V};function ie(U){return G.indexOf(U)!==-1}o("caad"),o("2ca0");var se=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function $(U){return se.includes(U)}function ee(U){return["transition-group","TransitionGroup"].includes(U)}function pe(U){return["id","class","role","style"].includes(U)||U.startsWith("data-")||U.startsWith("aria-")||U.startsWith("on")}function fe(U){return U.reduce(function(j,W){var te=y(W,2),ge=te[0],Ae=te[1];return j[ge]=Ae,j},{})}function me(U){var j=U.$attrs,W=U.componentData,te=W===void 0?{}:W,ge=fe(Object.entries(j).filter(function(Ae){var Le=y(Ae,2),it=Le[0];return Le[1],pe(it)}));return d(d({},ge),te)}function Me(U){var j=U.$attrs,W=U.callBackBuilder,te=fe(Nt(j));Object.entries(W).forEach(function(Ae){var Le=y(Ae,2),it=Le[0],zt=Le[1];H[it].forEach(function(Oe){te["on".concat(Oe)]=zt(Oe)})});var ge="[data-draggable]".concat(te.draggable||"");return d(d({},te),{},{draggable:ge})}function Nt(U){return Object.entries(U).filter(function(j){var W=y(j,2),te=W[0];return W[1],!pe(te)}).map(function(j){var W=y(j,2),te=W[0],ge=W[1];return[R(te),ge]}).filter(function(j){var W=y(j,2),te=W[0];return W[1],!ie(te)})}o("c740");function at(U,j){if(!(U instanceof j))throw new TypeError("Cannot call a class as a function")}function Qr(U,j){for(var W=0;W<j.length;W++){var te=j[W];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(U,te.key,te)}}function Qi(U,j,W){return j&&Qr(U.prototype,j),U}var Jn=function(j){var W=j.el;return W},Kt=function(j,W){return j.__draggable_context=W},nn=function(j){return j.__draggable_context},Oo=(function(){function U(j){var W=j.nodes,te=W.header,ge=W.default,Ae=W.footer,Le=j.root,it=j.realList;at(this,U),this.defaultNodes=ge,this.children=[].concat(C(te),C(ge),C(Ae)),this.externalComponent=Le.externalComponent,this.rootTransition=Le.transition,this.tag=Le.tag,this.realList=it}return Qi(U,[{key:"render",value:function(W,te){var ge=this.tag,Ae=this.children,Le=this._isRootComponent,it=Le?{default:function(){return Ae}}:Ae;return W(ge,te,it)}},{key:"updated",value:function(){var W=this.defaultNodes,te=this.realList;W.forEach(function(ge,Ae){Kt(Jn(ge),{element:te[Ae],index:Ae})})}},{key:"getUnderlyingVm",value:function(W){return nn(W)}},{key:"getVmIndexFromDomIndex",value:function(W,te){var ge=this.defaultNodes,Ae=ge.length,Le=te.children,it=Le.item(W);if(it===null)return Ae;var zt=nn(it);if(zt)return zt.index;if(Ae===0)return 0;var Oe=Jn(ge[0]),ye=C(Le).findIndex(function(Ee){return Ee===Oe});return W<ye?0:Ae}},{key:"_isRootComponent",get:function(){return this.externalComponent||this.rootTransition}}]),U})(),gi=o("8bbf");function bi(U,j){var W=U[j];return W?W():[]}function hd(U){var j=U.$slots,W=U.realList,te=U.getKey,ge=W||[],Ae=["header","footer"].map(function(Ee){return bi(j,Ee)}),Le=y(Ae,2),it=Le[0],zt=Le[1],Oe=j.item;if(!Oe)throw new Error("draggable element must have an item slot");var ye=ge.flatMap(function(Ee,We){return Oe({element:Ee,index:We}).map(function(et){return et.key=te(Ee),et.props=d(d({},et.props||{}),{},{"data-draggable":!0}),et})});if(ye.length!==ge.length)throw new Error("Item slot must have only one child");return{header:it,footer:zt,default:ye}}function rg(U){var j=ee(U),W=!$(U)&&!j;return{transition:j,externalComponent:W,tag:W?Object(gi.resolveComponent)(U):j?gi.TransitionGroup:U}}function ei(U){var j=U.$slots,W=U.tag,te=U.realList,ge=U.getKey,Ae=hd({$slots:j,realList:te,getKey:ge}),Le=rg(W);return new Oo({nodes:Ae,root:Le,realList:te})}function ks(U,j){var W=this;Object(gi.nextTick)(function(){return W.$emit(U.toLowerCase(),j)})}function Ma(U){var j=this;return function(W,te){if(j.realList!==null)return j["onDrag".concat(U)](W,te)}}function Eu(U){var j=this,W=Ma.call(this,U);return function(te,ge){W.call(j,te,ge),ks.call(j,U,te)}}var wu=null,_u={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(j){return j}},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Cu=["update:modelValue","change"].concat(C([].concat(C(H.manageAndEmit),C(H.emit)).map(function(U){return U.toLowerCase()}))),Au=Object(gi.defineComponent)({name:"draggable",inheritAttrs:!1,props:_u,emits:Cu,data:function(){return{error:!1}},render:function(){try{this.error=!1;var j=this.$slots,W=this.$attrs,te=this.tag,ge=this.componentData,Ae=this.realList,Le=this.getKey,it=ei({$slots:j,tag:te,realList:Ae,getKey:Le});this.componentStructure=it;var zt=me({$attrs:W,componentData:ge});return it.render(gi.h,zt)}catch(Oe){return this.error=!0,Object(gi.h)("pre",{style:{color:"red"}},Oe.stack)}},created:function(){this.list!==null&&this.modelValue!==null&&I.a.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted:function(){var j=this;if(!this.error){var W=this.$attrs,te=this.$el,ge=this.componentStructure;ge.updated();var Ae=Me({$attrs:W,callBackBuilder:{manageAndEmit:function(zt){return Eu.call(j,zt)},emit:function(zt){return ks.bind(j,zt)},manage:function(zt){return Ma.call(j,zt)}}}),Le=te.nodeType===1?te:te.parentElement;this._sortable=new A.a(Le,Ae),this.targetDomElement=Le,Le.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList:function(){var j=this.list;return j||this.modelValue},getKey:function(){var j=this.itemKey;return typeof j=="function"?j:function(W){return W[j]}}},watch:{$attrs:{handler:function(j){var W=this._sortable;W&&Nt(j).forEach(function(te){var ge=y(te,2),Ae=ge[0],Le=ge[1];W.option(Ae,Le)})},deep:!0}},methods:{getUnderlyingVm:function(j){return this.componentStructure.getUnderlyingVm(j)||null},getUnderlyingPotencialDraggableComponent:function(j){return j.__draggable_component__},emitChanges:function(j){var W=this;Object(gi.nextTick)(function(){return W.$emit("change",j)})},alterList:function(j){if(this.list){j(this.list);return}var W=C(this.modelValue);j(W),this.$emit("update:modelValue",W)},spliceList:function(){var j=arguments,W=function(ge){return ge.splice.apply(ge,C(j))};this.alterList(W)},updatePosition:function(j,W){var te=function(Ae){return Ae.splice(W,0,Ae.splice(j,1)[0])};this.alterList(te)},getRelatedContextFromMoveEvent:function(j){var W=j.to,te=j.related,ge=this.getUnderlyingPotencialDraggableComponent(W);if(!ge)return{component:ge};var Ae=ge.realList,Le={list:Ae,component:ge};if(W!==te&&Ae){var it=ge.getUnderlyingVm(te)||{};return d(d({},it),Le)}return Le},getVmIndexFromDomIndex:function(j){return this.componentStructure.getVmIndexFromDomIndex(j,this.targetDomElement)},onDragStart:function(j){this.context=this.getUnderlyingVm(j.item),j.item._underlying_vm_=this.clone(this.context.element),wu=j.item},onDragAdd:function(j){var W=j.item._underlying_vm_;if(W!==void 0){_(j.item);var te=this.getVmIndexFromDomIndex(j.newIndex);this.spliceList(te,0,W);var ge={element:W,newIndex:te};this.emitChanges({added:ge})}},onDragRemove:function(j){if(O(this.$el,j.item,j.oldIndex),j.pullMode==="clone"){_(j.clone);return}var W=this.context,te=W.index,ge=W.element;this.spliceList(te,1);var Ae={element:ge,oldIndex:te};this.emitChanges({removed:Ae})},onDragUpdate:function(j){_(j.item),O(j.from,j.item,j.oldIndex);var W=this.context.index,te=this.getVmIndexFromDomIndex(j.newIndex);this.updatePosition(W,te);var ge={element:this.context.element,oldIndex:W,newIndex:te};this.emitChanges({moved:ge})},computeFutureIndex:function(j,W){if(!j.element)return 0;var te=C(W.to.children).filter(function(it){return it.style.display!=="none"}),ge=te.indexOf(W.related),Ae=j.component.getVmIndexFromDomIndex(ge),Le=te.indexOf(wu)!==-1;return Le||!W.willInsertAfter?Ae:Ae+1},onDragMove:function(j,W){var te=this.move,ge=this.realList;if(!te||!ge)return!0;var Ae=this.getRelatedContextFromMoveEvent(j),Le=this.computeFutureIndex(Ae,j),it=d(d({},this.context),{},{futureIndex:Le}),zt=d(d({},j),{},{relatedContext:Ae,draggedContext:it});return te(zt,W)},onDragEnd:function(){wu=null}}}),Du=Au;s.default=Du}),fb6a:(function(i,s,o){var a=o("23e7"),l=o("861d"),u=o("e8b5"),c=o("23cb"),f=o("50c4"),d=o("fc6a"),h=o("8418"),p=o("b622"),m=o("1dde"),g=o("ae40"),b=m("slice"),y=g("slice",{ACCESSORS:!0,0:0,1:2}),x=p("species"),S=[].slice,E=Math.max;a({target:"Array",proto:!0,forced:!b||!y},{slice:function(w,A){var _=d(this),O=f(_.length),I=c(w,O),N=c(A===void 0?O:A,O),P,R,F;if(u(_)&&(P=_.constructor,typeof P=="function"&&(P===Array||u(P.prototype))?P=void 0:l(P)&&(P=P[x],P===null&&(P=void 0)),P===Array||P===void 0))return S.call(_,I,N);for(R=new(P===void 0?Array:P)(E(N-I,0)),F=0;I<N;I++,F++)I in _&&h(R,F,_[I]);return R.length=F,R}})}),fc6a:(function(i,s,o){var a=o("44ad"),l=o("1d80");i.exports=function(u){return a(l(u))}}),fdbc:(function(i,s){i.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),fdbf:(function(i,s,o){var a=o("4930");i.exports=a&&!Symbol.sham&&typeof Symbol.iterator=="symbol"})}).default})})(Yh)),Yh.exports}var nle=tle();const rle=Ta(nle),ile={class:"flex-1 truncate"},sle=["onClick"],ole=z({__name:"OpenTabs",props:{isOpen:{type:Boolean},isOpenModifiers:{}},emits:["update:isOpen"],setup(t){const e=ka(),{scrollContainer:n,showTopMask:r,showBottomMask:i,updateScrollMasks:s,scrollTabIntoView:o}=Y8({SCROLL_PADDING:20,MASK_HEIGHT:32}),a=Z({}),l=q({get:()=>e.tabs,set:p=>{e.tabs=p}}),u=(p,m)=>{m&&(a.value[p]=m.$el||m)},c=p=>{e.setActiveTab(p);const m=a.value[p];m&&o(m)};nt(()=>e.activeTabId,async p=>{if(!p)return;await kr();const m=a.value[p];m&&o(m)},{immediate:!0});const f=p=>{e.closeTab(p)},d=Ki(t,"isOpen"),h=Z(null);return nt(()=>{var p;return(p=h.value)==null?void 0:p.viewport},p=>{p&&(n.value=p)}),(p,m)=>(T(),L(v(YC),{class:Se(["flex flex-col overflow-hidden p-0",{"h-full":d.value}]),"data-testid":"open-tabs-section"},{default:D(()=>[k(v(JC),{class:Se(["flex min-h-0 flex-col overflow-hidden",{"flex-1":d.value}])},{default:D(()=>[k(v(W1),{class:Se(["flex max-h-full min-h-0 flex-col overflow-hidden p-0",{"flex-1":d.value}])},{default:D(()=>[k(v(H2),{class:Se(["group/collapsible flex min-h-0 flex-col overflow-hidden [&[data-state=open]>button>svg:first-child]:rotate-90",{"flex-1":d.value}]),open:d.value,"onUpdate:open":m[1]||(m[1]=g=>d.value=g)},{default:D(()=>[k(v(G2),{"as-child":""},{default:D(()=>[k(v(lp),{class:"focus-visible:bg-sidebar-accent data-[active=true]:focus-visible:bg-sidebar-accent text-xs focus-visible:ring-0","data-testid":"open-tabs-trigger"},{default:D(()=>[k(v(U0),{class:"transition-transform"}),m[2]||(m[2]=M("span",{class:"truncate"},"Open Tabs",-1))]),_:1})]),_:1}),k(v(q2),{class:"relative flex min-h-0 flex-1 flex-col overflow-hidden border-t"},{default:D(()=>[M("div",{class:Se(["from-sidebar pointer-events-none absolute top-0 right-0 left-0 z-10 h-8 bg-gradient-to-b from-20% to-transparent transition-opacity duration-300",[v(r)&&d.value?"opacity-100":"opacity-0"]])},null,2),k(v(If),{ref_key:"scrollAreaRef",ref:h,class:"min-h-0 flex-1",onScroll:v(s)},{default:D(()=>[k(v(rle),{modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=g=>l.value=g),"item-key":"id",tag:"ul",class:"border-sidebar-border ml-2.5 flex min-w-0 translate-x-px flex-col gap-1 border-l py-0.5 pl-0.5 group-data-[collapsible=icon]:hidden","ghost-class":"tabs-ghost"},{item:D(({element:g})=>[(T(),L(v(W1),{key:g.id,class:"group relative"},{default:D(()=>[k(v(lp),{ref:b=>u(g.id,b),"is-active":g.id===v(e).activeTabId,class:"focus-visible:bg-sidebar-accent data-[active=true]:focus-visible:bg-sidebar-accent pl-2 text-sm focus-visible:ring-0 data-[active=true]:rounded-l-none","data-testid":"sidebar-tab",onClick:b=>c(g.id)},{default:D(()=>[k(Lm,{method:g.method,class:"scale-90"},null,8,["method"]),M("span",ile,de(g.title),1),M("button",{class:"hover:bg-accent/50 shrink-0 rounded p-0.5 opacity-0 transition-opacity group-hover:opacity-100","data-testid":"sidebar-tab-close",onClick:eo(b=>f(g.id),["stop"])},[k(v(IP),{class:"size-3"})],8,sle)]),_:2},1032,["is-active","onClick"])]),_:2},1024))]),_:1},8,["modelValue"])]),_:1},8,["onScroll"]),M("div",{class:Se(["from-sidebar pointer-events-none absolute right-0 bottom-0 left-0 z-10 h-8 bg-gradient-to-t from-20% to-transparent transition-opacity duration-300",[v(i)&&d.value?"opacity-100":"opacity-0"]])},null,2)]),_:1})]),_:1},8,["class","open"])]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"]))}}),ale=Rm(ole,[["__scopeId","data-v-94f8d386"]]),lle={class:"text-foreground flex-1 text-xl font-medium"},ule=z({__name:"RouteExplorerBranding",setup(t){return(e,n)=>(T(),K("div",lle,"Nimbus"))}}),cle=z({__name:"RouteExplorerHeader",setup(t){return(e,n)=>(T(),L(v(lP),{class:"h-toolbar flex flex-row items-center justify-between border-b"},{default:D(()=>[k(ule)]),_:1}))}}),fle=z({__name:"RouteExplorerVersionSelector",props:Da({versions:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=Ki(t,"modelValue");return(n,r)=>(T(),L(v(tu),{modelValue:e.value,"onUpdate:modelValue":r[0]||(r[0]=i=>e.value=i),class:"flex items-center"},{default:D(()=>[k(v(Zl),{class:"px-panel w-full rounded-none border-0 text-xs shadow-none focus:ring-0 focus-visible:outline-none active:ring-0"},{default:D(()=>[k(v(Ql),{placeholder:"Select API Version"})]),_:1}),k(v(eu),null,{default:D(()=>[(T(!0),K(Qe,null,_n(t.versions,i=>(T(),L(v(Es),{key:i,value:i,class:"text-xs"},{default:D(()=>[ne(de(i),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]))}}),dle={class:"flex-1 whitespace-nowrap"},hle={key:0},ple={key:1},mle={class:"text-subtle-foreground"},gle={key:0,class:"justify-self-end"},ble={key:1,class:"justify-self-end text-amber-500"},yle=z({__name:"RoutesListItem",props:{route:{},resource:{},isActive:{type:Boolean,default:!1},onClick:{type:Function,default:()=>{}}},emits:["click"],setup(t,{emit:e}){const n=t,r=e,i=lv(),s=Xi(),o=q(()=>{const f=n.route.shortEndpoint.replace(`${n.resource}`,"").split("/");return f.length>1&&f[0]===""&&f.shift(),f.map(d=>d.startsWith("{")?{value:`/${d}`,isRouteVariable:!0}:{value:`/${d}`,isRouteVariable:!1})}),a=q(()=>{var f;return s.showOperationId&&((f=n.route.metadata)==null?void 0:f.operationId)}),l=q(()=>i.isUndocumented(n.route)),u=q(()=>i.isMissingImplementation(n.route)),c=()=>{n.onClick&&n.onClick(),r("click")};return(f,d)=>(T(),L(v(lp),{"is-active":t.isActive,class:"focus-visible:bg-sidebar-accent data-[active=true]:focus-visible:bg-sidebar-accent text-sm focus-visible:ring-0 data-[active=true]:rounded-l-none",onClick:c},{default:D(()=>{var h;return[k(Lm,{method:t.route.method},null,8,["method"]),M("span",dle,[a.value?(T(),K(Qe,{key:0},[ne(de((h=t.route.metadata)==null?void 0:h.operationId),1)],64)):(T(!0),K(Qe,{key:1},_n(o.value,(p,m)=>(T(),K(Qe,{key:m},[p.isRouteVariable?(T(),K("span",ple,[M("span",mle,de(p.value),1)])):(T(),K("span",hle,de(p.value),1))],64))),128))]),l.value?(T(),K("span",gle,[k(v(IA),{class:"size-3"})])):we("",!0),u.value?(T(),K("span",ble,[k(v(H0),{class:"size-3"})])):we("",!0)]}),_:1},8,["is-active"]))}}),vle={class:"max-w-[180px] truncate sm:max-w-[220px] md:max-w-[260px] lg:max-w-[300px]"},xle=z({__name:"RoutesResourceGroup",props:{resource:{}},setup(t){const e=t,n=Cl(Tf(`routes-explorer-resource-${e.resource}-expanded`),!1),r=Jy("showingSearchResults");return(i,s)=>(T(),L(v(W1),null,{default:D(()=>[k(v(H2),{class:"group/collapsible [&[data-state=open]>button>svg:first-child]:rotate-90","default-open":v(n),open:v(r)?!0:v(n),"onUpdate:open":s[0]||(s[0]=o=>n.value=o)},{default:D(()=>[k(v(G2),{"as-child":""},{default:D(()=>[k(v(lp),{class:"focus-visible:bg-sidebar-accent data-[active=true]:focus-visible:bg-sidebar-accent focus-visible:ring-0"},{default:D(()=>[k(v(U0),{class:"transition-transform"}),k(v(CN)),M("span",vle,de(e.resource),1)]),_:1})]),_:1}),k(v(q2),{class:"overflow-hidden"},{default:D(()=>[k(v(TM),null,{default:D(()=>[Q(i.$slots,"default")]),_:3})]),_:3})]),_:3},8,["default-open","open"])]),_:3}))}}),Sle={key:1,class:"px-2"},Ele={key:2,class:"mb-2 px-2 text-xs"},wle=z({__name:"RoutesList",props:{routes:{}},setup(t){const e=Rr(),n=q(()=>e.pendingRequestData),r=o=>!o||!n.value?!1:o.endpoint===n.value.endpoint&&o.method===n.value.method,i=(o,a)=>{if(!o||!a)return;const l=a.routes.filter(u=>u.endpoint===o.endpoint);e.initializeRequest(o,l)},s=Jy("showingSearchResults");return(o,a)=>t.routes&&t.routes.length?(T(!0),K(Qe,{key:0},_n(t.routes,l=>(T(),L(xle,{key:l.resource,resource:l.resource},{default:D(()=>[(T(!0),K(Qe,null,_n(l.routes,u=>(T(),L(yle,{key:u.endpoint+"-"+u.method,route:u,resource:l.resource,"on-click":()=>i(u,l),"is-active":r(u)},null,8,["route","resource","on-click","is-active"]))),128))]),_:2},1032,["resource"]))),128)):v(s)?(T(),K("p",Ele,"No routes matching your keywords.")):(T(),K("div",Sle,[...a[0]||(a[0]=[M("p",{class:"mb-2 text-xs"}," No routes have been detected. Make sure to check the Wiki in case of doubts. ",-1)])]))}}),_le={class:"h-sub-toolbar flex items-center overflow-hidden border-b"},Cle={class:"from-sidebar pointer-events-none absolute top-0 right-0 left-0 z-10 h-8 bg-gradient-to-b from-20% to-transparent transition-opacity duration-300"},Ale={key:1,class:"px-2"},Dle={class:"from-sidebar pointer-events-none absolute right-0 bottom-0 left-0 z-10 h-8 bg-gradient-to-t from-20% to-transparent transition-opacity duration-300"},kle=z({__name:"RouteExplorer",props:{routes:{}},setup(t){const e=t,n=Xi(),r=ka(),i=Cl(Tf("routes-explorer-search-keyword"),""),s=Z(""),o=Z(null),a=Cl(BA("routes-explorer-open-tabs-expanded"),!1),l=Z(null),{scrollContainer:u,showTopMask:c,showBottomMask:f,updateScrollMasks:d}=Y8({MASK_HEIGHT:32}),h=q(()=>Object.keys(e.routes||{}));nt(h,S=>{S.length>0&&!S.includes(s.value)?s.value=S[0]:S.length===0&&(s.value="")},{immediate:!0});const p=q(()=>e.routes===null?[]:e.routes[s.value]??[]),m=q(()=>{if(e.routes===null)return[];if(!i.value.trim())return p.value;const S=i.value.toLowerCase();return p.value.map(E=>{const C=E.routes.filter(w=>w.endpoint.toLowerCase().includes(S)||w.shortEndpoint.toLowerCase().includes(S));return C.length>0?{...E,routes:C}:null}).filter(E=>E!==null)||[]}),g=q(()=>Object.keys(n.applications).length>1),b=q(()=>i.value.trim().length>0),y=()=>{a.value=!1},x=()=>{a.value=!0};return nt(a,S=>{var E,C;S?(E=o.value)==null||E.expand():(C=o.value)==null||C.collapse()}),nt(()=>{var S;return(S=l.value)==null?void 0:S.viewport},S=>{S&&(u.value=S)}),dP("showingSearchResults",b),(S,E)=>(T(),L(v(fP),{collapsible:"none",class:"flex h-full max-h-screen w-full"},{default:D(()=>[k(cle),M("div",null,[k(v(kM),{modelValue:v(i),"onUpdate:modelValue":E[0]||(E[0]=C=>_l(i)?i.value=C:null),variant:"toolbar",placeholder:"Type to search...",disabled:p.value.length===0,class:"h-[calc(var(--toolbar-height)+1px)] w-full border-b text-xs"},null,8,["modelValue","disabled"]),M("div",_le,[g.value?(T(),L(vse,{key:0,class:"flex-1"})):we("",!0),v(n).isVersioned&&h.value.length?(T(),K("div",{key:1,class:Se(["h-full w-[80px] shrink-0 border-l",{"flex-1":!g.value}])},[k(fle,{modelValue:s.value,"onUpdate:modelValue":E[1]||(E[1]=C=>s.value=C),versions:h.value},null,8,["modelValue","versions"])],2)):we("",!0)])]),k(v(uP),{class:"overflow-hidden"},{default:D(()=>[(T(),L(v(Q1),{key:v(r).tabs.length>0?"with-tabs":"no-tabs","auto-save-id":"route-explorer",direction:"vertical"},{default:D(()=>[v(r).tabs.length>0?(T(),K(Qe,{key:0},[k(v(Ps),{ref_key:"openTabsPanel",ref:o,order:1,"min-size":20,"default-size":20,"collapsed-size":0,collapsible:!0,collapsed:!v(a),class:"min-h-[32px]",onCollapse:y,onExpand:x},{default:D(()=>[k(ale,{"is-open":v(a),"onUpdate:isOpen":E[2]||(E[2]=C=>_l(a)?a.value=C:null)},null,8,["is-open"])]),_:1},8,["collapsed"]),k(v(Z1))],64)):we("",!0),k(v(Ps),{order:2,"min-size":50,"default-size":100},{default:D(()=>[k(v(YC),{class:"flex h-full flex-col p-0"},{default:D(()=>[k(v(fN),null,{default:D(()=>[...E[3]||(E[3]=[ne("Routes",-1)])]),_:1}),k(v(JC),{class:"relative min-h-0 flex-1 overflow-hidden"},{default:D(()=>[k(v(If),{ref_key:"scrollAreaRef",ref:l,class:"h-full",onScroll:v(d)},{default:D(()=>[ua(M("div",Cle,null,512),[[Al,v(c)]]),k(v(cP),null,{default:D(()=>[t.routes!==null?(T(),L(wle,{key:0,routes:m.value},null,8,["routes"])):(T(),K("div",Ale,[...E[4]||(E[4]=[M("p",{class:"mb-2 text-xs"}," Routes extraction was Interrupted, check the error on the page. ",-1)])]))]),_:1}),ua(M("div",Dle,null,512),[[Al,v(f)]])]),_:1},8,["onScroll"])]),_:1})]),_:1})]),_:1})]),_:1}))]),_:1})]),_:1}))}});function Ole(){const t=pN(),e=ka(),n=G0();function r(h){return h.map(p=>({key:p.key,value:String(p.value??""),type:_r.Text,enabled:!0}))}function i(h){return h.map(p=>({key:p.key,value:p.value,type:p.type==="file"?_r.File:_r.Text,enabled:!0}))}function s(h){return{endpoint:h.endpoint,method:h.method,schema:{shape:{},extractionErrors:null},shortEndpoint:h.endpoint}}function o(h){return{method:h.method,endpoint:h.endpoint,headers:r(h.headers),body:null,queryParameters:i(h.queryParameters),payloadType:h.payloadType,authorization:h.authorization,routeDefinition:s(h)}}function a(h){return{status:h.status,statusCode:h.statusCode,statusText:h.statusText,body:h.body,sizeInBytes:h.sizeInBytes,headers:h.headers.map(p=>({key:p.key,value:p.value})),cookies:h.cookies,timestamp:h.timestamp}}function l(h){if(!h.response)throw new Error("Cannot create synthesized log without response data");return{durationInMs:h.response.durationInMs,isProcessing:!1,request:o(h),response:a(h.response),importedFromShare:!0}}function u(h){h.error?Eh.error("Failed to Restore Shareable Link",{description:h.error,duration:8e3}):h.routeExists?Eh.success("Shared Request Restored",{description:"Request and response have been imported from the shareable link."}):Eh.warning("Route Not Found",{description:"The shared route does not exist in any application. Request details are still displayed.",duration:6e3})}function c(){const h=new URL(window.location.href);h.searchParams.delete("share"),window.history.replaceState({},"",h.toString())}function f(h,p){if(h.requestLog){const m={...h.requestLog,importedFromShare:!0};p.addLog(m)}else if(h.response){const m=l(h);p.addLog(m)}}const d=()=>{var p;const h=(p=window.Nimbus)==null?void 0:p.sharedState;if(h){if(t.sharedState=h,t.isRestoredFromShare=!0,h.error){u(h),c();return}h.payload&&(e.restoreFromSharedPayload(h.payload),f(h.payload,n),u(h),c())}};return gn(()=>{d()}),{restoreSharedState:d}}function Tle(t,e){var i,s;const n=Z(((s=(i=e.value)==null?void 0:i.$el)==null?void 0:s.contentRect.width)??window.screen.width);return co(e,o=>{const a=o[0];n.value=a.contentRect.width}),{thresholds:t.map(o=>q(()=>n.value<o?"vertical":"horizontal"))}}const Ile={class:"flex h-screen max-h-screen overflow-hidden"},qle=z({name:"MainPage",__name:"Main",setup(t){const e=lv(),n=hN();Ole(),Xy(()=>{n.initializeGlobalErrors(),e.initializeRoutes()});const r=hP("panels-group"),{0:i,1:s}=Tle([600,960],r).thresholds;return(o,a)=>(T(),K("div",Ile,[k(v(Q1),{ref:"panels-group","auto-save-id":"main-splitter-group",direction:v(i)},{default:D(()=>[k(v(Ps),{"min-size":15,"default-size":20},{default:D(()=>[k(kle,{routes:v(e).routes},null,8,["routes"])]),_:1}),k(v(Z1)),!v(e).hasAnyError&&!v(n).hasGlobalError?(T(),L(v(Ps),{key:0,"min-size":60,"default-size":80},{default:D(()=>[k(v(Q1),{"auto-save-id":"client-splitter-group",direction:v(s)},{default:D(()=>[k(v(Ps),{"min-size":30,"default-size":50},{default:D(()=>[k(gne)]),_:1}),k(v(Z1)),k(v(Ps),{"min-size":30,"default-size":50},{default:D(()=>[k(Oie)]),_:1})]),_:1},8,["direction"])]),_:1})):v(n).hasGlobalError?(T(),L(v(Ps),{key:1,"min-size":60,"default-size":85},{default:D(()=>[k(Jie,{error:v(n).globalError},null,8,["error"])]),_:1})):(T(),L(v(Ps),{key:2,"min-size":60,"default-size":85},{default:D(()=>[k(gse,{error:v(e).routeExtractorException},null,8,["error"])]),_:1}))]),_:1},8,["direction"])]))}});export{qle as default};