spec-snake 0.0.1-beta.0 → 0.0.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{S as ih,g as oh,h as Wl,i as sh,n as Mu,k as lh,r as m,j as R,l as Fu,m as Lu,u as Yn,c as Du,A as mr,o as Qt,p as Zi,t as Kl,v as ve,w as vr,x as Wr,y as eo,z as Vu,B as ah,C as uh,D as Bn,E as ch,F as ur,G as In,H as fh,I as dh,J as Zs,L as Oi,K as Nu,M as hh,N as ph,O as mh}from"./index-D6usLrOW.js";import{n as gh,s as yh,E as xh,C as _u}from"./Header-DN39nNWE.js";import{P as bh}from"./PlusIcon-DqYOBije.js";var wh=class extends ih{#n;#r=void 0;#e;#t;constructor(t,n){super(),this.#n=t,this.setOptions(n),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#n.defaultMutationOptions(t),oh(this.options,n)||this.#n.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#e,observer:this}),n?.mutationKey&&this.options.mutationKey&&Wl(n.mutationKey)!==Wl(this.options.mutationKey)?this.reset():this.#e?.state.status==="pending"&&this.#e.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#e?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#o(t)}getCurrentResult(){return this.#r}reset(){this.#e?.removeObserver(this),this.#e=void 0,this.#i(),this.#o()}mutate(t,n){return this.#t=n,this.#e?.removeObserver(this),this.#e=this.#n.getMutationCache().build(this.#n,this.options),this.#e.addObserver(this),this.#e.execute(t)}#i(){const t=this.#e?.state??sh();this.#r={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Mu.batch(()=>{if(this.#t&&this.hasListeners()){const n=this.#r.variables,r=this.#r.context;t?.type==="success"?(this.#t.onSuccess?.(t.data,n,r),this.#t.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#t.onError?.(t.error,n,r),this.#t.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#r)})})}};function vh(e,t){const n=lh(),[r]=m.useState(()=>new wh(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);const i=m.useSyncExternalStore(m.useCallback(s=>r.subscribe(Mu.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=m.useCallback((s,l)=>{r.mutate(s,l).catch(gh)},[r]);if(i.error&&yh(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}const kh=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M2 4H14M5.333 4V2.667C5.333 2.298 5.632 2 6 2H10C10.368 2 10.667 2.298 10.667 2.667V4M12.667 4V13.333C12.667 13.702 12.368 14 12 14H4C3.632 14 3.333 13.702 3.333 13.333V4H12.667Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ch=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M10 12L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Sh=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M6 12L10 8L6 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Eh=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ih=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M10 12L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Rh=()=>R.jsx("svg",{"aria-hidden":"true",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ah=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M11.333 2.00004C11.5081 1.82494 11.7169 1.68605 11.9471 1.59129C12.1773 1.49653 12.4241 1.44775 12.6733 1.44775C12.9226 1.44775 13.1694 1.49653 13.3996 1.59129C13.6297 1.68605 13.8386 1.82494 14.0137 2.00004C14.1888 2.17513 14.3277 2.384 14.4224 2.61419C14.5172 2.84438 14.566 3.09117 14.566 3.34037C14.566 3.58957 14.5172 3.83637 14.4224 4.06656C14.3277 4.29675 14.1888 4.50561 14.0137 4.68071L5.00033 13.6941L1.33366 14.6667L2.30633 11.0001L11.333 2.00004Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Th=()=>R.jsxs("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M13.6667 2.66667V6.00001H10.3333",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M2.33333 13.3333V10H5.66667",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M3.66 6.00001C3.9534 5.04453 4.50594 4.18898 5.25559 3.52857C6.00523 2.86816 6.92264 2.42818 7.9073 2.25685C8.89196 2.08552 9.90501 2.18951 10.8355 2.55756C11.766 2.92561 12.5775 3.54348 13.18 4.34001L13.6667 6.00001M2.33333 10L2.82 11.66C3.42248 12.4565 4.23396 13.0744 5.16449 13.4425C6.09502 13.8105 7.10807 13.9145 8.09273 13.7432C9.07739 13.5718 9.99481 13.1319 10.7444 12.4714C11.4941 11.811 12.0466 10.9555 12.34 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ph=()=>R.jsxs("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M12.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V3.33333C2 2.97971 2.14048 2.64057 2.39052 2.39052C2.64057 2.14048 2.97971 2 3.33333 2H10.6667L14 5.33333V12.6667C14 13.0203 13.8595 13.3594 13.6095 13.6095C13.3594 13.8595 13.0203 14 12.6667 14Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M11.3333 14V9.33333H4.66667V14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M4.66667 2V5.33333H10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Oh=()=>R.jsxs("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("rect",{x:"5.33333",y:"5.33333",width:"8.66667",height:"8.66667",rx:"1.33333",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M10.6667 5.33333V3.33333C10.6667 2.97971 10.5262 2.64057 10.2761 2.39052C10.0261 2.14048 9.68696 2 9.33333 2H3.33333C2.97971 2 2.64057 2.14048 2.39052 2.39052C2.14048 2.64057 2 2.97971 2 3.33333V9.33333C2 9.68696 2.14048 10.0261 2.39052 10.2761C2.64057 10.5262 2.97971 10.6667 3.33333 10.6667H5.33333",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Mh=()=>R.jsxs("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M2.66667 8V12.6667C2.66667 13.0203 2.80714 13.3594 3.05719 13.6095C3.30724 13.8595 3.64638 14 4 14H12C12.3536 14 12.6928 13.8595 12.9428 13.6095C13.1929 13.3594 13.3333 13.0203 13.3333 12.6667V8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M10.6667 4L8 1.33333L5.33333 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M8 1.33333V10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});function Fh(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Lh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vh={};function Gl(e,t){return(Vh.jsx?Dh:Lh).test(e)}const Nh=/[ \t\n\f\r]/g;function _h(e){return typeof e=="object"?e.type==="text"?Yl(e.value):!1:Yl(e)}function Yl(e){return e.replace(Nh,"")===""}class Qr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Qr.prototype.normal={};Qr.prototype.property={};Qr.prototype.space=void 0;function ju(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Qr(n,r,t)}function bs(e){return e.toLowerCase()}class Tt{constructor(t,n){this.attribute=n,this.property=t}}Tt.prototype.attribute="";Tt.prototype.booleanish=!1;Tt.prototype.boolean=!1;Tt.prototype.commaOrSpaceSeparated=!1;Tt.prototype.commaSeparated=!1;Tt.prototype.defined=!1;Tt.prototype.mustUseProperty=!1;Tt.prototype.number=!1;Tt.prototype.overloadedBoolean=!1;Tt.prototype.property="";Tt.prototype.spaceSeparated=!1;Tt.prototype.space=void 0;let jh=0;const Le=Xn(),lt=Xn(),ws=Xn(),re=Xn(),Ge=Xn(),cr=Xn(),Ft=Xn();function Xn(){return 2**++jh}const vs=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:lt,commaOrSpaceSeparated:Ft,commaSeparated:cr,number:re,overloadedBoolean:ws,spaceSeparated:Ge},Symbol.toStringTag,{value:"Module"})),_o=Object.keys(vs);class el extends Tt{constructor(t,n,r,i){let o=-1;if(super(t,n),Xl(this,"space",i),typeof r=="number")for(;++o<_o.length;){const s=_o[o];Xl(this,_o[o],(r&vs[s])===vs[s])}}}el.prototype.defined=!0;function Xl(e,t,n){n&&(e[t]=n)}function kr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new el(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[bs(r)]=r,n[bs(o.attribute)]=r}return new Qr(t,n,e.space)}const zu=kr({properties:{ariaActiveDescendant:null,ariaAtomic:lt,ariaAutoComplete:null,ariaBusy:lt,ariaChecked:lt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:Ge,ariaCurrent:null,ariaDescribedBy:Ge,ariaDetails:null,ariaDisabled:lt,ariaDropEffect:Ge,ariaErrorMessage:null,ariaExpanded:lt,ariaFlowTo:Ge,ariaGrabbed:lt,ariaHasPopup:null,ariaHidden:lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ge,ariaLevel:re,ariaLive:null,ariaModal:lt,ariaMultiLine:lt,ariaMultiSelectable:lt,ariaOrientation:null,ariaOwns:Ge,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:lt,ariaReadOnly:lt,ariaRelevant:null,ariaRequired:lt,ariaRoleDescription:Ge,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:lt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Bu(e,t){return t in e?e[t]:t}function Hu(e,t){return Bu(e,t.toLowerCase())}const zh=kr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:cr,acceptCharset:Ge,accessKey:Ge,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:Ge,autoFocus:Le,autoPlay:Le,blocking:Ge,capture:null,charSet:null,checked:Le,cite:null,className:Ge,cols:re,colSpan:null,content:null,contentEditable:lt,controls:Le,controlsList:Ge,coords:re|cr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:ws,draggable:lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:Ge,height:re,hidden:ws,high:re,href:null,hrefLang:null,htmlFor:Ge,httpEquiv:Ge,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:Ge,itemRef:Ge,itemScope:Le,itemType:Ge,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,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:Le,optimum:re,pattern:null,ping:Ge,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:Ge,required:Le,reversed:Le,rows:re,rowSpan:re,sandbox:Ge,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:lt,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:Le,useMap:null,value:lt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ge,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:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:lt,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:Le,disableRemotePlayback:Le,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:Hu}),Bh=kr({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:Ft,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:Ge,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:Le,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:cr,g2:cr,glyphName:cr,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:Ft,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:Ge,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ft,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ft,rev:Ft,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ft,requiredFeatures:Ft,requiredFonts:Ft,requiredFormats:Ft,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:Ft,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:Ft,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:Ft,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:Bu}),Uu=kr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),$u=kr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Hu}),qu=kr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Hh={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Uh=/[A-Z]/g,Ql=/-[a-z]/g,$h=/^data[-\w.:]+$/i;function qh(e,t){const n=bs(t);let r=t,i=Tt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$h.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Ql,Kh);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Ql.test(o)){let s=o.replace(Uh,Wh);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=el}return new i(r,t)}function Wh(e){return"-"+e.toLowerCase()}function Kh(e){return e.charAt(1).toUpperCase()}const Gh=ju([zu,zh,Uu,$u,qu],"html"),tl=ju([zu,Bh,Uu,$u,qu],"svg");function Yh(e){return e.join(" ").trim()}var tr={},jo,Jl;function Xh(){if(Jl)return jo;Jl=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
1
+ import{S as ih,g as oh,h as Wl,i as sh,n as Mu,k as lh,r as m,j as R,l as Fu,m as Lu,u as Yn,c as Du,A as mr,o as Qt,p as Zi,t as Kl,v as ve,w as vr,x as Wr,y as eo,z as Vu,B as ah,C as uh,D as Bn,E as ch,F as ur,G as In,H as fh,I as dh,J as Zs,L as Oi,K as Nu,M as hh,N as ph,O as mh}from"./index-DzfYNFpx.js";import{n as gh,s as yh,E as xh,C as _u}from"./Header-Xv0ztODd.js";import{P as bh}from"./PlusIcon-erBdv4vE.js";var wh=class extends ih{#n;#r=void 0;#e;#t;constructor(t,n){super(),this.#n=t,this.setOptions(n),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#n.defaultMutationOptions(t),oh(this.options,n)||this.#n.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#e,observer:this}),n?.mutationKey&&this.options.mutationKey&&Wl(n.mutationKey)!==Wl(this.options.mutationKey)?this.reset():this.#e?.state.status==="pending"&&this.#e.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#e?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#o(t)}getCurrentResult(){return this.#r}reset(){this.#e?.removeObserver(this),this.#e=void 0,this.#i(),this.#o()}mutate(t,n){return this.#t=n,this.#e?.removeObserver(this),this.#e=this.#n.getMutationCache().build(this.#n,this.options),this.#e.addObserver(this),this.#e.execute(t)}#i(){const t=this.#e?.state??sh();this.#r={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Mu.batch(()=>{if(this.#t&&this.hasListeners()){const n=this.#r.variables,r=this.#r.context;t?.type==="success"?(this.#t.onSuccess?.(t.data,n,r),this.#t.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#t.onError?.(t.error,n,r),this.#t.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#r)})})}};function vh(e,t){const n=lh(),[r]=m.useState(()=>new wh(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);const i=m.useSyncExternalStore(m.useCallback(s=>r.subscribe(Mu.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=m.useCallback((s,l)=>{r.mutate(s,l).catch(gh)},[r]);if(i.error&&yh(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}const kh=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M2 4H14M5.333 4V2.667C5.333 2.298 5.632 2 6 2H10C10.368 2 10.667 2.298 10.667 2.667V4M12.667 4V13.333C12.667 13.702 12.368 14 12 14H4C3.632 14 3.333 13.702 3.333 13.333V4H12.667Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ch=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M10 12L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Sh=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M6 12L10 8L6 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Eh=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ih=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M10 12L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Rh=()=>R.jsx("svg",{"aria-hidden":"true",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ah=()=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M11.333 2.00004C11.5081 1.82494 11.7169 1.68605 11.9471 1.59129C12.1773 1.49653 12.4241 1.44775 12.6733 1.44775C12.9226 1.44775 13.1694 1.49653 13.3996 1.59129C13.6297 1.68605 13.8386 1.82494 14.0137 2.00004C14.1888 2.17513 14.3277 2.384 14.4224 2.61419C14.5172 2.84438 14.566 3.09117 14.566 3.34037C14.566 3.58957 14.5172 3.83637 14.4224 4.06656C14.3277 4.29675 14.1888 4.50561 14.0137 4.68071L5.00033 13.6941L1.33366 14.6667L2.30633 11.0001L11.333 2.00004Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Th=()=>R.jsxs("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M13.6667 2.66667V6.00001H10.3333",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M2.33333 13.3333V10H5.66667",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M3.66 6.00001C3.9534 5.04453 4.50594 4.18898 5.25559 3.52857C6.00523 2.86816 6.92264 2.42818 7.9073 2.25685C8.89196 2.08552 9.90501 2.18951 10.8355 2.55756C11.766 2.92561 12.5775 3.54348 13.18 4.34001L13.6667 6.00001M2.33333 10L2.82 11.66C3.42248 12.4565 4.23396 13.0744 5.16449 13.4425C6.09502 13.8105 7.10807 13.9145 8.09273 13.7432C9.07739 13.5718 9.99481 13.1319 10.7444 12.4714C11.4941 11.811 12.0466 10.9555 12.34 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ph=()=>R.jsxs("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M12.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V3.33333C2 2.97971 2.14048 2.64057 2.39052 2.39052C2.64057 2.14048 2.97971 2 3.33333 2H10.6667L14 5.33333V12.6667C14 13.0203 13.8595 13.3594 13.6095 13.6095C13.3594 13.8595 13.0203 14 12.6667 14Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M11.3333 14V9.33333H4.66667V14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M4.66667 2V5.33333H10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Oh=()=>R.jsxs("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("rect",{x:"5.33333",y:"5.33333",width:"8.66667",height:"8.66667",rx:"1.33333",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M10.6667 5.33333V3.33333C10.6667 2.97971 10.5262 2.64057 10.2761 2.39052C10.0261 2.14048 9.68696 2 9.33333 2H3.33333C2.97971 2 2.64057 2.14048 2.39052 2.39052C2.14048 2.64057 2 2.97971 2 3.33333V9.33333C2 9.68696 2.14048 10.0261 2.39052 10.2761C2.64057 10.5262 2.97971 10.6667 3.33333 10.6667H5.33333",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Mh=()=>R.jsxs("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M2.66667 8V12.6667C2.66667 13.0203 2.80714 13.3594 3.05719 13.6095C3.30724 13.8595 3.64638 14 4 14H12C12.3536 14 12.6928 13.8595 12.9428 13.6095C13.1929 13.3594 13.3333 13.0203 13.3333 12.6667V8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M10.6667 4L8 1.33333L5.33333 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("path",{d:"M8 1.33333V10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});function Fh(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Lh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vh={};function Gl(e,t){return(Vh.jsx?Dh:Lh).test(e)}const Nh=/[ \t\n\f\r]/g;function _h(e){return typeof e=="object"?e.type==="text"?Yl(e.value):!1:Yl(e)}function Yl(e){return e.replace(Nh,"")===""}class Qr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Qr.prototype.normal={};Qr.prototype.property={};Qr.prototype.space=void 0;function ju(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Qr(n,r,t)}function bs(e){return e.toLowerCase()}class Tt{constructor(t,n){this.attribute=n,this.property=t}}Tt.prototype.attribute="";Tt.prototype.booleanish=!1;Tt.prototype.boolean=!1;Tt.prototype.commaOrSpaceSeparated=!1;Tt.prototype.commaSeparated=!1;Tt.prototype.defined=!1;Tt.prototype.mustUseProperty=!1;Tt.prototype.number=!1;Tt.prototype.overloadedBoolean=!1;Tt.prototype.property="";Tt.prototype.spaceSeparated=!1;Tt.prototype.space=void 0;let jh=0;const Le=Xn(),lt=Xn(),ws=Xn(),re=Xn(),Ge=Xn(),cr=Xn(),Ft=Xn();function Xn(){return 2**++jh}const vs=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:lt,commaOrSpaceSeparated:Ft,commaSeparated:cr,number:re,overloadedBoolean:ws,spaceSeparated:Ge},Symbol.toStringTag,{value:"Module"})),_o=Object.keys(vs);class el extends Tt{constructor(t,n,r,i){let o=-1;if(super(t,n),Xl(this,"space",i),typeof r=="number")for(;++o<_o.length;){const s=_o[o];Xl(this,_o[o],(r&vs[s])===vs[s])}}}el.prototype.defined=!0;function Xl(e,t,n){n&&(e[t]=n)}function kr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new el(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[bs(r)]=r,n[bs(o.attribute)]=r}return new Qr(t,n,e.space)}const zu=kr({properties:{ariaActiveDescendant:null,ariaAtomic:lt,ariaAutoComplete:null,ariaBusy:lt,ariaChecked:lt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:Ge,ariaCurrent:null,ariaDescribedBy:Ge,ariaDetails:null,ariaDisabled:lt,ariaDropEffect:Ge,ariaErrorMessage:null,ariaExpanded:lt,ariaFlowTo:Ge,ariaGrabbed:lt,ariaHasPopup:null,ariaHidden:lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ge,ariaLevel:re,ariaLive:null,ariaModal:lt,ariaMultiLine:lt,ariaMultiSelectable:lt,ariaOrientation:null,ariaOwns:Ge,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:lt,ariaReadOnly:lt,ariaRelevant:null,ariaRequired:lt,ariaRoleDescription:Ge,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:lt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Bu(e,t){return t in e?e[t]:t}function Hu(e,t){return Bu(e,t.toLowerCase())}const zh=kr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:cr,acceptCharset:Ge,accessKey:Ge,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:Ge,autoFocus:Le,autoPlay:Le,blocking:Ge,capture:null,charSet:null,checked:Le,cite:null,className:Ge,cols:re,colSpan:null,content:null,contentEditable:lt,controls:Le,controlsList:Ge,coords:re|cr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:ws,draggable:lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:Ge,height:re,hidden:ws,high:re,href:null,hrefLang:null,htmlFor:Ge,httpEquiv:Ge,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:Ge,itemRef:Ge,itemScope:Le,itemType:Ge,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,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:Le,optimum:re,pattern:null,ping:Ge,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:Ge,required:Le,reversed:Le,rows:re,rowSpan:re,sandbox:Ge,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:lt,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:Le,useMap:null,value:lt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ge,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:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:lt,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:Le,disableRemotePlayback:Le,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:Hu}),Bh=kr({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:Ft,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:Ge,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:Le,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:cr,g2:cr,glyphName:cr,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:Ft,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:Ge,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ft,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ft,rev:Ft,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ft,requiredFeatures:Ft,requiredFonts:Ft,requiredFormats:Ft,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:Ft,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:Ft,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:Ft,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:Bu}),Uu=kr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),$u=kr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Hu}),qu=kr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Hh={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Uh=/[A-Z]/g,Ql=/-[a-z]/g,$h=/^data[-\w.:]+$/i;function qh(e,t){const n=bs(t);let r=t,i=Tt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$h.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Ql,Kh);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Ql.test(o)){let s=o.replace(Uh,Wh);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=el}return new i(r,t)}function Wh(e){return"-"+e.toLowerCase()}function Kh(e){return e.charAt(1).toUpperCase()}const Gh=ju([zu,zh,Uu,$u,qu],"html"),tl=ju([zu,Bh,Uu,$u,qu],"svg");function Yh(e){return e.join(" ").trim()}var tr={},jo,Jl;function Xh(){if(Jl)return jo;Jl=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
2
2
  `,a="/",f="*",c="",h="comment",d="declaration";function p(w,g){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];g=g||{};var y=1,v=1;function k(D){var A=D.match(t);A&&(y+=A.length);var N=D.lastIndexOf(u);v=~N?D.length-N:v+D.length}function E(){var D={line:y,column:v};return function(A){return A.position=new C(D),q(),A}}function C(D){this.start=D,this.end={line:y,column:v},this.source=g.source}C.prototype.content=w;function P(D){var A=new Error(g.source+":"+y+":"+v+": "+D);if(A.reason=D,A.filename=g.source,A.line=y,A.column=v,A.source=w,!g.silent)throw A}function L(D){var A=D.exec(w);if(A){var N=A[0];return k(N),w=w.slice(N.length),A}}function q(){L(n)}function O(D){var A;for(D=D||[];A=z();)A!==!1&&D.push(A);return D}function z(){var D=E();if(!(a!=w.charAt(0)||f!=w.charAt(1))){for(var A=2;c!=w.charAt(A)&&(f!=w.charAt(A)||a!=w.charAt(A+1));)++A;if(A+=2,c===w.charAt(A-1))return P("End of comment missing");var N=w.slice(2,A-2);return v+=2,k(N),w=w.slice(A),v+=2,D({type:h,comment:N})}}function _(){var D=E(),A=L(r);if(A){if(z(),!L(i))return P("property missing ':'");var N=L(o),Y=D({type:d,property:x(A[0].replace(e,c)),value:N?x(N[0].replace(e,c)):c});return L(s),Y}}function B(){var D=[];O(D);for(var A;A=_();)A!==!1&&(D.push(A),O(D));return D}return q(),B()}function x(w){return w?w.replace(l,c):c}return jo=p,jo}var Zl;function Qh(){if(Zl)return tr;Zl=1;var e=tr&&tr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.default=n;const t=e(Xh());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const s=(0,t.default)(r),l=typeof i=="function";return s.forEach(u=>{if(u.type!=="declaration")return;const{property:a,value:f}=u;l?i(a,f,u):f&&(o=o||{},o[a]=f)}),o}return tr}var Pr={},ea;function Jh(){if(ea)return Pr;ea=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(a){return!a||n.test(a)||e.test(a)},s=function(a,f){return f.toUpperCase()},l=function(a,f){return"".concat(f,"-")},u=function(a,f){return f===void 0&&(f={}),o(a)?a:(a=a.toLowerCase(),f.reactCompat?a=a.replace(i,l):a=a.replace(r,l),a.replace(t,s))};return Pr.camelCase=u,Pr}var Or,ta;function Zh(){if(ta)return Or;ta=1;var e=Or&&Or.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Qh()),n=Jh();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(l,u){l&&u&&(s[(0,n.camelCase)(l,o)]=u)}),s}return r.default=r,Or=r,Or}var ep=Zh();const tp=Fu(ep),Wu=Ku("end"),nl=Ku("start");function Ku(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function np(e){const t=nl(e),n=Wu(e);if(t&&n)return{start:t,end:n}}function _r(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?na(e.position):"start"in e||"end"in e?na(e):"line"in e||"column"in e?ks(e):""}function ks(e){return ra(e&&e.line)+":"+ra(e&&e.column)}function na(e){return ks(e&&e.start)+"-"+ks(e&&e.end)}function ra(e){return e&&typeof e=="number"?e:1}class bt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=_r(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bt.prototype.file="";bt.prototype.name="";bt.prototype.reason="";bt.prototype.message="";bt.prototype.stack="";bt.prototype.column=void 0;bt.prototype.line=void 0;bt.prototype.ancestors=void 0;bt.prototype.cause=void 0;bt.prototype.fatal=void 0;bt.prototype.place=void 0;bt.prototype.ruleId=void 0;bt.prototype.source=void 0;const rl={}.hasOwnProperty,rp=new Map,ip=/[A-Z]/g,op=new Set(["table","tbody","thead","tfoot","tr"]),sp=new Set(["td","th"]),Gu="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function lp(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=mp(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=pp(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?tl:Gh,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Yu(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Yu(e,t,n){if(t.type==="element")return ap(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return up(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return fp(e,t,n);if(t.type==="mdxjsEsm")return cp(e,t);if(t.type==="root")return dp(e,t,n);if(t.type==="text")return hp(e,t)}function ap(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=tl,e.schema=i),e.ancestors.push(t);const o=Qu(e,t.tagName,!1),s=gp(e,t);let l=ol(e,t);return op.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!_h(u):!0})),Xu(e,s,o,t),il(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function up(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Kr(e,t.position)}function cp(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Kr(e,t.position)}function fp(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=tl,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Qu(e,t.name,!0),s=yp(e,t),l=ol(e,t);return Xu(e,s,o,t),il(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function dp(e,t,n){const r={};return il(r,ol(e,t)),e.create(t,e.Fragment,r,n)}function hp(e,t){return t.value}function Xu(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function il(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function pp(e,t,n){return r;function r(i,o,s,l){const a=Array.isArray(s.children)?n:t;return l?a(o,s,l):a(o,s)}}function mp(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),u=nl(r);return t(i,o,s,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function gp(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&rl.call(t.properties,i)){const o=xp(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&sp.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function yp(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Kr(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else Kr(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function ol(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:rp;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const a=i.get(u)||0;s=u+"-"+a,i.set(u,a+1)}}const l=Yu(e,o,s);l!==void 0&&n.push(l)}return n}function xp(e,t,n){const r=qh(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Fh(n):Yh(n)),r.property==="style"){let i=typeof n=="object"?n:bp(e,String(n));return e.stylePropertyNameCase==="css"&&(i=wp(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Hh[r.property]||r.property:r.attribute,n]}}function bp(e,t){try{return tp(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new bt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Gu+"#cannot-parse-style-attribute",i}}function Qu(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=Gl(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=Gl(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return rl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Kr(e)}function Kr(e,t){const n=new bt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Gu+"#cannot-handle-mdx-estrees-without-createevaluater",n}function wp(e){const t={};let n;for(n in e)rl.call(e,n)&&(t[vp(n)]=e[n]);return t}function vp(e){let t=e.replace(ip,kp);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kp(e){return"-"+e.toLowerCase()}const zo={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Cp={};function sl(e,t){const n=Cp,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ju(e,r,i)}function Ju(e,t,n){if(Sp(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ia(e.children,t,n)}return Array.isArray(e)?ia(e,t,n):""}function ia(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ju(e[i],t,n);return r.join("")}function Sp(e){return!!(e&&typeof e=="object")}const oa=document.createElement("i");function ll(e){const t="&"+e+";";oa.innerHTML=t;const n=oa.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function _t(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Ut(e,t){return e.length>0?(_t(e,e.length,0,t),e):t}const sa={}.hasOwnProperty;function Zu(e){const t={};let n=-1;for(;++n<e.length;)Ep(t,e[n]);return t}function Ep(e,t){let n;for(n in t){const i=(sa.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){sa.call(i,s)||(i[s]=[]);const l=o[s];Ip(i[s],Array.isArray(l)?l:l?[l]:[])}}}function Ip(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);_t(e,0,0,r)}function ec(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Jt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const St=On(/[A-Za-z]/),xt=On(/[\dA-Za-z]/),Rp=On(/[#-'*+\--9=?A-Z^-~]/);function Mi(e){return e!==null&&(e<32||e===127)}const Cs=On(/\d/),Ap=On(/[\dA-Fa-f]/),Tp=On(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function Ke(e){return e!==null&&(e<0||e===32)}function _e(e){return e===-2||e===-1||e===32}const to=On(new RegExp("\\p{P}|\\p{S}","u")),Kn=On(/\s/);function On(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Cr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&xt(e.charCodeAt(n+1))&&xt(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ze(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(u){return _e(u)?(e.enter(n),l(u)):t(u)}function l(u){return _e(u)&&o++<i?(e.consume(u),l):(e.exit(n),t(u))}}const Pp={tokenize:Op};function Op(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ze(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Ie(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const Mp={tokenize:Fp},la={tokenize:Lp};function Fp(e){const t=this,n=[];let r=0,i,o,s;return l;function l(v){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,u,a)(v)}return a(v)}function u(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const k=t.events.length;let E=k,C;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){C=t.events[E][1].end;break}g(r);let P=k;for(;P<t.events.length;)t.events[P][1].end={...C},P++;return _t(t.events,E+1,0,t.events.slice(k)),t.events.length=P,a(v)}return l(v)}function a(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return p(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(la,f,c)(v)}function f(v){return i&&y(),g(r),h(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,p(v)}function h(v){return t.containerState={},e.attempt(la,d,p)(v)}function d(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function p(v){if(v===null){i&&y(),g(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(v)}function x(v){if(v===null){w(e.exit("chunkFlow"),!0),g(0),e.consume(v);return}return Ie(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(v),x)}function w(v,k){const E=t.sliceStream(v);if(k&&E.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(E),t.parser.lazy[v.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const P=t.events.length;let L=P,q,O;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(q){O=t.events[L][1].end;break}q=!0}for(g(r),C=P;C<t.events.length;)t.events[C][1].end={...O},C++;_t(t.events,L+1,0,t.events.slice(P)),t.events.length=C}}function g(v){let k=n.length;for(;k-- >v;){const E=n[k];t.containerState=E[1],E[0].exit.call(t,e)}n.length=v}function y(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Lp(e,t,n){return ze(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gr(e){if(e===null||Ke(e)||Kn(e))return 1;if(to(e))return 2}function no(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Ss={name:"attention",resolveAll:Dp,tokenize:Vp};function Dp(e,t){let n=-1,r,i,o,s,l,u,a,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[n][1].start};aa(c,-u),aa(h,u),s={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},a=[],e[r][1].end.offset-e[r][1].start.offset&&(a=Ut(a,[["enter",e[r][1],t],["exit",e[r][1],t]])),a=Ut(a,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),a=Ut(a,no(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),a=Ut(a,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,a=Ut(a,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,_t(e,r-1,n-r+3,a),n=r+a.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Vp(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=gr(r);let o;return s;function s(u){return o=u,e.enter("attentionSequence"),l(u)}function l(u){if(u===o)return e.consume(u),l;const a=e.exit("attentionSequence"),f=gr(u),c=!f||f===2&&i||n.includes(u),h=!i||i===2&&f||n.includes(r);return a._open=!!(o===42?c:c&&(i||!h)),a._close=!!(o===42?h:h&&(f||!c)),t(u)}}function aa(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Np={name:"autolink",tokenize:_p};function _p(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return St(d)?(e.consume(d),s):d===64?n(d):a(d)}function s(d){return d===43||d===45||d===46||xt(d)?(r=1,l(d)):a(d)}function l(d){return d===58?(e.consume(d),r=0,u):(d===43||d===45||d===46||xt(d))&&r++<32?(e.consume(d),l):(r=0,a(d))}function u(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Mi(d)?n(d):(e.consume(d),u)}function a(d){return d===64?(e.consume(d),f):Rp(d)?(e.consume(d),a):n(d)}function f(d){return xt(d)?c(d):n(d)}function c(d){return d===46?(e.consume(d),r=0,f):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):h(d)}function h(d){if((d===45||xt(d))&&r++<63){const p=d===45?h:c;return e.consume(d),p}return n(d)}}const Jr={partial:!0,tokenize:jp};function jp(e,t,n){return r;function r(o){return _e(o)?ze(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Ie(o)?t(o):n(o)}}const tc={continuation:{tokenize:Bp},exit:Hp,name:"blockQuote",tokenize:zp};function zp(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return _e(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Bp(e,t,n){const r=this;return i;function i(s){return _e(s)?ze(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(tc,t,n)(s)}}function Hp(e){e.exit("blockQuote")}const nc={name:"characterEscape",tokenize:Up};function Up(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Tp(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const rc={name:"characterReference",tokenize:$p};function $p(e,t,n){const r=this;let i=0,o,s;return l;function l(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),o=31,s=xt,f(c))}function a(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=Ap,f):(e.enter("characterReferenceValue"),o=7,s=Cs,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return s===xt&&!ll(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(c)&&i++<o?(e.consume(c),f):n(c)}}const ua={partial:!0,tokenize:Wp},ca={concrete:!0,name:"codeFenced",tokenize:qp};function qp(e,t,n){const r=this,i={partial:!0,tokenize:E};let o=0,s=0,l;return u;function u(C){return a(C)}function a(C){const P=r.events[r.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,l=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===l?(s++,e.consume(C),f):s<3?n(C):(e.exit("codeFencedFenceSequence"),_e(C)?ze(e,c,"whitespace")(C):c(C))}function c(C){return C===null||Ie(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(ua,x,k)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||Ie(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(C)):_e(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ze(e,d,"whitespace")(C)):C===96&&C===l?n(C):(e.consume(C),h)}function d(C){return C===null||Ie(C)?c(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||Ie(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(C)):C===96&&C===l?n(C):(e.consume(C),p)}function x(C){return e.attempt(i,k,w)(C)}function w(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),g}function g(C){return o>0&&_e(C)?ze(e,y,"linePrefix",o+1)(C):y(C)}function y(C){return C===null||Ie(C)?e.check(ua,x,k)(C):(e.enter("codeFlowValue"),v(C))}function v(C){return C===null||Ie(C)?(e.exit("codeFlowValue"),y(C)):(e.consume(C),v)}function k(C){return e.exit("codeFenced"),t(C)}function E(C,P,L){let q=0;return O;function O(A){return C.enter("lineEnding"),C.consume(A),C.exit("lineEnding"),z}function z(A){return C.enter("codeFencedFence"),_e(A)?ze(C,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):_(A)}function _(A){return A===l?(C.enter("codeFencedFenceSequence"),B(A)):L(A)}function B(A){return A===l?(q++,C.consume(A),B):q>=s?(C.exit("codeFencedFenceSequence"),_e(A)?ze(C,D,"whitespace")(A):D(A)):L(A)}function D(A){return A===null||Ie(A)?(C.exit("codeFencedFence"),P(A)):L(A)}}}function Wp(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Bo={name:"codeIndented",tokenize:Gp},Kp={partial:!0,tokenize:Yp};function Gp(e,t,n){const r=this;return i;function i(a){return e.enter("codeIndented"),ze(e,o,"linePrefix",5)(a)}function o(a){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(a):n(a)}function s(a){return a===null?u(a):Ie(a)?e.attempt(Kp,s,u)(a):(e.enter("codeFlowValue"),l(a))}function l(a){return a===null||Ie(a)?(e.exit("codeFlowValue"),s(a)):(e.consume(a),l)}function u(a){return e.exit("codeIndented"),t(a)}}function Yp(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Ie(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ze(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):Ie(s)?i(s):n(s)}}const Xp={name:"codeText",previous:Jp,resolve:Qp,tokenize:Zp};function Qp(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Jp(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Zp(e,t,n){let r=0,i,o;return s;function s(c){return e.enter("codeText"),e.enter("codeTextSequence"),l(c)}function l(c){return c===96?(e.consume(c),r++,l):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):Ie(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),a(c))}function a(c){return c===null||c===32||c===96||Ie(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),a)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",a(c))}}class em{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Mr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Mr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Mr(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Mr(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Mr(this.left,n.reverse())}}}function Mr(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ic(e){const t={};let n=-1,r,i,o,s,l,u,a;const f=new em(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,tm(f,n)),n=t[n],a=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=f.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},l=f.slice(i,n),l.unshift(r),f.splice(i,n-i+1,l))}}return _t(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!a}function tm(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,u=[],a={};let f,c,h=-1,d=n,p=0,x=0;const w=[x];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(f=r.sliceStream(d),d.next||f.push(null),c&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),c=d,d=d.next}for(d=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(x=h+1,w.push(x),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):w.pop(),h=w.length;h--;){const g=l.slice(w[h],w[h+1]),y=o.pop();u.push([y,y+g.length-1]),e.splice(y,2,g)}for(u.reverse(),h=-1;++h<u.length;)a[p+u[h][0]]=p+u[h][1],p+=u[h][1]-u[h][0]-1;return a}const nm={resolve:im,tokenize:om},rm={partial:!0,tokenize:sm};function im(e){return ic(e),e}function om(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):Ie(l)?e.check(rm,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function sm(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ze(e,o,"linePrefix")}function o(s){if(s===null||Ie(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function oc(e,t,n,r,i,o,s,l,u){const a=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),h):g===null||g===32||g===41||Mi(g)?n(g):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(g))}function h(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===62?(e.exit("chunkString"),e.exit(l),h(g)):g===null||g===60||Ie(g)?n(g):(e.consume(g),g===92?p:d)}function p(g){return g===60||g===62||g===92?(e.consume(g),d):d(g)}function x(g){return!f&&(g===null||g===41||Ke(g))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(g)):f<a&&g===40?(e.consume(g),f++,x):g===41?(e.consume(g),f--,x):g===null||g===32||g===40||Mi(g)?n(g):(e.consume(g),g===92?w:x)}function w(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function sc(e,t,n,r,i,o){const s=this;let l=0,u;return a;function a(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(o),f}function f(d){return l>999||d===null||d===91||d===93&&!u||d===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):Ie(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===null||d===91||d===93||Ie(d)||l++>999?(e.exit("chunkString"),f(d)):(e.consume(d),u||(u=!_e(d)),d===92?h:c)}function h(d){return d===91||d===92||d===93?(e.consume(d),l++,c):c(d)}}function lc(e,t,n,r,i,o){let s;return l;function l(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,u):n(h)}function u(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),a(h))}function a(h){return h===s?(e.exit(o),u(s)):h===null?n(h):Ie(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ze(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===s||h===null||Ie(h)?(e.exit("chunkString"),a(h)):(e.consume(h),h===92?c:f)}function c(h){return h===s||h===92?(e.consume(h),f):f(h)}}function jr(e,t){let n;return r;function r(i){return Ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):_e(i)?ze(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const lm={name:"definition",tokenize:um},am={partial:!0,tokenize:cm};function um(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),s(d)}function s(d){return sc.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function l(d){return i=Jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),u):n(d)}function u(d){return Ke(d)?jr(e,a)(d):a(d)}function a(d){return oc(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function f(d){return e.attempt(am,c,c)(d)}function c(d){return _e(d)?ze(e,h,"whitespace")(d):h(d)}function h(d){return d===null||Ie(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function cm(e,t,n){return r;function r(l){return Ke(l)?jr(e,i)(l):n(l)}function i(l){return lc(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return _e(l)?ze(e,s,"whitespace")(l):s(l)}function s(l){return l===null||Ie(l)?t(l):n(l)}}const fm={name:"hardBreakEscape",tokenize:dm};function dm(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Ie(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const hm={name:"headingAtx",resolve:pm,tokenize:mm};function pm(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},_t(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function mm(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||Ke(f)?(e.exit("atxHeadingSequence"),l(f)):n(f)}function l(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||Ie(f)?(e.exit("atxHeading"),t(f)):_e(f)?ze(e,l,"whitespace")(f):(e.enter("atxHeadingText"),a(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),l(f))}function a(f){return f===null||f===35||Ke(f)?(e.exit("atxHeadingText"),l(f)):(e.consume(f),a)}}const gm=["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"],fa=["pre","script","style","textarea"],ym={concrete:!0,name:"htmlFlow",resolveTo:wm,tokenize:vm},xm={partial:!0,tokenize:Cm},bm={partial:!0,tokenize:km};function wm(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function vm(e,t,n){const r=this;let i,o,s,l,u;return a;function a(I){return f(I)}function f(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),c}function c(I){return I===33?(e.consume(I),h):I===47?(e.consume(I),o=!0,x):I===63?(e.consume(I),i=3,r.interrupt?t:S):St(I)?(e.consume(I),s=String.fromCharCode(I),w):n(I)}function h(I){return I===45?(e.consume(I),i=2,d):I===91?(e.consume(I),i=5,l=0,p):St(I)?(e.consume(I),i=4,r.interrupt?t:S):n(I)}function d(I){return I===45?(e.consume(I),r.interrupt?t:S):n(I)}function p(I){const fe="CDATA[";return I===fe.charCodeAt(l++)?(e.consume(I),l===fe.length?r.interrupt?t:_:p):n(I)}function x(I){return St(I)?(e.consume(I),s=String.fromCharCode(I),w):n(I)}function w(I){if(I===null||I===47||I===62||Ke(I)){const fe=I===47,le=s.toLowerCase();return!fe&&!o&&fa.includes(le)?(i=1,r.interrupt?t(I):_(I)):gm.includes(s.toLowerCase())?(i=6,fe?(e.consume(I),g):r.interrupt?t(I):_(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):o?y(I):v(I))}return I===45||xt(I)?(e.consume(I),s+=String.fromCharCode(I),w):n(I)}function g(I){return I===62?(e.consume(I),r.interrupt?t:_):n(I)}function y(I){return _e(I)?(e.consume(I),y):O(I)}function v(I){return I===47?(e.consume(I),O):I===58||I===95||St(I)?(e.consume(I),k):_e(I)?(e.consume(I),v):O(I)}function k(I){return I===45||I===46||I===58||I===95||xt(I)?(e.consume(I),k):E(I)}function E(I){return I===61?(e.consume(I),C):_e(I)?(e.consume(I),E):v(I)}function C(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),u=I,P):_e(I)?(e.consume(I),C):L(I)}function P(I){return I===u?(e.consume(I),u=null,q):I===null||Ie(I)?n(I):(e.consume(I),P)}function L(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Ke(I)?E(I):(e.consume(I),L)}function q(I){return I===47||I===62||_e(I)?v(I):n(I)}function O(I){return I===62?(e.consume(I),z):n(I)}function z(I){return I===null||Ie(I)?_(I):_e(I)?(e.consume(I),z):n(I)}function _(I){return I===45&&i===2?(e.consume(I),N):I===60&&i===1?(e.consume(I),Y):I===62&&i===4?(e.consume(I),Z):I===63&&i===3?(e.consume(I),S):I===93&&i===5?(e.consume(I),K):Ie(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(xm,be,B)(I)):I===null||Ie(I)?(e.exit("htmlFlowData"),B(I)):(e.consume(I),_)}function B(I){return e.check(bm,D,be)(I)}function D(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),A}function A(I){return I===null||Ie(I)?B(I):(e.enter("htmlFlowData"),_(I))}function N(I){return I===45?(e.consume(I),S):_(I)}function Y(I){return I===47?(e.consume(I),s="",$):_(I)}function $(I){if(I===62){const fe=s.toLowerCase();return fa.includes(fe)?(e.consume(I),Z):_(I)}return St(I)&&s.length<8?(e.consume(I),s+=String.fromCharCode(I),$):_(I)}function K(I){return I===93?(e.consume(I),S):_(I)}function S(I){return I===62?(e.consume(I),Z):I===45&&i===2?(e.consume(I),S):_(I)}function Z(I){return I===null||Ie(I)?(e.exit("htmlFlowData"),be(I)):(e.consume(I),Z)}function be(I){return e.exit("htmlFlow"),t(I)}}function km(e,t,n){const r=this;return i;function i(s){return Ie(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Cm(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Jr,t,n)}}const Sm={name:"htmlText",tokenize:Em};function Em(e,t,n){const r=this;let i,o,s;return l;function l(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),u}function u(S){return S===33?(e.consume(S),a):S===47?(e.consume(S),E):S===63?(e.consume(S),v):St(S)?(e.consume(S),L):n(S)}function a(S){return S===45?(e.consume(S),f):S===91?(e.consume(S),o=0,p):St(S)?(e.consume(S),y):n(S)}function f(S){return S===45?(e.consume(S),d):n(S)}function c(S){return S===null?n(S):S===45?(e.consume(S),h):Ie(S)?(s=c,Y(S)):(e.consume(S),c)}function h(S){return S===45?(e.consume(S),d):c(S)}function d(S){return S===62?N(S):S===45?h(S):c(S)}function p(S){const Z="CDATA[";return S===Z.charCodeAt(o++)?(e.consume(S),o===Z.length?x:p):n(S)}function x(S){return S===null?n(S):S===93?(e.consume(S),w):Ie(S)?(s=x,Y(S)):(e.consume(S),x)}function w(S){return S===93?(e.consume(S),g):x(S)}function g(S){return S===62?N(S):S===93?(e.consume(S),g):x(S)}function y(S){return S===null||S===62?N(S):Ie(S)?(s=y,Y(S)):(e.consume(S),y)}function v(S){return S===null?n(S):S===63?(e.consume(S),k):Ie(S)?(s=v,Y(S)):(e.consume(S),v)}function k(S){return S===62?N(S):v(S)}function E(S){return St(S)?(e.consume(S),C):n(S)}function C(S){return S===45||xt(S)?(e.consume(S),C):P(S)}function P(S){return Ie(S)?(s=P,Y(S)):_e(S)?(e.consume(S),P):N(S)}function L(S){return S===45||xt(S)?(e.consume(S),L):S===47||S===62||Ke(S)?q(S):n(S)}function q(S){return S===47?(e.consume(S),N):S===58||S===95||St(S)?(e.consume(S),O):Ie(S)?(s=q,Y(S)):_e(S)?(e.consume(S),q):N(S)}function O(S){return S===45||S===46||S===58||S===95||xt(S)?(e.consume(S),O):z(S)}function z(S){return S===61?(e.consume(S),_):Ie(S)?(s=z,Y(S)):_e(S)?(e.consume(S),z):q(S)}function _(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,B):Ie(S)?(s=_,Y(S)):_e(S)?(e.consume(S),_):(e.consume(S),D)}function B(S){return S===i?(e.consume(S),i=void 0,A):S===null?n(S):Ie(S)?(s=B,Y(S)):(e.consume(S),B)}function D(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Ke(S)?q(S):(e.consume(S),D)}function A(S){return S===47||S===62||Ke(S)?q(S):n(S)}function N(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function Y(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),$}function $(S){return _e(S)?ze(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):K(S)}function K(S){return e.enter("htmlTextData"),s(S)}}const al={name:"labelEnd",resolveAll:Tm,resolveTo:Pm,tokenize:Om},Im={tokenize:Mm},Rm={tokenize:Fm},Am={tokenize:Lm};function Tm(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&_t(e,0,e.length,n),e}function Pm(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",u,t],["enter",a,t]],l=Ut(l,e.slice(o+1,o+r+3)),l=Ut(l,[["enter",f,t]]),l=Ut(l,no(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=Ut(l,[["exit",f,t],e[s-2],e[s-1],["exit",a,t]]),l=Ut(l,e.slice(s+1)),l=Ut(l,[["exit",u,t]]),_t(e,o,e.length,l),e}function Om(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(h){return o?o._inactive?c(h):(s=r.parser.defined.includes(Jt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):n(h)}function u(h){return h===40?e.attempt(Im,f,s?f:c)(h):h===91?e.attempt(Rm,f,s?a:c)(h):s?f(h):c(h)}function a(h){return e.attempt(Am,f,c)(h)}function f(h){return t(h)}function c(h){return o._balanced=!0,n(h)}}function Mm(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Ke(c)?jr(e,o)(c):o(c)}function o(c){return c===41?f(c):oc(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function s(c){return Ke(c)?jr(e,u)(c):f(c)}function l(c){return n(c)}function u(c){return c===34||c===39||c===40?lc(e,a,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function a(c){return Ke(c)?jr(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function Fm(e,t,n){const r=this;return i;function i(l){return sc.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(Jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function Lm(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Dm={name:"labelStartImage",resolveAll:al.resolveAll,tokenize:Vm};function Vm(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Nm={name:"labelStartLink",resolveAll:al.resolveAll,tokenize:_m};function _m(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ho={name:"lineEnding",tokenize:jm};function jm(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ze(e,t,"linePrefix")}}const Ii={name:"thematicBreak",tokenize:zm};function zm(e,t,n){let r=0,i;return o;function o(a){return e.enter("thematicBreak"),s(a)}function s(a){return i=a,l(a)}function l(a){return a===i?(e.enter("thematicBreakSequence"),u(a)):r>=3&&(a===null||Ie(a))?(e.exit("thematicBreak"),t(a)):n(a)}function u(a){return a===i?(e.consume(a),r++,u):(e.exit("thematicBreakSequence"),_e(a)?ze(e,l,"whitespace")(a):l(a))}}const It={continuation:{tokenize:$m},exit:Wm,name:"list",tokenize:Um},Bm={partial:!0,tokenize:Km},Hm={partial:!0,tokenize:qm};function Um(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(d){const p=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Cs(d)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Ii,n,a)(d):a(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(d)}return n(d)}function u(d){return Cs(d)&&++s<10?(e.consume(d),u):(!r.interrupt||s<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),a(d)):n(d)}function a(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(Jr,r.interrupt?n:f,e.attempt(Bm,h,c))}function f(d){return r.containerState.initialBlankLine=!0,o++,h(d)}function c(d){return _e(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),h):n(d)}function h(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function $m(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Jr,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ze(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!_e(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Hm,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ze(e,e.attempt(It,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function qm(e,t,n){const r=this;return ze(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function Wm(e){e.exit(this.containerState.type)}function Km(e,t,n){const r=this;return ze(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!_e(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const da={name:"setextUnderline",resolveTo:Gm,tokenize:Ym};function Gm(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Ym(e,t,n){const r=this;let i;return o;function o(a){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=a,s(a)):n(a)}function s(a){return e.enter("setextHeadingLineSequence"),l(a)}function l(a){return a===i?(e.consume(a),l):(e.exit("setextHeadingLineSequence"),_e(a)?ze(e,u,"lineSuffix")(a):u(a))}function u(a){return a===null||Ie(a)?(e.exit("setextHeadingLine"),t(a)):n(a)}}const Xm={tokenize:Qm};function Qm(e){const t=this,n=e.attempt(Jr,r,e.attempt(this.parser.constructs.flowInitial,i,ze(e,e.attempt(this.parser.constructs.flow,i,e.attempt(nm,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Jm={resolveAll:uc()},Zm=ac("string"),eg=ac("text");function ac(e){return{resolveAll:uc(e==="text"?tg:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(f){return a(f)?o(f):l(f)}function l(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return a(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function a(f){if(f===null)return!0;const c=i[f];let h=-1;if(c)for(;++h<c.length;){const d=c[h];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function uc(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function tg(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,l=0,u;for(;o--;){const a=i[o];if(typeof a=="string"){for(s=a.length;a.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(a===-2)u=!0,l++;else if(a!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const a={type:n===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}const ng={42:It,43:It,45:It,48:It,49:It,50:It,51:It,52:It,53:It,54:It,55:It,56:It,57:It,62:tc},rg={91:lm},ig={[-2]:Bo,[-1]:Bo,32:Bo},og={35:hm,42:Ii,45:[da,Ii],60:ym,61:da,95:Ii,96:ca,126:ca},sg={38:rc,92:nc},lg={[-5]:Ho,[-4]:Ho,[-3]:Ho,33:Dm,38:rc,42:Ss,60:[Np,Sm],91:Nm,92:[fm,nc],93:al,95:Ss,96:Xp},ag={null:[Ss,Jm]},ug={null:[42,95]},cg={null:[]},fg=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ug,contentInitial:rg,disable:cg,document:ng,flow:og,flowInitial:ig,insideSpan:ag,string:sg,text:lg},Symbol.toStringTag,{value:"Module"}));function dg(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const u={attempt:P(E),check:P(C),consume:y,enter:v,exit:k,interrupt:P(C,{interrupt:!0})},a={code:null,containerState:{},defineSkip:x,events:[],now:p,parser:e,previous:null,sliceSerialize:h,sliceStream:d,write:c};let f=t.tokenize.call(a,u);return t.resolveAll&&o.push(t),a;function c(z){return s=Ut(s,z),w(),s[s.length-1]!==null?[]:(L(t,0),a.events=no(o,a.events,a),a.events)}function h(z,_){return pg(d(z),_)}function d(z){return hg(s,z)}function p(){const{_bufferIndex:z,_index:_,line:B,column:D,offset:A}=r;return{_bufferIndex:z,_index:_,line:B,column:D,offset:A}}function x(z){i[z.line]=z.column,O()}function w(){let z;for(;r._index<s.length;){const _=s[r._index];if(typeof _=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<_.length;)g(_.charCodeAt(r._bufferIndex));else g(_)}}function g(z){f=f(z)}function y(z){Ie(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,O()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),a.previous=z}function v(z,_){const B=_||{};return B.type=z,B.start=p(),a.events.push(["enter",B,a]),l.push(B),B}function k(z){const _=l.pop();return _.end=p(),a.events.push(["exit",_,a]),_}function E(z,_){L(z,_.from)}function C(z,_){_.restore()}function P(z,_){return B;function B(D,A,N){let Y,$,K,S;return Array.isArray(D)?be(D):"tokenize"in D?be([D]):Z(D);function Z(X){return ue;function ue(ie){const we=ie!==null&&X[ie],Q=ie!==null&&X.null,H=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(Q)?Q:Q?[Q]:[]];return be(H)(ie)}}function be(X){return Y=X,$=0,X.length===0?N:I(X[$])}function I(X){return ue;function ue(ie){return S=q(),K=X,X.partial||(a.currentConstruct=X),X.name&&a.parser.constructs.disable.null.includes(X.name)?le():X.tokenize.call(_?Object.assign(Object.create(a),_):a,u,fe,le)(ie)}}function fe(X){return z(K,S),A}function le(X){return S.restore(),++$<Y.length?I(Y[$]):N}}}function L(z,_){z.resolveAll&&!o.includes(z)&&o.push(z),z.resolve&&_t(a.events,_,a.events.length-_,z.resolve(a.events.slice(_),a)),z.resolveTo&&(a.events=z.resolveTo(a.events,a))}function q(){const z=p(),_=a.previous,B=a.currentConstruct,D=a.events.length,A=Array.from(l);return{from:D,restore:N};function N(){r=z,a.previous=_,a.currentConstruct=B,a.events.length=D,l=A,O()}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function hg(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function pg(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
3
3
  `;break}case-3:{s=`\r
4
4
  `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function mg(e){const r={constructs:Zu([fg,...(e||{}).extensions||[]]),content:i(Pp),defined:[],document:i(Mp),flow:i(Xm),lazy:{},string:i(Zm),text:i(eg)};return r;function i(o){return s;function s(l){return dg(r,o,l)}}}function gg(e){for(;!ic(e););return e}const ha=/[\0\t\n\r]/g;function yg(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const u=[];let a,f,c,h,d;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(ha.lastIndex=c,a=ha.exec(o),h=a&&a.index!==void 0?a.index:o.length,d=o.charCodeAt(h),!a){t=o.slice(c);break}if(d===10&&c===h&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<h&&(u.push(o.slice(c,h)),e+=h-c),d){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return l&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const xg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function bg(e){return e.replace(xg,wg)}function wg(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return ec(n.slice(o?2:1),o?16:10)}return ll(n)||e}const cc={}.hasOwnProperty;function vg(e,t,n){return typeof t!="string"&&(n=t,t=void 0),kg(n)(gg(mg(n).document().write(yg()(e,t,!0))))}function kg(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ye),autolinkProtocol:q,autolinkEmail:q,atxHeading:o(ee),blockQuote:o(Q),characterEscape:q,characterReference:q,codeFenced:o(H),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(H,s),codeText:o(se,s),codeTextData:q,data:q,codeFlowValue:q,definition:o(ne),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Ae),hardBreakEscape:o(G),hardBreakTrailing:o(G),htmlFlow:o(oe,s),htmlFlowData:q,htmlText:o(oe,s),htmlTextData:q,image:o(Ee),label:s,link:o(ye),listItem:o(b),listItemValue:h,listOrdered:o(xe,c),listUnordered:o(xe),paragraph:o(M),reference:I,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ee),strong:o(F),thematicBreak:o(j)},exit:{atxHeading:u(),atxHeadingSequence:E,autolink:u(),autolinkEmail:we,autolinkProtocol:ie,blockQuote:u(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:X,characterReference:ue,codeFenced:u(w),codeFencedFence:x,codeFencedFenceInfo:d,codeFencedFenceMeta:p,codeFlowValue:O,codeIndented:u(g),codeText:u(A),codeTextData:O,data:O,definition:u(),definitionDestinationString:k,definitionLabelString:y,definitionTitleString:v,emphasis:u(),hardBreakEscape:u(_),hardBreakTrailing:u(_),htmlFlow:u(B),htmlFlowData:O,htmlText:u(D),htmlTextData:O,image:u(Y),label:K,labelText:$,lineEnding:z,link:u(N),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:fe,resourceDestinationString:S,resourceTitleString:Z,resource:be,setextHeading:u(L),setextHeadingLineSequence:P,setextHeadingText:C,strong:u(),thematicBreak:u()}};fc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(T){let V={type:"root",children:[]};const W={stack:[V],tokenStack:[],config:t,enter:l,exit:a,buffer:s,resume:f,data:n},J=[];let he=-1;for(;++he<T.length;)if(T[he][1].type==="listOrdered"||T[he][1].type==="listUnordered")if(T[he][0]==="enter")J.push(he);else{const Pe=J.pop();he=i(T,Pe,he)}for(he=-1;++he<T.length;){const Pe=t[T[he][0]];cc.call(Pe,T[he][1].type)&&Pe[T[he][1].type].call(Object.assign({sliceSerialize:T[he][2].sliceSerialize},W),T[he][1])}if(W.tokenStack.length>0){const Pe=W.tokenStack[W.tokenStack.length-1];(Pe[1]||pa).call(W,void 0,Pe[0])}for(V.position={start:yn(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:yn(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},he=-1;++he<t.transforms.length;)V=t.transforms[he](V)||V;return V}function i(T,V,W){let J=V-1,he=-1,Pe=!1,Oe,ke,de,He;for(;++J<=W;){const Be=T[J];switch(Be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Be[0]==="enter"?he++:he--,He=void 0;break}case"lineEndingBlank":{Be[0]==="enter"&&(Oe&&!He&&!he&&!de&&(de=J),He=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:He=void 0}if(!he&&Be[0]==="enter"&&Be[1].type==="listItemPrefix"||he===-1&&Be[0]==="exit"&&(Be[1].type==="listUnordered"||Be[1].type==="listOrdered")){if(Oe){let De=J;for(ke=void 0;De--;){const Me=T[De];if(Me[1].type==="lineEnding"||Me[1].type==="lineEndingBlank"){if(Me[0]==="exit")continue;ke&&(T[ke][1].type="lineEndingBlank",Pe=!0),Me[1].type="lineEnding",ke=De}else if(!(Me[1].type==="linePrefix"||Me[1].type==="blockQuotePrefix"||Me[1].type==="blockQuotePrefixWhitespace"||Me[1].type==="blockQuoteMarker"||Me[1].type==="listItemIndent"))break}de&&(!ke||de<ke)&&(Oe._spread=!0),Oe.end=Object.assign({},ke?T[ke][1].start:Be[1].end),T.splice(ke||J,0,["exit",Oe,Be[2]]),J++,W++}if(Be[1].type==="listItemPrefix"){const De={type:"listItem",_spread:!1,start:Object.assign({},Be[1].start),end:void 0};Oe=De,T.splice(J,0,["enter",De,Be[2]]),J++,W++,de=void 0,He=!0}}}return T[V][1]._spread=Pe,W}function o(T,V){return W;function W(J){l.call(this,T(J),J),V&&V.call(this,J)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(T,V,W){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([V,W||void 0]),T.position={start:yn(V.start),end:void 0}}function u(T){return V;function V(W){T&&T.call(this,W),a.call(this,W)}}function a(T,V){const W=this.stack.pop(),J=this.tokenStack.pop();if(J)J[0].type!==T.type&&(V?V.call(this,T,J[0]):(J[1]||pa).call(this,T,J[0]));else throw new Error("Cannot close `"+T.type+"` ("+_r({start:T.start,end:T.end})+"): it’s not open");W.position.end=yn(T.end)}function f(){return sl(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(T){if(this.data.expectingFirstListItemValue){const V=this.stack[this.stack.length-2];V.start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0}}function d(){const T=this.resume(),V=this.stack[this.stack.length-1];V.lang=T}function p(){const T=this.resume(),V=this.stack[this.stack.length-1];V.meta=T}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const T=this.resume(),V=this.stack[this.stack.length-1];V.value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const T=this.resume(),V=this.stack[this.stack.length-1];V.value=T.replace(/(\r?\n|\r)$/g,"")}function y(T){const V=this.resume(),W=this.stack[this.stack.length-1];W.label=V,W.identifier=Jt(this.sliceSerialize(T)).toLowerCase()}function v(){const T=this.resume(),V=this.stack[this.stack.length-1];V.title=T}function k(){const T=this.resume(),V=this.stack[this.stack.length-1];V.url=T}function E(T){const V=this.stack[this.stack.length-1];if(!V.depth){const W=this.sliceSerialize(T).length;V.depth=W}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function P(T){const V=this.stack[this.stack.length-1];V.depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function q(T){const W=this.stack[this.stack.length-1].children;let J=W[W.length-1];(!J||J.type!=="text")&&(J=U(),J.position={start:yn(T.start),end:void 0},W.push(J)),this.stack.push(J)}function O(T){const V=this.stack.pop();V.value+=this.sliceSerialize(T),V.position.end=yn(T.end)}function z(T){const V=this.stack[this.stack.length-1];if(this.data.atHardBreak){const W=V.children[V.children.length-1];W.position.end=yn(T.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(V.type)&&(q.call(this,T),O.call(this,T))}function _(){this.data.atHardBreak=!0}function B(){const T=this.resume(),V=this.stack[this.stack.length-1];V.value=T}function D(){const T=this.resume(),V=this.stack[this.stack.length-1];V.value=T}function A(){const T=this.resume(),V=this.stack[this.stack.length-1];V.value=T}function N(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=V,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function Y(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=V,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function $(T){const V=this.sliceSerialize(T),W=this.stack[this.stack.length-2];W.label=bg(V),W.identifier=Jt(V).toLowerCase()}function K(){const T=this.stack[this.stack.length-1],V=this.resume(),W=this.stack[this.stack.length-1];if(this.data.inReference=!0,W.type==="link"){const J=T.children;W.children=J}else W.alt=V}function S(){const T=this.resume(),V=this.stack[this.stack.length-1];V.url=T}function Z(){const T=this.resume(),V=this.stack[this.stack.length-1];V.title=T}function be(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function fe(T){const V=this.resume(),W=this.stack[this.stack.length-1];W.label=V,W.identifier=Jt(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function le(T){this.data.characterReferenceType=T.type}function X(T){const V=this.sliceSerialize(T),W=this.data.characterReferenceType;let J;W?(J=ec(V,W==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):J=ll(V);const he=this.stack[this.stack.length-1];he.value+=J}function ue(T){const V=this.stack.pop();V.position.end=yn(T.end)}function ie(T){O.call(this,T);const V=this.stack[this.stack.length-1];V.url=this.sliceSerialize(T)}function we(T){O.call(this,T);const V=this.stack[this.stack.length-1];V.url="mailto:"+this.sliceSerialize(T)}function Q(){return{type:"blockquote",children:[]}}function H(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ae(){return{type:"emphasis",children:[]}}function ee(){return{type:"heading",depth:0,children:[]}}function G(){return{type:"break"}}function oe(){return{type:"html",value:""}}function Ee(){return{type:"image",title:null,url:"",alt:null}}function ye(){return{type:"link",title:null,url:"",children:[]}}function xe(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function b(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function M(){return{type:"paragraph",children:[]}}function F(){return{type:"strong",children:[]}}function U(){return{type:"text",value:""}}function j(){return{type:"thematicBreak"}}}function yn(e){return{line:e.line,column:e.column,offset:e.offset}}function fc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?fc(e,r):Cg(e,r)}}function Cg(e,t){let n;for(n in t)if(cc.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function pa(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_r({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_r({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_r({start:t.start,end:t.end})+") is still open")}function Sg(e){const t=this;t.parser=n;function n(r){return vg(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Eg(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ig(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
@@ -38,4 +38,4 @@ import{S as ih,g as oh,h as Wl,i as sh,n as Mu,k as lh,r as m,j as R,l as Fu,m a
38
38
  ${s.right}px ${s.top}px,
39
39
  ${s.left}px ${s.top}px
40
40
  )`}return R.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})}),V1=m.forwardRef(function(t,n){const{render:r,className:i,anchor:o,positionMethod:s="absolute",side:l="bottom",align:u="center",sideOffset:a=0,alignOffset:f=0,collisionBoundary:c="clipping-ancestors",collisionPadding:h=5,arrowPadding:d=5,sticky:p=!1,disableAnchorTracking:x=!1,collisionAvoidance:w=Gc,...g}=t,y=Er(),{filteredItems:v}=Ir(),k=Vl(),E=E1(),C=te(y,Ce.modal),P=te(y,Ce.open),L=te(y,Ce.mounted),q=te(y,Ce.openMethod),O=te(y,Ce.triggerElement),z=te(y,Ce.inputElement),_=te(y,Ce.inputInsidePopup),B=v.length===0,A=Sd({anchor:o??(_?O:z),floatingRootContext:k,positionMethod:s,mounted:L,side:l,sideOffset:a,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:c,collisionPadding:h,sticky:p,disableAnchorTracking:x,keepMounted:E,collisionAvoidance:w,lazyFlip:!0});kd(P&&C&&q!=="touch",O);const N=m.useMemo(()=>{const Z={...A.positionerStyles};return P||(Z.pointerEvents="none"),{role:"presentation",hidden:!L,style:Z}},[P,L,A.positionerStyles]),Y=m.useMemo(()=>({open:P,side:A.side,align:A.align,anchorHidden:A.anchorHidden,empty:B}),[P,A.side,A.align,A.anchorHidden,B]);ge(()=>{y.set("popupSide",A.side)},[y,A.side]);const $=m.useMemo(()=>({side:A.side,align:A.align,arrowRef:A.arrowRef,arrowUncentered:A.arrowUncentered,arrowStyles:A.arrowStyles,anchorHidden:A.anchorHidden,isPositioned:A.isPositioned}),[A.side,A.align,A.arrowRef,A.arrowUncentered,A.arrowStyles,A.anchorHidden,A.isPositioned]),K=me(Z=>{y.set("positionerElement",Z)}),S=nt("div",t,{state:Y,ref:[n,K],props:[N,g],stateAttributesMapping:Io});return R.jsxs(gd.Provider,{value:$,children:[L&&C&&R.jsx(Ed,{inert:vd(!P),cutout:z??O}),S]})});function Id(e){return e==="starting"?Mw:yt}const N1={...Io,...vo},_1=m.forwardRef(function(t,n){const{render:r,className:i,initialFocus:o,finalFocus:s,...l}=t,u=Er(),a=jl(),f=Vl(),{filteredItems:c}=Ir(),h=te(u,Ce.mounted),d=te(u,Ce.open),p=te(u,Ce.openMethod),x=te(u,Ce.transitionStatus),w=te(u,Ce.inputInsidePopup),g=te(u,Ce.inputElement),y=c.length===0;Sr({open:d,ref:u.state.popupRef,onComplete(){d&&u.state.onOpenChangeComplete(!0)}});const v=m.useMemo(()=>({open:d,side:a.side,align:a.align,anchorHidden:a.anchorHidden,transitionStatus:x,empty:y}),[d,a.side,a.align,a.anchorHidden,x,y]),k=nt("div",t,{state:v,ref:[n,u.state.popupRef],props:[{role:w?"dialog":"presentation",tabIndex:-1,onFocus(L){const q=Ct(L.nativeEvent);p!=="touch"&&(We(u.state.listElement,q)||q===L.currentTarget)&&u.state.inputRef.current?.focus()}},Id(x),l],stateAttributesMapping:N1}),C=o===void 0?w?L=>L==="touch"?u.state.popupRef.current:g:!1:o;let P;return s!=null?P=s:P=w?void 0:!1,R.jsx(qf,{context:f,disabled:!h,modal:!w,openInteractionType:p,initialFocus:C,returnFocus:P,children:k})});let zl=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Rd(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:s,unregister:l,subscribeMapChange:u,elementsRef:a,labelsRef:f,nextIndexRef:c}=w1(),h=m.useRef(-1),[d,p]=m.useState(o??(i===zl.GuessFromOrder?()=>{if(h.current===-1){const g=c.current;c.current+=1,h.current=g}return h.current}:-1)),x=m.useRef(null),w=m.useCallback(g=>{if(x.current=g,d!==-1&&g!==null&&(a.current[d]=g,f)){const y=t!==void 0;f.current[d]=y?t:r?.current?.textContent??g.textContent}},[d,a,f,t,r]);return ge(()=>{if(o!=null)return;const g=x.current;if(g)return s(g,n),()=>{l(g)}},[o,s,l,n]),ge(()=>{if(o==null)return u(g=>{const y=x.current?g.get(x.current)?.index:null;y!=null&&p(y)})},[o,u,p]),m.useMemo(()=>({ref:w,index:d}),[d,w])}const j1=m.createContext(void 0),z1=m.createContext(!1);function B1(){return m.useContext(z1)}const H1=m.memo(m.forwardRef(function(t,n){const{render:r,className:i,value:o=null,index:s,disabled:l=!1,nativeButton:u=!1,...a}=t,f=m.useRef(!1),c=m.useRef(null),h=Rd({index:s,textRef:c,indexGuessBehavior:zl.GuessFromOrder}),d=Er(),p=B1(),{flatFilteredItems:x}=Ir(),w=te(d,Ce.open),g=te(d,Ce.selectionMode),y=te(d,Ce.readOnly),v=te(d,Ce.virtualized),k=te(d,Ce.isItemEqualToValue),E=g!=="none",C=s??(v?wr(x,o,k):h.index),P=h.index!==-1,L=te(d,Ce.id),q=te(d,Ce.isActive,C),O=te(d,Ce.isSelected,o),z=te(d,Ce.items),_=te(d,Ce.getItemProps),B=m.useRef(null),D=L!=null&&P?`${L}-${C}`:void 0,A=O&&E;ge(()=>{if(!(P&&(v||s!=null)))return;const le=d.state.listRef.current;return le[C]=B.current,()=>{delete le[C]}},[P,v,C,s,d]),ge(()=>{if(!P||z)return;const fe=d.state.valuesRef.current;return fe[C]=o,g!=="none"&&d.state.allValuesRef.current.push(o),()=>{delete fe[C]}},[P,z,C,o,d,g]),ge(()=>{if(!w){f.current=!1;return}if(!P||z)return;const fe=d.state.selectedValue,le=Array.isArray(fe)?fe[fe.length-1]:fe;pn(le,o,k)&&d.set("selectedIndex",C)},[P,z,w,d,C,o,k]);const N=m.useMemo(()=>({disabled:l,selected:A,highlighted:q}),[l,A,q]),Y=_({active:q,selected:A});Y.id=void 0,Y.onFocus=void 0;const{getButtonProps:$,buttonRef:K}=ei({disabled:l,focusableWhenDisabled:!0,native:u});function S(fe){function le(){d.state.handleSelection(fe,o)}d.state.submitOnItemClick?(In.flushSync(le),d.state.requestSubmit()):le()}const Z={id:D,role:p?"gridcell":"option","aria-disabled":l||void 0,"aria-selected":E?A:void 0,tabIndex:void 0,onPointerDownCapture(fe){f.current=!0,fe.preventDefault()},onClick(fe){l||y||S(fe.nativeEvent)},onMouseUp(fe){const le=f.current;f.current=!1,!(l||y||fe.button!==0||le||!q)&&S(fe.nativeEvent)}},be=nt("div",t,{ref:[K,n,h.ref,B],state:N,props:[Y,Z,a,$]}),I=m.useMemo(()=>({selected:A,textRef:c}),[A,c]);return R.jsx(j1.Provider,{value:I,children:be})})),U1=m.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function $1(e=!1){const t=m.useContext(U1);if(!t&&!e)throw new Error(wt(86));return t}const q1=function(t){const n=Tn(),[r,i]=m.useState(t.initialControlId===void 0?n:t.initialControlId),[o,s]=m.useState(void 0),[l,u]=m.useState([]),{messageIds:a}=en(),f=m.useCallback(h=>Rn({"aria-describedby":a.concat(l).join(" ")||void 0},h),[a,l]),c=m.useMemo(()=>({controlId:r,setControlId:i,labelId:o,setLabelId:s,messageIds:l,setMessageIds:u,getDescriptionProps:f}),[r,i,o,s,l,u,f]);return R.jsx(hf.Provider,{value:c,children:t.children})},Pi=Object.keys(go);function W1(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const n of Pi)n!=="valid"&&(n==="valueMissing"&&(t=e[n]),e[n]&&(t=!1));return t}function K1(e){const{formRef:t,clearErrors:n}=Jn(),{setValidityData:r,validate:i,validityData:o,validationDebounceTime:s,invalid:l,markedDirtyRef:u,state:a,name:f,shouldValidateOnChange:c}=e,{controlId:h,getDescriptionProps:d}=en(),p=Nt(),x=m.useRef(null),w=me(async(v,k=!1)=>{const E=x.current;if(!E)return;if(k){if(a.valid!==!1)return;const B=E.validity;if(!B.valueMissing){const A={value:v,state:{...go,valid:!0},error:"",errors:[],initialValue:o.initialValue};if(E.setCustomValidity(""),h){const N=t.current.fields.get(h);N&&t.current.fields.set(h,{...N,...zs(A,!1)})}r(A);return}const D=Pi.reduce((A,N)=>(A[N]=B[N],A),{});if(!D.valid&&!W1(D))return}function C(B){const D=Pi.reduce((N,Y)=>(N[Y]=B.validity[Y],N),{});let A=!1;for(const N of Pi)if(N!=="valid"){if(N==="valueMissing"&&D[N])A=!0;else if(D[N])return D}return A&&!u.current&&(D.valid=!0,D.valueMissing=!1),D}p.clear();let P=null,L=[];const q=C(E);let O;const z=c();if(E.validationMessage&&!z)O=E.validationMessage,L=[E.validationMessage];else{const B=Array.from(t.current.fields.values()).reduce((A,N)=>(N.name&&(A[N.name]=N.getValue()),A),{}),D=i(v,B);typeof D=="object"&&D!==null&&"then"in D?P=await D:P=D,P!==null?(q.valid=!1,q.customError=!0,Array.isArray(P)?(L=P,E.setCustomValidity(P.join(`
41
- `))):P&&(L=[P],E.setCustomValidity(P))):z&&(E.setCustomValidity(""),q.customError=!1,E.validationMessage?(O=E.validationMessage,L=[E.validationMessage]):E.validity.valid&&!q.valid&&(q.valid=!0))}const _={value:v,state:q,error:O??(Array.isArray(P)?P[0]:P??""),errors:L,initialValue:o.initialValue};if(h){const B=t.current.fields.get(h);B&&t.current.fields.set(h,{...B,...zs(_,l)})}r(_)}),g=m.useCallback((v={})=>Rn(d,a.valid===!1?{"aria-invalid":!0}:yt,v),[d,a.valid]),y=m.useCallback((v={})=>Rn({onChange(k){if(k.nativeEvent.defaultPrevented)return;if(n(f),!c()){w(k.currentTarget.value,!0);return}if(l)return;const E=k.currentTarget;if(E.value===""){w(E.value);return}p.clear(),s?p.start(s,()=>{w(E.value)}):w(E.value)}},g(v)),[g,n,f,p,w,l,s,c]);return m.useMemo(()=>({getValidationProps:g,getInputValidationProps:y,inputRef:x,commit:w}),[g,y,w])}const G1=m.forwardRef(function(t,n){const{errors:r,validationMode:i,submitAttemptedRef:o}=Jn(),{render:s,className:l,validate:u,validationDebounceTime:a=0,validationMode:f=i,name:c,disabled:h=!1,invalid:d,dirty:p,touched:x,...w}=t,{disabled:g}=$1(),y=me(u||(()=>null)),v=g||h,[k,E]=m.useState(!1),[C,P]=m.useState(!1),[L,q]=m.useState(!1),[O,z]=m.useState(!1),_=p??C,B=x??k,D=m.useRef(!1),A=me(X=>{p===void 0&&(X&&(D.current=!0),P(X))}),N=me(X=>{x===void 0&&E(X)}),Y=me(()=>f==="onChange"||f==="onSubmit"&&o.current),$=!!(d||c&&{}.hasOwnProperty.call(r,c)&&r[c]!==void 0),[K,S]=m.useState({state:go,error:"",errors:[],value:null,initialValue:null}),Z=!$&&K.state.valid,be=m.useMemo(()=>({disabled:v,touched:B,dirty:_,valid:Z,filled:L,focused:O}),[v,B,_,Z,L,O]),I=K1({setValidityData:S,validate:y,validityData:K,validationDebounceTime:a,invalid:$,markedDirtyRef:D,state:be,name:c,shouldValidateOnChange:Y}),fe=m.useMemo(()=>({invalid:$,name:c,validityData:K,setValidityData:S,disabled:v,touched:B,setTouched:N,dirty:_,setDirty:A,filled:L,setFilled:q,focused:O,setFocused:z,validate:y,validationMode:f,validationDebounceTime:a,shouldValidateOnChange:Y,state:be,markedDirtyRef:D,validation:I}),[$,c,K,v,B,N,_,A,L,q,O,z,y,f,a,Y,be,I]),le=nt("div",t,{ref:n,state:be,props:w,stateAttributesMapping:gn});return R.jsx(df.Provider,{value:fe,children:le})}),Ys=m.forwardRef(function(t,n){return R.jsx(q1,{children:R.jsx(G1,{...t,ref:n})})}),Xs=m.forwardRef(function(t,n){const{render:r,className:i,id:o,...s}=t,l=Zt(!1),{controlId:u,setLabelId:a,labelId:f}=en(),c=Tn(o),h=m.useRef(null);return ge(()=>(c&&a(c),()=>{a(void 0)}),[c,a]),nt("label",t,{ref:[n,h],state:l.state,props:[{id:f,htmlFor:u??void 0,onMouseDown(p){Ct(p.nativeEvent)?.closest("button,input,select,textarea")||!p.defaultPrevented&&p.detail>1&&p.preventDefault()}},s],stateAttributesMapping:gn})}),Qs=m.forwardRef(function(t,n){const{render:r,id:i,className:o,match:s,...l}=t,u=Tn(i),{validityData:a,state:f,name:c}=Zt(!1),{setMessageIds:h}=en(),{errors:d}=Jn(),p=c?d[c]:null;let x=!1;p||s===!0?x=!0:s?x=!!a.state[s]:x=a.state.valid===!1,ge(()=>{if(!(!x||!u))return h(g=>g.concat(u)),()=>{h(g=>g.filter(y=>y!==u))}},[x,u,h]);const w=nt("div",t,{ref:n,state:f,props:[{id:u,children:p||(a.errors.length>1?m.createElement("ul",{},a.errors.map(g=>m.createElement("li",{key:g},g))):a.error)},l],stateAttributesMapping:gn});return x?w:null}),Js=m.forwardRef(function(t,n){const{render:r,id:i,className:o,...s}=t,l=Tn(i),u=Zt(!1),{setMessageIds:a}=en();return ge(()=>{if(l)return a(c=>c.concat(l)),()=>{a(c=>c.filter(h=>h!==l))}},[l,a]),nt("p",t,{ref:n,state:u.state,props:[{id:l},s],stateAttributesMapping:gn})}),Y1=m.forwardRef(function(t,n){const{render:r,className:i,id:o,name:s,value:l,disabled:u=!1,onValueChange:a,defaultValue:f,...c}=t,{state:h,name:d,disabled:p}=Zt(),x=p||u,w=d??s,g=m.useMemo(()=>({...h,disabled:x}),[h,x]),{setTouched:y,setDirty:v,validityData:k,setFocused:E,setFilled:C,validationMode:P,validation:L}=Zt(),{labelId:q}=en(),O=Nl({id:o});ge(()=>{const N=l!=null;L.inputRef.current?.value||N&&l!==""?C(!0):N&&l===""&&C(!1)},[L.inputRef,C,l]);const[z,_]=qn({controlled:l,default:f,name:"FieldControl",state:"value"}),B=l!==void 0,D=me((N,Y)=>{a?.(N,Y),!Y.isCanceled&&_(N)});return yo({id:O,name:w,commit:L.commit,value:z,getValue:()=>L.inputRef.current?.value,controlRef:L.inputRef}),nt("input",t,{ref:n,state:g,props:[{id:O,disabled:x,name:w,ref:L.inputRef,"aria-labelledby":q,...B?{value:z}:{defaultValue:f},onChange(N){const Y=N.currentTarget.value;D(Y,Te(kt,N.nativeEvent)),v(Y!==k.initialValue),C(Y!=="")},onFocus(){E(!0)},onBlur(N){y(!0),E(!1),P==="onBlur"&&L.commit(N.currentTarget.value)},onKeyDown(N){N.currentTarget.tagName==="INPUT"&&N.key==="Enter"&&(y(!0),L.commit(N.currentTarget.value))}},L.getInputValidationProps(),c],stateAttributesMapping:gn})}),Tu="w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-indigo-300 focus:outline-none focus:ring-2 focus:ring-indigo-300 disabled:text-gray-500 data-[invalid]:border-red-500 data-[invalid]:focus:border-red-500 data-[invalid]:focus:ring-red-500/20",X1=m.forwardRef(({label:e,error:t,hint:n,required:r,suggestions:i,...o},s)=>i!=null&&i.length>0?R.jsxs(Ys,{invalid:t!=null,children:[e!=null&&R.jsxs(Xs,{className:"block text-sm font-bold text-gray-700 mb-1.5",children:[e,r===!0&&R.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),R.jsxs(i1,{items:i,children:[R.jsx(g1,{ref:s,className:Tu,...o}),R.jsx(I1,{children:R.jsx(V1,{className:"z-50",sideOffset:4,style:{width:"var(--anchor-width)"},children:R.jsx(_1,{className:"rounded-lg border border-gray-200 bg-white shadow-lg overflow-hidden",children:R.jsx(S1,{className:"max-h-60 overflow-auto p-1",children:l=>R.jsx(H1,{value:l,className:"px-3 py-2 text-sm text-gray-900 rounded-md cursor-pointer data-[highlighted]:bg-indigo-50 data-[highlighted]:text-indigo-900 data-[selected]:font-medium",children:l},l)})})})})]}),n!=null&&t==null&&R.jsx(Js,{className:"mt-1.5 text-sm text-gray-500",children:n}),t!=null&&R.jsx(Qs,{className:"mt-1.5 text-sm text-red-600",children:t})]}):R.jsxs(Ys,{invalid:t!=null,children:[e!=null&&R.jsxs(Xs,{className:"block text-sm font-bold text-gray-700 mb-1.5",children:[e,r===!0&&R.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),R.jsx(Y1,{ref:s,className:Tu,...o}),n!=null&&t==null&&R.jsx(Js,{className:"mt-1.5 text-sm text-gray-500",children:n}),t!=null&&R.jsx(Qs,{className:"mt-1.5 text-sm text-red-600",children:t})]})),Ad=m.createContext(null),Td=m.createContext(null);function Ln(){const e=m.useContext(Ad);if(e===null)throw new Error(wt(60));return e}function Pd(){const e=m.useContext(Td);if(e===null)throw new Error(wt(61));return e}const Ne={id:ae(e=>e.id),modal:ae(e=>e.modal),multiple:ae(e=>e.multiple),items:ae(e=>e.items),itemToStringLabel:ae(e=>e.itemToStringLabel),itemToStringValue:ae(e=>e.itemToStringValue),isItemEqualToValue:ae(e=>e.isItemEqualToValue),value:ae(e=>e.value),open:ae(e=>e.open),mounted:ae(e=>e.mounted),forceMount:ae(e=>e.forceMount),transitionStatus:ae(e=>e.transitionStatus),openMethod:ae(e=>e.openMethod),activeIndex:ae(e=>e.activeIndex),selectedIndex:ae(e=>e.selectedIndex),isActive:ae((e,t)=>e.activeIndex===t),isSelected:ae((e,t,n)=>{const r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(o=>pn(o,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:pn(i,n,r)}),isSelectedByFocus:ae((e,t)=>e.selectedIndex===t),popupProps:ae(e=>e.popupProps),triggerProps:ae(e=>e.triggerProps),triggerElement:ae(e=>e.triggerElement),positionerElement:ae(e=>e.positionerElement),listElement:ae(e=>e.listElement),scrollUpArrowVisible:ae(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:ae(e=>e.scrollDownArrowVisible),hasScrollArrows:ae(e=>e.hasScrollArrows),serializedValue:ae(e=>{const{multiple:t,value:n,itemToStringValue:r}=e;return t&&Array.isArray(n)&&n.length===0?"":Xt(n,r)})};function Q1(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:o,defaultOpen:s=!1,onOpenChange:l,name:u,disabled:a=!1,readOnly:f=!1,required:c=!1,modal:h=!0,actionsRef:d,inputRef:p,onOpenChangeComplete:x,items:w,multiple:g=!1,itemToStringLabel:y,itemToStringValue:v,isItemEqualToValue:k=ad,highlightItemOnHover:E=!0,children:C}=e,{clearErrors:P}=Jn(),{setDirty:L,shouldValidateOnChange:q,validityData:O,setFilled:z,name:_,disabled:B,validation:D}=Zt(),{controlId:A}=en(),N=Nl({id:t}),Y=B||a,$=_??u,[K,S]=qn({controlled:n,default:g?r??wn:r,name:"Select",state:"value"}),[Z,be]=qn({controlled:o,default:s,name:"Select",state:"open"}),I=m.useRef([]),fe=m.useRef([]),le=m.useRef(null),X=m.useRef(null),ue=m.useRef(0),ie=m.useRef(null),we=m.useRef([]),Q=m.useRef(!1),H=m.useRef(!1),se=m.useRef(null),ne=m.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Ae=m.useRef(!1),{mounted:ee,setMounted:G,transitionStatus:oe}=wo(Z),{openMethod:Ee,triggerProps:ye,reset:xe}=hd(Z),b=Wt(()=>new Wn({id:N,modal:h,multiple:g,itemToStringLabel:y,itemToStringValue:v,isItemEqualToValue:k,value:K,open:Z,mounted:ee,transitionStatus:oe,items:w,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,M=te(b,Ne.activeIndex),F=te(b,Ne.selectedIndex),U=te(b,Ne.triggerElement),j=te(b,Ne.positionerElement),T=m.useMemo(()=>g&&Array.isArray(K)&&K.length===0?"":Xt(K,v),[g,K,v]),V=m.useMemo(()=>g&&Array.isArray(K)?K.map(je=>Xt(je,v)):Xt(K,v),[g,K,v]),W=dt(b.state.triggerElement);yo({id:N,commit:D.commit,value:K,controlRef:W,name:$,getValue:()=>V});const J=m.useRef(K);ge(()=>{K!==J.current&&b.set("forceMount",!0)},[b,K]),ge(()=>{z(K!==null)},[K,z]),ge(function(){if(Z)return;const Ue=we.current;if(g){const Qe=Array.isArray(K)?K:[];if(Qe.length===0){b.set("selectedIndex",null);return}const Se=Qe[Qe.length-1],Mt=wr(Ue,Se,k);b.set("selectedIndex",Mt===-1?null:Mt);return}const ht=wr(Ue,K,k);b.set("selectedIndex",ht===-1?null:ht)},[g,Z,K,we,k,b]),lr(K,()=>{P($),L(K!==O.initialValue),q()?D.commit(K):D.commit(K,!0)});const he=me((je,Ue)=>{if(l?.(je,Ue),!Ue.isCanceled&&(be(je),!je&&b.state.activeIndex!==null)){const ht=I.current[b.state.activeIndex];queueMicrotask(()=>{ht?.setAttribute("tabindex","-1")})}}),Pe=me(()=>{G(!1),b.set("activeIndex",null),xe(),x?.(!1)});Sr({enabled:!d,open:Z,ref:le,onComplete(){Z||Pe()}}),m.useImperativeHandle(d,()=>({unmount:Pe}),[Pe]);const Oe=me((je,Ue)=>{i?.(je,Ue),!Ue.isCanceled&&S(je)}),ke=me(()=>{const je=b.state.listElement||le.current;if(!je)return;const Ue=je.scrollTop,ht=je.scrollTop+je.clientHeight,Qe=Ue>1,Se=ht<je.scrollHeight-1;b.state.scrollUpArrowVisible!==Qe&&b.set("scrollUpArrowVisible",Qe),b.state.scrollDownArrowVisible!==Se&&b.set("scrollDownArrowVisible",Se)}),de=Dl({open:Z,onOpenChange:he,elements:{reference:U,floating:j}}),He=Wf(de,{enabled:!f&&!Y,event:"mousedown"}),Be=td(de,{bubbles:!1}),De=rd(de,{enabled:!f&&!Y,listRef:I,activeIndex:M,selectedIndex:F,disabledIndices:wn,onNavigate(je){je===null&&!Z||b.set("activeIndex",je)},focusItemOnHover:!1}),Me=Yk(de,{enabled:!f&&!Y&&(Z||!g),listRef:fe,activeIndex:M,selectedIndex:F,onMatch(je){Z?b.set("activeIndex",je):Oe(we.current[je],Te("none"))},onTypingChange(je){Q.current=je}}),{getReferenceProps:rt,getFloatingProps:Ve,getItemProps:Pt}=nd([He,Be,De,Me]),tt=m.useMemo(()=>Rn(rt(),ye),[rt,ye]);xf(()=>{b.update({popupProps:Ve(),triggerProps:tt})}),ge(()=>{b.update({id:N,modal:h,multiple:g,value:K,open:Z,mounted:ee,transitionStatus:oe,popupProps:Ve(),triggerProps:tt,items:w,itemToStringLabel:y,itemToStringValue:v,isItemEqualToValue:k,openMethod:Ee})},[b,N,h,g,K,Z,ee,oe,Ve,tt,w,y,v,k,Ee]);const qe=m.useMemo(()=>({store:b,name:$,required:c,disabled:Y,readOnly:f,multiple:g,itemToStringLabel:y,itemToStringValue:v,highlightItemOnHover:E,setValue:Oe,setOpen:he,listRef:I,popupRef:le,scrollHandlerRef:X,handleScrollArrowVisibility:ke,scrollArrowsMountedCountRef:ue,getItemProps:Pt,events:de.context.events,valueRef:ie,valuesRef:we,labelsRef:fe,typingRef:Q,selectionRef:ne,selectedItemTextRef:se,validation:D,onOpenChangeComplete:x,keyboardActiveRef:H,alignItemWithTriggerActiveRef:Ae,initialValueRef:J}),[b,$,c,Y,f,g,y,v,E,Oe,he,Pt,de.context.events,D,x,ke]),Ot=An(p,D.inputRef),ln=g&&Array.isArray(K)&&K.length>0,Kt=m.useMemo(()=>!g||!Array.isArray(K)||!$?null:K.map(je=>{const Ue=Xt(je,v);return R.jsx("input",{type:"hidden",name:$,value:Ue},Ue)}),[g,K,$,v]);return R.jsx(Ad.Provider,{value:qe,children:R.jsxs(Td.Provider,{value:de,children:[C,R.jsx("input",{...D.getInputValidationProps({onFocus(){b.state.triggerElement?.focus()},onChange(je){if(je.nativeEvent.defaultPrevented)return;const Ue=je.target.value,ht=Te(kt,je.nativeEvent);function Qe(){if(g)return;const Se=we.current.find(Mt=>Xt(Mt,v).toLowerCase()===Ue.toLowerCase());Se!=null&&(L(Se!==O.initialValue),Oe(Se,ht),q()&&D.commit(Se))}b.set("forceMount",!0),queueMicrotask(Qe)}}),id:t||A||void 0,name:g?void 0:$,value:T,disabled:Y,required:c&&!ln,readOnly:f,ref:Ot,style:ri,tabIndex:-1,"aria-hidden":!0}),Kt]})})}const Si=2,J1={...md,...gn,value:()=>null},Z1=m.forwardRef(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:s=!0,...l}=t,{setTouched:u,setFocused:a,validationMode:f,state:c,disabled:h}=Zt(),{labelId:d}=en(),{store:p,setOpen:x,selectionRef:w,validation:g,readOnly:y,alignItemWithTriggerActiveRef:v,disabled:k,keyboardActiveRef:E}=Ln(),C=h||k||o,P=te(p,Ne.open),L=te(p,Ne.value),q=te(p,Ne.triggerProps),O=te(p,Ne.positionerElement),z=te(p,Ne.listElement),_=te(p,Ne.serializedValue),B=dt(O),D=m.useRef(null),A=Nt(),N=Nt(),{getButtonProps:Y,buttonRef:$}=ei({disabled:C,native:s}),K=me(X=>{p.set("triggerElement",X)}),S=An(n,D,$,K),Z=Nt(),be=Nt();m.useEffect(()=>{if(P)return be.start(200,()=>{w.current.allowUnselectedMouseUp=!0,Z.start(200,()=>{w.current.allowSelectedMouseUp=!0})}),()=>{Z.clear(),be.clear()};w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},N.clear()},[P,w,N,Z,be]);const I=m.useMemo(()=>z?.id??Hi(O)?.id,[z,O]),fe=Rn(q,{role:"combobox","aria-expanded":P?"true":"false","aria-haspopup":"listbox","aria-controls":P?I:void 0,"aria-labelledby":d,"aria-readonly":y||void 0,tabIndex:C?-1:0,ref:S,onFocus(X){a(!0),P&&v.current&&x(!1,Te(xo,X.nativeEvent)),A.start(0,()=>{p.set("forceMount",!0)})},onBlur(){u(!0),a(!1),f==="onBlur"&&g.commit(L)},onPointerMove(){E.current=!1},onKeyDown(){E.current=!0},onMouseDown(X){if(P)return;const ue=Pn(X.currentTarget);function ie(we){if(!D.current)return;const Q=we.target;if(We(D.current,Q)||We(B.current,Q)||Q===D.current)return;const H=f1(D.current);we.clientX>=H.left-Si&&we.clientX<=H.right+Si&&we.clientY>=H.top-Si&&we.clientY<=H.bottom+Si||x(!1,Te(C0,we))}N.start(0,()=>{ue.addEventListener("mouseup",ie,{once:!0})})}},g.getValidationProps,l,Y);fe.role="combobox";const le=m.useMemo(()=>({...c,open:P,disabled:C,value:L,readOnly:y,placeholder:!_}),[c,P,C,L,y,_]);return nt("button",t,{ref:[n,D],state:le,stateAttributesMapping:J1,props:fe})}),eC={value:()=>null},tC=m.forwardRef(function(t,n){const{className:r,render:i,children:o,...s}=t,{store:l,valueRef:u}=Ln(),a=te(l,Ne.value),f=te(l,Ne.items),c=te(l,Ne.itemToStringLabel),h=te(l,Ne.serializedValue),d=m.useMemo(()=>({value:a,placeholder:!h}),[a,h]),p=typeof o=="function"?o(a):o??(Array.isArray(a)?Jk(a,c):Qk(a,f,c));return nt("span",t,{state:d,ref:[n,u],props:[{children:p},s],stateAttributesMapping:eC})}),nC=m.forwardRef(function(t,n){const{className:r,render:i,...o}=t,{store:s}=Ln(),l=te(s,Ne.open),u=m.useMemo(()=>({open:l}),[l]);return nt("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},o],stateAttributesMapping:c1})}),rC=m.createContext(void 0),iC=m.forwardRef(function(t,n){const{store:r}=Ln(),i=te(r,Ne.mounted),o=te(r,Ne.forceMount);return i||o?R.jsx(rC.Provider,{value:!0,children:R.jsx($f,{ref:n,...t})}):null}),Od=m.createContext(void 0);function oC(){const e=m.useContext(Od);if(!e)throw new Error(wt(59));return e}function Ji(e,t){e&&Object.assign(e.style,t)}const sC={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},lC={position:"fixed"},aC=m.forwardRef(function(t,n){const{anchor:r,positionMethod:i="absolute",className:o,render:s,side:l="bottom",align:u="center",sideOffset:a=0,alignOffset:f=0,collisionBoundary:c="clipping-ancestors",collisionPadding:h,arrowPadding:d=5,sticky:p=!1,disableAnchorTracking:x,alignItemWithTrigger:w=!0,collisionAvoidance:g=Gc,...y}=t,{store:v,listRef:k,labelsRef:E,alignItemWithTriggerActiveRef:C,selectedItemTextRef:P,valuesRef:L,initialValueRef:q,popupRef:O,setValue:z}=Ln(),_=Pd(),B=te(v,Ne.open),D=te(v,Ne.mounted),A=te(v,Ne.modal),N=te(v,Ne.value),Y=te(v,Ne.openMethod),$=te(v,Ne.positionerElement),K=te(v,Ne.triggerElement),S=te(v,Ne.isItemEqualToValue),Z=m.useRef(null),be=m.useRef(null),[I,fe]=m.useState(w),le=D&&I&&Y!=="touch";!D&&I!==w&&fe(w),ge(()=>{D||(Ne.scrollUpArrowVisible(v.state)&&v.set("scrollUpArrowVisible",!1),Ne.scrollDownArrowVisible(v.state)&&v.set("scrollDownArrowVisible",!1))},[v,D]),m.useImperativeHandle(C,()=>le),kd((le||A)&&B&&Y!=="touch",K);const X=Sd({anchor:r,floatingRootContext:_,positionMethod:i,mounted:D,side:l,sideOffset:a,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:c,collisionPadding:h,sticky:p,disableAnchorTracking:x??le,collisionAvoidance:g,keepMounted:!0}),ue=le?"none":X.side,ie=le?lC:X.positionerStyles,we=m.useMemo(()=>{const G={};return B||(G.pointerEvents="none"),{role:"presentation",hidden:!D,style:{...ie,...G}}},[B,D,ie]),Q=m.useMemo(()=>({open:B,side:ue,align:X.align,anchorHidden:X.anchorHidden}),[B,ue,X.align,X.anchorHidden]),H=me(G=>{v.set("positionerElement",G)}),se=nt("div",t,{ref:[n,H],state:Q,stateAttributesMapping:Io,props:[we,y]}),ne=m.useRef(0),Ae=me(G=>{if(G.size===0&&ne.current===0||L.current.length===0)return;const oe=ne.current;if(ne.current=G.size,G.size===oe)return;const Ee=Te(kt);if(oe!==0&&!v.state.multiple&&N!==null&&wr(L.current,N,S)===-1){const xe=q.current,M=xe!=null&&$n(L.current,xe,S)?xe:null;z(M,Ee),M===null&&(v.set("selectedIndex",null),P.current=null)}if(oe!==0&&v.state.multiple&&Array.isArray(N)){const ye=N.filter(xe=>$n(L.current,xe,S));(ye.length!==N.length||ye.some(xe=>!$n(N,xe,S)))&&(z(ye,Ee),ye.length===0&&(v.set("selectedIndex",null),P.current=null))}if(B&&le){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ye={height:""};Ji($,ye),Ji(O.current,ye)}}),ee=m.useMemo(()=>({...X,side:ue,alignItemWithTriggerActive:le,setControlledAlignItemWithTrigger:fe,scrollUpArrowRef:Z,scrollDownArrowRef:be}),[X,ue,le,fe]);return R.jsx(bd,{elementsRef:k,labelsRef:E,onMapChange:Ae,children:R.jsxs(Od.Provider,{value:ee,children:[D&&A&&R.jsx(Ed,{inert:vd(!B),cutout:K}),se]})})});function Md(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const Ei="base-ui-disable-scrollbar",Pu={className:Ei,element:R.jsx("style",{href:Ei,precedence:"base-ui:low",children:`.${Ei}{scrollbar-width:none}.${Ei}::-webkit-scrollbar{display:none}`})},uC=m.createContext(void 0);function cC(e){return m.useContext(uC)}const Fd="ArrowUp",Ld="ArrowDown",Dd="ArrowLeft",Vd="ArrowRight",Nd="Home",_d="End",fC=new Set([Dd,Vd]),dC=new Set([Fd,Ld]),hC=new Set([...fC,...dC]);[...hC];const pC=new Set([Fd,Ld,Dd,Vd,Nd,_d]),mC={...Io,...vo},gC=m.forwardRef(function(t,n){const{render:r,className:i,...o}=t,{store:s,popupRef:l,onOpenChangeComplete:u,setOpen:a,valueRef:f,selectedItemTextRef:c,keyboardActiveRef:h,multiple:d,handleScrollArrowVisibility:p,scrollHandlerRef:x}=Ln(),{side:w,align:g,alignItemWithTriggerActive:y,setControlledAlignItemWithTrigger:v,scrollDownArrowRef:k,scrollUpArrowRef:E}=oC(),C=cC()!=null,P=Pd(),L=Nt(),q=te(s,Ne.id),O=te(s,Ne.open),z=te(s,Ne.mounted),_=te(s,Ne.popupProps),B=te(s,Ne.transitionStatus),D=te(s,Ne.triggerElement),A=te(s,Ne.positionerElement),N=te(s,Ne.listElement),Y=m.useRef(0),$=m.useRef(!1),K=m.useRef(0),S=m.useRef(!1),Z=m.useRef({}),be=bo(),I=me(ue=>{if(!A||!l.current||!S.current)return;if($.current||!y){p();return}const ie=A.style.top==="0px",we=A.style.bottom==="0px",Q=A.getBoundingClientRect().height,H=Pn(A),se=getComputedStyle(A),ne=parseFloat(se.marginTop),Ae=parseFloat(se.marginBottom),ee=H.documentElement.clientHeight-ne-Ae,G=ue.scrollTop,oe=ue.scrollHeight,Ee=ue.clientHeight,ye=oe-Ee;let xe=null,b=null,M=!1;if(ie){const F=ye-G,U=Q+F,j=Math.min(U,ee);xe=j,j!==ee?b=ye:M=!0}else if(we){const F=G-0,U=Q+F,j=Math.min(U,ee),T=U-ee;xe=j,j!==ee?b=0:(M=!0,G<ye&&(b=G-(F-T)))}xe!=null&&(A.style.height=`${xe}px`),b!=null&&(ue.scrollTop=b),M&&($.current=!0),p()});m.useImperativeHandle(x,()=>I,[I]),Sr({open:O,ref:l,onComplete(){O&&u?.(!0)}});const fe=m.useMemo(()=>({open:O,transitionStatus:B,side:w,align:g}),[O,B,w,g]);ge(()=>{!A||!l.current||Object.keys(Z.current).length||(Z.current={top:A.style.top||"0",left:A.style.left||"0",right:A.style.right,height:A.style.height,bottom:A.style.bottom,minHeight:A.style.minHeight,maxHeight:A.style.maxHeight,marginTop:A.style.marginTop,marginBottom:A.style.marginBottom})},[l,A]),ge(()=>{z||y||(S.current=!1,$.current=!1,Y.current=0,K.current=0,Ji(A,Z.current))},[z,y,A,l]),ge(()=>{const ue=l.current;if(!(!z||!D||!A||!ue)){if(!y){S.current=!0,be.request(p);return}queueMicrotask(()=>{const ie=getComputedStyle(A),we=getComputedStyle(ue),Q=Pn(D),H=ft(A),se=D.getBoundingClientRect(),ne=A.getBoundingClientRect(),Ae=se.left,ee=se.height,G=N||ue,oe=G.scrollHeight,Ee=parseFloat(we.borderBottomWidth),ye=parseFloat(ie.marginTop)||10,xe=parseFloat(ie.marginBottom)||10,b=parseFloat(ie.minHeight)||100,M=5,F=5,U=20,j=Q.documentElement.clientHeight-ye-xe,T=Q.documentElement.clientWidth,V=j-se.bottom+ee,W=c.current,J=f.current;let he=0,Pe=0;if(W&&J){const qe=J.getBoundingClientRect(),Ot=W.getBoundingClientRect(),ln=qe.left-Ae,Kt=Ot.left-ne.left,je=qe.top-se.top+qe.height/2,Ue=Ot.top-ne.top+Ot.height/2;he=ln-Kt,Pe=Ue-je}const Oe=V+Pe+xe+Ee;let ke=Math.min(j,Oe);const de=j-ye-xe,He=Oe-ke,Be=Math.max(M,Ae+he),De=T-F,Me=Math.max(0,Be+ne.width-De);A.style.left=`${Be-Me}px`,A.style.height=`${ke}px`,A.style.maxHeight="auto",A.style.marginTop=`${ye}px`,A.style.marginBottom=`${xe}px`,ue.style.height="100%";const rt=G.scrollHeight-G.clientHeight,Ve=He>=rt;Ve&&(ke=Math.min(j,ne.height)-(He-rt));const Pt=se.top<U||se.bottom>j-U||ke<Math.min(oe,b),tt=(H.visualViewport?.scale??1)!==1&&kf;if(Pt||tt){S.current=!0,Ji(A,Z.current),In.flushSync(()=>v(!1));return}if(Ve){const qe=Math.max(0,j-Oe);A.style.top=ne.height>=de?"0":`${qe}px`,A.style.height=`${ke}px`,G.scrollTop=G.scrollHeight-G.clientHeight,Y.current=Math.max(b,ke)}else A.style.bottom="0",Y.current=Math.max(b,ke),G.scrollTop=He;Y.current===j&&($.current=!0),p(),setTimeout(()=>{S.current=!0})})}},[s,z,A,D,f,c,l,p,y,v,be,k,E,N]),m.useEffect(()=>{if(!y||!A||!z)return;const ue=ft(A);function ie(we){a(!1,Te(S0,we))}return ue.addEventListener("resize",ie),()=>{ue.removeEventListener("resize",ie)}},[a,y,A,z]);const le={...N?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":d||void 0,id:`${q}-list`},onKeyDown(ue){h.current=!0,C&&pC.has(ue.key)&&ue.stopPropagation()},onMouseMove(){h.current=!1},onPointerLeave(ue){if(Md(ue)||ue.pointerType==="touch")return;const ie=ue.currentTarget;L.start(0,()=>{s.set("activeIndex",null),ie.focus({preventScroll:!0})})},onScroll(ue){N||x.current?.(ue.currentTarget)},...y&&{style:N?{height:"100%"}:sC}},X=nt("div",t,{ref:[n,l],state:fe,stateAttributesMapping:mC,props:[_,le,Id(B),{className:!N&&y?Pu.className:void 0},o]});return R.jsxs(m.Fragment,{children:[Pu.element,R.jsx(qf,{context:P,modal:!1,disabled:!z,restoreFocus:!0,children:X})]})}),jd=m.createContext(void 0);function Bl(){const e=m.useContext(jd);if(!e)throw new Error(wt(57));return e}const yC=m.memo(m.forwardRef(function(t,n){const{render:r,className:i,value:o=null,label:s,disabled:l=!1,nativeButton:u=!1,...a}=t,f=m.useRef(null),c=Rd({label:s,textRef:f,indexGuessBehavior:zl.GuessFromOrder}),{store:h,getItemProps:d,setOpen:p,setValue:x,selectionRef:w,typingRef:g,valuesRef:y,keyboardActiveRef:v,multiple:k,highlightItemOnHover:E}=Ln(),C=Nt(),P=te(h,Ne.isActive,c.index),L=te(h,Ne.isSelected,c.index,o),q=te(h,Ne.isSelectedByFocus,c.index),O=te(h,Ne.isItemEqualToValue),z=c.index,_=z!==-1,B=m.useRef(null),D=dt(z);ge(()=>{if(!_)return;const X=y.current;return X[z]=o,()=>{delete X[z]}},[_,z,o,y]),ge(()=>{if(!_)return;const X=h.state.value;let ue=X;k&&Array.isArray(X)&&X.length>0&&(ue=X[X.length-1]),ue!==void 0&&pn(ue,o,O)&&h.set("selectedIndex",z)},[_,z,k,O,h,o]);const A=m.useMemo(()=>({disabled:l,selected:L,highlighted:P}),[l,L,P]),N=d({active:P,selected:L});N.onFocus=void 0,N.id=void 0;const Y=m.useRef(null),$=m.useRef("mouse"),K=m.useRef(!1),{getButtonProps:S,buttonRef:Z}=ei({disabled:l,focusableWhenDisabled:!0,native:u});function be(X){const ue=h.state.value;if(k){const ie=Array.isArray(ue)?ue:[],we=L?ud(ie,o,O):[...ie,o];x(we,Te(Ri,X))}else x(o,Te(Ri,X)),p(!1,Te(Ri,X))}const I={role:"option","aria-selected":L,"aria-disabled":l||void 0,tabIndex:P?0:-1,onFocus(){h.set("activeIndex",z)},onMouseEnter(){!v.current&&h.state.selectedIndex===null&&h.set("activeIndex",z)},onMouseMove(){E&&h.set("activeIndex",z)},onMouseLeave(X){!E||v.current||Md(X)||C.start(0,()=>{h.state.activeIndex===z&&h.set("activeIndex",null)})},onTouchStart(){w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(X){Y.current=X.key,h.set("activeIndex",z)},onClick(X){K.current=!1,!(X.type==="keydown"&&Y.current===null)&&(l||Y.current===" "&&g.current||$.current!=="touch"&&!P||(Y.current=null,be(X.nativeEvent)))},onPointerEnter(X){$.current=X.pointerType},onPointerDown(X){$.current=X.pointerType,K.current=!0},onMouseUp(X){if(l)return;if(K.current){K.current=!1;return}const ue=!w.current.allowSelectedMouseUp&&L,ie=!w.current.allowUnselectedMouseUp&&!L;ue||ie||$.current!=="touch"&&!P||be(X.nativeEvent)}},fe=nt("div",t,{ref:[Z,n,c.ref,B],state:A,props:[N,I,a,S]}),le=m.useMemo(()=>({selected:L,indexRef:D,textRef:f,selectedByFocus:q,hasRegistered:_}),[L,D,f,q,_]);return R.jsx(jd.Provider,{value:le,children:fe})})),xC=m.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:i}=Bl();return r||i?R.jsx(bC,{...t,ref:n}):null}),bC=m.memo(m.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:i,...o}=e,{selected:s}=Bl(),l=m.useRef(null),{transitionStatus:u,setMounted:a}=wo(s),f=m.useMemo(()=>({selected:s,transitionStatus:u}),[s,u]),c=nt("span",e,{ref:[t,l],state:f,props:[{"aria-hidden":!0,children:"✔️"},o],stateAttributesMapping:vo});return Sr({open:s,ref:l,onComplete(){s||a(!1)}}),c})),wC=m.memo(m.forwardRef(function(t,n){const{indexRef:r,textRef:i,selectedByFocus:o,hasRegistered:s}=Bl(),{selectedItemTextRef:l}=Ln(),{className:u,render:a,...f}=t,c=m.useCallback(d=>{if(!d||!s)return;const p=l.current===null||!l.current.isConnected;(o||p&&r.current===0)&&(l.current=d)},[l,r,o,s]);return nt("div",t,{ref:[c,n,i],props:f})})),vC=({label:e,options:t,value:n,onValueChange:r,placeholder:i="選択してください",error:o,required:s})=>R.jsxs("div",{className:"flex flex-col gap-1.5",children:[e!=null&&R.jsxs("span",{className:"text-sm font-bold text-gray-700",children:[e,s===!0&&R.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),R.jsxs(Q1,{value:n,onValueChange:r,children:[R.jsxs(Z1,{className:`flex items-center justify-between w-full rounded-lg border bg-gray-50 px-3 py-2 text-sm text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-300 cursor-pointer ${o!=null?"border-red-500":"border-gray-200 focus:border-indigo-300"}`,children:[R.jsx(tC,{children:l=>l==null?R.jsx("span",{className:"text-gray-400",children:i}):t.find(a=>a.value===l)?.label??l}),R.jsx(nC,{className:"text-gray-400",children:R.jsx(Eh,{})})]}),R.jsx(iC,{children:R.jsx(aC,{children:R.jsx(gC,{className:"z-50 min-w-[var(--anchor-width)] rounded-lg border border-gray-200 bg-white p-1",children:t.map(l=>R.jsxs(yC,{className:"flex items-center rounded-md px-3 py-2 text-sm text-gray-900 outline-none cursor-pointer hover:bg-gray-100 data-[highlighted]:bg-gray-100 data-[selected]:bg-indigo-50 data-[selected]:text-indigo-500",value:l.value,children:[R.jsx(xC,{className:"mr-2",children:R.jsx(Zs,{})}),R.jsx(wC,{children:l.label})]},l.value))})})})]}),o!=null&&R.jsx("p",{className:"text-sm text-red-600",children:o})]}),kC=m.forwardRef(({label:e,error:t,hint:n,required:r,...i},o)=>R.jsxs(Ys,{invalid:t!=null,children:[e!=null&&R.jsxs(Xs,{className:"block text-sm font-bold text-gray-700 mb-1.5",children:[e,r===!0&&R.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),R.jsx("textarea",{ref:o,className:`w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-indigo-300 focus:outline-none focus:ring-2 focus:ring-indigo-300 disabled:text-gray-500 resize-y min-h-[80px] ${t!=null?"border-red-500 focus:border-red-500 focus:ring-red-500/20":""}`,...i}),n!=null&&t==null&&R.jsx(Js,{className:"mt-1.5 text-sm text-gray-500",children:n}),t!=null&&R.jsx(Qs,{className:"mt-1.5 text-sm text-red-600",children:t})]})),CC=({field:e,value:t,onValueChange:n})=>{const r=m.useCallback(i=>{n(i??"")},[n]);return R.jsx(vC,{label:e.label,options:e.options,placeholder:e.placeholder,required:e.required,value:t,onValueChange:r})},SC=({field:e,checked:t,onCheckedChange:n})=>R.jsx(L0,{checked:t,label:e.label,required:e.required,onCheckedChange:n}),Hl=({field:e,namePrefix:t=""})=>{const{register:n,control:r}=ni(),i=o=>t?`${t}.${o}`:o;switch(e.type){case"input":return R.jsx(X1,{...n(i(e.id)),label:e.label,placeholder:e.placeholder,required:e.required,suggestions:e.suggestions,type:e.inputType});case"textarea":return R.jsx(kC,{...n(i(e.id)),label:e.label,placeholder:e.placeholder,required:e.required,rows:e.rows});case"select":return R.jsx(ja,{control:r,name:i(e.id),render:({field:o})=>R.jsx(CC,{field:e,value:o.value??"",onValueChange:o.onChange})});case"checkbox":return R.jsx(ja,{control:r,name:i(e.id),render:({field:o})=>R.jsx(SC,{checked:o.value??!1,field:e,onCheckedChange:o.onChange})});case"grid":return R.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${e.columns}, 1fr)`},children:e.fields.map(o=>R.jsx(Hl,{field:o,namePrefix:t},"id"in o?o.id:o.type))});default:return null}},EC=({index:e,fields:t,canRemove:n,onRemove:r})=>{const i=`items.${e}`,o=m.useCallback(()=>{r(e)},[e,r]);return R.jsxs("div",{className:"space-y-6 pb-6 border-b border-gray-200 last:border-b-0 last:pb-0",children:[R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsxs("span",{className:"text-base font-medium text-gray-900",children:["#",e+1]}),R.jsx(co,{type:"button",variant:"outline",size:"icon",disabled:!n,onClick:o,children:R.jsx(kh,{})})]}),t.map(s=>R.jsx(Hl,{field:s,namePrefix:i},"id"in s?s.id:s.type))]})},zC=({step:e,formKey:t})=>{const{_:n}=Yn(),r=e.section,{sectionValue:i,updateSectionValue:o}=cf({formKey:t,section:r}),s=r.minFieldCount??0,l=i,u=l.length>=s?l:[...l,...Array.from({length:s-l.length},()=>({}))],a=af({defaultValues:{items:u}}),{control:f}=a,{fields:c,append:h,remove:d}=u0({control:f,name:"items"}),p=Sl({control:f,name:"items"});m.useEffect(()=>{p&&o(p)},[p,o]);const x=c.length>s,w=m.useCallback(()=>{h({})},[h]),g=m.useCallback(v=>{v.preventDefault()},[]),y=m.useCallback(v=>{d(v)},[d]);return R.jsxs("div",{className:"rounded-xl bg-white border border-gray-100",children:[R.jsxs("div",{className:"px-6 pt-6",children:[R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:e.title}),R.jsxs(co,{type:"button",variant:"outline",size:"sm",onClick:w,children:[R.jsx(bh,{}),n({id:"m16xKo"})]})]}),R.jsx("p",{className:"mt-4 text-sm text-gray-500",children:e.description})]}),R.jsx("hr",{className:"mx-6 mt-4 border-gray-200"}),R.jsx(Jc,{...a,children:R.jsx("form",{className:"p-6 space-y-6",onSubmit:g,children:c.length===0?R.jsx("p",{className:"text-sm text-gray-500 text-center py-4",children:n({id:"W/yZH3"})}):c.map((v,k)=>R.jsx(EC,{fields:r.fields,index:k,canRemove:x,onRemove:y},v.id))})})]})},IC=(e,t,n)=>e==="error"?{className:"bg-amber-500 text-white",content:R.jsx(Nu,{})}:e==="success"?{className:"bg-green-500 text-white",content:R.jsx(Zs,{})}:t?{className:"bg-indigo-500 text-white",content:R.jsx("span",{className:"text-sm font-medium",children:n})}:{className:"bg-gray-100 text-gray-600",content:R.jsx("span",{className:"text-sm font-medium",children:n})},BC=({scenarioName:e,isOpen:t,onClose:n,items:r,onItemClick:i})=>{const{_:o}=Yn(),s=m.useMemo(()=>r.map(u=>IC(u.status,u.selected,u.step)),[r]),l=m.useCallback(()=>{i(),n()},[i,n]);return R.jsx(mr,{children:t&&R.jsxs(R.Fragment,{children:[R.jsx(Qt.div,{className:"fixed inset-0 bg-black/50 z-40 xl:hidden",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},onClick:n}),R.jsxs(Qt.aside,{className:"fixed top-0 left-0 bottom-0 w-80 max-w-full bg-white z-50 flex flex-col overflow-y-auto xl:hidden",initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"},transition:{duration:.3,ease:"easeInOut"},children:[R.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200",children:[R.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"Spec Snake Beta"}),R.jsx("button",{"aria-label":o({id:"vcpc5o"}),className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors cursor-pointer *:size-5",type:"button",onClick:n,children:R.jsx(_u,{})})]}),R.jsxs("div",{className:"p-4 flex-1",children:[R.jsx("div",{className:"mb-4",children:R.jsx("h2",{className:"text-base font-semibold text-gray-900",children:e})}),R.jsx("nav",{"aria-label":o({id:"hUe0iX"}),className:"space-y-2",children:r.map((u,a)=>{const f=s[a];return f==null?null:R.jsxs(Oi,{"aria-current":u.selected?"step":void 0,className:`flex items-start gap-3 p-4 rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-300 focus-visible:ring-offset-2 ${u.selected?"bg-indigo-50 border border-indigo-200":"hover:bg-gray-50 border border-transparent"}`,to:u.to,onClick:l,children:[R.jsx("div",{className:`flex items-center justify-center w-8 h-8 rounded-full ${f.className}`,children:f.content}),R.jsxs("div",{className:"flex-1 min-w-0",children:[R.jsx("div",{className:`font-medium ${u.selected?"text-indigo-900":"text-gray-900"}`,children:u.title}),R.jsx("div",{className:"text-sm text-gray-500 truncate",children:u.description})]})]},u.to)})})]})]})]})})},HC=({step:e,formKey:t})=>{const n=e.section,{sectionValue:r,updateSectionValue:i}=cf({formKey:t,section:n}),o=af({defaultValues:r}),s=Sl({control:o.control});m.useEffect(()=>{i(s)},[s,i]);const l=m.useCallback(u=>{u.preventDefault()},[]);return R.jsxs("div",{className:"rounded-xl bg-white border border-gray-100",children:[R.jsxs("div",{className:"px-6 pt-6",children:[R.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:e.title}),R.jsx("p",{className:"mt-4 text-sm text-gray-500",children:e.description})]}),R.jsx("hr",{className:"mx-6 mt-4 border-gray-200"}),R.jsx(Jc,{...o,children:R.jsx("form",{className:"p-6 space-y-6",onSubmit:l,children:n.fields.map(u=>R.jsx(Hl,{field:u,namePrefix:""},"id"in u?u.id:u.type))})})]})},RC=(e,t,n)=>e==="error"?{bgClassName:"bg-amber-500",textClassName:"text-white",content:R.jsx(Nu,{}),shouldAnimate:!0}:e==="success"?{bgClassName:"bg-green-500",textClassName:"text-white",content:R.jsx(Zs,{}),shouldAnimate:!0}:t?{bgClassName:"bg-indigo-500",textClassName:"text-white",content:R.jsx("span",{className:"text-sm font-medium",children:n}),shouldAnimate:!1}:{bgClassName:"bg-gray-100",textClassName:"text-gray-600",content:R.jsx("span",{className:"text-sm font-medium",children:n}),shouldAnimate:!1},AC=({iconStyle:e,status:t,shrink:n})=>R.jsxs("div",{className:`relative flex items-center justify-center w-8 h-8 rounded-full ${n?"shrink-0":""} ${e.textClassName}`,children:[R.jsx(mr,{mode:"wait",children:R.jsx(Qt.div,{className:`absolute inset-0 rounded-full ${e.bgClassName}`,initial:e.shouldAnimate?{scale:0}:!1,animate:{scale:1},transition:{duration:.3,ease:[.34,1.56,.64,1]}},t)}),R.jsx(Qt.div,{className:"relative z-10",initial:e.shouldAnimate?{scale:0,opacity:0}:!1,animate:{scale:1,opacity:1},transition:{duration:.2,delay:e.shouldAnimate?.15:0},children:e.content},`content-${t}`)]}),UC=({scenarioName:e,items:t,isCollapsed:n,onItemClick:r,onToggleCollapse:i})=>{const{_:o}=Yn(),s=m.useMemo(()=>t.map(l=>RC(l.status,l.selected,l.step)),[t]);return R.jsxs(Qt.aside,{className:"hidden xl:flex shrink-0 bg-white rounded-2xl border border-gray-100 flex-col overflow-hidden sticky top-8 h-[calc(100vh-64px-56px-24px)] self-start",initial:!1,animate:{width:n?64:320},transition:{duration:.3,ease:"easeInOut"},children:[R.jsxs("div",{className:`flex-1 overflow-y-auto ${n?"p-2":"p-6"}`,children:[R.jsx(mr,{mode:"popLayout",children:!n&&R.jsx(Qt.div,{className:"mb-4 pb-4 border-b border-gray-200",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:R.jsx("h2",{className:"text-base font-semibold text-gray-900 truncate",children:e})})}),R.jsx("nav",{"aria-label":o({id:"hUe0iX"}),className:`space-y-2 ${n?"flex flex-col items-center":""}`,children:t.map((l,u)=>{const a=s[u];return a==null?null:R.jsxs(Oi,{"aria-current":l.selected?"step":void 0,"aria-label":n?l.title:void 0,className:`flex items-center rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-300 focus-visible:ring-offset-2 ${n?`justify-center w-10 h-10 ${l.selected?"bg-indigo-50 border border-indigo-200":"hover:bg-gray-50 border border-transparent"}`:`items-start gap-3 p-4 ${l.selected?"bg-indigo-50 border border-indigo-200":"hover:bg-gray-50 border border-transparent"}`}`,to:l.to,onClick:r,children:[R.jsx(AC,{shrink:!n,iconStyle:a,status:l.status}),R.jsx(mr,{mode:"popLayout",children:!n&&R.jsxs(Qt.div,{className:"flex-1 min-w-0 overflow-hidden",initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.2,delay:.2},children:[R.jsx("div",{className:`font-medium whitespace-nowrap ${l.selected?"text-indigo-900":"text-gray-900"}`,children:l.title}),R.jsx("div",{className:"text-sm text-gray-500 whitespace-nowrap",children:l.description})]})})]},l.to)})})]}),R.jsx("div",{className:n?"p-2":"p-4",children:R.jsx("div",{className:n?"flex justify-center":"flex justify-end",children:R.jsx("button",{"aria-label":o(n?{id:"tugdy6"}:{id:"mkMLq4"}),className:`rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors cursor-pointer *:size-5 ${n?"flex items-center justify-center w-10 h-10":"p-2"}`,type:"button",onClick:i,children:R.jsx(Qt.div,{initial:!1,animate:{rotate:n?180:0},transition:{duration:.3,ease:"easeInOut"},className:"flex items-center justify-center",children:R.jsx(Ih,{})})})})})]})},zd="inline-flex items-center justify-center rounded-full font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-300 focus-visible:ring-offset-2 cursor-pointer px-4 py-2 text-sm gap-2",TC=`${zd} bg-indigo-500 text-white hover:bg-indigo-600 active:bg-indigo-700`,PC=`${zd} border border-gray-200 bg-gray-50 text-gray-700 hover:bg-gray-100 active:bg-gray-200`,$C=({prev:e,next:t,onSubmit:n})=>{const{_:r}=Yn(),i=m.useCallback(()=>{e?.onClick?.()},[e]),o=m.useCallback(()=>{t?.onClick?.()},[t]),s=m.useCallback(()=>{n?.()},[n]);return R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsx("div",{children:e!=null&&R.jsxs(Oi,{to:e.to,className:PC,onClick:i,children:[R.jsx(Ch,{}),e.label]})}),R.jsxs("div",{children:[t!=null&&R.jsxs(Oi,{to:t.to,className:TC,onClick:o,children:[t.label,R.jsx(Sh,{})]}),n!=null&&R.jsx(co,{variant:"primary",onClick:s,children:r({id:"hYgDIe"})})]})]})},qC=({current:e,total:t,title:n,description:r})=>{const i=e/t*100,o=24,s=3,l=2*Math.PI*o,u=l-i/100*l;return R.jsx("div",{className:"bg-white rounded-xl p-4 border border-gray-100",children:R.jsxs("div",{className:"flex items-center gap-4",children:[R.jsxs("div",{className:"relative flex items-center justify-center",children:[R.jsxs("svg",{"aria-hidden":"true",className:"transform -rotate-90",width:"56",height:"56",children:[R.jsx("circle",{className:"text-gray-200",cx:"28",cy:"28",fill:"transparent",r:o,stroke:"currentColor",strokeWidth:s}),R.jsx("circle",{className:"text-indigo-500 transition-all duration-300",cx:"28",cy:"28",fill:"transparent",r:o,stroke:"currentColor",strokeDasharray:l,strokeDashoffset:u,strokeLinecap:"round",strokeWidth:s})]}),R.jsxs("span",{className:"absolute text-sm font-semibold text-gray-700",children:[e,"/",t]})]}),R.jsxs("div",{className:"flex-1 min-w-0",children:[R.jsx("h3",{className:"text-base font-semibold text-gray-900",children:n}),r!=null&&R.jsx("p",{className:"text-sm text-gray-500 truncate",children:r})]})]})})},Ou=hh()(ph(e=>({navStatuses:{},setNavStatus:(t,n,r)=>e(i=>({navStatuses:{...i.navStatuses,[t]:{...i.navStatuses[t]??{},[n]:r}}})),resetNavStatuses:t=>e(n=>({navStatuses:{...n.navStatuses,[t]:{}}}))}),{name:"design-docs-step-aside",storage:mh(()=>sessionStorage),partialize:e=>({navStatuses:e.navStatuses})})),OC={},WC=(e={})=>{const t=m.useMemo(()=>Zi(e.formKey),[e.formKey]),n=Ou(o=>o.navStatuses[t]??OC),r=Ou(o=>o.setNavStatus),i=m.useCallback(o=>{const l=(ur.getState().forms[t]?.errors??{})[o]===!0;r(t,o,l?"error":"success")},[t,r]);return{navStatuses:n,updateNavStatus:i}},MC={},KC=(e={})=>{const t=m.useMemo(()=>Zi(e.formKey),[e.formKey]),n=ur(o=>o.forms[t]?.values??MC),r=ur(o=>o.setError),i=m.useCallback((o,s)=>r(t,o,s),[t,r]);return{formValues:n,setFormError:i}};export{zC as A,BC as M,Bw as P,UC as S,KC as a,Hw as b,WC as c,jC as d,qC as e,HC as f,d0 as g,$C as h,_C as i,vh as u};
41
+ `))):P&&(L=[P],E.setCustomValidity(P))):z&&(E.setCustomValidity(""),q.customError=!1,E.validationMessage?(O=E.validationMessage,L=[E.validationMessage]):E.validity.valid&&!q.valid&&(q.valid=!0))}const _={value:v,state:q,error:O??(Array.isArray(P)?P[0]:P??""),errors:L,initialValue:o.initialValue};if(h){const B=t.current.fields.get(h);B&&t.current.fields.set(h,{...B,...zs(_,l)})}r(_)}),g=m.useCallback((v={})=>Rn(d,a.valid===!1?{"aria-invalid":!0}:yt,v),[d,a.valid]),y=m.useCallback((v={})=>Rn({onChange(k){if(k.nativeEvent.defaultPrevented)return;if(n(f),!c()){w(k.currentTarget.value,!0);return}if(l)return;const E=k.currentTarget;if(E.value===""){w(E.value);return}p.clear(),s?p.start(s,()=>{w(E.value)}):w(E.value)}},g(v)),[g,n,f,p,w,l,s,c]);return m.useMemo(()=>({getValidationProps:g,getInputValidationProps:y,inputRef:x,commit:w}),[g,y,w])}const G1=m.forwardRef(function(t,n){const{errors:r,validationMode:i,submitAttemptedRef:o}=Jn(),{render:s,className:l,validate:u,validationDebounceTime:a=0,validationMode:f=i,name:c,disabled:h=!1,invalid:d,dirty:p,touched:x,...w}=t,{disabled:g}=$1(),y=me(u||(()=>null)),v=g||h,[k,E]=m.useState(!1),[C,P]=m.useState(!1),[L,q]=m.useState(!1),[O,z]=m.useState(!1),_=p??C,B=x??k,D=m.useRef(!1),A=me(X=>{p===void 0&&(X&&(D.current=!0),P(X))}),N=me(X=>{x===void 0&&E(X)}),Y=me(()=>f==="onChange"||f==="onSubmit"&&o.current),$=!!(d||c&&{}.hasOwnProperty.call(r,c)&&r[c]!==void 0),[K,S]=m.useState({state:go,error:"",errors:[],value:null,initialValue:null}),Z=!$&&K.state.valid,be=m.useMemo(()=>({disabled:v,touched:B,dirty:_,valid:Z,filled:L,focused:O}),[v,B,_,Z,L,O]),I=K1({setValidityData:S,validate:y,validityData:K,validationDebounceTime:a,invalid:$,markedDirtyRef:D,state:be,name:c,shouldValidateOnChange:Y}),fe=m.useMemo(()=>({invalid:$,name:c,validityData:K,setValidityData:S,disabled:v,touched:B,setTouched:N,dirty:_,setDirty:A,filled:L,setFilled:q,focused:O,setFocused:z,validate:y,validationMode:f,validationDebounceTime:a,shouldValidateOnChange:Y,state:be,markedDirtyRef:D,validation:I}),[$,c,K,v,B,N,_,A,L,q,O,z,y,f,a,Y,be,I]),le=nt("div",t,{ref:n,state:be,props:w,stateAttributesMapping:gn});return R.jsx(df.Provider,{value:fe,children:le})}),Ys=m.forwardRef(function(t,n){return R.jsx(q1,{children:R.jsx(G1,{...t,ref:n})})}),Xs=m.forwardRef(function(t,n){const{render:r,className:i,id:o,...s}=t,l=Zt(!1),{controlId:u,setLabelId:a,labelId:f}=en(),c=Tn(o),h=m.useRef(null);return ge(()=>(c&&a(c),()=>{a(void 0)}),[c,a]),nt("label",t,{ref:[n,h],state:l.state,props:[{id:f,htmlFor:u??void 0,onMouseDown(p){Ct(p.nativeEvent)?.closest("button,input,select,textarea")||!p.defaultPrevented&&p.detail>1&&p.preventDefault()}},s],stateAttributesMapping:gn})}),Qs=m.forwardRef(function(t,n){const{render:r,id:i,className:o,match:s,...l}=t,u=Tn(i),{validityData:a,state:f,name:c}=Zt(!1),{setMessageIds:h}=en(),{errors:d}=Jn(),p=c?d[c]:null;let x=!1;p||s===!0?x=!0:s?x=!!a.state[s]:x=a.state.valid===!1,ge(()=>{if(!(!x||!u))return h(g=>g.concat(u)),()=>{h(g=>g.filter(y=>y!==u))}},[x,u,h]);const w=nt("div",t,{ref:n,state:f,props:[{id:u,children:p||(a.errors.length>1?m.createElement("ul",{},a.errors.map(g=>m.createElement("li",{key:g},g))):a.error)},l],stateAttributesMapping:gn});return x?w:null}),Js=m.forwardRef(function(t,n){const{render:r,id:i,className:o,...s}=t,l=Tn(i),u=Zt(!1),{setMessageIds:a}=en();return ge(()=>{if(l)return a(c=>c.concat(l)),()=>{a(c=>c.filter(h=>h!==l))}},[l,a]),nt("p",t,{ref:n,state:u.state,props:[{id:l},s],stateAttributesMapping:gn})}),Y1=m.forwardRef(function(t,n){const{render:r,className:i,id:o,name:s,value:l,disabled:u=!1,onValueChange:a,defaultValue:f,...c}=t,{state:h,name:d,disabled:p}=Zt(),x=p||u,w=d??s,g=m.useMemo(()=>({...h,disabled:x}),[h,x]),{setTouched:y,setDirty:v,validityData:k,setFocused:E,setFilled:C,validationMode:P,validation:L}=Zt(),{labelId:q}=en(),O=Nl({id:o});ge(()=>{const N=l!=null;L.inputRef.current?.value||N&&l!==""?C(!0):N&&l===""&&C(!1)},[L.inputRef,C,l]);const[z,_]=qn({controlled:l,default:f,name:"FieldControl",state:"value"}),B=l!==void 0,D=me((N,Y)=>{a?.(N,Y),!Y.isCanceled&&_(N)});return yo({id:O,name:w,commit:L.commit,value:z,getValue:()=>L.inputRef.current?.value,controlRef:L.inputRef}),nt("input",t,{ref:n,state:g,props:[{id:O,disabled:x,name:w,ref:L.inputRef,"aria-labelledby":q,...B?{value:z}:{defaultValue:f},onChange(N){const Y=N.currentTarget.value;D(Y,Te(kt,N.nativeEvent)),v(Y!==k.initialValue),C(Y!=="")},onFocus(){E(!0)},onBlur(N){y(!0),E(!1),P==="onBlur"&&L.commit(N.currentTarget.value)},onKeyDown(N){N.currentTarget.tagName==="INPUT"&&N.key==="Enter"&&(y(!0),L.commit(N.currentTarget.value))}},L.getInputValidationProps(),c],stateAttributesMapping:gn})}),Tu="w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-indigo-300 focus:outline-none focus:ring-2 focus:ring-indigo-300 disabled:text-gray-500 data-[invalid]:border-red-500 data-[invalid]:focus:border-red-500 data-[invalid]:focus:ring-red-500/20",X1=m.forwardRef(({label:e,error:t,hint:n,required:r,suggestions:i,...o},s)=>i!=null&&i.length>0?R.jsxs(Ys,{invalid:t!=null,children:[e!=null&&R.jsxs(Xs,{className:"block text-sm font-bold text-gray-700 mb-1.5",children:[e,r===!0&&R.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),R.jsxs(i1,{items:i,children:[R.jsx(g1,{ref:s,className:Tu,...o}),R.jsx(I1,{children:R.jsx(V1,{className:"z-50",sideOffset:4,style:{width:"var(--anchor-width)"},children:R.jsx(_1,{className:"rounded-lg border border-gray-200 bg-white shadow-lg overflow-hidden",children:R.jsx(S1,{className:"max-h-60 overflow-auto p-1",children:l=>R.jsx(H1,{value:l,className:"px-3 py-2 text-sm text-gray-900 rounded-md cursor-pointer data-[highlighted]:bg-indigo-50 data-[highlighted]:text-indigo-900 data-[selected]:font-medium",children:l},l)})})})})]}),n!=null&&t==null&&R.jsx(Js,{className:"mt-1.5 text-sm text-gray-500",children:n}),t!=null&&R.jsx(Qs,{className:"mt-1.5 text-sm text-red-600",children:t})]}):R.jsxs(Ys,{invalid:t!=null,children:[e!=null&&R.jsxs(Xs,{className:"block text-sm font-bold text-gray-700 mb-1.5",children:[e,r===!0&&R.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),R.jsx(Y1,{ref:s,className:Tu,...o}),n!=null&&t==null&&R.jsx(Js,{className:"mt-1.5 text-sm text-gray-500",children:n}),t!=null&&R.jsx(Qs,{className:"mt-1.5 text-sm text-red-600",children:t})]})),Ad=m.createContext(null),Td=m.createContext(null);function Ln(){const e=m.useContext(Ad);if(e===null)throw new Error(wt(60));return e}function Pd(){const e=m.useContext(Td);if(e===null)throw new Error(wt(61));return e}const Ne={id:ae(e=>e.id),modal:ae(e=>e.modal),multiple:ae(e=>e.multiple),items:ae(e=>e.items),itemToStringLabel:ae(e=>e.itemToStringLabel),itemToStringValue:ae(e=>e.itemToStringValue),isItemEqualToValue:ae(e=>e.isItemEqualToValue),value:ae(e=>e.value),open:ae(e=>e.open),mounted:ae(e=>e.mounted),forceMount:ae(e=>e.forceMount),transitionStatus:ae(e=>e.transitionStatus),openMethod:ae(e=>e.openMethod),activeIndex:ae(e=>e.activeIndex),selectedIndex:ae(e=>e.selectedIndex),isActive:ae((e,t)=>e.activeIndex===t),isSelected:ae((e,t,n)=>{const r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(o=>pn(o,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:pn(i,n,r)}),isSelectedByFocus:ae((e,t)=>e.selectedIndex===t),popupProps:ae(e=>e.popupProps),triggerProps:ae(e=>e.triggerProps),triggerElement:ae(e=>e.triggerElement),positionerElement:ae(e=>e.positionerElement),listElement:ae(e=>e.listElement),scrollUpArrowVisible:ae(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:ae(e=>e.scrollDownArrowVisible),hasScrollArrows:ae(e=>e.hasScrollArrows),serializedValue:ae(e=>{const{multiple:t,value:n,itemToStringValue:r}=e;return t&&Array.isArray(n)&&n.length===0?"":Xt(n,r)})};function Q1(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:o,defaultOpen:s=!1,onOpenChange:l,name:u,disabled:a=!1,readOnly:f=!1,required:c=!1,modal:h=!0,actionsRef:d,inputRef:p,onOpenChangeComplete:x,items:w,multiple:g=!1,itemToStringLabel:y,itemToStringValue:v,isItemEqualToValue:k=ad,highlightItemOnHover:E=!0,children:C}=e,{clearErrors:P}=Jn(),{setDirty:L,shouldValidateOnChange:q,validityData:O,setFilled:z,name:_,disabled:B,validation:D}=Zt(),{controlId:A}=en(),N=Nl({id:t}),Y=B||a,$=_??u,[K,S]=qn({controlled:n,default:g?r??wn:r,name:"Select",state:"value"}),[Z,be]=qn({controlled:o,default:s,name:"Select",state:"open"}),I=m.useRef([]),fe=m.useRef([]),le=m.useRef(null),X=m.useRef(null),ue=m.useRef(0),ie=m.useRef(null),we=m.useRef([]),Q=m.useRef(!1),H=m.useRef(!1),se=m.useRef(null),ne=m.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Ae=m.useRef(!1),{mounted:ee,setMounted:G,transitionStatus:oe}=wo(Z),{openMethod:Ee,triggerProps:ye,reset:xe}=hd(Z),b=Wt(()=>new Wn({id:N,modal:h,multiple:g,itemToStringLabel:y,itemToStringValue:v,isItemEqualToValue:k,value:K,open:Z,mounted:ee,transitionStatus:oe,items:w,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,M=te(b,Ne.activeIndex),F=te(b,Ne.selectedIndex),U=te(b,Ne.triggerElement),j=te(b,Ne.positionerElement),T=m.useMemo(()=>g&&Array.isArray(K)&&K.length===0?"":Xt(K,v),[g,K,v]),V=m.useMemo(()=>g&&Array.isArray(K)?K.map(je=>Xt(je,v)):Xt(K,v),[g,K,v]),W=dt(b.state.triggerElement);yo({id:N,commit:D.commit,value:K,controlRef:W,name:$,getValue:()=>V});const J=m.useRef(K);ge(()=>{K!==J.current&&b.set("forceMount",!0)},[b,K]),ge(()=>{z(K!==null)},[K,z]),ge(function(){if(Z)return;const Ue=we.current;if(g){const Qe=Array.isArray(K)?K:[];if(Qe.length===0){b.set("selectedIndex",null);return}const Se=Qe[Qe.length-1],Mt=wr(Ue,Se,k);b.set("selectedIndex",Mt===-1?null:Mt);return}const ht=wr(Ue,K,k);b.set("selectedIndex",ht===-1?null:ht)},[g,Z,K,we,k,b]),lr(K,()=>{P($),L(K!==O.initialValue),q()?D.commit(K):D.commit(K,!0)});const he=me((je,Ue)=>{if(l?.(je,Ue),!Ue.isCanceled&&(be(je),!je&&b.state.activeIndex!==null)){const ht=I.current[b.state.activeIndex];queueMicrotask(()=>{ht?.setAttribute("tabindex","-1")})}}),Pe=me(()=>{G(!1),b.set("activeIndex",null),xe(),x?.(!1)});Sr({enabled:!d,open:Z,ref:le,onComplete(){Z||Pe()}}),m.useImperativeHandle(d,()=>({unmount:Pe}),[Pe]);const Oe=me((je,Ue)=>{i?.(je,Ue),!Ue.isCanceled&&S(je)}),ke=me(()=>{const je=b.state.listElement||le.current;if(!je)return;const Ue=je.scrollTop,ht=je.scrollTop+je.clientHeight,Qe=Ue>1,Se=ht<je.scrollHeight-1;b.state.scrollUpArrowVisible!==Qe&&b.set("scrollUpArrowVisible",Qe),b.state.scrollDownArrowVisible!==Se&&b.set("scrollDownArrowVisible",Se)}),de=Dl({open:Z,onOpenChange:he,elements:{reference:U,floating:j}}),He=Wf(de,{enabled:!f&&!Y,event:"mousedown"}),Be=td(de,{bubbles:!1}),De=rd(de,{enabled:!f&&!Y,listRef:I,activeIndex:M,selectedIndex:F,disabledIndices:wn,onNavigate(je){je===null&&!Z||b.set("activeIndex",je)},focusItemOnHover:!1}),Me=Yk(de,{enabled:!f&&!Y&&(Z||!g),listRef:fe,activeIndex:M,selectedIndex:F,onMatch(je){Z?b.set("activeIndex",je):Oe(we.current[je],Te("none"))},onTypingChange(je){Q.current=je}}),{getReferenceProps:rt,getFloatingProps:Ve,getItemProps:Pt}=nd([He,Be,De,Me]),tt=m.useMemo(()=>Rn(rt(),ye),[rt,ye]);xf(()=>{b.update({popupProps:Ve(),triggerProps:tt})}),ge(()=>{b.update({id:N,modal:h,multiple:g,value:K,open:Z,mounted:ee,transitionStatus:oe,popupProps:Ve(),triggerProps:tt,items:w,itemToStringLabel:y,itemToStringValue:v,isItemEqualToValue:k,openMethod:Ee})},[b,N,h,g,K,Z,ee,oe,Ve,tt,w,y,v,k,Ee]);const qe=m.useMemo(()=>({store:b,name:$,required:c,disabled:Y,readOnly:f,multiple:g,itemToStringLabel:y,itemToStringValue:v,highlightItemOnHover:E,setValue:Oe,setOpen:he,listRef:I,popupRef:le,scrollHandlerRef:X,handleScrollArrowVisibility:ke,scrollArrowsMountedCountRef:ue,getItemProps:Pt,events:de.context.events,valueRef:ie,valuesRef:we,labelsRef:fe,typingRef:Q,selectionRef:ne,selectedItemTextRef:se,validation:D,onOpenChangeComplete:x,keyboardActiveRef:H,alignItemWithTriggerActiveRef:Ae,initialValueRef:J}),[b,$,c,Y,f,g,y,v,E,Oe,he,Pt,de.context.events,D,x,ke]),Ot=An(p,D.inputRef),ln=g&&Array.isArray(K)&&K.length>0,Kt=m.useMemo(()=>!g||!Array.isArray(K)||!$?null:K.map(je=>{const Ue=Xt(je,v);return R.jsx("input",{type:"hidden",name:$,value:Ue},Ue)}),[g,K,$,v]);return R.jsx(Ad.Provider,{value:qe,children:R.jsxs(Td.Provider,{value:de,children:[C,R.jsx("input",{...D.getInputValidationProps({onFocus(){b.state.triggerElement?.focus()},onChange(je){if(je.nativeEvent.defaultPrevented)return;const Ue=je.target.value,ht=Te(kt,je.nativeEvent);function Qe(){if(g)return;const Se=we.current.find(Mt=>Xt(Mt,v).toLowerCase()===Ue.toLowerCase());Se!=null&&(L(Se!==O.initialValue),Oe(Se,ht),q()&&D.commit(Se))}b.set("forceMount",!0),queueMicrotask(Qe)}}),id:t||A||void 0,name:g?void 0:$,value:T,disabled:Y,required:c&&!ln,readOnly:f,ref:Ot,style:ri,tabIndex:-1,"aria-hidden":!0}),Kt]})})}const Si=2,J1={...md,...gn,value:()=>null},Z1=m.forwardRef(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:s=!0,...l}=t,{setTouched:u,setFocused:a,validationMode:f,state:c,disabled:h}=Zt(),{labelId:d}=en(),{store:p,setOpen:x,selectionRef:w,validation:g,readOnly:y,alignItemWithTriggerActiveRef:v,disabled:k,keyboardActiveRef:E}=Ln(),C=h||k||o,P=te(p,Ne.open),L=te(p,Ne.value),q=te(p,Ne.triggerProps),O=te(p,Ne.positionerElement),z=te(p,Ne.listElement),_=te(p,Ne.serializedValue),B=dt(O),D=m.useRef(null),A=Nt(),N=Nt(),{getButtonProps:Y,buttonRef:$}=ei({disabled:C,native:s}),K=me(X=>{p.set("triggerElement",X)}),S=An(n,D,$,K),Z=Nt(),be=Nt();m.useEffect(()=>{if(P)return be.start(200,()=>{w.current.allowUnselectedMouseUp=!0,Z.start(200,()=>{w.current.allowSelectedMouseUp=!0})}),()=>{Z.clear(),be.clear()};w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},N.clear()},[P,w,N,Z,be]);const I=m.useMemo(()=>z?.id??Hi(O)?.id,[z,O]),fe=Rn(q,{role:"combobox","aria-expanded":P?"true":"false","aria-haspopup":"listbox","aria-controls":P?I:void 0,"aria-labelledby":d,"aria-readonly":y||void 0,tabIndex:C?-1:0,ref:S,onFocus(X){a(!0),P&&v.current&&x(!1,Te(xo,X.nativeEvent)),A.start(0,()=>{p.set("forceMount",!0)})},onBlur(){u(!0),a(!1),f==="onBlur"&&g.commit(L)},onPointerMove(){E.current=!1},onKeyDown(){E.current=!0},onMouseDown(X){if(P)return;const ue=Pn(X.currentTarget);function ie(we){if(!D.current)return;const Q=we.target;if(We(D.current,Q)||We(B.current,Q)||Q===D.current)return;const H=f1(D.current);we.clientX>=H.left-Si&&we.clientX<=H.right+Si&&we.clientY>=H.top-Si&&we.clientY<=H.bottom+Si||x(!1,Te(C0,we))}N.start(0,()=>{ue.addEventListener("mouseup",ie,{once:!0})})}},g.getValidationProps,l,Y);fe.role="combobox";const le=m.useMemo(()=>({...c,open:P,disabled:C,value:L,readOnly:y,placeholder:!_}),[c,P,C,L,y,_]);return nt("button",t,{ref:[n,D],state:le,stateAttributesMapping:J1,props:fe})}),eC={value:()=>null},tC=m.forwardRef(function(t,n){const{className:r,render:i,children:o,...s}=t,{store:l,valueRef:u}=Ln(),a=te(l,Ne.value),f=te(l,Ne.items),c=te(l,Ne.itemToStringLabel),h=te(l,Ne.serializedValue),d=m.useMemo(()=>({value:a,placeholder:!h}),[a,h]),p=typeof o=="function"?o(a):o??(Array.isArray(a)?Jk(a,c):Qk(a,f,c));return nt("span",t,{state:d,ref:[n,u],props:[{children:p},s],stateAttributesMapping:eC})}),nC=m.forwardRef(function(t,n){const{className:r,render:i,...o}=t,{store:s}=Ln(),l=te(s,Ne.open),u=m.useMemo(()=>({open:l}),[l]);return nt("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},o],stateAttributesMapping:c1})}),rC=m.createContext(void 0),iC=m.forwardRef(function(t,n){const{store:r}=Ln(),i=te(r,Ne.mounted),o=te(r,Ne.forceMount);return i||o?R.jsx(rC.Provider,{value:!0,children:R.jsx($f,{ref:n,...t})}):null}),Od=m.createContext(void 0);function oC(){const e=m.useContext(Od);if(!e)throw new Error(wt(59));return e}function Ji(e,t){e&&Object.assign(e.style,t)}const sC={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},lC={position:"fixed"},aC=m.forwardRef(function(t,n){const{anchor:r,positionMethod:i="absolute",className:o,render:s,side:l="bottom",align:u="center",sideOffset:a=0,alignOffset:f=0,collisionBoundary:c="clipping-ancestors",collisionPadding:h,arrowPadding:d=5,sticky:p=!1,disableAnchorTracking:x,alignItemWithTrigger:w=!0,collisionAvoidance:g=Gc,...y}=t,{store:v,listRef:k,labelsRef:E,alignItemWithTriggerActiveRef:C,selectedItemTextRef:P,valuesRef:L,initialValueRef:q,popupRef:O,setValue:z}=Ln(),_=Pd(),B=te(v,Ne.open),D=te(v,Ne.mounted),A=te(v,Ne.modal),N=te(v,Ne.value),Y=te(v,Ne.openMethod),$=te(v,Ne.positionerElement),K=te(v,Ne.triggerElement),S=te(v,Ne.isItemEqualToValue),Z=m.useRef(null),be=m.useRef(null),[I,fe]=m.useState(w),le=D&&I&&Y!=="touch";!D&&I!==w&&fe(w),ge(()=>{D||(Ne.scrollUpArrowVisible(v.state)&&v.set("scrollUpArrowVisible",!1),Ne.scrollDownArrowVisible(v.state)&&v.set("scrollDownArrowVisible",!1))},[v,D]),m.useImperativeHandle(C,()=>le),kd((le||A)&&B&&Y!=="touch",K);const X=Sd({anchor:r,floatingRootContext:_,positionMethod:i,mounted:D,side:l,sideOffset:a,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:c,collisionPadding:h,sticky:p,disableAnchorTracking:x??le,collisionAvoidance:g,keepMounted:!0}),ue=le?"none":X.side,ie=le?lC:X.positionerStyles,we=m.useMemo(()=>{const G={};return B||(G.pointerEvents="none"),{role:"presentation",hidden:!D,style:{...ie,...G}}},[B,D,ie]),Q=m.useMemo(()=>({open:B,side:ue,align:X.align,anchorHidden:X.anchorHidden}),[B,ue,X.align,X.anchorHidden]),H=me(G=>{v.set("positionerElement",G)}),se=nt("div",t,{ref:[n,H],state:Q,stateAttributesMapping:Io,props:[we,y]}),ne=m.useRef(0),Ae=me(G=>{if(G.size===0&&ne.current===0||L.current.length===0)return;const oe=ne.current;if(ne.current=G.size,G.size===oe)return;const Ee=Te(kt);if(oe!==0&&!v.state.multiple&&N!==null&&wr(L.current,N,S)===-1){const xe=q.current,M=xe!=null&&$n(L.current,xe,S)?xe:null;z(M,Ee),M===null&&(v.set("selectedIndex",null),P.current=null)}if(oe!==0&&v.state.multiple&&Array.isArray(N)){const ye=N.filter(xe=>$n(L.current,xe,S));(ye.length!==N.length||ye.some(xe=>!$n(N,xe,S)))&&(z(ye,Ee),ye.length===0&&(v.set("selectedIndex",null),P.current=null))}if(B&&le){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ye={height:""};Ji($,ye),Ji(O.current,ye)}}),ee=m.useMemo(()=>({...X,side:ue,alignItemWithTriggerActive:le,setControlledAlignItemWithTrigger:fe,scrollUpArrowRef:Z,scrollDownArrowRef:be}),[X,ue,le,fe]);return R.jsx(bd,{elementsRef:k,labelsRef:E,onMapChange:Ae,children:R.jsxs(Od.Provider,{value:ee,children:[D&&A&&R.jsx(Ed,{inert:vd(!B),cutout:K}),se]})})});function Md(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const Ei="base-ui-disable-scrollbar",Pu={className:Ei,element:R.jsx("style",{href:Ei,precedence:"base-ui:low",children:`.${Ei}{scrollbar-width:none}.${Ei}::-webkit-scrollbar{display:none}`})},uC=m.createContext(void 0);function cC(e){return m.useContext(uC)}const Fd="ArrowUp",Ld="ArrowDown",Dd="ArrowLeft",Vd="ArrowRight",Nd="Home",_d="End",fC=new Set([Dd,Vd]),dC=new Set([Fd,Ld]),hC=new Set([...fC,...dC]);[...hC];const pC=new Set([Fd,Ld,Dd,Vd,Nd,_d]),mC={...Io,...vo},gC=m.forwardRef(function(t,n){const{render:r,className:i,...o}=t,{store:s,popupRef:l,onOpenChangeComplete:u,setOpen:a,valueRef:f,selectedItemTextRef:c,keyboardActiveRef:h,multiple:d,handleScrollArrowVisibility:p,scrollHandlerRef:x}=Ln(),{side:w,align:g,alignItemWithTriggerActive:y,setControlledAlignItemWithTrigger:v,scrollDownArrowRef:k,scrollUpArrowRef:E}=oC(),C=cC()!=null,P=Pd(),L=Nt(),q=te(s,Ne.id),O=te(s,Ne.open),z=te(s,Ne.mounted),_=te(s,Ne.popupProps),B=te(s,Ne.transitionStatus),D=te(s,Ne.triggerElement),A=te(s,Ne.positionerElement),N=te(s,Ne.listElement),Y=m.useRef(0),$=m.useRef(!1),K=m.useRef(0),S=m.useRef(!1),Z=m.useRef({}),be=bo(),I=me(ue=>{if(!A||!l.current||!S.current)return;if($.current||!y){p();return}const ie=A.style.top==="0px",we=A.style.bottom==="0px",Q=A.getBoundingClientRect().height,H=Pn(A),se=getComputedStyle(A),ne=parseFloat(se.marginTop),Ae=parseFloat(se.marginBottom),ee=H.documentElement.clientHeight-ne-Ae,G=ue.scrollTop,oe=ue.scrollHeight,Ee=ue.clientHeight,ye=oe-Ee;let xe=null,b=null,M=!1;if(ie){const F=ye-G,U=Q+F,j=Math.min(U,ee);xe=j,j!==ee?b=ye:M=!0}else if(we){const F=G-0,U=Q+F,j=Math.min(U,ee),T=U-ee;xe=j,j!==ee?b=0:(M=!0,G<ye&&(b=G-(F-T)))}xe!=null&&(A.style.height=`${xe}px`),b!=null&&(ue.scrollTop=b),M&&($.current=!0),p()});m.useImperativeHandle(x,()=>I,[I]),Sr({open:O,ref:l,onComplete(){O&&u?.(!0)}});const fe=m.useMemo(()=>({open:O,transitionStatus:B,side:w,align:g}),[O,B,w,g]);ge(()=>{!A||!l.current||Object.keys(Z.current).length||(Z.current={top:A.style.top||"0",left:A.style.left||"0",right:A.style.right,height:A.style.height,bottom:A.style.bottom,minHeight:A.style.minHeight,maxHeight:A.style.maxHeight,marginTop:A.style.marginTop,marginBottom:A.style.marginBottom})},[l,A]),ge(()=>{z||y||(S.current=!1,$.current=!1,Y.current=0,K.current=0,Ji(A,Z.current))},[z,y,A,l]),ge(()=>{const ue=l.current;if(!(!z||!D||!A||!ue)){if(!y){S.current=!0,be.request(p);return}queueMicrotask(()=>{const ie=getComputedStyle(A),we=getComputedStyle(ue),Q=Pn(D),H=ft(A),se=D.getBoundingClientRect(),ne=A.getBoundingClientRect(),Ae=se.left,ee=se.height,G=N||ue,oe=G.scrollHeight,Ee=parseFloat(we.borderBottomWidth),ye=parseFloat(ie.marginTop)||10,xe=parseFloat(ie.marginBottom)||10,b=parseFloat(ie.minHeight)||100,M=5,F=5,U=20,j=Q.documentElement.clientHeight-ye-xe,T=Q.documentElement.clientWidth,V=j-se.bottom+ee,W=c.current,J=f.current;let he=0,Pe=0;if(W&&J){const qe=J.getBoundingClientRect(),Ot=W.getBoundingClientRect(),ln=qe.left-Ae,Kt=Ot.left-ne.left,je=qe.top-se.top+qe.height/2,Ue=Ot.top-ne.top+Ot.height/2;he=ln-Kt,Pe=Ue-je}const Oe=V+Pe+xe+Ee;let ke=Math.min(j,Oe);const de=j-ye-xe,He=Oe-ke,Be=Math.max(M,Ae+he),De=T-F,Me=Math.max(0,Be+ne.width-De);A.style.left=`${Be-Me}px`,A.style.height=`${ke}px`,A.style.maxHeight="auto",A.style.marginTop=`${ye}px`,A.style.marginBottom=`${xe}px`,ue.style.height="100%";const rt=G.scrollHeight-G.clientHeight,Ve=He>=rt;Ve&&(ke=Math.min(j,ne.height)-(He-rt));const Pt=se.top<U||se.bottom>j-U||ke<Math.min(oe,b),tt=(H.visualViewport?.scale??1)!==1&&kf;if(Pt||tt){S.current=!0,Ji(A,Z.current),In.flushSync(()=>v(!1));return}if(Ve){const qe=Math.max(0,j-Oe);A.style.top=ne.height>=de?"0":`${qe}px`,A.style.height=`${ke}px`,G.scrollTop=G.scrollHeight-G.clientHeight,Y.current=Math.max(b,ke)}else A.style.bottom="0",Y.current=Math.max(b,ke),G.scrollTop=He;Y.current===j&&($.current=!0),p(),setTimeout(()=>{S.current=!0})})}},[s,z,A,D,f,c,l,p,y,v,be,k,E,N]),m.useEffect(()=>{if(!y||!A||!z)return;const ue=ft(A);function ie(we){a(!1,Te(S0,we))}return ue.addEventListener("resize",ie),()=>{ue.removeEventListener("resize",ie)}},[a,y,A,z]);const le={...N?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":d||void 0,id:`${q}-list`},onKeyDown(ue){h.current=!0,C&&pC.has(ue.key)&&ue.stopPropagation()},onMouseMove(){h.current=!1},onPointerLeave(ue){if(Md(ue)||ue.pointerType==="touch")return;const ie=ue.currentTarget;L.start(0,()=>{s.set("activeIndex",null),ie.focus({preventScroll:!0})})},onScroll(ue){N||x.current?.(ue.currentTarget)},...y&&{style:N?{height:"100%"}:sC}},X=nt("div",t,{ref:[n,l],state:fe,stateAttributesMapping:mC,props:[_,le,Id(B),{className:!N&&y?Pu.className:void 0},o]});return R.jsxs(m.Fragment,{children:[Pu.element,R.jsx(qf,{context:P,modal:!1,disabled:!z,restoreFocus:!0,children:X})]})}),jd=m.createContext(void 0);function Bl(){const e=m.useContext(jd);if(!e)throw new Error(wt(57));return e}const yC=m.memo(m.forwardRef(function(t,n){const{render:r,className:i,value:o=null,label:s,disabled:l=!1,nativeButton:u=!1,...a}=t,f=m.useRef(null),c=Rd({label:s,textRef:f,indexGuessBehavior:zl.GuessFromOrder}),{store:h,getItemProps:d,setOpen:p,setValue:x,selectionRef:w,typingRef:g,valuesRef:y,keyboardActiveRef:v,multiple:k,highlightItemOnHover:E}=Ln(),C=Nt(),P=te(h,Ne.isActive,c.index),L=te(h,Ne.isSelected,c.index,o),q=te(h,Ne.isSelectedByFocus,c.index),O=te(h,Ne.isItemEqualToValue),z=c.index,_=z!==-1,B=m.useRef(null),D=dt(z);ge(()=>{if(!_)return;const X=y.current;return X[z]=o,()=>{delete X[z]}},[_,z,o,y]),ge(()=>{if(!_)return;const X=h.state.value;let ue=X;k&&Array.isArray(X)&&X.length>0&&(ue=X[X.length-1]),ue!==void 0&&pn(ue,o,O)&&h.set("selectedIndex",z)},[_,z,k,O,h,o]);const A=m.useMemo(()=>({disabled:l,selected:L,highlighted:P}),[l,L,P]),N=d({active:P,selected:L});N.onFocus=void 0,N.id=void 0;const Y=m.useRef(null),$=m.useRef("mouse"),K=m.useRef(!1),{getButtonProps:S,buttonRef:Z}=ei({disabled:l,focusableWhenDisabled:!0,native:u});function be(X){const ue=h.state.value;if(k){const ie=Array.isArray(ue)?ue:[],we=L?ud(ie,o,O):[...ie,o];x(we,Te(Ri,X))}else x(o,Te(Ri,X)),p(!1,Te(Ri,X))}const I={role:"option","aria-selected":L,"aria-disabled":l||void 0,tabIndex:P?0:-1,onFocus(){h.set("activeIndex",z)},onMouseEnter(){!v.current&&h.state.selectedIndex===null&&h.set("activeIndex",z)},onMouseMove(){E&&h.set("activeIndex",z)},onMouseLeave(X){!E||v.current||Md(X)||C.start(0,()=>{h.state.activeIndex===z&&h.set("activeIndex",null)})},onTouchStart(){w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(X){Y.current=X.key,h.set("activeIndex",z)},onClick(X){K.current=!1,!(X.type==="keydown"&&Y.current===null)&&(l||Y.current===" "&&g.current||$.current!=="touch"&&!P||(Y.current=null,be(X.nativeEvent)))},onPointerEnter(X){$.current=X.pointerType},onPointerDown(X){$.current=X.pointerType,K.current=!0},onMouseUp(X){if(l)return;if(K.current){K.current=!1;return}const ue=!w.current.allowSelectedMouseUp&&L,ie=!w.current.allowUnselectedMouseUp&&!L;ue||ie||$.current!=="touch"&&!P||be(X.nativeEvent)}},fe=nt("div",t,{ref:[Z,n,c.ref,B],state:A,props:[N,I,a,S]}),le=m.useMemo(()=>({selected:L,indexRef:D,textRef:f,selectedByFocus:q,hasRegistered:_}),[L,D,f,q,_]);return R.jsx(jd.Provider,{value:le,children:fe})})),xC=m.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:i}=Bl();return r||i?R.jsx(bC,{...t,ref:n}):null}),bC=m.memo(m.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:i,...o}=e,{selected:s}=Bl(),l=m.useRef(null),{transitionStatus:u,setMounted:a}=wo(s),f=m.useMemo(()=>({selected:s,transitionStatus:u}),[s,u]),c=nt("span",e,{ref:[t,l],state:f,props:[{"aria-hidden":!0,children:"✔️"},o],stateAttributesMapping:vo});return Sr({open:s,ref:l,onComplete(){s||a(!1)}}),c})),wC=m.memo(m.forwardRef(function(t,n){const{indexRef:r,textRef:i,selectedByFocus:o,hasRegistered:s}=Bl(),{selectedItemTextRef:l}=Ln(),{className:u,render:a,...f}=t,c=m.useCallback(d=>{if(!d||!s)return;const p=l.current===null||!l.current.isConnected;(o||p&&r.current===0)&&(l.current=d)},[l,r,o,s]);return nt("div",t,{ref:[c,n,i],props:f})})),vC=({label:e,options:t,value:n,onValueChange:r,placeholder:i="選択してください",error:o,required:s})=>R.jsxs("div",{className:"flex flex-col gap-1.5",children:[e!=null&&R.jsxs("span",{className:"text-sm font-bold text-gray-700",children:[e,s===!0&&R.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),R.jsxs(Q1,{value:n,onValueChange:r,children:[R.jsxs(Z1,{className:`flex items-center justify-between w-full rounded-lg border bg-gray-50 px-3 py-2 text-sm text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-300 cursor-pointer ${o!=null?"border-red-500":"border-gray-200 focus:border-indigo-300"}`,children:[R.jsx(tC,{children:l=>l==null?R.jsx("span",{className:"text-gray-400",children:i}):t.find(a=>a.value===l)?.label??l}),R.jsx(nC,{className:"text-gray-400",children:R.jsx(Eh,{})})]}),R.jsx(iC,{children:R.jsx(aC,{children:R.jsx(gC,{className:"z-50 min-w-[var(--anchor-width)] rounded-lg border border-gray-200 bg-white p-1",children:t.map(l=>R.jsxs(yC,{className:"flex items-center rounded-md px-3 py-2 text-sm text-gray-900 outline-none cursor-pointer hover:bg-gray-100 data-[highlighted]:bg-gray-100 data-[selected]:bg-indigo-50 data-[selected]:text-indigo-500",value:l.value,children:[R.jsx(xC,{className:"mr-2",children:R.jsx(Zs,{})}),R.jsx(wC,{children:l.label})]},l.value))})})})]}),o!=null&&R.jsx("p",{className:"text-sm text-red-600",children:o})]}),kC=m.forwardRef(({label:e,error:t,hint:n,required:r,...i},o)=>R.jsxs(Ys,{invalid:t!=null,children:[e!=null&&R.jsxs(Xs,{className:"block text-sm font-bold text-gray-700 mb-1.5",children:[e,r===!0&&R.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),R.jsx("textarea",{ref:o,className:`w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-indigo-300 focus:outline-none focus:ring-2 focus:ring-indigo-300 disabled:text-gray-500 resize-y min-h-[80px] ${t!=null?"border-red-500 focus:border-red-500 focus:ring-red-500/20":""}`,...i}),n!=null&&t==null&&R.jsx(Js,{className:"mt-1.5 text-sm text-gray-500",children:n}),t!=null&&R.jsx(Qs,{className:"mt-1.5 text-sm text-red-600",children:t})]})),CC=({field:e,value:t,onValueChange:n})=>{const r=m.useCallback(i=>{n(i??"")},[n]);return R.jsx(vC,{label:e.label,options:e.options,placeholder:e.placeholder,required:e.required,value:t,onValueChange:r})},SC=({field:e,checked:t,onCheckedChange:n})=>R.jsx(L0,{checked:t,label:e.label,required:e.required,onCheckedChange:n}),Hl=({field:e,namePrefix:t=""})=>{const{register:n,control:r}=ni(),i=o=>t?`${t}.${o}`:o;switch(e.type){case"input":return R.jsx(X1,{...n(i(e.id)),label:e.label,placeholder:e.placeholder,required:e.required,suggestions:e.suggestions,type:e.inputType});case"textarea":return R.jsx(kC,{...n(i(e.id)),label:e.label,placeholder:e.placeholder,required:e.required,rows:e.rows});case"select":return R.jsx(ja,{control:r,name:i(e.id),render:({field:o})=>R.jsx(CC,{field:e,value:o.value??"",onValueChange:o.onChange})});case"checkbox":return R.jsx(ja,{control:r,name:i(e.id),render:({field:o})=>R.jsx(SC,{checked:o.value??!1,field:e,onCheckedChange:o.onChange})});case"grid":return R.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${e.columns}, 1fr)`},children:e.fields.map(o=>R.jsx(Hl,{field:o,namePrefix:t},"id"in o?o.id:o.type))});default:return null}},EC=({index:e,fields:t,canRemove:n,onRemove:r})=>{const i=`items.${e}`,o=m.useCallback(()=>{r(e)},[e,r]);return R.jsxs("div",{className:"space-y-6 pb-6 border-b border-gray-200 last:border-b-0 last:pb-0",children:[R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsxs("span",{className:"text-base font-medium text-gray-900",children:["#",e+1]}),R.jsx(co,{type:"button",variant:"outline",size:"icon",disabled:!n,onClick:o,children:R.jsx(kh,{})})]}),t.map(s=>R.jsx(Hl,{field:s,namePrefix:i},"id"in s?s.id:s.type))]})},zC=({step:e,formKey:t})=>{const{_:n}=Yn(),r=e.section,{sectionValue:i,updateSectionValue:o}=cf({formKey:t,section:r}),s=r.minFieldCount??0,l=i,u=l.length>=s?l:[...l,...Array.from({length:s-l.length},()=>({}))],a=af({defaultValues:{items:u}}),{control:f}=a,{fields:c,append:h,remove:d}=u0({control:f,name:"items"}),p=Sl({control:f,name:"items"});m.useEffect(()=>{p&&o(p)},[p,o]);const x=c.length>s,w=m.useCallback(()=>{h({})},[h]),g=m.useCallback(v=>{v.preventDefault()},[]),y=m.useCallback(v=>{d(v)},[d]);return R.jsxs("div",{className:"rounded-xl bg-white border border-gray-100",children:[R.jsxs("div",{className:"px-6 pt-6",children:[R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:e.title}),R.jsxs(co,{type:"button",variant:"outline",size:"sm",onClick:w,children:[R.jsx(bh,{}),n({id:"m16xKo"})]})]}),R.jsx("p",{className:"mt-4 text-sm text-gray-500",children:e.description})]}),R.jsx("hr",{className:"mx-6 mt-4 border-gray-200"}),R.jsx(Jc,{...a,children:R.jsx("form",{className:"p-6 space-y-6",onSubmit:g,children:c.length===0?R.jsx("p",{className:"text-sm text-gray-500 text-center py-4",children:n({id:"W/yZH3"})}):c.map((v,k)=>R.jsx(EC,{fields:r.fields,index:k,canRemove:x,onRemove:y},v.id))})})]})},IC=(e,t,n)=>e==="error"?{className:"bg-amber-500 text-white",content:R.jsx(Nu,{})}:e==="success"?{className:"bg-green-500 text-white",content:R.jsx(Zs,{})}:t?{className:"bg-indigo-500 text-white",content:R.jsx("span",{className:"text-sm font-medium",children:n})}:{className:"bg-gray-100 text-gray-600",content:R.jsx("span",{className:"text-sm font-medium",children:n})},BC=({scenarioName:e,isOpen:t,onClose:n,items:r,onItemClick:i})=>{const{_:o}=Yn(),s=m.useMemo(()=>r.map(u=>IC(u.status,u.selected,u.step)),[r]),l=m.useCallback(()=>{i(),n()},[i,n]);return R.jsx(mr,{children:t&&R.jsxs(R.Fragment,{children:[R.jsx(Qt.div,{className:"fixed inset-0 bg-black/50 z-40 xl:hidden",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},onClick:n}),R.jsxs(Qt.aside,{className:"fixed top-0 left-0 bottom-0 w-80 max-w-full bg-white z-50 flex flex-col overflow-y-auto xl:hidden",initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"},transition:{duration:.3,ease:"easeInOut"},children:[R.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200",children:[R.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"Spec Snake Beta"}),R.jsx("button",{"aria-label":o({id:"vcpc5o"}),className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors cursor-pointer *:size-5",type:"button",onClick:n,children:R.jsx(_u,{})})]}),R.jsxs("div",{className:"p-4 flex-1",children:[R.jsx("div",{className:"mb-4",children:R.jsx("h2",{className:"text-base font-semibold text-gray-900",children:e})}),R.jsx("nav",{"aria-label":o({id:"hUe0iX"}),className:"space-y-2",children:r.map((u,a)=>{const f=s[a];return f==null?null:R.jsxs(Oi,{"aria-current":u.selected?"step":void 0,className:`flex items-start gap-3 p-4 rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-300 focus-visible:ring-offset-2 ${u.selected?"bg-indigo-50 border border-indigo-200":"hover:bg-gray-50 border border-transparent"}`,to:u.to,onClick:l,children:[R.jsx("div",{className:`flex items-center justify-center w-8 h-8 rounded-full ${f.className}`,children:f.content}),R.jsxs("div",{className:"flex-1 min-w-0",children:[R.jsx("div",{className:`font-medium ${u.selected?"text-indigo-900":"text-gray-900"}`,children:u.title}),R.jsx("div",{className:"text-sm text-gray-500 truncate",children:u.description})]})]},u.to)})})]})]})]})})},HC=({step:e,formKey:t})=>{const n=e.section,{sectionValue:r,updateSectionValue:i}=cf({formKey:t,section:n}),o=af({defaultValues:r}),s=Sl({control:o.control});m.useEffect(()=>{i(s)},[s,i]);const l=m.useCallback(u=>{u.preventDefault()},[]);return R.jsxs("div",{className:"rounded-xl bg-white border border-gray-100",children:[R.jsxs("div",{className:"px-6 pt-6",children:[R.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:e.title}),R.jsx("p",{className:"mt-4 text-sm text-gray-500",children:e.description})]}),R.jsx("hr",{className:"mx-6 mt-4 border-gray-200"}),R.jsx(Jc,{...o,children:R.jsx("form",{className:"p-6 space-y-6",onSubmit:l,children:n.fields.map(u=>R.jsx(Hl,{field:u,namePrefix:""},"id"in u?u.id:u.type))})})]})},RC=(e,t,n)=>e==="error"?{bgClassName:"bg-amber-500",textClassName:"text-white",content:R.jsx(Nu,{}),shouldAnimate:!0}:e==="success"?{bgClassName:"bg-green-500",textClassName:"text-white",content:R.jsx(Zs,{}),shouldAnimate:!0}:t?{bgClassName:"bg-indigo-500",textClassName:"text-white",content:R.jsx("span",{className:"text-sm font-medium",children:n}),shouldAnimate:!1}:{bgClassName:"bg-gray-100",textClassName:"text-gray-600",content:R.jsx("span",{className:"text-sm font-medium",children:n}),shouldAnimate:!1},AC=({iconStyle:e,status:t,shrink:n})=>R.jsxs("div",{className:`relative flex items-center justify-center w-8 h-8 rounded-full ${n?"shrink-0":""} ${e.textClassName}`,children:[R.jsx(mr,{mode:"wait",children:R.jsx(Qt.div,{className:`absolute inset-0 rounded-full ${e.bgClassName}`,initial:e.shouldAnimate?{scale:0}:!1,animate:{scale:1},transition:{duration:.3,ease:[.34,1.56,.64,1]}},t)}),R.jsx(Qt.div,{className:"relative z-10",initial:e.shouldAnimate?{scale:0,opacity:0}:!1,animate:{scale:1,opacity:1},transition:{duration:.2,delay:e.shouldAnimate?.15:0},children:e.content},`content-${t}`)]}),UC=({scenarioName:e,items:t,isCollapsed:n,onItemClick:r,onToggleCollapse:i})=>{const{_:o}=Yn(),s=m.useMemo(()=>t.map(l=>RC(l.status,l.selected,l.step)),[t]);return R.jsxs(Qt.aside,{className:"hidden xl:flex shrink-0 bg-white rounded-2xl border border-gray-100 flex-col overflow-hidden sticky top-8 h-[calc(100vh-64px-56px-24px)] self-start",initial:!1,animate:{width:n?64:320},transition:{duration:.3,ease:"easeInOut"},children:[R.jsxs("div",{className:`flex-1 overflow-y-auto ${n?"p-2":"p-6"}`,children:[R.jsx(mr,{mode:"popLayout",children:!n&&R.jsx(Qt.div,{className:"mb-4 pb-4 border-b border-gray-200",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:R.jsx("h2",{className:"text-base font-semibold text-gray-900 truncate",children:e})})}),R.jsx("nav",{"aria-label":o({id:"hUe0iX"}),className:`space-y-2 ${n?"flex flex-col items-center":""}`,children:t.map((l,u)=>{const a=s[u];return a==null?null:R.jsxs(Oi,{"aria-current":l.selected?"step":void 0,"aria-label":n?l.title:void 0,className:`flex items-center rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-300 focus-visible:ring-offset-2 ${n?`justify-center w-10 h-10 ${l.selected?"bg-indigo-50 border border-indigo-200":"hover:bg-gray-50 border border-transparent"}`:`items-start gap-3 p-4 ${l.selected?"bg-indigo-50 border border-indigo-200":"hover:bg-gray-50 border border-transparent"}`}`,to:l.to,onClick:r,children:[R.jsx(AC,{shrink:!n,iconStyle:a,status:l.status}),R.jsx(mr,{mode:"popLayout",children:!n&&R.jsxs(Qt.div,{className:"flex-1 min-w-0 overflow-hidden",initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.2,delay:.2},children:[R.jsx("div",{className:`font-medium whitespace-nowrap ${l.selected?"text-indigo-900":"text-gray-900"}`,children:l.title}),R.jsx("div",{className:"text-sm text-gray-500 whitespace-nowrap",children:l.description})]})})]},l.to)})})]}),R.jsx("div",{className:n?"p-2":"p-4",children:R.jsx("div",{className:n?"flex justify-center":"flex justify-end",children:R.jsx("button",{"aria-label":o(n?{id:"tugdy6"}:{id:"mkMLq4"}),className:`rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors cursor-pointer *:size-5 ${n?"flex items-center justify-center w-10 h-10":"p-2"}`,type:"button",onClick:i,children:R.jsx(Qt.div,{initial:!1,animate:{rotate:n?180:0},transition:{duration:.3,ease:"easeInOut"},className:"flex items-center justify-center",children:R.jsx(Ih,{})})})})})]})},zd="inline-flex items-center justify-center rounded-full font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-300 focus-visible:ring-offset-2 cursor-pointer px-4 py-2 text-sm gap-2",TC=`${zd} bg-indigo-500 text-white hover:bg-indigo-600 active:bg-indigo-700`,PC=`${zd} border border-gray-200 bg-gray-50 text-gray-700 hover:bg-gray-100 active:bg-gray-200`,$C=({prev:e,next:t,onSubmit:n})=>{const{_:r}=Yn(),i=m.useCallback(()=>{e?.onClick?.()},[e]),o=m.useCallback(()=>{t?.onClick?.()},[t]),s=m.useCallback(()=>{n?.()},[n]);return R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsx("div",{children:e!=null&&R.jsxs(Oi,{to:e.to,className:PC,onClick:i,children:[R.jsx(Ch,{}),e.label]})}),R.jsxs("div",{children:[t!=null&&R.jsxs(Oi,{to:t.to,className:TC,onClick:o,children:[t.label,R.jsx(Sh,{})]}),n!=null&&R.jsx(co,{variant:"primary",onClick:s,children:r({id:"rdUucN"})})]})]})},qC=({current:e,total:t,title:n,description:r})=>{const i=e/t*100,o=24,s=3,l=2*Math.PI*o,u=l-i/100*l;return R.jsx("div",{className:"bg-white rounded-xl p-4 border border-gray-100",children:R.jsxs("div",{className:"flex items-center gap-4",children:[R.jsxs("div",{className:"relative flex items-center justify-center",children:[R.jsxs("svg",{"aria-hidden":"true",className:"transform -rotate-90",width:"56",height:"56",children:[R.jsx("circle",{className:"text-gray-200",cx:"28",cy:"28",fill:"transparent",r:o,stroke:"currentColor",strokeWidth:s}),R.jsx("circle",{className:"text-indigo-500 transition-all duration-300",cx:"28",cy:"28",fill:"transparent",r:o,stroke:"currentColor",strokeDasharray:l,strokeDashoffset:u,strokeLinecap:"round",strokeWidth:s})]}),R.jsxs("span",{className:"absolute text-sm font-semibold text-gray-700",children:[e,"/",t]})]}),R.jsxs("div",{className:"flex-1 min-w-0",children:[R.jsx("h3",{className:"text-base font-semibold text-gray-900",children:n}),r!=null&&R.jsx("p",{className:"text-sm text-gray-500 truncate",children:r})]})]})})},Ou=hh()(ph(e=>({navStatuses:{},setNavStatus:(t,n,r)=>e(i=>({navStatuses:{...i.navStatuses,[t]:{...i.navStatuses[t]??{},[n]:r}}})),resetNavStatuses:t=>e(n=>({navStatuses:{...n.navStatuses,[t]:{}}}))}),{name:"design-docs-step-aside",storage:mh(()=>sessionStorage),partialize:e=>({navStatuses:e.navStatuses})})),OC={},WC=(e={})=>{const t=m.useMemo(()=>Zi(e.formKey),[e.formKey]),n=Ou(o=>o.navStatuses[t]??OC),r=Ou(o=>o.setNavStatus),i=m.useCallback(o=>{const l=(ur.getState().forms[t]?.errors??{})[o]===!0;r(t,o,l?"error":"success")},[t,r]);return{navStatuses:n,updateNavStatus:i}},MC={},KC=(e={})=>{const t=m.useMemo(()=>Zi(e.formKey),[e.formKey]),n=ur(o=>o.forms[t]?.values??MC),r=ur(o=>o.setError),i=m.useCallback((o,s)=>r(t,o,s),[t,r]);return{formValues:n,setFormError:i}};export{zC as A,BC as M,Bw as P,UC as S,KC as a,Hw as b,WC as c,jC as d,qC as e,HC as f,d0 as g,$C as h,_C as i,vh as u};
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Design Docs Generator</title>
7
- <script type="module" crossorigin src="/assets/index-D6usLrOW.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-DzfYNFpx.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-CSjjObwb.css">
9
9
  </head>
10
10
  <body>