@ceed/cds 0.0.149-2 → 0.0.149-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/framer/index.js CHANGED
@@ -124,7 +124,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
124
124
  Prefix can't start with '-' when allowNegative is true.
125
125
  prefix: `+n+`
126
126
  allowNegative: `+a+`
127
- `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function iW(e){e=aW(e);var t=e.decimalSeparator,r=e.allowedDecimalSeparators,o=e.thousandsGroupStyle,n=e.suffix,a=e.allowNegative,i=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=ai);var l=e.onBlur;l===void 0&&(l=ai);var p=e.thousandSeparator,c=e.decimalScale,u=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var d=e.defaultValue,y=e.value,h=e.valueIsNumericString,g=e.onValueChange,b=J1(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=eh(e),v=x.decimalSeparator,C=x.allowedDecimalSeparators,T=function(z){return W1(z,e)},P=function(z,R){return oW(z,R,e)},k=Vl(y)?d:y,S=h!=null?h:rW(k,f,n);Vl(y)?Vl(d)||(S=S||typeof d=="number"):S=S||typeof y=="number";var O=function(z){return q1(z)?z:(typeof z=="number"&&(z=X1(z)),S&&typeof c=="number"?H1(z,c,!!u):z)},I=Q1(O(y),O(d),!!S,T,P,g),B=I[0],M=B.numAsString,w=B.formattedValue,$=I[1],N=function(z){var R=z.target,q=z.key,oe=R.selectionStart,_=R.selectionEnd,pe=R.value;if(pe===void 0&&(pe=""),oe!==_){s(z);return}q==="Backspace"&&pe[0]==="-"&&oe===f.length+1&&a&&fs(R,1),c&&u&&(q==="Backspace"&&pe[oe-1]===v?(fs(R,oe-1),z.preventDefault()):q==="Delete"&&pe[oe]===v&&z.preventDefault()),C!=null&&C.includes(q)&&pe[oe]===v&&fs(R,oe+1);var me=p===!0?",":p;q==="Backspace"&&pe[oe-1]===me&&fs(R,oe-1),q==="Delete"&&pe[oe]===me&&fs(R,oe+1),s(z)},D=function(z){var R=M;if(R.match(/\d/g)||(R=""),i||(R=U4(R)),u&&c&&(R=H1(R,c,u)),R!==M){var q=W1(R,e);$({formattedValue:q,value:R,floatValue:parseFloat(R)},{event:z,source:qc.event})}l(z)},L=function(z){return z===v?!0:Kc(z)},U=function(z){var R=z.currentValue,q=z.lastValue,oe=z.formattedValue,_=z.currentValueIndex,pe=z.formattedValueIndex,me=R[_],we=oe[pe],ae=Z1(q,R),W=ae.to;return _>=W.start&&_<W.end&&C&&C.includes(me)&&we===v?!0:me===we};return Object.assign(Object.assign({},b),{value:w,valueIsNumericString:!1,isValidInputCharacter:L,isCharacterSame:U,onValueChange:$,format:T,removeFormatting:P,getCaretBoundary:function(z){return nW(z,e)},onKeyDown:N,onBlur:D})}function eI(e){var t=iW(e);return Fl.createElement(Q4,Object.assign({},t))}import sW,{useCallback as lW}from"react";import{motion as pW}from"framer-motion";var cW=pW(gf),Yc=sW.forwardRef((e,t)=>{var P;let T=e,{label:r,helperText:o,error:n,style:a,size:i,color:s,disabled:l,required:p,onChange:c,name:u,sx:f,className:d,enableClearable:y}=T,h=ge(T,["label","helperText","error","style","size","color","disabled","required","onChange","name","sx","className","enableClearable"]),[g,b]=Rr(e.value,e.defaultValue,lW(k=>{c==null||c({target:{value:(k==null?void 0:k.toString())||"",name:u||""}})},[c,u])),x=k=>{b(k.target.value)},v=()=>{b(e.defaultValue||"")},C=A(cW,re(V({value:g,name:u,onChange:x,required:p,color:n?"danger":s,disabled:l,slotProps:V({input:V({ref:t},(P=h.slotProps)==null?void 0:P.input)},h.slotProps)},h),{endDecorator:Pe(Lt,{gap:1,direction:"row",children:[h.endDecorator,y&&A(Wt,{onClick:v,"aria-label":"Clear",children:A(_m,{})})]})}));return Pe(kn,{required:p,color:s,size:i,error:n,disabled:l,sx:f,className:d,children:[r&&A(Sn,{children:r}),C,o&&A(Rn,{children:o})]})});Yc.displayName="Input";var Fr=Yc;var uW={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},tI=(e="USD")=>{let[t,r,o,...n]=new $1(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=uW[e];return{symbol:`${t} `,thousandSeparator:r,decimalSeparator:o,placeholder:o?`${t} 0${o}${Array.from(Array(a)).map(()=>0).join("")}`:`${t} 0`,fixedDecimalScale:!!o,decimalScale:a}};var fW=nI.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=ge(a,["onChange"]);return A(eI,re(V({},n),{onValueChange:({value:i})=>{o==null||o({target:{name:t.name,value:i}})},valueIsNumericString:!0,getInputRef:r,allowNegative:!1}))}),th=nI.forwardRef(function(t,r){let M=t,{currency:o="USD",name:n,onChange:a,label:i,error:s,helperText:l,required:p,disabled:c,useMinorUnit:u,sx:f,className:d}=M,y=ge(M,["currency","name","onChange","label","error","helperText","required","disabled","useMinorUnit","sx","className"]),{symbol:h,thousandSeparator:g,decimalSeparator:b,placeholder:x,fixedDecimalScale:v,decimalScale:C}=tI(o),[T,P]=Rr(t.value,t.defaultValue,rI(w=>a==null?void 0:a({target:{name:n,value:w}}),[a,n])),k=oI(()=>T&&u?T/Math.pow(10,C):T,[T,u,C]),S=oI(()=>t.max&&u?t.max/Math.pow(10,C):t.max,[t.max,u,C]),[O,I]=dW(!!S&&!!k&&k>S),B=rI(w=>{var N;if(w.target.value===""){P(void 0);return}let $=Number(u?(N=w.target.value)==null?void 0:N.replace(b,""):w.target.value);S&&Number(w.target.value)>S?I(!0):I(!1),P($)},[b,S,u,P]);return A(Fr,re(V({},y),{size:"sm",ref:r,value:k,placeholder:x,onChange:B,error:s||O,disabled:c,required:p,color:s||O?"danger":t.color,label:i,helperText:O?new Qm(`limit: {amount, number, ::currency/${o} unit-width-narrow}`).format({amount:S}):l,slotProps:{input:{component:fW,decimalSeparator:b,thousandSeparator:g,prefix:h,fixedDecimalScale:v,decimalScale:C,"aria-label":y["aria-label"]}},sx:re(V({},f),{fontFamily:"monospace"}),className:d}))});var aI=th;import HW,{useCallback as ua,useEffect as mh,useMemo as nr,useRef as xb,useState as gI,useId as UW}from"react";import{jsx as mW}from"react/jsx-runtime";var iI=Nt(mW("path",{d:"M13 19V7.83l4.88 4.88c.39.39 1.03.39 1.42 0 .39-.39.39-1.02 0-1.41l-6.59-6.59a.9959.9959 0 0 0-1.41 0l-6.6 6.58c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L11 7.83V19c0 .55.45 1 1 1s1-.45 1-1"}),"ArrowUpwardRounded");import{motion as hW}from"framer-motion";var yW=hW(nm),Xc=yW;Xc.displayName="Sheet";var No=Xc;var Zc=e=>{let o=e,{children:t}=o,r=ge(o,["children"]);return A(dm,re(V({},r),{children:t}))};Zc.displayName="Table";function cb(e){let{headCells:t,showCheckbox:r,onCheckboxChange:o,slots:{checkbox:n=$c}={},slotProps:{checkbox:a={}}={}}=e;return A("thead",{children:Pe("tr",{children:[r&&A("th",{style:{width:"40px",textAlign:"center"},children:A(n,V({onChange:o},a))}),t.map(i=>A("th",{style:{width:i.width,minWidth:i.minWidth,maxWidth:i.maxWidth,textAlign:i.numeric?"right":"left"},children:i.label},i.label))]})})}cb.displayName="TableHead";function ub(e){let{rows:t,cellOrder:r,rowOptions:o,showCheckbox:n,onCheckboxChange:a,slots:{checkbox:i=$c}={},slotProps:{checkbox:s={}}={}}=e;return A("tbody",{children:t.map((l,p)=>Pe("tr",{children:[n&&A("td",{style:{textAlign:"center"},children:A(i,V({onChange:c=>a==null?void 0:a(c,p)},s))}),r.map(c=>{var u;return A("td",{style:{textAlign:(u=o==null?void 0:o[c])!=null&&u.numeric?"right":"left"},children:l[c]},c)})]},p))})}ub.displayName="TableBody";import RW,{forwardRef as EW,useCallback as bb,useEffect as IW,useImperativeHandle as OW,useRef as _W,useState as wW}from"react";function co(e){return typeof e=="string"||e instanceof String}function db(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function fb(e,t){return Array.isArray(t)?fb(e,(r,o)=>t.includes(o)):Object.entries(e).reduce((r,o)=>{let[n,a]=o;return t(a,n)&&(r[n]=a),r},{})}var Oe={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function mb(e){switch(e){case Oe.LEFT:return Oe.FORCE_LEFT;case Oe.RIGHT:return Oe.FORCE_RIGHT;default:return e}}function rh(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function $l(e,t){if(t===e)return!0;let r=Array.isArray(t),o=Array.isArray(e),n;if(r&&o){if(t.length!=e.length)return!1;for(n=0;n<t.length;n++)if(!$l(t[n],e[n]))return!1;return!0}if(r!=o)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){let a=t instanceof Date,i=e instanceof Date;if(a&&i)return t.getTime()==e.getTime();if(a!=i)return!1;let s=t instanceof RegExp,l=e instanceof RegExp;if(s&&l)return t.toString()==e.toString();if(s!=l)return!1;let p=Object.keys(t);for(n=0;n<p.length;n++)if(!Object.prototype.hasOwnProperty.call(e,p[n]))return!1;for(n=0;n<p.length;n++)if(!$l(e[p[n]],t[p[n]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}var oh=class{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Oe.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Oe.RIGHT:Oe.LEFT}};function Te(e,t){return new Te.InputMask(e,t)}function hb(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?Te.MaskedRegExp:co(e)?Te.MaskedPattern:e===Date?Te.MaskedDate:e===Number?Te.MaskedNumber:Array.isArray(e)||e===Array?Te.MaskedDynamic:Te.Masked&&e.prototype instanceof Te.Masked?e:Te.Masked&&e instanceof Te.Masked?e.constructor:e instanceof Function?Te.MaskedFunction:(console.warn("Mask not found for mask",e),Te.Masked)}function la(e){if(!e)throw new Error("Options in not defined");if(Te.Masked){if(e.prototype instanceof Te.Masked)return{mask:e};let t=e instanceof Te.Masked?{mask:e}:db(e)&&e.mask instanceof Te.Masked?e:{},{mask:r=void 0}=t,o=ge(t,["mask"]);if(r){let n=r.mask;return V(re(V({},fb(r,(a,i)=>!i.startsWith("_"))),{mask:r.constructor,_mask:n}),o)}}return db(e)?V({},e):{mask:e}}function Ir(e){if(Te.Masked&&e instanceof Te.Masked)return e;let t=la(e),r=hb(t.mask);if(!r)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===r&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new r(t)}Te.createMask=Ir;var ii=class{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch(r){}return t!=null?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch(r){}return t!=null?t:this.value.length}select(t,r){if(!(t==null||r==null||t===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(t,r)}catch(o){}}get isActive(){return!1}};Te.MaskElement=ii;var sI=90,gW=89,pa=class extends ii{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,r,o;return(t=(r=(o=this.input).getRootNode)==null?void 0:r.call(o))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===sI&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===gW&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===sI&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}};Te.HTMLMaskElement=pa;var Qc=class extends pa{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,r){this.input.setSelectionRange(t,r)}get value(){return this.input.value}set value(t){this.input.value=t}};Te.HTMLMaskElement=pa;var jl=class extends pa{get _unsafeSelectionStart(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o<n?o:n}get _unsafeSelectionEnd(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o>n?o:n}_unsafeSelect(t,r){if(!this.rootElement.createRange)return;let o=this.rootElement.createRange();o.setStart(this.input.firstChild||this.input,t),o.setEnd(this.input.lastChild||this.input,r);let n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(o))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}};Te.HTMLContenteditableMaskElement=jl;var eu=class e{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>e.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}};eu.MAX_LENGTH=100;var nh=class{constructor(t,r){this.el=t instanceof ii?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new jl(t):new Qc(t),this.masked=Ir(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new eu,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var r;return t==null||((r=this.masked)==null?void 0:r.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof Te.Masked)&&this.masked.constructor===hb(t)){this.masked.updateOptions({mask:t});return}let r=t instanceof Te.Masked?t:Ir({mask:t});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,r){let o=this._listeners[t];o&&o.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(t){let r=this.masked.unmaskedValue,o=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==r||this.value!==o||this._rawInputValue!==n;this._unmaskedValue=r,this._value=o,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){let i=t,{mask:r}=i,o=ge(i,["mask"]),n=!this.maskEquals(r),a=this.masked.optionsIsChanged(o);n&&(this.mask=r),a&&this.masked.updateOptions(o),(n||a)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Oe.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,r){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(r),this}off(t,r){if(!this._listeners[t])return this;if(!r)return delete this._listeners[t],this;let o=this._listeners[t].indexOf(r);return o>=0&&this._listeners[t].splice(o,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();let r=new oh({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),o=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=o===this.masked.rawInputValue?r.removeDirection:Oe.NONE,i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==Oe.NONE&&(i=this.masked.nearestInputPos(i,Oe.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};Te.InputMask=nh;var Ve=class e{static normalize(t){return Array.isArray(t)?t:[t,new e]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}};Te.ChangeDetails=Ve;var Or=class{constructor(t,r,o){t===void 0&&(t=""),r===void 0&&(r=0),this.value=t,this.from=r,this.stop=o}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";let r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";let t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}};var Gt=class e{constructor(t){this._value="",this._update(V(V({},e.DEFAULTS),t)),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,r){r===void 0&&(r={input:!0}),this.reset(),this.append(t,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,r){return t}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(t,r)}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Or(this.extractInput(t,r),t)}appendTail(t){return co(t)&&(t=new Or(String(t))),t.appendTo(this)}_appendCharRaw(t,r){return t?(this._value+=t,new Ve({inserted:t,rawInserted:t})):new Ve}_appendChar(t,r,o){r===void 0&&(r={});let n=this.state,a;if([t,a]=this.doPrepareChar(t,r),t&&(a=a.aggregate(this._appendCharRaw(t,r)),!a.rawInserted&&this.autofix==="pad")){let i=this.state;this.state=n;let s=this.pad(r),l=this._appendCharRaw(t,r);s=s.aggregate(l),l.rawInserted||s.equals(a)?a=s:this.state=i}if(a.inserted){let i,s=this.doValidate(r)!==!1;if(s&&o!=null){let l=this.state;if(this.overwrite===!0){i=o.state;for(let c=0;c<a.rawInserted.length;++c)o.unshift(this.displayValue.length-a.tailShift)}let p=this.appendTail(o);if(s=p.rawInserted.length===o.toString().length,!(s&&p.inserted)&&this.overwrite==="shift"){this.state=l,i=o.state;for(let c=0;c<a.rawInserted.length;++c)o.shift();p=this.appendTail(o),s=p.rawInserted.length===o.toString().length}s&&p.inserted&&(this.state=l)}s||(a=new Ve,this.state=n,o&&i&&(o.state=i))}return a}_appendPlaceholder(){return new Ve}_appendEager(){return new Ve}append(t,r,o){if(!co(t))throw new Error("value should be string");let n=co(o)?new Or(String(o)):o;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[t,a]=this.doPrepare(t,r);for(let i=0;i<t.length;++i){let s=this._appendChar(t[i],r,n);if(!s.rawInserted&&!this.doSkipInvalid(t[i],r,n))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&t&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(r),new Ve}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;let r=this.rawInputValue,o=this.value,n=t();return this.rawInputValue=r,this.value&&this.value!==o&&o.indexOf(this.value)===0&&(this.append(o.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;let r=this.state,o=t(this);return this.state=r,delete this._isolated,o}doSkipInvalid(t,r,o){return!!this.skipInvalid}doPrepare(t,r){return r===void 0&&(r={}),Ve.normalize(this.prepare?this.prepare(t,this,r):t)}doPrepareChar(t,r){return r===void 0&&(r={}),Ve.normalize(this.prepareChar?this.prepareChar(t,this,r):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,r,o,n,a){o===void 0&&(o=""),n===void 0&&(n=Oe.NONE),a===void 0&&(a={input:!0});let i=t+r,s=this.extractTail(i),l=this.eager===!0||this.eager==="remove",p;l&&(n=mb(n),p=this.extractInput(0,i,{raw:!0}));let c=t,u=new Ve;if(n!==Oe.NONE&&(c=this.nearestInputPos(t,r>1&&t!==0&&!l?Oe.NONE:n),u.tailShift=c-t),u.aggregate(this.remove(c)),l&&n!==Oe.NONE&&p===this.rawInputValue)if(n===Oe.FORCE_LEFT){let f;for(;p===this.rawInputValue&&(f=this.displayValue.length);)u.aggregate(new Ve({tailShift:-1})).aggregate(this.remove(f-1))}else n===Oe.FORCE_RIGHT&&s.unshift();return u.aggregate(this.append(o,a,s))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!$l(this,t)}typedValueEquals(t){let r=this.typedValue;return t===r||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(r)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new Ve}};Gt.DEFAULTS={skipInvalid:!0};Gt.EMPTY_VALUES=[void 0,null,""];Te.Masked=Gt;var Hl=class e{constructor(t,r){t===void 0&&(t=[]),r===void 0&&(r=0),this.chunks=t,this.from=r}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=co(t)?new Or(String(t)):t;let r=this.chunks[this.chunks.length-1],o=r&&(r.stop===t.stop||t.stop==null)&&t.from===r.from+r.toString().length;if(t instanceof Or)o?r.extend(t.toString()):this.chunks.push(t);else if(t instanceof e){if(t.stop==null){let n;for(;t.chunks.length&&t.chunks[0].stop==null;)n=t.chunks.shift(),n.from+=t.from,this.extend(n)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Te.MaskedPattern))return new Or(this.toString()).appendTo(t);let r=new Ve;for(let o=0;o<this.chunks.length;++o){let n=this.chunks[o],a=t._mapPosToBlock(t.displayValue.length),i=n.stop,s;if(i!=null&&(!a||a.index<=i)&&((n instanceof e||t._stops.indexOf(i)>=0)&&r.aggregate(t._appendPlaceholder(i)),s=n instanceof e&&t._blocks[i]),s){let l=s.appendTail(n);r.aggregate(l);let p=n.toString().slice(l.rawInserted.length);p&&r.aggregate(t.append(p,{tail:!0}))}else r.aggregate(t.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){let n=t,{chunks:r}=n,o=ge(n,["chunks"]);Object.assign(this,o),this.chunks=r.map(a=>{let i="chunks"in a?new e:new Or;return i.state=a,i})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";let r=t!=null?t-this.from:t,o=0;for(;o<this.chunks.length;){let n=this.chunks[o],a=n.unshift(r);if(n.toString()){if(!a)break;++o}else this.chunks.splice(o,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){let r=this.chunks[t],o=r.shift();if(r.toString()){if(!o)break;--t}else this.chunks.splice(t,1);if(o)return o}return""}};var ah=class{constructor(t,r){this.masked=t,this._log=[];let{offset:o,index:n}=t._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=o,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){let t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Oe.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Oe.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Oe.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Oe.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Oe.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Oe.NONE),!0})}};var Ul=class{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(r),this._value||(this._isRawInput=!1),new Ve}nearestInputPos(t,r){r===void 0&&(r=Oe.NONE);let o=0,n=this._value.length;switch(r){case Oe.LEFT:case Oe.FORCE_LEFT:return o;case Oe.NONE:case Oe.RIGHT:case Oe.FORCE_RIGHT:default:return n}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._isRawInput?r-t:0}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),o===void 0&&(o={}),o.raw&&this._isRawInput&&this._value.slice(t,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new Ve;let o=this.eager===!0||this.eager==="append",a=this.char===t&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!o)&&!r.tail,i=new Ve({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(r.raw||r.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){let t=new Ve;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new Or("")}appendTail(t){return co(t)&&(t=new Or(String(t))),t.appendTo(this)}append(t,r,o){let n=this._appendChar(t[0],r);return o!=null&&(n.tailShift+=this.appendTail(o).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}};var si=class{constructor(t){let p=t,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s}=p,l=ge(p,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=Ir(l),Object.assign(this,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),t===0&&r>=1?(this.isFilled=!1,this.masked.remove(t,r)):new Ve}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new Ve;let o=this.masked.state,n=this.masked._appendChar(t,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new Ve,this.masked.state=o),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(t,r,o){return this.masked.append(t,this.currentMaskFlags(r),o)}_appendPlaceholder(){return this.isFilled||this.isOptional?new Ve:(this.isFilled=!0,new Ve({inserted:this.placeholderChar}))}_appendEager(){return new Ve}extractTail(t,r){return this.masked.extractTail(t,r)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.masked.extractInput(t,r,o)}nearestInputPos(t,r){r===void 0&&(r=Oe.NONE);let o=0,n=this.value.length,a=Math.min(Math.max(t,o),n);switch(r){case Oe.LEFT:case Oe.FORCE_LEFT:return this.isComplete?a:o;case Oe.RIGHT:case Oe.FORCE_RIGHT:return this.isComplete?a:n;case Oe.NONE:default:return a}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.value.slice(t,r).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var r;return re(V({},t),{_beforeTailState:(t==null||(r=t._beforeTailState)==null?void 0:r.masked)||(t==null?void 0:t._beforeTailState)})}pad(t){return new Ve}};si.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};var ih=class extends Gt{updateOptions(t){super.updateOptions(t)}_update(t){let r=t.mask;r&&(t.validate=o=>o.search(r)>=0),super._update(t)}};Te.MaskedRegExp=ih;var Zt=class e extends Gt{constructor(t){super(re(V(V({},e.DEFAULTS),t),{definitions:Object.assign({},si.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)}))}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){let t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};let r=this.mask;if(!r||!t)return;let o=!1,n=!1;for(let i=0;i<r.length;++i){if(this.blocks){let c=r.slice(i),u=Object.keys(this.blocks).filter(d=>c.indexOf(d)===0);u.sort((d,y)=>y.length-d.length);let f=u[0];if(f){let a=la(this.blocks[f]),{expose:d,repeat:y}=a,h=ge(a,["expose","repeat"]),g=re(V({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix},h),{repeat:y,parent:this}),b=y!=null?new Te.RepeatBlock(g):Ir(g);b&&(this._blocks.push(b),d&&(this.exposeBlock=b),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),i+=f.length-1;continue}}let s=r[i],l=s in t;if(s===e.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){o=!o;continue}if(s==="["||s==="]"){n=!n;continue}if(s===e.ESCAPE_CHAR){if(++i,s=r[i],!s)break;l=!1}let p=l?new si(re(V({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},la(t[s])),{parent:this})):new Ul({char:s,eager:this.eager,isUnmasking:o});this._blocks.push(p)}}get state(){return re(V({},super.state),{_blocks:this._blocks.map(t=>t.state)})}set state(t){if(!t){this.reset();return}let n=t,{_blocks:r}=n,o=ge(n,["_blocks"]);this._blocks.forEach((a,i)=>a.state=r[i]),super.state=o}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,r)=>t+=r.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(r),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,r)=>t+=r.value,"")}set value(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(r),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(r),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,r)=>t+=r.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;let r=new Ve,o=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(o==null)return r;this._blocks[o].isFilled&&++o;for(let n=o;n<this._blocks.length;++n){let a=this._blocks[n]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._mapPosToBlock(this.displayValue.length),n=new Ve;if(!o)return n;for(let i=o.index,s;s=this._blocks[i];++i){var a;let l=s._appendChar(t,re(V({},r),{_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]}));if(n.aggregate(l),l.consumed)break}return n}extractTail(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=new Hl;return t===r||this._forEachBlocksInRange(t,r,(n,a,i,s)=>{let l=n.extractTail(i,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof Hl&&(l.blockIndex=a),o.extend(l)}),o}extractInput(t,r,o){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),o===void 0&&(o={}),t===r)return"";let n="";return this._forEachBlocksInRange(t,r,(a,i,s,l)=>{n+=a.extractInput(s,l,o)}),n}_findStopBefore(t){let r;for(let o=0;o<this._stops.length;++o){let n=this._stops[o];if(n<=t)r=n;else break}return r}_appendPlaceholder(t){let r=new Ve;if(this.lazy&&t==null)return r;let o=this._mapPosToBlock(this.displayValue.length);if(!o)return r;let n=o.index,a=t!=null?t:this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||t!=null){var s;r.aggregate(i._appendPlaceholder((s=i._blocks)==null?void 0:s.length))}}),r}_mapPosToBlock(t){let r="";for(let o=0;o<this._blocks.length;++o){let n=this._blocks[o],a=r.length;if(r+=n.displayValue,t<=r.length)return{index:o,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((r,o)=>r+=o.displayValue.length,0)}_forEachBlocksInRange(t,r,o){r===void 0&&(r=this.displayValue.length);let n=this._mapPosToBlock(t);if(n){let a=this._mapPosToBlock(r),i=a&&n.index===a.index,s=n.offset,l=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(o(this._blocks[n.index],n.index,s,l),a&&!i){for(let p=n.index+1;p<a.index;++p)o(this._blocks[p],p,0,this._blocks[p].displayValue.length);o(this._blocks[a.index],a.index,0,a.offset)}}}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._forEachBlocksInRange(t,r,(n,a,i,s)=>{o.aggregate(n.remove(i,s))}),o}nearestInputPos(t,r){if(r===void 0&&(r=Oe.NONE),!this._blocks.length)return 0;let o=new ah(this,t);if(r===Oe.NONE)return o.pushRightBeforeInput()||(o.popState(),o.pushLeftBeforeInput())?o.pos:this.displayValue.length;if(r===Oe.LEFT||r===Oe.FORCE_LEFT){if(r===Oe.LEFT){if(o.pushRightBeforeFilled(),o.ok&&o.pos===t)return t;o.popState()}if(o.pushLeftBeforeInput(),o.pushLeftBeforeRequired(),o.pushLeftBeforeFilled(),r===Oe.LEFT){if(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.ok&&o.pos<=t||(o.popState(),o.ok&&o.pos<=t))return o.pos;o.popState()}return o.ok?o.pos:r===Oe.FORCE_LEFT?0:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:0)}return r===Oe.RIGHT||r===Oe.FORCE_RIGHT?(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.pushRightBeforeFilled()?o.pos:r===Oe.FORCE_RIGHT?this.displayValue.length:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:this.nearestInputPos(t,Oe.LEFT))):t}totalInputPositions(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=0;return this._forEachBlocksInRange(t,r,(n,a,i,s)=>{o+=n.totalInputPositions(i,s)}),o}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){let r=this._maskedBlocks[t];return r?r.map(o=>this._blocks[o]):[]}pad(t){let r=new Ve;return this._forEachBlocksInRange(0,this.displayValue.length,o=>r.aggregate(o.pad(t))),r}};Zt.DEFAULTS=re(V({},Gt.DEFAULTS),{lazy:!0,placeholderChar:"_"});Zt.STOP_CHAR="`";Zt.ESCAPE_CHAR="\\";Zt.InputDefinition=si;Zt.FixedDefinition=Ul;Te.MaskedPattern=Zt;var li=class extends Zt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){let c=t,{to:r=this.to||0,from:o=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix}=c,i=ge(c,["to","from","maxLength","autofix"]);this.to=r,this.from=o,this.maxLength=Math.max(String(r).length,n),this.autofix=a;let s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0"),p=0;for(;p<l.length&&l[p]===s[p];)++p;i.mask=l.slice(0,p).replace(/0/g,"\\0")+"0".repeat(this.maxLength-p),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let r="",o="",[,n,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(n.length)+a,o="9".repeat(n.length)+a),r=r.padEnd(this.maxLength,"0"),o=o.padEnd(this.maxLength,"9"),[r,o]}doPrepareChar(t,r){r===void 0&&(r={});let o;return[t,o]=super.doPrepareChar(t.replace(/\D/g,""),r),t||(o.skip=!this.isComplete),[t,o]}_appendCharRaw(t,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,r);let o=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+t);return Number(i)<this.from?super._appendCharRaw(o[this.value.length],r):Number(a)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(o[this.value.length],r).aggregate(this._appendCharRaw(t,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(t,r)}doValidate(t){let r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;let[n,a]=this.boundaries(r);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){let r=new Ve;if(this.value.length===this.maxLength)return r;let o=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)r.aggregate(super._appendCharRaw("0",t));o.split("").forEach(a=>this._appendCharRaw(a))}return r}};Te.MaskedRange=li;var Wl=class e extends Zt{static extractPatternOptions(t){let a=t,{mask:r,pattern:o}=a,n=ge(a,["mask","pattern"]);return re(V({},n),{mask:co(r)?r:o})}constructor(t){super(e.extractPatternOptions(V(V({},e.DEFAULTS),t)))}updateOptions(t){super.updateOptions(t)}_update(t){let s=V(V({},e.DEFAULTS),t),{mask:r,pattern:o,blocks:n}=s,a=ge(s,["mask","pattern","blocks"]),i=Object.assign({},e.GET_DEFAULT_BLOCKS());t.min&&(i.Y.from=t.min.getFullYear()),t.max&&(i.Y.to=t.max.getFullYear()),t.min&&t.max&&i.Y.from===i.Y.to&&(i.m.from=t.min.getMonth()+1,i.m.to=t.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=t.min.getDate(),i.d.to=t.max.getDate())),Object.assign(i,this.blocks,n),super._update(re(V({},a),{mask:co(r)?r:o,blocks:i}))}doValidate(t){let r=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(e.extractPatternOptions(t))}};Wl.GET_DEFAULT_BLOCKS=()=>({d:{mask:li,from:1,to:31,maxLength:2},m:{mask:li,from:1,to:12,maxLength:2},Y:{mask:li,from:1900,to:9999}});Wl.DEFAULTS=re(V({},Zt.DEFAULTS),{mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";let r=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),n=e.getFullYear();return[r,o,n].join(".")},parse:(e,t)=>{let[r,o,n]=e.split(".").map(Number);return new Date(n,o-1,r)}});Te.MaskedDate=Wl;var tu=class e extends Gt{constructor(t){super(V(V({},e.DEFAULTS),t)),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(r=>{let i=la(r),{expose:o}=i,n=ge(i,["expose"]),a=Ir(V({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid},n));return o&&(this.exposeMask=a),a}):[])}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._applyDispatch(t,r);return this.currentMask&&o.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(r))),o}_applyDispatch(t,r,o){t===void 0&&(t=""),r===void 0&&(r={}),o===void 0&&(o="");let n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,i=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,s=a.slice(i.length),l=this.currentMask,p=new Ve,c=l==null?void 0:l.state;return this.currentMask=this.doDispatch(t,V({},r),o),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),p.tailShift=this.currentMask.value.length-n.length),s&&(p.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),p}_appendPlaceholder(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){let r=new Ve;return t&&r.aggregate(this._applyDispatch("",{},t)),r.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var r,o;return re(V({},t),{_beforeTailState:((r=t._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((o=t._beforeTailState)==null?void 0:o.currentMask)||t._beforeTailState})}doDispatch(t,r,o){return r===void 0&&(r={}),o===void 0&&(o=""),this.dispatch(t,this,r,o)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,r){r===void 0&&(r={});let[o,n]=super.doPrepare(t,r);if(this.currentMask){let a;[o,a]=super.doPrepare(o,this.currentMaskFlags(r)),n=n.aggregate(a)}return[o,n]}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(t,r);if(this.currentMask){let a;[o,a]=super.doPrepareChar(o,this.currentMaskFlags(r)),n=n.aggregate(a)}return[o,n]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(t);this.currentMask&&(this.currentMask.typedValue=t,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,r){let o=new Ve;return this.currentMask&&o.aggregate(this.currentMask.remove(t,r)).aggregate(this._applyDispatch()),o}get state(){var t;return re(V({},super.state),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state})}set state(t){let i=t,{compiledMasks:r,currentMaskRef:o,currentMask:n}=i,a=ge(i,["compiledMasks","currentMaskRef","currentMask"]);r&&this.compiledMasks.forEach((s,l)=>s.state=r[l]),o!=null&&(this.currentMask=o,this.currentMask.state=n),super.state=a}extractInput(t,r,o){return this.currentMask?this.currentMask.extractInput(t,r,o):""}extractTail(t,r){return this.currentMask?this.currentMask.extractTail(t,r):super.extractTail(t,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,r){return this.currentMask?this.currentMask.nearestInputPos(t,r):super.nearestInputPos(t,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((r,o)=>{if(!t[o])return;let i=t[o],{mask:n}=i,a=ge(i,["mask"]);return $l(r,a)&&r.maskEquals(n)}):super.maskEquals(t)}typedValueEquals(t){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(t))}};tu.DEFAULTS=re(V({},Gt.DEFAULTS),{dispatch:(e,t,r,o)=>{if(!t.compiledMasks.length)return;let n=t.rawInputValue,a=t.compiledMasks.map((i,s)=>{let l=t.currentMask===i,p=l?i.displayValue.length:i.nearestInputPos(i.displayValue.length,Oe.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):l||i.remove(p),i.append(e,t.currentMaskFlags(r)),i.appendTail(o),{index:s,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(p,i.nearestInputPos(i.displayValue.length,Oe.FORCE_LEFT)))}});return a.sort((i,s)=>s.weight-i.weight||s.totalInputPositions-i.totalInputPositions),t.compiledMasks[a[0].index]}});Te.MaskedDynamic=tu;var ru=class e extends Zt{constructor(t){super(V(V({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){let n=t,{enum:r}=n,o=ge(n,["enum"]);if(r){let a=r.map(l=>l.length),i=Math.min(...a),s=Math.max(...a)-i;o.mask="*".repeat(i),s&&(o.mask+="["+"*".repeat(s)+"]"),this.enum=r}super._update(o)}_appendCharRaw(t,r){r===void 0&&(r={});let o=Math.min(this.nearestInputPos(0,Oe.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+t,o));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,s)=>{let l=n[0][s];s>=this.value.length||l===i.value||(i.reset(),i._appendChar(l,r))});let a=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new Ve}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Or("",t)}remove(t,r){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),t===r)return new Ve;let o=Math.min(super.nearestInputPos(0,Oe.FORCE_RIGHT),this.value.length),n;for(n=t;n>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(o,n),o)).length>1);--n);let a=super.remove(n,r);return a.tailShift+=n-t,a}};ru.DEFAULTS=re(V({},Zt.DEFAULTS),{matchValue:(e,t,r)=>e.indexOf(t,r)===r});Te.MaskedEnum=ru;var sh=class extends Gt{updateOptions(t){super.updateOptions(t)}_update(t){super._update(re(V({},t),{validate:t.mask}))}};Te.MaskedFunction=sh;var lI,pi=class e extends Gt{constructor(t){super(V(V({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){let t="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",o=(this.scale?"("+rh(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+r+o),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(rh).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(rh(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){let r=t.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),r);return t&&!o&&(n.skip=!0),o&&!this.allowPositive&&!this.value&&o!=="-"&&n.aggregate(this._appendChar("-")),[o,n]}_separatorsCount(t,r){r===void 0&&(r=!1);let o=0;for(let n=0;n<t;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++o,r&&(t+=this.thousandsSeparator.length));return o}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r),this._removeThousandsSeparators(super.extractInput(t,r,o))}_appendCharRaw(t,r){r===void 0&&(r={});let o=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(o);this._value=this._removeThousandsSeparators(this.value);let a=this._value;this._value+=t;let i=this.number,s=!isNaN(i),l=!1;if(s){let f;this.min!=null&&this.min<0&&this.number<this.min&&(f=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(f=this.max),f!=null&&(this.autofix?(this._value=this.format(f,this).replace(e.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!r.tail)):s=!1),s&&(s=!!this._value.match(this._numberRegExp))}let p;s?p=new Ve({inserted:this._value.slice(a.length),rawInserted:l?"":t,skip:l}):(this._value=a,p=new Ve),this._value=this._insertThousandsSeparators(this._value);let c=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,u=this._separatorsCountFromSlice(c);return p.tailShift+=(u-n)*this.thousandsSeparator.length,p}_findSeparatorAround(t){if(this.thousandsSeparator){let r=t-this.thousandsSeparator.length+1,o=this.value.indexOf(this.thousandsSeparator,r);if(o<=t)return o}return-1}_adjustRangeWithSeparators(t,r){let o=this._findSeparatorAround(t);o>=0&&(t=o);let n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[t,r]}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r);let o=this.value.slice(0,t),n=this.value.slice(r),a=this._separatorsCount(o.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(o+n));let i=this._separatorsCountFromSlice(o);return new Ve({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(t,r){if(!this.thousandsSeparator)return t;switch(r){case Oe.NONE:case Oe.LEFT:case Oe.FORCE_LEFT:{let o=this._findSeparatorAround(t-1);if(o>=0){let n=o+this.thousandsSeparator.length;if(t<n||this.value.length<=n||r===Oe.FORCE_LEFT)return o}break}case Oe.RIGHT:case Oe.FORCE_RIGHT:{let o=this._findSeparatorAround(t);if(o>=0)return o+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){let t=this.number,r=t;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==t&&(this.unmaskedValue=this.format(r,this));let o=this.value;this.normalizeZeros&&(o=this._normalizeZeros(o)),this.padFractionalZeros&&this.scale>0&&(o=this._padFractionalZeros(o)),this._value=o}super.doCommit()}_normalizeZeros(t){let r=this._removeThousandsSeparators(t).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(o,n,a,i)=>n+i),t.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(t){if(!t)return t;let r=t.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(t,r,o){r===void 0&&(r={});let n=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===e.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,r,o)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,e.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(e.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}};lI=pi;pi.UNMASKED_RADIX=".";pi.EMPTY_VALUES=[...Gt.EMPTY_VALUES,0];pi.DEFAULTS=re(V({},Gt.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[lI.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})});Te.MaskedNumber=pi;var lh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function yb(e,t,r){t===void 0&&(t=lh.MASKED),r===void 0&&(r=lh.MASKED);let o=Ir(e);return n=>o.runIsolated(a=>(a[t]=n,a[r]))}function pI(e,t,r,o){return yb(t,r,o)(e)}Te.PIPE_TYPE=lh;Te.createPipe=yb;Te.pipe=pI;var ph=class extends Zt{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var r,o,n;let l=la(t),{repeat:a}=l,i=ge(l,["repeat"]);this._blockOpts=Object.assign({},this._blockOpts,i);let s=Ir(this._blockOpts);this.repeat=(r=(o=a!=null?a:s.repeat)!=null?o:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:s},eager:s.eager,overwrite:s.overwrite,skipInvalid:s.skipInvalid,lazy:s.lazy,placeholderChar:s.placeholderChar,displayChar:s.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ir(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,r){r===void 0&&(r={});let o=new Ve;for(let l=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),p,c;p=(i=this._blocks[l])!=null?i:c=!c&&this._allocateBlock(l);++l){var n,a,i,s;let u=p._appendChar(t,re(V({},r),{_beforeTailState:(s=r._beforeTailState)==null||(s=s._blocks)==null?void 0:s[l]}));if(u.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(o.aggregate(u),u.consumed)break}return o}_trimEmptyTail(t,r){var o,n;t===void 0&&(t=0);let a=Math.max(((o=this._mapPosToBlock(t))==null?void 0:o.index)||0,this.repeatFrom,0),i;r!=null&&(i=(n=this._mapPosToBlock(r))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let s=0;for(let l=i;a<=l&&!this._blocks[l].unmaskedValue;--l,++s);s&&(this._blocks.splice(i-s+1,s),this.mask=this.mask.slice(s))}reset(){super.reset(),this._trimEmptyTail()}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._trimEmptyTail(t,r),o}totalInputPositions(t,r){return t===void 0&&(t=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,r)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};Te.RepeatBlock=ph;try{globalThis.IMask=Te}catch(e){}import vb from"react";var Le=Dn(R0(),1);import ch from"react";var cI={mask:Le.default.oneOfType([Le.default.array,Le.default.func,Le.default.string,Le.default.instanceOf(RegExp),Le.default.oneOf([Date,Number,Te.Masked]),Le.default.instanceOf(Te.Masked)]),value:Le.default.any,unmask:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["typed"])]),prepare:Le.default.func,prepareChar:Le.default.func,validate:Le.default.func,commit:Le.default.func,overwrite:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["shift"])]),eager:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["append","remove"])]),skipInvalid:Le.default.bool,onAccept:Le.default.func,onComplete:Le.default.func,placeholderChar:Le.default.string,displayChar:Le.default.string,lazy:Le.default.bool,definitions:Le.default.object,blocks:Le.default.object,enum:Le.default.arrayOf(Le.default.string),maxLength:Le.default.number,from:Le.default.number,to:Le.default.number,pattern:Le.default.string,format:Le.default.func,parse:Le.default.func,autofix:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["pad"])]),radix:Le.default.string,thousandsSeparator:Le.default.string,mapToRadix:Le.default.arrayOf(Le.default.string),scale:Le.default.number,normalizeZeros:Le.default.bool,padFractionalZeros:Le.default.bool,min:Le.default.oneOfType([Le.default.number,Le.default.instanceOf(Date)]),max:Le.default.oneOfType([Le.default.number,Le.default.instanceOf(Date)]),dispatch:Le.default.func,inputRef:Le.default.oneOfType([Le.default.func,Le.default.shape({current:Le.default.object})])},uI=Object.keys(cI).filter(e=>e!=="value"),vW=["value","unmask","onAccept","onComplete","inputRef"],bW=uI.filter(e=>vW.indexOf(e)<0);function gb(e){var t;let r=(t=class extends ch.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){let a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Te(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){let i=ge(a,[]);return Object.keys(i).filter(s=>bW.indexOf(s)<0).forEach(s=>{delete i[s]}),i}_extractNonMaskProps(a){let i=ge(a,[]);return uI.forEach(s=>{s!=="maxLength"&&delete i[s]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return ch.createElement(e,re(V({},this._extractNonMaskProps(this.props)),{inputRef:this._inputRef}))}},t.displayName=void 0,t.propTypes=void 0,t),o=e.displayName||e.name||"Component";return r.displayName="IMask("+o+")",r.propTypes=cI,ch.forwardRef((n,a)=>ch.createElement(r,re(V({},n),{ref:a})))}var xW=gb(e=>{let o=e,{inputRef:t}=o,r=ge(o,["inputRef"]);return vb.createElement("input",re(V({},r),{ref:t}))}),TW=(e,t)=>vb.createElement(xW,re(V({},e),{ref:t})),ca=vb.forwardRef(TW);import{useRef as VGe,useState as $Ge,useCallback as jGe,useEffect as HGe}from"react";import"react";import{jsx as PW}from"react/jsx-runtime";var ci=Nt(PW("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");import{motion as CW}from"framer-motion";var kW=CW(Of),SW=E(kW)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),ou=SW;ou.displayName="DialogActions";var En=ou;var DW=E(Ut,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),AW=E(No,{name:"DatePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),MW=E("div",{name:"DatePicker",slot:"container"})({width:"100%"}),dI=e=>{let t=`${e.getDate()}`,r=`${e.getMonth()+1}`,o=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(r)<10&&(r="0"+r),[o,r,t].join("/")},NW=RW.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=ge(a,["onChange"]);return A(ca,re(V({},n),{inputRef:r,onAccept:i=>o({target:{name:t.name,value:i}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:dI,parse:i=>{let s=i.split("/");return new Date(Number(s[0]),Number(s[1])-1,Number(s[2]))},autofix:"pad",overwrite:!0}))}),uh=EW((e,t)=>{let k=e,{onChange:r,disabled:o,label:n,error:a,helperText:i,minDate:s,maxDate:l,disableFuture:p,disablePast:c,required:u,sx:f,className:d}=k,y=ge(k,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className"]),h=_W(null),[g,b]=Rr(e.value,e.defaultValue||"",bb(S=>r==null?void 0:r({target:{name:e.name,value:S}}),[e.name,r])),[x,v]=wW(null),C=!!x;IW(()=>{var S;x||(S=h.current)==null||S.blur()},[x,h]),OW(t,()=>h.current,[h]);let T=bb(S=>{b(S.target.value)},[b]),P=bb(S=>{v(x?null:S.currentTarget),setTimeout(()=>{var O;(O=h.current)==null||O.focus()},0)},[x,v,h]);return A(MW,{children:A(Gr,{open:!0,children:Pe(Ao,{children:[A(Fr,re(V({},y),{color:a?"danger":y.color,ref:h,size:"sm",value:g,onChange:T,placeholder:"YYYY/MM/DD",disabled:o,required:u,error:a,slotProps:{input:{component:NW,ref:h}},className:d,sx:re(V({},f),{fontFamily:"monospace"}),endDecorator:A(Wt,{variant:"plain",onClick:P,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:A(ci,{})}),label:n,helperText:i})),C&&A(Fn,{onClickAway:()=>v(null),children:A(DW,{id:"date-picker-popper",open:!0,anchorEl:x,placement:"bottom-end",onMouseDown:S=>S.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(AW,{tabIndex:-1,role:"presentation",children:[A(ni,{value:Number.isNaN(new Date(g).getTime())?void 0:[new Date(g),void 0],onChange:([S])=>{T({target:{name:e.name,value:dI(S)}}),v(null)},minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),A(En,{sx:{p:1},children:A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{T({target:{name:e.name,value:""}}),v(null)},children:"Clear"})})]})})})]})})})});var fI=uh;import{motion as LW}from"framer-motion";var BW=LW(vm),nu=e=>{let y=e,{label:t,error:r,helperText:o,color:n,size:a,disabled:i,required:s,minRows:l=2,maxRows:p=4,sx:c,className:u}=y,f=ge(y,["label","error","helperText","color","size","disabled","required","minRows","maxRows","sx","className"]),d=A(BW,V({required:s,disabled:i,color:r?"danger":n,size:a,minRows:l,maxRows:p},f));return Pe(kn,{required:s,disabled:i,color:n,size:a,error:r,sx:c,className:u,children:[t&&A(Sn,{children:t}),d,o&&A(Rn,{children:o})]})};nu.displayName="Textarea";var mI=nu;import{useMemo as zW}from"react";import{motion as FW}from"framer-motion";var VW=FW(em),dh=VW;dh.displayName="Option";function au(e){let h=e,{label:t,helperText:r,error:o,size:n,color:a,disabled:i,required:s,onChange:l,sx:p,className:c}=h,u=ge(h,["label","helperText","error","size","color","disabled","required","onChange","sx","className"]),f=zW(()=>e.options.map(g=>typeof g!="object"?{value:g,label:g}:g),[e.options]),d=(g,b)=>{var C;let x=g||{target:{}},v=re(V({},x),{target:{name:((C=x.target)==null?void 0:C.name)||e.name,value:b||void 0}});l==null||l(v)},y=A(om,re(V({},u),{required:s,disabled:i,size:n,color:o?"danger":a,onChange:d,children:f.map(g=>A(dh,{value:g.value,children:g.label},g.value))}));return Pe(kn,{required:s,disabled:i,size:n,color:a,error:o,sx:p,className:c,children:[t&&A(Sn,{children:t}),y,r&&A(Rn,{children:r})]})}au.displayName="Select";var hI=au;import{motion as $W}from"framer-motion";var jW=$W(xm),iu=e=>A(jW,V({},e));iu.displayName="Tooltip";var yI=iu;import{motion as vI}from"framer-motion";function bI(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var WW=E("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),fh=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function GW(e){let{paginationModel:{page:t,pageSize:r},rowCount:o,onPageChange:n}=e,a=1,i=Math.ceil(o/r),s=[t-2,t-1].filter(u=>u>1),l=[t+1,t+2].filter(u=>u<=i-1),p=i>1&&t<i-3,c=i>1&&t>4;return A(Lt,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center",children:Pe(Lt,{direction:"row",spacing:.5,alignItems:"center",children:[A(Wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-1),disabled:t===a,"aria-label":"Previous page",children:A(Bm,{})}),t!==a&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(a),children:a}),c&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-3),children:"..."}),s.map(u=>A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),A(It,{variant:"soft",size:"sm",children:t}),l.map(u=>A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),p&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+3),children:"..."}),t!==i&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(i),children:i}),A(Wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+1),disabled:t===i,"aria-label":"Next page",children:A(zm,{})})]})})}var JW=e=>A(Lm,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:t=>t.stopPropagation(),onMouseDown:t=>{var i;let r=t.clientX,o=(i=e.current)==null?void 0:i.getBoundingClientRect().width,n=s=>{o&&r&&(e.current.style.width=`${o+(s.clientX-r)}px`)},a=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)}}),qW=E("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"100%"}}),KW=E("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>re(V({},e&&{background:"var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",color:"var(--ceed-palette-text-primary)"}),{"&:hover":{background:"var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"}})),YW=E("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),XW=vI(iI),ZW=e=>{let{width:t,maxWidth:r,minWidth:o,stickyHeader:n,resizable:a,field:i,tableId:s,headerName:l,required:p,editMode:c,sort:u,onSortChange:f,sortable:d=!0,sortOrder:y}=e,h=xb(null),g=nr(()=>`${s}_header_${l!=null?l:i}`.trim(),[s,l,i]),b=a==null||a?JW(h):null,x={width:t,minWidth:o!=null?o:"50px",maxWidth:r,position:n?void 0:"relative",cursor:d?"pointer":"default",userSelect:"none"},v=bI(e),C=y[0],T=d&&A(XW,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":g,"aria-description":(u!=null?u:C)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:u?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(u!=null?u:C)==="desc"?180:0,opacity:u?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}});return Pe(vI.th,{id:g,"aria-label":l!=null?l:i,"aria-sort":u?{asc:"ascending",desc:"descending"}[u]:"none",ref:h,style:x,onClick:P=>d&&(f==null?void 0:f({field:i,currentSort:u,multiple:P.shiftKey})),whileHover:"hover",initial:"initial",children:[Pe(Lt,{gap:1,direction:"row",justifyContent:v,children:[v==="end"&&T,Pe("div",{children:[l!=null?l:i,c&&p&&A(YW,{children:"*"})]}),v==="start"&&T]}),b]},i)},QW=e=>{var T;let{tableId:t,field:r,type:o,renderCell:n,renderEditCell:a,isCellEditable:i,noWrap:s,row:l,rowId:p}=e,[c,u]=gI(l[r]),f=xb(null),d=nr(()=>({row:l,value:c,id:p}),[l,p,c]),y=nr(()=>!!(e.editMode&&(typeof i=="function"?i(d):i==null||i)),[e.editMode,i,d]),h=nr(()=>re(V({},typeof e.componentProps=="function"?e.componentProps(d):e.componentProps||{}),{size:"sm"}),[e,d]),g=nr(()=>V(re(V({},h),{onChange:P=>{var k,S;(k=h.onChange)==null||k.call(h,P),u(P.target.value),o==="select"&&((S=e.onCellEditStop)==null||S.call(e,re(V({},d),{originalRow:l,row:re(V({},d.row),{[r]:P.target.value}),value:P.target.value})))},onFocus:P=>{var k,S;(k=h.onFocus)==null||k.call(h,P),(S=e.onCellEditStart)==null||S.call(e,re(V({},d),{originalRow:l,row:re(V({},d.row),{value:c}),value:c}))},onBlur:P=>{var k,S;(k=h.onBlur)==null||k.call(h,P),o&&["number","text","longText","currency","date"].includes(o)&&((S=e.onCellEditStop)==null||S.call(e,re(V({},d),{originalRow:l,row:re(V({},d.row),{[r]:c}),value:c})))}}),o==="autocomplete"&&{onChangeComplete:P=>{var k,S;(k=h.onChangeComplete)==null||k.call(h,P),u(P.target.value),(S=e.onCellEditStop)==null||S.call(e,re(V({},d),{originalRow:l,row:re(V({},d.row),{[r]:P.target.value}),value:P.target.value}))}}),[d,l,r,c,h,o,e]),b=nr(()=>a?a(d):{date:A(fI,V({value:c},g)),currency:A(aI,V({value:c},g)),number:A(Fr,V({value:c,type:"number"},g)),text:A(Fr,V({value:c,type:"text"},g)),longText:A(mI,V({value:c},g)),autocomplete:A(QE,V({value:c,options:g.options||[c]},g)),select:A(hI,V({value:c,options:g.options||[c]},g))}[o||"text"],[c,g,o]),x=nr(()=>{if(n)return n(d);let P=c;return{link:HW.createElement(e.component||ra,V({children:P},h))}[o||"text"]||P},[c,n,d,o,h,e]),v=nr(()=>y&&b?b:x,[y,b,x]),C=nr(()=>s&&e.type==="longText",[s,e.type]);return mh(()=>{u(l[r])},[l,r]),A("td",{ref:f,headers:`${t}_header_${(T=e.headerName)!=null?T:r}`,style:{textAlign:bI({type:o}),verticalAlign:y?"top":"middle"},children:C?A(yI,{title:c,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500,children:A("div",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:v})}):v},r)},e9=e=>{let{tableId:t,columns:r,rowId:o,editMode:n,noWrap:a,row:i}=e;return A(Ao,{children:r.map((s,l)=>m0(QW,re(V({},s),{tableId:t,key:`${o}_${s.field.toString()}_${l}`,row:i,rowId:o,editMode:n,noWrap:a})))})};function t9({rows:e,columns:t,rowCount:r,pagination:o,paginationMode:n,paginationModel:a,onPaginationModelChange:i,sortModel:s,sortOrder:l=["asc","desc",null],selectionModel:p=[],onSortModelChange:c,onSelectionModelChange:u,editMode:f,getId:d,isTotalSelected:y}){let[h,g]=Rr(s,[],ua(L=>c==null?void 0:c(L),[c])),b=nr(()=>t.reduce((L,U)=>re(V({},L),{[U.field]:U}),{}),[t]),x=ua((L,U)=>{for(let z of h){let{field:R,sort:q}=z,oe=L[R],_=U[R],pe=b[R],me=0;if(pe.sortComparator?me=pe.sortComparator({rowA:L,rowB:U}):typeof oe=="string"&&typeof _=="string"?me=oe.localeCompare(_):typeof oe=="number"&&typeof _=="number"?me=oe-_:oe instanceof Date&&_ instanceof Date&&(me=oe.getTime()-_.getTime()),me!==0)return q==="asc"?me:-me}return 0},[h,b]),v=nr(()=>h.length?[...e].sort(x):e,[e,h,x]),C=nr(()=>Array.from(new Set(l)),[l]),[T,P]=gI((a==null?void 0:a.page)||1),k=(a==null?void 0:a.pageSize)||20,S=ua((L,U)=>{var z,R;return(R=(z=d==null?void 0:d(L))!=null?z:L==null?void 0:L.id)!=null?R:`${(U||0)+(T-1)*k}`},[d!=null?d:T,k]),O=nr(()=>new Set(p),[p]),I=nr(()=>!o||n==="server"?v:v.slice((T-1)*k,(T-1)*k+k),[v,T,k,n,o]),B=nr(()=>I.length>0&&I.every((L,U)=>O.has(S(L,U))),[I,O,S]),M=r||v.length,w=nr(()=>y!=null?y:M>0&&p.length===M,[y,p,M]),$=nr(()=>(t||Object.keys(v[0]||{}).map(U=>({field:U}))).map(U=>{var z,R,q;return re(V({},U),{isCellEditable:f&&(typeof U.isCellEditable=="function"?U.isCellEditable:(z=U.isCellEditable)!=null?z:!0),sort:(R=h.find(oe=>oe.field===U.field))==null?void 0:R.sort,sortOrder:((q=b[U.field])==null?void 0:q.sortOrder)||C})}),[v,t,f,h,b,C]),N=ua(L=>{P(L),i==null||i({page:L,pageSize:k})},[i,k]),D=ua(L=>{let{field:U,currentSort:z,multiple:R}=L,oe=b[U].sortOrder||C;if(z!==void 0){let pe=(oe.indexOf(z)+1)%oe.length,me=oe[pe];if(!me){let ae=R?h.filter(W=>W.field!==U):[];g(ae);return}let we=R?h.map(ae=>ae.field===U?{field:U,sort:me}:ae):[{field:U,sort:me}];g(we)}else{let _=R?[...h,{field:U,sort:oe[0]}]:[{field:U,sort:oe[0]}];g(_)}},[C,b,h,g]);return mh(()=>{a||N(1)},[M,N,a]),mh(()=>{let L=Math.max(1,Math.ceil(M/k));T>L&&N(L)},[T,M,k,N]),mh(()=>{u==null||u([])},[T]),{rowCount:M,page:T,pageSize:k,onPaginationModelChange:N,getId:S,HeadCell:ZW,BodyRow:e9,dataInPage:I,handleSortChange:D,isAllSelected:B,isTotalSelected:w,isSelectedRow:ua(L=>O.has(L),[O]),onAllCheckboxChange:ua(()=>{u==null||u(B?[]:I.map(S))},[B,I,u,S]),onCheckboxChange:ua((L,U)=>{if(O.has(U)){let z=p.filter(R=>R!==U);u==null||u(z)}else{let z=[...p,U];u==null||u(z)}},[p,u,O]),columns:$,onTotalSelect:ua(()=>{u==null||u(w?[]:v.map(S),!w)},[w,v,u,S])}}function Tb(e){let ve=e,{rows:t,checkboxSelection:r,editMode:o,selectionModel:n,onSelectionModelChange:a,disableSelectionOnClick:i,rowCount:s,columns:l,onPaginationModelChange:p,pagination:c,paginationMode:u,paginationModel:f,sortModel:d,sortOrder:y,onSortModelChange:h,loading:g,slots:{checkbox:b=$c,toolbar:x,footer:v,loadingOverlay:C=()=>A(mc,{value:8,variant:"plain"})}={},slotProps:{checkbox:T={},toolbar:P,background:k={}}={},stripe:S}=ve,O=ge(ve,["rows","checkboxSelection","editMode","selectionModel","onSelectionModelChange","disableSelectionOnClick","rowCount","columns","onPaginationModelChange","pagination","paginationMode","paginationModel","sortModel","sortOrder","onSortModelChange","loading","slots","slotProps","stripe"]),I=UW(),B=xb(null),{columns:M,isAllSelected:w,isSelectedRow:$,onAllCheckboxChange:N,onCheckboxChange:D,getId:L,rowCount:U,page:z,pageSize:R,onPaginationModelChange:q,handleSortChange:oe,dataInPage:_,isTotalSelected:pe,onTotalSelect:me,HeadCell:we,BodyRow:ae}=t9(e),W=Am({count:_.length,getScrollElement:()=>B.current,estimateSize:()=>32,measureElement:Ae=>Ae.clientHeight,overscan:20}),de=nr(()=>({page:z,pageSize:R}),[z,R]),fe=W.getTotalSize(),Ce=W.getVirtualItems();return Pe(Lm,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"},children:[(!!r||!!x)&&Pe(Lt,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center",children:[!!r&&Pe(Lt,{direction:"row",spacing:1,children:[!w&&Pe(Yr,{level:"body-xs",children:[fh((n==null?void 0:n.length)||0)," items selected"]}),w&&!pe&&Pe(Lt,{direction:"row",spacing:1,alignItems:"center",children:[Pe(Yr,{level:"body-xs",children:["All ",fh((n==null?void 0:n.length)||0)," items on this page are selected."]}),Pe(It,{size:"sm",variant:"plain",onClick:me,children:["Select all ",fh(U!=null?U:t.length)," items"]})]}),pe&&Pe(Lt,{direction:"row",spacing:1,alignItems:"center",children:[Pe(Yr,{level:"body-xs",children:["All ",fh(U!=null?U:t.length)," items are selected."]}),A(It,{size:"sm",variant:"plain",color:"danger",onClick:me,children:"Cancel"})]})]}),x&&A(x,V({},P||{}))]}),A(No,re(V({variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:B},k),{children:Pe(Zc,re(V({},O),{children:[A("thead",{children:Pe("tr",{children:[r&&A("th",{style:{width:"40px",textAlign:"center"},children:A(b,V({onChange:N,checked:w,indeterminate:(n||[]).length>0&&!w},T))}),M.map((Ae,We)=>A(we,V({tableId:I,stickyHeader:e.stickyHeader,editMode:!!Ae.isCellEditable,onSortChange:oe},Ae),`${Ae.field.toString()}_${We}`))]})}),Pe(qW,{style:{height:`${fe}px`},children:[!!g&&A(WW,{children:A("td",{children:A(Lm,{sx:{position:"absolute",top:0,left:0,right:0},children:A(C,{})})})}),Ce.map((Ae,We)=>{let te=Ae.index,Z=_[te],he=L(Z,te),be=S&&(S==="even"&&(te+1)%2===0||S==="odd"&&(te+1)%2===1);return Pe(KW,{role:r&&!i?"checkbox":void 0,tabIndex:r&&!i?-1:void 0,onClick:r&&!i?Be=>D(Be,he):void 0,"aria-checked":r&&!i?$(he):void 0,striped:be,style:{height:`${Ae.size}px`,transform:`translateY(${Ae.start-We*Ae.size}px)`},children:[r&&A("th",{scope:"row",style:{textAlign:"center"},children:A(b,V({onChange:Be=>D(Be,he),checked:$(he)},T))}),A(ae,{tableId:I,columns:M,row:Z,rowId:he,editMode:o,noWrap:e.noWrap})]},he)})]}),v&&A(v,{})]}))})),R<U&&c&&A(GW,{paginationModel:de,rowCount:U,onPageChange:q})]})}Tb.displayName="DataTable";import r9,{forwardRef as o9,useCallback as hh,useEffect as n9,useImperativeHandle as a9,useMemo as i9,useRef as s9,useState as l9}from"react";var p9=E(Ut,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),c9=E(No,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),u9=E("div",{name:"DateRangePicker",slot:"container"})({width:"100%"}),xI=([e,t])=>{let r=o=>{let n=`${o.getDate()}`,a=`${o.getMonth()+1}`,i=o.getFullYear();return Number(n)<10&&(n="0"+n),Number(a)<10&&(a="0"+a),[i,a,n].join("/")};return[r(e),t?r(t):""].join(" - ")},TI=e=>{let t=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"",o=t.split("/"),n=r.split("/");return[new Date(Number(o[0]),Number(o[1])-1,Number(o[2])),new Date(Number(n[0]),Number(n[1])-1,Number(n[2]))]},d9=r9.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=ge(a,["onChange"]);return A(ca,re(V({},n),{inputRef:r,onAccept:i=>o({target:{name:t.name,value:i}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:xI,parse:TI,autofix:"pad",overwrite:!0}))}),Pb=o9((e,t)=>{let O=e,{onChange:r,disabled:o,label:n,error:a,helperText:i,minDate:s,maxDate:l,disableFuture:p,disablePast:c,required:u,sx:f,className:d}=O,y=ge(O,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className"]),h=s9(null),[g,b]=Rr(e.value,e.defaultValue||"",hh(I=>r==null?void 0:r({target:{name:e.name,value:I}}),[e.name,r])),[x,v]=l9(null),C=!!x,T=i9(()=>g?TI(g):void 0,[g]);n9(()=>{var I;x||(I=h.current)==null||I.blur()},[x,h]),a9(t,()=>h.current,[h]);let P=hh(I=>{b(I.target.value)},[b]),k=hh(I=>{var B;v(x?null:I.currentTarget),(B=h.current)==null||B.focus()},[x,v,h]),S=hh(([I,B])=>{!I||!B||(b(xI([I,B])),v(null))},[b,v]);return A(u9,{children:A(Gr,{open:!0,children:Pe(Ao,{children:[A(Fr,re(V({},y),{color:a?"danger":y.color,ref:t,size:"sm",value:g,onChange:P,disabled:o,required:u,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:d9,ref:h}},error:a,className:d,sx:re(V({},f),{fontFamily:"monospace"}),endDecorator:A(Wt,{variant:"plain",onClick:k,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:A(ci,{})}),label:n,helperText:i})),C&&A(Fn,{onClickAway:()=>v(null),children:A(p9,{id:"date-range-picker-popper",open:!0,anchorEl:x,placement:"bottom-end",onMouseDown:I=>I.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(c9,{tabIndex:-1,role:"presentation",children:[A(ni,{rangeSelection:!0,defaultValue:T,onChange:S,minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),A(En,{sx:{p:1},children:A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{b(""),v(null)},children:"Clear"})})]})})})]})})})});Pb.displayName="DateRangePicker";import{motion as f9}from"framer-motion";var m9=f9(Rl),Cb=e=>{var i;let a=e,{children:t,size:r}=a,o=ge(a,["children","size"]),n=Ap();return A(m9,re(V({},o),{slotProps:re(V({},o.slotProps),{content:re(V({},(i=o.slotProps)==null?void 0:i.content),{sx:{bgcolor:"transparent",boxShadow:"none",[n.breakpoints.down("md")]:{width:"100%"}}})}),sx:re(V({},e.sx),{"--Drawer-horizontalSize":{sm:"360px",md:"600px",lg:"900px"}[r||"md"]}),children:t}))};Cb.displayName="Drawer";import{motion as h9}from"framer-motion";var y9=h9(wf),g9=E(y9)(({theme:e})=>({padding:e.spacing(0,6,5)})),su=g9;su.displayName="DialogContent";var yh=su;import{motion as v9}from"framer-motion";var b9=v9(Df),x9=E(b9)(({theme:e})=>({padding:e.spacing(4,6)})),lu=x9;lu.displayName="DialogTitle";var gh=lu;import k9 from"react";import{motion as kb}from"framer-motion";var T9=kb(Nf),Sb=T9;Sb.displayName="Modal";var PI=E(Yf)({padding:0}),pu=PI;pu.displayName="ModalDialog";var P9=E(kb(Kf))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),vh=P9;vh.displayName="ModalClose";var C9=kb(Zf),Rb=C9;Rb.displayName="ModalOverflow";function Eb(e){let n=e,{title:t,children:r}=n,o=ge(n,["title","children"]);return Pe(PI,re(V({},o),{children:[A(vh,{}),A(gh,{children:t}),A(yh,{children:r})]}))}Eb.displayName="ModalFrame";var S9=E(pu,{name:"Dialog",slot:"Root"})({padding:0}),Ib=k9.forwardRef((e,t)=>{let s=e,{title:r,children:o,actions:n,fullscreen:a}=s,i=ge(s,["title","children","actions","fullscreen"]);return Pe(S9,re(V({layout:a?"fullscreen":"center",ref:t},i),{children:[A(gh,{children:r}),A(yh,{children:o}),A(En,{children:n})]}))});Ib.displayName="DialogFrame";import{motion as R9}from"framer-motion";var E9=R9(Af),cu=e=>A(E9,V({},e));cu.displayName="Divider";import{motion as I9}from"framer-motion";var O9=I9(Rl),Ob=e=>{var n;let o=e,{children:t}=o,r=ge(o,["children"]);return A(O9,re(V({},r),{slotProps:re(V({},r.slotProps),{content:re(V({},(n=r.slotProps)==null?void 0:n.content),{sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}})}),children:t}))};Ob.displayName="InsetDrawer";import{motion as _9}from"framer-motion";var w9=_9($f),_b=w9;_b.displayName="Grid";function CI(e,t){let r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var D9=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,A9=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,M9={};function bh(e,t){return((t||M9).jsx?A9:D9).test(e)}var N9=/[ \t\n\f\r]/g;function wb(e){return typeof e=="object"?e.type==="text"?kI(e.value):!1:kI(e)}function kI(e){return e.replace(N9,"")===""}var da=class{constructor(t,r,o){this.property=t,this.normal=r,o&&(this.space=o)}};da.prototype.property={};da.prototype.normal={};da.prototype.space=null;function Db(e,t){let r={},o={},n=-1;for(;++n<e.length;)Object.assign(r,e[n].property),Object.assign(o,e[n].normal);return new da(r,o,t)}function uu(e){return e.toLowerCase()}var _r=class{constructor(t,r){this.property=t,this.attribute=r}};_r.prototype.space=null;_r.prototype.boolean=!1;_r.prototype.booleanish=!1;_r.prototype.overloadedBoolean=!1;_r.prototype.number=!1;_r.prototype.commaSeparated=!1;_r.prototype.spaceSeparated=!1;_r.prototype.commaOrSpaceSeparated=!1;_r.prototype.mustUseProperty=!1;_r.prototype.defined=!1;var du={};ET(du,{boolean:()=>$e,booleanish:()=>Ot,commaOrSpaceSeparated:()=>Xr,commaSeparated:()=>ui,number:()=>ye,overloadedBoolean:()=>Ab,spaceSeparated:()=>pt});var L9=0,$e=ms(),Ot=ms(),Ab=ms(),ye=ms(),pt=ms(),ui=ms(),Xr=ms();function ms(){return 2**++L9}var Mb=Object.keys(du),hs=class extends _r{constructor(t,r,o,n){let a=-1;if(super(t,r),SI(this,"space",n),typeof o=="number")for(;++a<Mb.length;){let i=Mb[a];SI(this,Mb[a],(o&du[i])===du[i])}}};hs.prototype.defined=!0;function SI(e,t,r){r&&(e[t]=r)}var B9={}.hasOwnProperty;function Lo(e){let t={},r={},o;for(o in e.properties)if(B9.call(e.properties,o)){let n=e.properties[o],a=new hs(o,e.transform(e.attributes||{},o),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,r[uu(o)]=o,r[uu(a.attribute)]=o}return new da(t,r,e.space)}var Nb=Lo({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var Lb=Lo({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function xh(e,t){return t in e?e[t]:t}function Th(e,t){return xh(e,t.toLowerCase())}var Bb=Lo({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Th,properties:{xmlns:null,xmlnsXLink:null}});var zb=Lo({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ot,ariaAutoComplete:null,ariaBusy:Ot,ariaChecked:Ot,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Ot,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Ot,ariaFlowTo:pt,ariaGrabbed:Ot,ariaHasPopup:null,ariaHidden:Ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:ye,ariaLive:null,ariaModal:Ot,ariaMultiLine:Ot,ariaMultiSelectable:Ot,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:Ot,ariaReadOnly:Ot,ariaRelevant:null,ariaRequired:Ot,ariaRoleDescription:pt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:Ot,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null}});var RI=Lo({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Th,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ui,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:pt,autoFocus:$e,autoPlay:$e,blocking:pt,capture:null,charSet:null,checked:$e,cite:null,className:pt,cols:ye,colSpan:null,content:null,contentEditable:Ot,controls:$e,controlsList:pt,coords:ye|ui,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:Ab,draggable:Ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:pt,height:ye,hidden:$e,high:ye,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:pt,itemRef:pt,itemScope:$e,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,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:$e,optimum:ye,pattern:null,ping:pt,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:pt,required:$e,reversed:$e,rows:ye,rowSpan:ye,sandbox:pt,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:Ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Ot,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:Ot,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:ye,security:null,unselectable:null}});var EI=Lo({space:"svg",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"},transform:xh,properties:{about:Xr,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:pt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:ui,g2:ui,glyphName:ui,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:Xr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,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:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xr,rev:Xr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xr,requiredFeatures:Xr,requiredFonts:Xr,requiredFormats:Xr,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:Xr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xr,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var z9=/^data[-\w.:]+$/i,II=/-[a-z]/g,F9=/[A-Z]/g;function Fb(e,t){let r=uu(t),o=t,n=_r;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&z9.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(II,$9);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!II.test(a)){let i=a.replace(F9,V9);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}n=hs}return new n(o,t)}function V9(e){return"-"+e.toLowerCase()}function $9(e){return e.charAt(1).toUpperCase()}var Vb={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"};var OI=Db([Lb,Nb,Bb,zb,RI],"html"),Ph=Db([Lb,Nb,Bb,zb,EI],"svg");function _I(e){return e.join(" ").trim()}var $b=Dn(BI(),1),zI=$b.default.default||$b.default;var Ch=FI("end"),Gl=FI("start");function FI(e){return t;function t(r){let o=r&&r.position&&r.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function jb(e){let t=Gl(e),r=Ch(e);if(t&&r)return{start:t,end:r}}function di(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?VI(e.position):"start"in e||"end"in e?VI(e):"line"in e||"column"in e?Hb(e):""}function Hb(e){return $I(e&&e.line)+":"+$I(e&&e.column)}function VI(e){return Hb(e&&e.start)+"-"+Hb(e&&e.end)}function $I(e){return e&&typeof e=="number"?e:1}var Bt=class extends Error{constructor(t,r,o){super(),typeof r=="string"&&(o=r,r=void 0);let n="",a={},i=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a=V({},r)),typeof t=="string"?n=t:!a.cause&&t&&(i=!0,n=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof o=="string"){let l=o.indexOf(":");l===-1?a.ruleId=o:(a.source=o.slice(0,l),a.ruleId=o.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){let l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}let s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=s?s.line:void 0,this.name=di(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}};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;var Ub={}.hasOwnProperty,t6=new Map,r6=/[A-Z]/g,o6=/-([a-z])/g,n6=new Set(["table","tbody","thead","tfoot","tr"]),a6=new Set(["td","th"]),jI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Wb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let r=t.filePath||void 0,o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=f6(r,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");o=d6(r,t.jsx,t.jsxs)}let n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ph:OI,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=HI(n,e,void 0);return a&&typeof a!="string"?a:n.create(e,n.Fragment,{children:a||void 0},void 0)}function HI(e,t,r){if(t.type==="element")return i6(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return s6(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return p6(e,t,r);if(t.type==="mdxjsEsm")return l6(e,t);if(t.type==="root")return c6(e,t,r);if(t.type==="text")return u6(e,t)}function i6(e,t,r){let o=e.schema,n=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(n=Ph,e.schema=n),e.ancestors.push(t);let a=WI(e,t.tagName,!1),i=m6(e,t),s=Jb(e,t);return n6.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!wb(l):!0})),UI(e,i,a,t),Gb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function s6(e,t){if(t.data&&t.data.estree&&e.evaluater){let o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}mu(e,t.position)}function l6(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);mu(e,t.position)}function p6(e,t,r){let o=e.schema,n=o;t.name==="svg"&&o.space==="html"&&(n=Ph,e.schema=n),e.ancestors.push(t);let a=t.name===null?e.Fragment:WI(e,t.name,!0),i=h6(e,t),s=Jb(e,t);return UI(e,i,a,t),Gb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function c6(e,t,r){let o={};return Gb(o,Jb(e,t)),e.create(t,e.Fragment,o,r)}function u6(e,t){return t.value}function UI(e,t,r,o){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=o)}function Gb(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function d6(e,t,r){return o;function o(n,a,i,s){let p=Array.isArray(i.children)?r:t;return s?p(a,i,s):p(a,i)}}function f6(e,t){return r;function r(o,n,a,i){let s=Array.isArray(a.children),l=Gl(o);return t(n,a,i,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function m6(e,t){let r={},o,n;for(n in t.properties)if(n!=="children"&&Ub.call(t.properties,n)){let a=y6(e,n,t.properties[n]);if(a){let[i,s]=a;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&a6.has(t.tagName)?o=s:r[i]=s}}if(o){let a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return r}function h6(e,t){let r={};for(let o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){let a=o.data.estree.body[0];a.type;let i=a.expression;i.type;let s=i.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else mu(e,t.position);else{let n=o.name,a;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){let s=o.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else mu(e,t.position);else a=o.value===null?!0:o.value;r[n]=a}return r}function Jb(e,t){let r=[],o=-1,n=e.passKeys?new Map:t6;for(;++o<t.children.length;){let a=t.children[o],i;if(e.passKeys){let l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){let p=n.get(l)||0;i=l+"-"+p,n.set(l,p+1)}}let s=HI(e,a,i);s!==void 0&&r.push(s)}return r}function y6(e,t,r){let o=Fb(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=o.commaSeparated?CI(r):_I(r)),o.property==="style"){let n=typeof r=="object"?r:g6(e,String(r));return e.stylePropertyNameCase==="css"&&(n=v6(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&o.space?Vb[o.property]||o.property:o.attribute,r]}}function g6(e,t){let r={};try{zI(t,o)}catch(n){if(!e.ignoreInvalidStyle){let a=n,i=new Bt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=jI+"#cannot-parse-style-attribute",i}}return r;function o(n,a){let i=n;i.slice(0,2)!=="--"&&(i.slice(0,4)==="-ms-"&&(i="ms-"+i.slice(4)),i=i.replace(o6,x6)),r[i]=a}}function WI(e,t,r){let o;if(!r)o={type:"Literal",value:t};else if(t.includes(".")){let n=t.split("."),a=-1,i;for(;++a<n.length;){let s=bh(n[a])?{type:"Identifier",name:n[a]}:{type:"Literal",value:n[a]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}o=i}else o=bh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){let n=o.value;return Ub.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(o);mu(e)}function mu(e,t){let r=new Bt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=jI+"#cannot-handle-mdx-estrees-without-createevaluater",r}function v6(e){let t={},r;for(r in e)Ub.call(e,r)&&(t[b6(r)]=e[r]);return t}function b6(e){let t=e.replace(r6,T6);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function x6(e,t){return t.toUpperCase()}function T6(e){return"-"+e.toLowerCase()}var hu={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"]};import{Fragment as RG,jsx as EG,jsxs as IG}from"react/jsx-runtime";var P6={};function qb(e,t){let r=t||P6,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return JI(e,o,n)}function JI(e,t,r){if(C6(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return GI(e.children,t,r)}return Array.isArray(e)?GI(e,t,r):""}function GI(e,t,r){let o=[],n=-1;for(;++n<e.length;)o[n]=JI(e[n],t,r);return o.join("")}function C6(e){return!!(e&&typeof e=="object")}var qI=document.createElement("i");function Jl(e){let t="&"+e+";";qI.innerHTML=t;let r=qI.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function wr(e,t,r,o){let n=e.length,a=0,i;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,r=r>0?r:0,o.length<1e4)i=Array.from(o),i.unshift(t,r),e.splice(...i);else for(r&&e.splice(t,r);a<o.length;)i=o.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function Vr(e,t){return e.length>0?(wr(e,e.length,0,t),e):t}var KI={}.hasOwnProperty;function YI(e){let t={},r=-1;for(;++r<e.length;)k6(t,e[r]);return t}function k6(e,t){let r;for(r in t){let n=(KI.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r],i;if(a)for(i in a){KI.call(n,i)||(n[i]=[]);let s=a[i];S6(n[i],Array.isArray(s)?s:s?[s]:[])}}}function S6(e,t){let r=-1,o=[];for(;++r<t.length;)(t[r].add==="after"?e:o).push(t[r]);wr(e,0,0,o)}function kh(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function fa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var uo=fi(/[A-Za-z]/),ar=fi(/[\dA-Za-z]/),XI=fi(/[#-'*+\--9=?A-Z^-~]/);function yu(e){return e!==null&&(e<32||e===127)}var gu=fi(/\d/),ZI=fi(/[\dA-Fa-f]/),QI=fi(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function zt(e){return e!==null&&(e<0||e===32)}function je(e){return e===-2||e===-1||e===32}var eO=fi(new RegExp("\\p{P}|\\p{S}","u")),tO=fi(/\s/);function fi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Bo(e){let t=[],r=-1,o=0,n=0;for(;++r<e.length;){let a=e.charCodeAt(r),i="";if(a===37&&ar(e.charCodeAt(r+1))&&ar(e.charCodeAt(r+2)))n=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){let s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(i=String.fromCharCode(a,s),n=1):i="\uFFFD"}else i=String.fromCharCode(a);i&&(t.push(e.slice(o,r),encodeURIComponent(i)),o=r+n+1,i=""),n&&(r+=n,n=0)}return t.join("")+e.slice(o)}function Ue(e,t,r,o){let n=o?o-1:Number.POSITIVE_INFINITY,a=0;return i;function i(l){return je(l)?(e.enter(r),s(l)):t(l)}function s(l){return je(l)&&a++<n?(e.consume(l),s):(e.exit(r),t(l))}}var rO={tokenize:R6};function R6(e){let t=e.attempt(this.parser.constructs.contentInitial,o,n),r;return t;function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ue(e,t,"linePrefix")}function n(s){return e.enter("paragraph"),a(s)}function a(s){let l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,i(s)}function i(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return _e(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),i)}}var nO={tokenize:E6},oO={tokenize:I6};function E6(e){let t=this,r=[],o=0,n,a,i;return s;function s(v){if(o<r.length){let C=r[o];return t.containerState=C[1],e.attempt(C[0].continuation,l,p)(v)}return p(v)}function l(v){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();let C=t.events.length,T=C,P;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){P=t.events[T][1].end;break}b(o);let k=C;for(;k<t.events.length;)t.events[k][1].end=Object.assign({},P),k++;return wr(t.events,T+1,0,t.events.slice(C)),t.events.length=k,p(v)}return s(v)}function p(v){if(o===r.length){if(!n)return f(v);if(n.currentConstruct&&n.currentConstruct.concrete)return y(v);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(oO,c,u)(v)}function c(v){return n&&x(),b(o),f(v)}function u(v){return t.parser.lazy[t.now().line]=o!==r.length,i=t.now().offset,y(v)}function f(v){return t.containerState={},e.attempt(oO,d,y)(v)}function d(v){return o++,r.push([t.currentConstruct,t.containerState]),f(v)}function y(v){if(v===null){n&&x(),b(0),e.consume(v);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:n}),h(v)}function h(v){if(v===null){g(e.exit("chunkFlow"),!0),b(0),e.consume(v);return}return _e(v)?(e.consume(v),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(v),h)}function g(v,C){let T=t.sliceStream(v);if(C&&T.push(null),v.previous=a,a&&(a.next=v),a=v,n.defineSkip(v.start),n.write(T),t.parser.lazy[v.start.line]){let P=n.events.length;for(;P--;)if(n.events[P][1].start.offset<i&&(!n.events[P][1].end||n.events[P][1].end.offset>i))return;let k=t.events.length,S=k,O,I;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){if(O){I=t.events[S][1].end;break}O=!0}for(b(o),P=k;P<t.events.length;)t.events[P][1].end=Object.assign({},I),P++;wr(t.events,S+1,0,t.events.slice(k)),t.events.length=P}}function b(v){let C=r.length;for(;C-- >v;){let T=r[C];t.containerState=T[1],T[0].exit.call(t,e)}r.length=v}function x(){n.write([null]),a=void 0,n=void 0,t.containerState._closeFlow=void 0}}function I6(e,t,r){return Ue(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Kb(e){if(e===null||zt(e)||tO(e))return 1;if(eO(e))return 2}function ql(e,t,r){let o=[],n=-1;for(;++n<e.length;){let a=e[n].resolveAll;a&&!o.includes(a)&&(t=a(t,r),o.push(a))}return t}var vu={name:"attention",tokenize:_6,resolveAll:O6};function O6(e,t){let r=-1,o,n,a,i,s,l,p,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(o=r;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[o][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[o][1].end.offset-e[o][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let u=Object.assign({},e[o][1].end),f=Object.assign({},e[r][1].start);aO(u,-l),aO(f,l),i={type:l>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[o][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:f},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[r][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},s.end)},e[o][1].end=Object.assign({},i.start),e[r][1].start=Object.assign({},s.end),p=[],e[o][1].end.offset-e[o][1].start.offset&&(p=Vr(p,[["enter",e[o][1],t],["exit",e[o][1],t]])),p=Vr(p,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",a,t]]),p=Vr(p,ql(t.parser.constructs.insideSpan.null,e.slice(o+1,r),t)),p=Vr(p,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",n,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,p=Vr(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,wr(e,o-1,r-o+3,p),r=o+p.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function _6(e,t){let r=this.parser.constructs.attentionMarkers.null,o=this.previous,n=Kb(o),a;return i;function i(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;let p=e.exit("attentionSequence"),c=Kb(l),u=!c||c===2&&n||r.includes(l),f=!n||n===2&&c||r.includes(o);return p._open=!!(a===42?u:u&&(n||!f)),p._close=!!(a===42?f:f&&(c||!u)),t(l)}}function aO(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Yb={name:"autolink",tokenize:w6};function w6(e,t,r){let o=0;return n;function n(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(d){return uo(d)?(e.consume(d),i):p(d)}function i(d){return d===43||d===45||d===46||ar(d)?(o=1,s(d)):p(d)}function s(d){return d===58?(e.consume(d),o=0,l):(d===43||d===45||d===46||ar(d))&&o++<32?(e.consume(d),s):(o=0,p(d))}function l(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||yu(d)?r(d):(e.consume(d),l)}function p(d){return d===64?(e.consume(d),c):XI(d)?(e.consume(d),p):r(d)}function c(d){return ar(d)?u(d):r(d)}function u(d){return d===46?(e.consume(d),o=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):f(d)}function f(d){if((d===45||ar(d))&&o++<63){let y=d===45?f:u;return e.consume(d),y}return r(d)}}var mi={tokenize:D6,partial:!0};function D6(e,t,r){return o;function o(a){return je(a)?Ue(e,n,"linePrefix")(a):n(a)}function n(a){return a===null||_e(a)?t(a):r(a)}}var Sh={name:"blockQuote",tokenize:A6,continuation:{tokenize:M6},exit:N6};function A6(e,t,r){let o=this;return n;function n(i){if(i===62){let s=o.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return r(i)}function a(i){return je(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function M6(e,t,r){let o=this;return n;function n(i){return je(i)?Ue(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(Sh,t,r)(i)}}function N6(e){e.exit("blockQuote")}var Rh={name:"characterEscape",tokenize:L6};function L6(e,t,r){return o;function o(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),n}function n(a){return QI(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}var Eh={name:"characterReference",tokenize:B6};function B6(e,t,r){let o=this,n=0,a,i;return s;function s(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,i=ar,c(u))}function p(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=ZI,c):(e.enter("characterReferenceValue"),a=7,i=gu,c(u))}function c(u){if(u===59&&n){let f=e.exit("characterReferenceValue");return i===ar&&!Jl(o.sliceSerialize(f))?r(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(u)&&n++<a?(e.consume(u),c):r(u)}}var iO={tokenize:F6,partial:!0},Ih={name:"codeFenced",tokenize:z6,concrete:!0};function z6(e,t,r){let o=this,n={tokenize:T,partial:!0},a=0,i=0,s;return l;function l(P){return p(P)}function p(P){let k=o.events[o.events.length-1];return a=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,s=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(P)}function c(P){return P===s?(i++,e.consume(P),c):i<3?r(P):(e.exit("codeFencedFenceSequence"),je(P)?Ue(e,u,"whitespace")(P):u(P))}function u(P){return P===null||_e(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(iO,h,C)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(P))}function f(P){return P===null||_e(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(P)):je(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ue(e,d,"whitespace")(P)):P===96&&P===s?r(P):(e.consume(P),f)}function d(P){return P===null||_e(P)?u(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(P))}function y(P){return P===null||_e(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(P)):P===96&&P===s?r(P):(e.consume(P),y)}function h(P){return e.attempt(n,C,g)(P)}function g(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),b}function b(P){return a>0&&je(P)?Ue(e,x,"linePrefix",a+1)(P):x(P)}function x(P){return P===null||_e(P)?e.check(iO,h,C)(P):(e.enter("codeFlowValue"),v(P))}function v(P){return P===null||_e(P)?(e.exit("codeFlowValue"),x(P)):(e.consume(P),v)}function C(P){return e.exit("codeFenced"),t(P)}function T(P,k,S){let O=0;return I;function I(N){return P.enter("lineEnding"),P.consume(N),P.exit("lineEnding"),B}function B(N){return P.enter("codeFencedFence"),je(N)?Ue(P,M,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):M(N)}function M(N){return N===s?(P.enter("codeFencedFenceSequence"),w(N)):S(N)}function w(N){return N===s?(O++,P.consume(N),w):O>=i?(P.exit("codeFencedFenceSequence"),je(N)?Ue(P,$,"whitespace")(N):$(N)):S(N)}function $(N){return N===null||_e(N)?(P.exit("codeFencedFence"),k(N)):S(N)}}}function F6(e,t,r){let o=this;return n;function n(i){return i===null?r(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}var bu={name:"codeIndented",tokenize:$6},V6={tokenize:j6,partial:!0};function $6(e,t,r){let o=this;return n;function n(p){return e.enter("codeIndented"),Ue(e,a,"linePrefix",5)(p)}function a(p){let c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(p):r(p)}function i(p){return p===null?l(p):_e(p)?e.attempt(V6,i,l)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||_e(p)?(e.exit("codeFlowValue"),i(p)):(e.consume(p),s)}function l(p){return e.exit("codeIndented"),t(p)}}function j6(e,t,r){let o=this;return n;function n(i){return o.parser.lazy[o.now().line]?r(i):_e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n):Ue(e,a,"linePrefix",5)(i)}function a(i){let s=o.events[o.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):_e(i)?n(i):r(i)}}var Xb={name:"codeText",tokenize:W6,resolve:H6,previous:U6};function H6(e){let t=e.length-4,r=3,o,n;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=r;++o<t;)if(e[o][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(o=r-1,t++;++o<=t;)n===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(n=o):(o===t||e[o][1].type==="lineEnding")&&(e[n][1].type="codeTextData",o!==n+2&&(e[n][1].end=e[o-1][1].end,e.splice(n+2,o-n-2),t-=o-n-2,o=n+2),n=void 0);return e}function U6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function W6(e,t,r){let o=this,n=0,a,i;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),n++,l):(e.exit("codeTextSequence"),p(f))}function p(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),p):f===96?(i=e.enter("codeTextSequence"),a=0,u(f)):_e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),p):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||_e(f)?(e.exit("codeTextData"),p(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),a++,u):a===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}var Oh=class{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,r){let o=r==null?Number.POSITIVE_INFINITY:r;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,r,o){let n=r||0;this.setCursor(Math.trunc(t));let a=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return o&&xu(this.left,o),a.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),xu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),xu(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){let r=this.left.splice(t,Number.POSITIVE_INFINITY);xu(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);xu(this.left,r.reverse())}}};function xu(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function _h(e){let t={},r=-1,o,n,a,i,s,l,p,c=new Oh(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(o=c.get(r),r&&o[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=o[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,G6(c,r)),r=t[r],p=!0);else if(o[1]._container){for(a=r,n=void 0;a--&&(i=c.get(a),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=a);n&&(o[1].end=Object.assign({},c.get(n)[1].start),s=c.slice(n,r),s.unshift(o),c.splice(n,r-n+1,s))}}return wr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!p}function G6(e,t){let r=e.get(t)[1],o=e.get(t)[2],n=t-1,a=[],i=r._tokenizer||o.parser[r.contentType](r.start),s=i.events,l=[],p={},c,u,f=-1,d=r,y=0,h=0,g=[h];for(;d;){for(;e.get(++n)[1]!==d;);a.push(n),d._tokenizer||(c=o.sliceStream(d),d.next||c.push(null),u&&i.defineSkip(d.start),d._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),d._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),u=d,d=d.next}for(d=r;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(i.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),f=g.length;f--;){let b=s.slice(g[f],g[f+1]),x=a.pop();l.push([x,x+b.length-1]),e.splice(x,2,b)}for(l.reverse(),f=-1;++f<l.length;)p[y+l[f][0]]=y+l[f][1],y+=l[f][1]-l[f][0]-1;return p}var Zb={tokenize:K6,resolve:q6},J6={tokenize:Y6,partial:!0};function q6(e){return _h(e),e}function K6(e,t){let r;return o;function o(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(s)}function n(s){return s===null?a(s):_e(s)?e.check(J6,i,a)(s):(e.consume(s),n)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function Y6(e,t,r){let o=this;return n;function n(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ue(e,a,"linePrefix")}function a(i){if(i===null||_e(i))return r(i);let s=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(o.parser.constructs.flow,r,t)(i)}}function wh(e,t,r,o,n,a,i,s,l){let p=l||Number.POSITIVE_INFINITY,c=0;return u;function u(b){return b===60?(e.enter(o),e.enter(n),e.enter(a),e.consume(b),e.exit(a),f):b===null||b===32||b===41||yu(b)?r(b):(e.enter(o),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(b))}function f(b){return b===62?(e.enter(a),e.consume(b),e.exit(a),e.exit(n),e.exit(o),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===62?(e.exit("chunkString"),e.exit(s),f(b)):b===null||b===60||_e(b)?r(b):(e.consume(b),b===92?y:d)}function y(b){return b===60||b===62||b===92?(e.consume(b),d):d(b)}function h(b){return!c&&(b===null||b===41||zt(b))?(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(o),t(b)):c<p&&b===40?(e.consume(b),c++,h):b===41?(e.consume(b),c--,h):b===null||b===32||b===40||yu(b)?r(b):(e.consume(b),b===92?g:h)}function g(b){return b===40||b===41||b===92?(e.consume(b),h):h(b)}}function Dh(e,t,r,o,n,a){let i=this,s=0,l;return p;function p(d){return e.enter(o),e.enter(n),e.consume(d),e.exit(n),e.enter(a),c}function c(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?r(d):d===93?(e.exit(a),e.enter(n),e.consume(d),e.exit(n),e.exit(o),t):_e(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===null||d===91||d===93||_e(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!je(d)),d===92?f:u)}function f(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function Ah(e,t,r,o,n,a){let i;return s;function s(f){return f===34||f===39||f===40?(e.enter(o),e.enter(n),e.consume(f),e.exit(n),i=f===40?41:f,l):r(f)}function l(f){return f===i?(e.enter(n),e.consume(f),e.exit(n),e.exit(o),t):(e.enter(a),p(f))}function p(f){return f===i?(e.exit(a),l(i)):f===null?r(f):_e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ue(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===i||f===null||_e(f)?(e.exit("chunkString"),p(f)):(e.consume(f),f===92?u:c)}function u(f){return f===i||f===92?(e.consume(f),c):c(f)}}function gs(e,t){let r;return o;function o(n){return _e(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,o):je(n)?Ue(e,o,r?"linePrefix":"lineSuffix")(n):t(n)}}var Qb={name:"definition",tokenize:Z6},X6={tokenize:Q6,partial:!0};function Z6(e,t,r){let o=this,n;return a;function a(d){return e.enter("definition"),i(d)}function i(d){return Dh.call(o,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return n=fa(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):r(d)}function l(d){return zt(d)?gs(e,p)(d):p(d)}function p(d){return wh(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(X6,u,u)(d)}function u(d){return je(d)?Ue(e,f,"whitespace")(d):f(d)}function f(d){return d===null||_e(d)?(e.exit("definition"),o.parser.defined.push(n),t(d)):r(d)}}function Q6(e,t,r){return o;function o(s){return zt(s)?gs(e,n)(s):r(s)}function n(s){return Ah(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return je(s)?Ue(e,i,"whitespace")(s):i(s)}function i(s){return s===null||_e(s)?t(s):r(s)}}var ex={name:"hardBreakEscape",tokenize:e7};function e7(e,t,r){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),n}function n(a){return _e(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}var tx={name:"headingAtx",tokenize:r7,resolve:t7};function t7(e,t){let r=e.length-2,o=3,n,a;return e[o][1].type==="whitespace"&&(o+=2),r-2>o&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(o===r-1||r-4>o&&e[r-2][1].type==="whitespace")&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},a={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},wr(e,o,r-o+1,[["enter",n,t],["enter",a,t],["exit",a,t],["exit",n,t]])),e}function r7(e,t,r){let o=0;return n;function n(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&o++<6?(e.consume(c),i):c===null||zt(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||_e(c)?(e.exit("atxHeading"),t(c)):je(c)?Ue(e,s,"whitespace")(c):(e.enter("atxHeadingText"),p(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function p(c){return c===null||c===35||zt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),p)}}var sO=["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"],rx=["pre","script","style","textarea"];var ox={name:"htmlFlow",tokenize:i7,resolveTo:a7,concrete:!0},o7={tokenize:l7,partial:!0},n7={tokenize:s7,partial:!0};function a7(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 i7(e,t,r){let o=this,n,a,i,s,l;return p;function p(_){return c(_)}function c(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),u}function u(_){return _===33?(e.consume(_),f):_===47?(e.consume(_),a=!0,h):_===63?(e.consume(_),n=3,o.interrupt?t:R):uo(_)?(e.consume(_),i=String.fromCharCode(_),g):r(_)}function f(_){return _===45?(e.consume(_),n=2,d):_===91?(e.consume(_),n=5,s=0,y):uo(_)?(e.consume(_),n=4,o.interrupt?t:R):r(_)}function d(_){return _===45?(e.consume(_),o.interrupt?t:R):r(_)}function y(_){let pe="CDATA[";return _===pe.charCodeAt(s++)?(e.consume(_),s===pe.length?o.interrupt?t:M:y):r(_)}function h(_){return uo(_)?(e.consume(_),i=String.fromCharCode(_),g):r(_)}function g(_){if(_===null||_===47||_===62||zt(_)){let pe=_===47,me=i.toLowerCase();return!pe&&!a&&rx.includes(me)?(n=1,o.interrupt?t(_):M(_)):sO.includes(i.toLowerCase())?(n=6,pe?(e.consume(_),b):o.interrupt?t(_):M(_)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(_):a?x(_):v(_))}return _===45||ar(_)?(e.consume(_),i+=String.fromCharCode(_),g):r(_)}function b(_){return _===62?(e.consume(_),o.interrupt?t:M):r(_)}function x(_){return je(_)?(e.consume(_),x):I(_)}function v(_){return _===47?(e.consume(_),I):_===58||_===95||uo(_)?(e.consume(_),C):je(_)?(e.consume(_),v):I(_)}function C(_){return _===45||_===46||_===58||_===95||ar(_)?(e.consume(_),C):T(_)}function T(_){return _===61?(e.consume(_),P):je(_)?(e.consume(_),T):v(_)}function P(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(e.consume(_),l=_,k):je(_)?(e.consume(_),P):S(_)}function k(_){return _===l?(e.consume(_),l=null,O):_===null||_e(_)?r(_):(e.consume(_),k)}function S(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||zt(_)?T(_):(e.consume(_),S)}function O(_){return _===47||_===62||je(_)?v(_):r(_)}function I(_){return _===62?(e.consume(_),B):r(_)}function B(_){return _===null||_e(_)?M(_):je(_)?(e.consume(_),B):r(_)}function M(_){return _===45&&n===2?(e.consume(_),D):_===60&&n===1?(e.consume(_),L):_===62&&n===4?(e.consume(_),q):_===63&&n===3?(e.consume(_),R):_===93&&n===5?(e.consume(_),z):_e(_)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(o7,oe,w)(_)):_===null||_e(_)?(e.exit("htmlFlowData"),w(_)):(e.consume(_),M)}function w(_){return e.check(n7,$,oe)(_)}function $(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),N}function N(_){return _===null||_e(_)?w(_):(e.enter("htmlFlowData"),M(_))}function D(_){return _===45?(e.consume(_),R):M(_)}function L(_){return _===47?(e.consume(_),i="",U):M(_)}function U(_){if(_===62){let pe=i.toLowerCase();return rx.includes(pe)?(e.consume(_),q):M(_)}return uo(_)&&i.length<8?(e.consume(_),i+=String.fromCharCode(_),U):M(_)}function z(_){return _===93?(e.consume(_),R):M(_)}function R(_){return _===62?(e.consume(_),q):_===45&&n===2?(e.consume(_),R):M(_)}function q(_){return _===null||_e(_)?(e.exit("htmlFlowData"),oe(_)):(e.consume(_),q)}function oe(_){return e.exit("htmlFlow"),t(_)}}function s7(e,t,r){let o=this;return n;function n(i){return _e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):r(i)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}function l7(e,t,r){return o;function o(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(mi,t,r)}}var nx={name:"htmlText",tokenize:p7};function p7(e,t,r){let o=this,n,a,i;return s;function s(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),l}function l(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),T):R===63?(e.consume(R),v):uo(R)?(e.consume(R),S):r(R)}function p(R){return R===45?(e.consume(R),c):R===91?(e.consume(R),a=0,y):uo(R)?(e.consume(R),x):r(R)}function c(R){return R===45?(e.consume(R),d):r(R)}function u(R){return R===null?r(R):R===45?(e.consume(R),f):_e(R)?(i=u,L(R)):(e.consume(R),u)}function f(R){return R===45?(e.consume(R),d):u(R)}function d(R){return R===62?D(R):R===45?f(R):u(R)}function y(R){let q="CDATA[";return R===q.charCodeAt(a++)?(e.consume(R),a===q.length?h:y):r(R)}function h(R){return R===null?r(R):R===93?(e.consume(R),g):_e(R)?(i=h,L(R)):(e.consume(R),h)}function g(R){return R===93?(e.consume(R),b):h(R)}function b(R){return R===62?D(R):R===93?(e.consume(R),b):h(R)}function x(R){return R===null||R===62?D(R):_e(R)?(i=x,L(R)):(e.consume(R),x)}function v(R){return R===null?r(R):R===63?(e.consume(R),C):_e(R)?(i=v,L(R)):(e.consume(R),v)}function C(R){return R===62?D(R):v(R)}function T(R){return uo(R)?(e.consume(R),P):r(R)}function P(R){return R===45||ar(R)?(e.consume(R),P):k(R)}function k(R){return _e(R)?(i=k,L(R)):je(R)?(e.consume(R),k):D(R)}function S(R){return R===45||ar(R)?(e.consume(R),S):R===47||R===62||zt(R)?O(R):r(R)}function O(R){return R===47?(e.consume(R),D):R===58||R===95||uo(R)?(e.consume(R),I):_e(R)?(i=O,L(R)):je(R)?(e.consume(R),O):D(R)}function I(R){return R===45||R===46||R===58||R===95||ar(R)?(e.consume(R),I):B(R)}function B(R){return R===61?(e.consume(R),M):_e(R)?(i=B,L(R)):je(R)?(e.consume(R),B):O(R)}function M(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),n=R,w):_e(R)?(i=M,L(R)):je(R)?(e.consume(R),M):(e.consume(R),$)}function w(R){return R===n?(e.consume(R),n=void 0,N):R===null?r(R):_e(R)?(i=w,L(R)):(e.consume(R),w)}function $(R){return R===null||R===34||R===39||R===60||R===61||R===96?r(R):R===47||R===62||zt(R)?O(R):(e.consume(R),$)}function N(R){return R===47||R===62||zt(R)?O(R):r(R)}function D(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):r(R)}function L(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),U}function U(R){return je(R)?Ue(e,z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):z(R)}function z(R){return e.enter("htmlTextData"),i(R)}}var vs={name:"labelEnd",tokenize:h7,resolveTo:m7,resolveAll:f7},c7={tokenize:y7},u7={tokenize:g7},d7={tokenize:v7};function f7(e){let t=-1;for(;++t<e.length;){let r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function m7(e,t){let r=e.length,o=0,n,a,i,s;for(;r--;)if(n=e[r][1],a){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[r][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(i){if(e[r][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(a=r,n.type!=="labelLink")){o=2;break}}else n.type==="labelEnd"&&(i=r);let l={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},p={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[i][1].end)},c={type:"labelText",start:Object.assign({},e[a+o+2][1].end),end:Object.assign({},e[i-2][1].start)};return s=[["enter",l,t],["enter",p,t]],s=Vr(s,e.slice(a+1,a+o+3)),s=Vr(s,[["enter",c,t]]),s=Vr(s,ql(t.parser.constructs.insideSpan.null,e.slice(a+o+4,i-3),t)),s=Vr(s,[["exit",c,t],e[i-2],e[i-1],["exit",p,t]]),s=Vr(s,e.slice(i+1)),s=Vr(s,[["exit",l,t]]),wr(e,a,e.length,s),e}function h7(e,t,r){let o=this,n=o.events.length,a,i;for(;n--;)if((o.events[n][1].type==="labelImage"||o.events[n][1].type==="labelLink")&&!o.events[n][1]._balanced){a=o.events[n][1];break}return s;function s(f){return a?a._inactive?u(f):(i=o.parser.defined.includes(fa(o.sliceSerialize({start:a.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):r(f)}function l(f){return f===40?e.attempt(c7,c,i?c:u)(f):f===91?e.attempt(u7,c,i?p:u)(f):i?c(f):u(f)}function p(f){return e.attempt(d7,c,u)(f)}function c(f){return t(f)}function u(f){return a._balanced=!0,r(f)}}function y7(e,t,r){return o;function o(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),n}function n(u){return zt(u)?gs(e,a)(u):a(u)}function a(u){return u===41?c(u):wh(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function i(u){return zt(u)?gs(e,l)(u):c(u)}function s(u){return r(u)}function l(u){return u===34||u===39||u===40?Ah(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):c(u)}function p(u){return zt(u)?gs(e,c)(u):c(u)}function c(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):r(u)}}function g7(e,t,r){let o=this;return n;function n(s){return Dh.call(o,e,a,i,"reference","referenceMarker","referenceString")(s)}function a(s){return o.parser.defined.includes(fa(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function i(s){return r(s)}}function v7(e,t,r){return o;function o(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),n}function n(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}var ax={name:"labelStartImage",tokenize:b7,resolveAll:vs.resolveAll};function b7(e,t,r){let o=this;return n;function n(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):r(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(s):t(s)}}var ix={name:"labelStartLink",tokenize:x7,resolveAll:vs.resolveAll};function x7(e,t,r){let o=this;return n;function n(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(i):t(i)}}var Tu={name:"lineEnding",tokenize:T7};function T7(e,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ue(e,t,"linePrefix")}}var bs={name:"thematicBreak",tokenize:P7};function P7(e,t,r){let o=0,n;return a;function a(p){return e.enter("thematicBreak"),i(p)}function i(p){return n=p,s(p)}function s(p){return p===n?(e.enter("thematicBreakSequence"),l(p)):o>=3&&(p===null||_e(p))?(e.exit("thematicBreak"),t(p)):r(p)}function l(p){return p===n?(e.consume(p),o++,l):(e.exit("thematicBreakSequence"),je(p)?Ue(e,s,"whitespace")(p):s(p))}}var Dr={name:"list",tokenize:S7,continuation:{tokenize:R7},exit:I7},C7={tokenize:O7,partial:!0},k7={tokenize:E7,partial:!0};function S7(e,t,r){let o=this,n=o.events[o.events.length-1],a=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,i=0;return s;function s(d){let y=o.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!o.containerState.marker||d===o.containerState.marker:gu(d)){if(o.containerState.type||(o.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(bs,r,p)(d):p(d);if(!o.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return r(d)}function l(d){return gu(d)&&++i<10?(e.consume(d),l):(!o.interrupt||i<2)&&(o.containerState.marker?d===o.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),p(d)):r(d)}function p(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||d,e.check(mi,o.interrupt?r:c,e.attempt(C7,f,u))}function c(d){return o.containerState.initialBlankLine=!0,a++,f(d)}function u(d){return je(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),f):r(d)}function f(d){return o.containerState.size=a+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function R7(e,t,r){let o=this;return o.containerState._closeFlow=void 0,e.check(mi,n,a);function n(s){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ue(e,t,"listItemIndent",o.containerState.size+1)(s)}function a(s){return o.containerState.furtherBlankLines||!je(s)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,i(s)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(k7,t,i)(s))}function i(s){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ue(e,e.attempt(Dr,t,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function E7(e,t,r){let o=this;return Ue(e,n,"listItemIndent",o.containerState.size+1);function n(a){let i=o.events[o.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===o.containerState.size?t(a):r(a)}}function I7(e){e.exit(this.containerState.type)}function O7(e,t,r){let o=this;return Ue(e,n,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(a){let i=o.events[o.events.length-1];return!je(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}var Mh={name:"setextUnderline",tokenize:w7,resolveTo:_7};function _7(e,t){let r=e.length,o,n,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){o=r;break}e[r][1].type==="paragraph"&&(n=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);let i={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[n][1].type="setextHeadingText",a?(e.splice(n,0,["enter",i,t]),e.splice(a+1,0,["exit",e[o][1],t]),e[o][1].end=Object.assign({},e[a][1].end)):e[o][1]=i,e.push(["exit",i,t]),e}function w7(e,t,r){let o=this,n;return a;function a(p){let c=o.events.length,u;for(;c--;)if(o.events[c][1].type!=="lineEnding"&&o.events[c][1].type!=="linePrefix"&&o.events[c][1].type!=="content"){u=o.events[c][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(e.enter("setextHeadingLine"),n=p,i(p)):r(p)}function i(p){return e.enter("setextHeadingLineSequence"),s(p)}function s(p){return p===n?(e.consume(p),s):(e.exit("setextHeadingLineSequence"),je(p)?Ue(e,l,"lineSuffix")(p):l(p))}function l(p){return p===null||_e(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}var lO={tokenize:D7};function D7(e){let t=this,r=e.attempt(mi,o,e.attempt(this.parser.constructs.flowInitial,n,Ue(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Zb,n)),"linePrefix")));return r;function o(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function n(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var pO={resolveAll:fO()},cO=dO("string"),uO=dO("text");function dO(e){return{tokenize:t,resolveAll:fO(e==="text"?A7:void 0)};function t(r){let o=this,n=this.parser.constructs[e],a=r.attempt(n,i,s);return i;function i(c){return p(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return p(c)?(r.exit("data"),a(c)):(r.consume(c),l)}function p(c){if(c===null)return!0;let u=n[c],f=-1;if(u)for(;++f<u.length;){let d=u[f];if(!d.previous||d.previous.call(o,o.previous))return!0}return!1}}}function fO(e){return t;function t(r,o){let n=-1,a;for(;++n<=r.length;)a===void 0?r[n]&&r[n][1].type==="data"&&(a=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==a+2&&(r[a][1].end=r[n-1][1].end,r.splice(a+2,n-a-2),n=a+2),a=void 0);return e?e(r,o):r}}function A7(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let o=e[r-1][1],n=t.sliceStream(o),a=n.length,i=-1,s=0,l;for(;a--;){let p=n[a];if(typeof p=="string"){for(i=p.length;p.charCodeAt(i-1)===32;)s++,i--;if(i)break;i=-1}else if(p===-2)l=!0,s++;else if(p!==-1){a++;break}}if(s){let p={type:r===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-s,offset:o.end.offset-s,_index:o.start._index+a,_bufferIndex:a?i:o.start._bufferIndex+i},end:Object.assign({},o.end)};o.end=Object.assign({},p.start),o.start.offset===o.end.offset?Object.assign(o,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}function mO(e,t,r){let o=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),n={},a=[],i=[],s=[],l=!0,p={consume:C,enter:T,exit:P,attempt:O(k),check:O(S),interrupt:O(S,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:y,now:g,defineSkip:b,write:d},u=t.tokenize.call(c,p),f;return t.resolveAll&&a.push(t),c;function d(w){return i=Vr(i,w),x(),i[i.length-1]!==null?[]:(I(t,0),c.events=ql(a,c.events,c),c.events)}function y(w,$){return N7(h(w),$)}function h(w){return M7(i,w)}function g(){let{line:w,column:$,offset:N,_index:D,_bufferIndex:L}=o;return{line:w,column:$,offset:N,_index:D,_bufferIndex:L}}function b(w){n[w.line]=w.column,M()}function x(){let w;for(;o._index<i.length;){let $=i[o._index];if(typeof $=="string")for(w=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===w&&o._bufferIndex<$.length;)v($.charCodeAt(o._bufferIndex));else v($)}}function v(w){l=void 0,f=w,u=u(w)}function C(w){_e(w)?(o.line++,o.column=1,o.offset+=w===-3?2:1,M()):w!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===i[o._index].length&&(o._bufferIndex=-1,o._index++)),c.previous=w,l=!0}function T(w,$){let N=$||{};return N.type=w,N.start=g(),c.events.push(["enter",N,c]),s.push(N),N}function P(w){let $=s.pop();return $.end=g(),c.events.push(["exit",$,c]),$}function k(w,$){I(w,$.from)}function S(w,$){$.restore()}function O(w,$){return N;function N(D,L,U){let z,R,q,oe;return Array.isArray(D)?pe(D):"tokenize"in D?pe([D]):_(D);function _(W){return de;function de(fe){let Ce=fe!==null&&W[fe],ve=fe!==null&&W.null,Ae=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return pe(Ae)(fe)}}function pe(W){return z=W,R=0,W.length===0?U:me(W[R])}function me(W){return de;function de(fe){return oe=B(),q=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?ae(fe):W.tokenize.call($?Object.assign(Object.create(c),$):c,p,we,ae)(fe)}}function we(W){return l=!0,w(q,oe),L}function ae(W){return l=!0,oe.restore(),++R<z.length?me(z[R]):U}}}function I(w,$){w.resolveAll&&!a.includes(w)&&a.push(w),w.resolve&&wr(c.events,$,c.events.length-$,w.resolve(c.events.slice($),c)),w.resolveTo&&(c.events=w.resolveTo(c.events,c))}function B(){let w=g(),$=c.previous,N=c.currentConstruct,D=c.events.length,L=Array.from(s);return{restore:U,from:D};function U(){o=w,c.previous=$,c.currentConstruct=N,c.events.length=D,s=L,M()}}function M(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function M7(e,t){let r=t.start._index,o=t.start._bufferIndex,n=t.end._index,a=t.end._bufferIndex,i;if(r===n)i=[e[r].slice(o,a)];else{if(i=e.slice(r,n),o>-1){let s=i[0];typeof s=="string"?i[0]=s.slice(o):i.shift()}a>0&&i.push(e[n].slice(0,a))}return i}function N7(e,t){let r=-1,o=[],n;for(;++r<e.length;){let a=e[r],i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
127
+ `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function iW(e){e=aW(e);var t=e.decimalSeparator,r=e.allowedDecimalSeparators,o=e.thousandsGroupStyle,n=e.suffix,a=e.allowNegative,i=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=ai);var l=e.onBlur;l===void 0&&(l=ai);var p=e.thousandSeparator,c=e.decimalScale,u=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var d=e.defaultValue,y=e.value,h=e.valueIsNumericString,g=e.onValueChange,b=J1(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=eh(e),v=x.decimalSeparator,C=x.allowedDecimalSeparators,T=function(z){return W1(z,e)},P=function(z,R){return oW(z,R,e)},k=Vl(y)?d:y,S=h!=null?h:rW(k,f,n);Vl(y)?Vl(d)||(S=S||typeof d=="number"):S=S||typeof y=="number";var O=function(z){return q1(z)?z:(typeof z=="number"&&(z=X1(z)),S&&typeof c=="number"?H1(z,c,!!u):z)},I=Q1(O(y),O(d),!!S,T,P,g),B=I[0],M=B.numAsString,w=B.formattedValue,$=I[1],N=function(z){var R=z.target,q=z.key,oe=R.selectionStart,_=R.selectionEnd,pe=R.value;if(pe===void 0&&(pe=""),oe!==_){s(z);return}q==="Backspace"&&pe[0]==="-"&&oe===f.length+1&&a&&fs(R,1),c&&u&&(q==="Backspace"&&pe[oe-1]===v?(fs(R,oe-1),z.preventDefault()):q==="Delete"&&pe[oe]===v&&z.preventDefault()),C!=null&&C.includes(q)&&pe[oe]===v&&fs(R,oe+1);var me=p===!0?",":p;q==="Backspace"&&pe[oe-1]===me&&fs(R,oe-1),q==="Delete"&&pe[oe]===me&&fs(R,oe+1),s(z)},D=function(z){var R=M;if(R.match(/\d/g)||(R=""),i||(R=U4(R)),u&&c&&(R=H1(R,c,u)),R!==M){var q=W1(R,e);$({formattedValue:q,value:R,floatValue:parseFloat(R)},{event:z,source:qc.event})}l(z)},L=function(z){return z===v?!0:Kc(z)},U=function(z){var R=z.currentValue,q=z.lastValue,oe=z.formattedValue,_=z.currentValueIndex,pe=z.formattedValueIndex,me=R[_],we=oe[pe],ae=Z1(q,R),W=ae.to;return _>=W.start&&_<W.end&&C&&C.includes(me)&&we===v?!0:me===we};return Object.assign(Object.assign({},b),{value:w,valueIsNumericString:!1,isValidInputCharacter:L,isCharacterSame:U,onValueChange:$,format:T,removeFormatting:P,getCaretBoundary:function(z){return nW(z,e)},onKeyDown:N,onBlur:D})}function eI(e){var t=iW(e);return Fl.createElement(Q4,Object.assign({},t))}import sW,{useCallback as lW}from"react";import{motion as pW}from"framer-motion";var cW=pW(gf),Yc=sW.forwardRef((e,t)=>{var P;let T=e,{label:r,helperText:o,error:n,style:a,size:i,color:s,disabled:l,required:p,onChange:c,name:u,sx:f,className:d,enableClearable:y}=T,h=ge(T,["label","helperText","error","style","size","color","disabled","required","onChange","name","sx","className","enableClearable"]),[g,b]=Rr(e.value,e.defaultValue,lW(k=>{c==null||c({target:{value:(k==null?void 0:k.toString())||"",name:u||""}})},[c,u])),x=k=>{b(k.target.value)},v=()=>{b(e.defaultValue||"")},C=A(cW,re(V({value:g,name:u,onChange:x,required:p,color:n?"danger":s,disabled:l,slotProps:V({input:V({ref:t},(P=h.slotProps)==null?void 0:P.input)},h.slotProps)},h),{endDecorator:y?Pe(Lt,{gap:1,direction:"row",children:[h.endDecorator,A(Wt,{onClick:v,"aria-label":"Clear",children:A(_m,{})})]}):h.endDecorator}));return Pe(kn,{required:p,color:s,size:i,error:n,disabled:l,sx:f,className:d,children:[r&&A(Sn,{children:r}),C,o&&A(Rn,{children:o})]})});Yc.displayName="Input";var Fr=Yc;var uW={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},tI=(e="USD")=>{let[t,r,o,...n]=new $1(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=uW[e];return{symbol:`${t} `,thousandSeparator:r,decimalSeparator:o,placeholder:o?`${t} 0${o}${Array.from(Array(a)).map(()=>0).join("")}`:`${t} 0`,fixedDecimalScale:!!o,decimalScale:a}};var fW=nI.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=ge(a,["onChange"]);return A(eI,re(V({},n),{onValueChange:({value:i})=>{o==null||o({target:{name:t.name,value:i}})},valueIsNumericString:!0,getInputRef:r,allowNegative:!1}))}),th=nI.forwardRef(function(t,r){let M=t,{currency:o="USD",name:n,onChange:a,label:i,error:s,helperText:l,required:p,disabled:c,useMinorUnit:u,sx:f,className:d}=M,y=ge(M,["currency","name","onChange","label","error","helperText","required","disabled","useMinorUnit","sx","className"]),{symbol:h,thousandSeparator:g,decimalSeparator:b,placeholder:x,fixedDecimalScale:v,decimalScale:C}=tI(o),[T,P]=Rr(t.value,t.defaultValue,rI(w=>a==null?void 0:a({target:{name:n,value:w}}),[a,n])),k=oI(()=>T&&u?T/Math.pow(10,C):T,[T,u,C]),S=oI(()=>t.max&&u?t.max/Math.pow(10,C):t.max,[t.max,u,C]),[O,I]=dW(!!S&&!!k&&k>S),B=rI(w=>{var N;if(w.target.value===""){P(void 0);return}let $=Number(u?(N=w.target.value)==null?void 0:N.replace(b,""):w.target.value);S&&Number(w.target.value)>S?I(!0):I(!1),P($)},[b,S,u,P]);return A(Fr,re(V({},y),{size:"sm",ref:r,value:k,placeholder:x,onChange:B,error:s||O,disabled:c,required:p,color:s||O?"danger":t.color,label:i,helperText:O?new Qm(`limit: {amount, number, ::currency/${o} unit-width-narrow}`).format({amount:S}):l,slotProps:{input:{component:fW,decimalSeparator:b,thousandSeparator:g,prefix:h,fixedDecimalScale:v,decimalScale:C,"aria-label":y["aria-label"]}},sx:re(V({},f),{fontFamily:"monospace"}),className:d}))});var aI=th;import HW,{useCallback as ua,useEffect as mh,useMemo as nr,useRef as xb,useState as gI,useId as UW}from"react";import{jsx as mW}from"react/jsx-runtime";var iI=Nt(mW("path",{d:"M13 19V7.83l4.88 4.88c.39.39 1.03.39 1.42 0 .39-.39.39-1.02 0-1.41l-6.59-6.59a.9959.9959 0 0 0-1.41 0l-6.6 6.58c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L11 7.83V19c0 .55.45 1 1 1s1-.45 1-1"}),"ArrowUpwardRounded");import{motion as hW}from"framer-motion";var yW=hW(nm),Xc=yW;Xc.displayName="Sheet";var No=Xc;var Zc=e=>{let o=e,{children:t}=o,r=ge(o,["children"]);return A(dm,re(V({},r),{children:t}))};Zc.displayName="Table";function cb(e){let{headCells:t,showCheckbox:r,onCheckboxChange:o,slots:{checkbox:n=$c}={},slotProps:{checkbox:a={}}={}}=e;return A("thead",{children:Pe("tr",{children:[r&&A("th",{style:{width:"40px",textAlign:"center"},children:A(n,V({onChange:o},a))}),t.map(i=>A("th",{style:{width:i.width,minWidth:i.minWidth,maxWidth:i.maxWidth,textAlign:i.numeric?"right":"left"},children:i.label},i.label))]})})}cb.displayName="TableHead";function ub(e){let{rows:t,cellOrder:r,rowOptions:o,showCheckbox:n,onCheckboxChange:a,slots:{checkbox:i=$c}={},slotProps:{checkbox:s={}}={}}=e;return A("tbody",{children:t.map((l,p)=>Pe("tr",{children:[n&&A("td",{style:{textAlign:"center"},children:A(i,V({onChange:c=>a==null?void 0:a(c,p)},s))}),r.map(c=>{var u;return A("td",{style:{textAlign:(u=o==null?void 0:o[c])!=null&&u.numeric?"right":"left"},children:l[c]},c)})]},p))})}ub.displayName="TableBody";import RW,{forwardRef as EW,useCallback as bb,useEffect as IW,useImperativeHandle as OW,useRef as _W,useState as wW}from"react";function co(e){return typeof e=="string"||e instanceof String}function db(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function fb(e,t){return Array.isArray(t)?fb(e,(r,o)=>t.includes(o)):Object.entries(e).reduce((r,o)=>{let[n,a]=o;return t(a,n)&&(r[n]=a),r},{})}var Oe={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function mb(e){switch(e){case Oe.LEFT:return Oe.FORCE_LEFT;case Oe.RIGHT:return Oe.FORCE_RIGHT;default:return e}}function rh(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function $l(e,t){if(t===e)return!0;let r=Array.isArray(t),o=Array.isArray(e),n;if(r&&o){if(t.length!=e.length)return!1;for(n=0;n<t.length;n++)if(!$l(t[n],e[n]))return!1;return!0}if(r!=o)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){let a=t instanceof Date,i=e instanceof Date;if(a&&i)return t.getTime()==e.getTime();if(a!=i)return!1;let s=t instanceof RegExp,l=e instanceof RegExp;if(s&&l)return t.toString()==e.toString();if(s!=l)return!1;let p=Object.keys(t);for(n=0;n<p.length;n++)if(!Object.prototype.hasOwnProperty.call(e,p[n]))return!1;for(n=0;n<p.length;n++)if(!$l(e[p[n]],t[p[n]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}var oh=class{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Oe.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Oe.RIGHT:Oe.LEFT}};function Te(e,t){return new Te.InputMask(e,t)}function hb(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?Te.MaskedRegExp:co(e)?Te.MaskedPattern:e===Date?Te.MaskedDate:e===Number?Te.MaskedNumber:Array.isArray(e)||e===Array?Te.MaskedDynamic:Te.Masked&&e.prototype instanceof Te.Masked?e:Te.Masked&&e instanceof Te.Masked?e.constructor:e instanceof Function?Te.MaskedFunction:(console.warn("Mask not found for mask",e),Te.Masked)}function la(e){if(!e)throw new Error("Options in not defined");if(Te.Masked){if(e.prototype instanceof Te.Masked)return{mask:e};let t=e instanceof Te.Masked?{mask:e}:db(e)&&e.mask instanceof Te.Masked?e:{},{mask:r=void 0}=t,o=ge(t,["mask"]);if(r){let n=r.mask;return V(re(V({},fb(r,(a,i)=>!i.startsWith("_"))),{mask:r.constructor,_mask:n}),o)}}return db(e)?V({},e):{mask:e}}function Ir(e){if(Te.Masked&&e instanceof Te.Masked)return e;let t=la(e),r=hb(t.mask);if(!r)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===r&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new r(t)}Te.createMask=Ir;var ii=class{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch(r){}return t!=null?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch(r){}return t!=null?t:this.value.length}select(t,r){if(!(t==null||r==null||t===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(t,r)}catch(o){}}get isActive(){return!1}};Te.MaskElement=ii;var sI=90,gW=89,pa=class extends ii{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,r,o;return(t=(r=(o=this.input).getRootNode)==null?void 0:r.call(o))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===sI&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===gW&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===sI&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}};Te.HTMLMaskElement=pa;var Qc=class extends pa{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,r){this.input.setSelectionRange(t,r)}get value(){return this.input.value}set value(t){this.input.value=t}};Te.HTMLMaskElement=pa;var jl=class extends pa{get _unsafeSelectionStart(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o<n?o:n}get _unsafeSelectionEnd(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o>n?o:n}_unsafeSelect(t,r){if(!this.rootElement.createRange)return;let o=this.rootElement.createRange();o.setStart(this.input.firstChild||this.input,t),o.setEnd(this.input.lastChild||this.input,r);let n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(o))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}};Te.HTMLContenteditableMaskElement=jl;var eu=class e{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>e.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}};eu.MAX_LENGTH=100;var nh=class{constructor(t,r){this.el=t instanceof ii?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new jl(t):new Qc(t),this.masked=Ir(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new eu,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var r;return t==null||((r=this.masked)==null?void 0:r.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof Te.Masked)&&this.masked.constructor===hb(t)){this.masked.updateOptions({mask:t});return}let r=t instanceof Te.Masked?t:Ir({mask:t});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,r){let o=this._listeners[t];o&&o.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(t){let r=this.masked.unmaskedValue,o=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==r||this.value!==o||this._rawInputValue!==n;this._unmaskedValue=r,this._value=o,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){let i=t,{mask:r}=i,o=ge(i,["mask"]),n=!this.maskEquals(r),a=this.masked.optionsIsChanged(o);n&&(this.mask=r),a&&this.masked.updateOptions(o),(n||a)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Oe.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,r){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(r),this}off(t,r){if(!this._listeners[t])return this;if(!r)return delete this._listeners[t],this;let o=this._listeners[t].indexOf(r);return o>=0&&this._listeners[t].splice(o,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();let r=new oh({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),o=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=o===this.masked.rawInputValue?r.removeDirection:Oe.NONE,i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==Oe.NONE&&(i=this.masked.nearestInputPos(i,Oe.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};Te.InputMask=nh;var Ve=class e{static normalize(t){return Array.isArray(t)?t:[t,new e]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}};Te.ChangeDetails=Ve;var Or=class{constructor(t,r,o){t===void 0&&(t=""),r===void 0&&(r=0),this.value=t,this.from=r,this.stop=o}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";let r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";let t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}};var Gt=class e{constructor(t){this._value="",this._update(V(V({},e.DEFAULTS),t)),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,r){r===void 0&&(r={input:!0}),this.reset(),this.append(t,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,r){return t}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(t,r)}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Or(this.extractInput(t,r),t)}appendTail(t){return co(t)&&(t=new Or(String(t))),t.appendTo(this)}_appendCharRaw(t,r){return t?(this._value+=t,new Ve({inserted:t,rawInserted:t})):new Ve}_appendChar(t,r,o){r===void 0&&(r={});let n=this.state,a;if([t,a]=this.doPrepareChar(t,r),t&&(a=a.aggregate(this._appendCharRaw(t,r)),!a.rawInserted&&this.autofix==="pad")){let i=this.state;this.state=n;let s=this.pad(r),l=this._appendCharRaw(t,r);s=s.aggregate(l),l.rawInserted||s.equals(a)?a=s:this.state=i}if(a.inserted){let i,s=this.doValidate(r)!==!1;if(s&&o!=null){let l=this.state;if(this.overwrite===!0){i=o.state;for(let c=0;c<a.rawInserted.length;++c)o.unshift(this.displayValue.length-a.tailShift)}let p=this.appendTail(o);if(s=p.rawInserted.length===o.toString().length,!(s&&p.inserted)&&this.overwrite==="shift"){this.state=l,i=o.state;for(let c=0;c<a.rawInserted.length;++c)o.shift();p=this.appendTail(o),s=p.rawInserted.length===o.toString().length}s&&p.inserted&&(this.state=l)}s||(a=new Ve,this.state=n,o&&i&&(o.state=i))}return a}_appendPlaceholder(){return new Ve}_appendEager(){return new Ve}append(t,r,o){if(!co(t))throw new Error("value should be string");let n=co(o)?new Or(String(o)):o;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[t,a]=this.doPrepare(t,r);for(let i=0;i<t.length;++i){let s=this._appendChar(t[i],r,n);if(!s.rawInserted&&!this.doSkipInvalid(t[i],r,n))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&t&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(r),new Ve}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;let r=this.rawInputValue,o=this.value,n=t();return this.rawInputValue=r,this.value&&this.value!==o&&o.indexOf(this.value)===0&&(this.append(o.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;let r=this.state,o=t(this);return this.state=r,delete this._isolated,o}doSkipInvalid(t,r,o){return!!this.skipInvalid}doPrepare(t,r){return r===void 0&&(r={}),Ve.normalize(this.prepare?this.prepare(t,this,r):t)}doPrepareChar(t,r){return r===void 0&&(r={}),Ve.normalize(this.prepareChar?this.prepareChar(t,this,r):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,r,o,n,a){o===void 0&&(o=""),n===void 0&&(n=Oe.NONE),a===void 0&&(a={input:!0});let i=t+r,s=this.extractTail(i),l=this.eager===!0||this.eager==="remove",p;l&&(n=mb(n),p=this.extractInput(0,i,{raw:!0}));let c=t,u=new Ve;if(n!==Oe.NONE&&(c=this.nearestInputPos(t,r>1&&t!==0&&!l?Oe.NONE:n),u.tailShift=c-t),u.aggregate(this.remove(c)),l&&n!==Oe.NONE&&p===this.rawInputValue)if(n===Oe.FORCE_LEFT){let f;for(;p===this.rawInputValue&&(f=this.displayValue.length);)u.aggregate(new Ve({tailShift:-1})).aggregate(this.remove(f-1))}else n===Oe.FORCE_RIGHT&&s.unshift();return u.aggregate(this.append(o,a,s))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!$l(this,t)}typedValueEquals(t){let r=this.typedValue;return t===r||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(r)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new Ve}};Gt.DEFAULTS={skipInvalid:!0};Gt.EMPTY_VALUES=[void 0,null,""];Te.Masked=Gt;var Hl=class e{constructor(t,r){t===void 0&&(t=[]),r===void 0&&(r=0),this.chunks=t,this.from=r}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=co(t)?new Or(String(t)):t;let r=this.chunks[this.chunks.length-1],o=r&&(r.stop===t.stop||t.stop==null)&&t.from===r.from+r.toString().length;if(t instanceof Or)o?r.extend(t.toString()):this.chunks.push(t);else if(t instanceof e){if(t.stop==null){let n;for(;t.chunks.length&&t.chunks[0].stop==null;)n=t.chunks.shift(),n.from+=t.from,this.extend(n)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Te.MaskedPattern))return new Or(this.toString()).appendTo(t);let r=new Ve;for(let o=0;o<this.chunks.length;++o){let n=this.chunks[o],a=t._mapPosToBlock(t.displayValue.length),i=n.stop,s;if(i!=null&&(!a||a.index<=i)&&((n instanceof e||t._stops.indexOf(i)>=0)&&r.aggregate(t._appendPlaceholder(i)),s=n instanceof e&&t._blocks[i]),s){let l=s.appendTail(n);r.aggregate(l);let p=n.toString().slice(l.rawInserted.length);p&&r.aggregate(t.append(p,{tail:!0}))}else r.aggregate(t.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){let n=t,{chunks:r}=n,o=ge(n,["chunks"]);Object.assign(this,o),this.chunks=r.map(a=>{let i="chunks"in a?new e:new Or;return i.state=a,i})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";let r=t!=null?t-this.from:t,o=0;for(;o<this.chunks.length;){let n=this.chunks[o],a=n.unshift(r);if(n.toString()){if(!a)break;++o}else this.chunks.splice(o,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){let r=this.chunks[t],o=r.shift();if(r.toString()){if(!o)break;--t}else this.chunks.splice(t,1);if(o)return o}return""}};var ah=class{constructor(t,r){this.masked=t,this._log=[];let{offset:o,index:n}=t._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=o,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){let t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Oe.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Oe.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Oe.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Oe.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Oe.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Oe.NONE),!0})}};var Ul=class{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(r),this._value||(this._isRawInput=!1),new Ve}nearestInputPos(t,r){r===void 0&&(r=Oe.NONE);let o=0,n=this._value.length;switch(r){case Oe.LEFT:case Oe.FORCE_LEFT:return o;case Oe.NONE:case Oe.RIGHT:case Oe.FORCE_RIGHT:default:return n}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._isRawInput?r-t:0}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),o===void 0&&(o={}),o.raw&&this._isRawInput&&this._value.slice(t,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new Ve;let o=this.eager===!0||this.eager==="append",a=this.char===t&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!o)&&!r.tail,i=new Ve({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(r.raw||r.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){let t=new Ve;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new Or("")}appendTail(t){return co(t)&&(t=new Or(String(t))),t.appendTo(this)}append(t,r,o){let n=this._appendChar(t[0],r);return o!=null&&(n.tailShift+=this.appendTail(o).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}};var si=class{constructor(t){let p=t,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s}=p,l=ge(p,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=Ir(l),Object.assign(this,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),t===0&&r>=1?(this.isFilled=!1,this.masked.remove(t,r)):new Ve}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new Ve;let o=this.masked.state,n=this.masked._appendChar(t,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new Ve,this.masked.state=o),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(t,r,o){return this.masked.append(t,this.currentMaskFlags(r),o)}_appendPlaceholder(){return this.isFilled||this.isOptional?new Ve:(this.isFilled=!0,new Ve({inserted:this.placeholderChar}))}_appendEager(){return new Ve}extractTail(t,r){return this.masked.extractTail(t,r)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.masked.extractInput(t,r,o)}nearestInputPos(t,r){r===void 0&&(r=Oe.NONE);let o=0,n=this.value.length,a=Math.min(Math.max(t,o),n);switch(r){case Oe.LEFT:case Oe.FORCE_LEFT:return this.isComplete?a:o;case Oe.RIGHT:case Oe.FORCE_RIGHT:return this.isComplete?a:n;case Oe.NONE:default:return a}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.value.slice(t,r).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var r;return re(V({},t),{_beforeTailState:(t==null||(r=t._beforeTailState)==null?void 0:r.masked)||(t==null?void 0:t._beforeTailState)})}pad(t){return new Ve}};si.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};var ih=class extends Gt{updateOptions(t){super.updateOptions(t)}_update(t){let r=t.mask;r&&(t.validate=o=>o.search(r)>=0),super._update(t)}};Te.MaskedRegExp=ih;var Zt=class e extends Gt{constructor(t){super(re(V(V({},e.DEFAULTS),t),{definitions:Object.assign({},si.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)}))}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){let t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};let r=this.mask;if(!r||!t)return;let o=!1,n=!1;for(let i=0;i<r.length;++i){if(this.blocks){let c=r.slice(i),u=Object.keys(this.blocks).filter(d=>c.indexOf(d)===0);u.sort((d,y)=>y.length-d.length);let f=u[0];if(f){let a=la(this.blocks[f]),{expose:d,repeat:y}=a,h=ge(a,["expose","repeat"]),g=re(V({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix},h),{repeat:y,parent:this}),b=y!=null?new Te.RepeatBlock(g):Ir(g);b&&(this._blocks.push(b),d&&(this.exposeBlock=b),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),i+=f.length-1;continue}}let s=r[i],l=s in t;if(s===e.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){o=!o;continue}if(s==="["||s==="]"){n=!n;continue}if(s===e.ESCAPE_CHAR){if(++i,s=r[i],!s)break;l=!1}let p=l?new si(re(V({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},la(t[s])),{parent:this})):new Ul({char:s,eager:this.eager,isUnmasking:o});this._blocks.push(p)}}get state(){return re(V({},super.state),{_blocks:this._blocks.map(t=>t.state)})}set state(t){if(!t){this.reset();return}let n=t,{_blocks:r}=n,o=ge(n,["_blocks"]);this._blocks.forEach((a,i)=>a.state=r[i]),super.state=o}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,r)=>t+=r.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(r),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,r)=>t+=r.value,"")}set value(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(r),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(r),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,r)=>t+=r.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;let r=new Ve,o=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(o==null)return r;this._blocks[o].isFilled&&++o;for(let n=o;n<this._blocks.length;++n){let a=this._blocks[n]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._mapPosToBlock(this.displayValue.length),n=new Ve;if(!o)return n;for(let i=o.index,s;s=this._blocks[i];++i){var a;let l=s._appendChar(t,re(V({},r),{_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]}));if(n.aggregate(l),l.consumed)break}return n}extractTail(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=new Hl;return t===r||this._forEachBlocksInRange(t,r,(n,a,i,s)=>{let l=n.extractTail(i,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof Hl&&(l.blockIndex=a),o.extend(l)}),o}extractInput(t,r,o){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),o===void 0&&(o={}),t===r)return"";let n="";return this._forEachBlocksInRange(t,r,(a,i,s,l)=>{n+=a.extractInput(s,l,o)}),n}_findStopBefore(t){let r;for(let o=0;o<this._stops.length;++o){let n=this._stops[o];if(n<=t)r=n;else break}return r}_appendPlaceholder(t){let r=new Ve;if(this.lazy&&t==null)return r;let o=this._mapPosToBlock(this.displayValue.length);if(!o)return r;let n=o.index,a=t!=null?t:this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||t!=null){var s;r.aggregate(i._appendPlaceholder((s=i._blocks)==null?void 0:s.length))}}),r}_mapPosToBlock(t){let r="";for(let o=0;o<this._blocks.length;++o){let n=this._blocks[o],a=r.length;if(r+=n.displayValue,t<=r.length)return{index:o,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((r,o)=>r+=o.displayValue.length,0)}_forEachBlocksInRange(t,r,o){r===void 0&&(r=this.displayValue.length);let n=this._mapPosToBlock(t);if(n){let a=this._mapPosToBlock(r),i=a&&n.index===a.index,s=n.offset,l=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(o(this._blocks[n.index],n.index,s,l),a&&!i){for(let p=n.index+1;p<a.index;++p)o(this._blocks[p],p,0,this._blocks[p].displayValue.length);o(this._blocks[a.index],a.index,0,a.offset)}}}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._forEachBlocksInRange(t,r,(n,a,i,s)=>{o.aggregate(n.remove(i,s))}),o}nearestInputPos(t,r){if(r===void 0&&(r=Oe.NONE),!this._blocks.length)return 0;let o=new ah(this,t);if(r===Oe.NONE)return o.pushRightBeforeInput()||(o.popState(),o.pushLeftBeforeInput())?o.pos:this.displayValue.length;if(r===Oe.LEFT||r===Oe.FORCE_LEFT){if(r===Oe.LEFT){if(o.pushRightBeforeFilled(),o.ok&&o.pos===t)return t;o.popState()}if(o.pushLeftBeforeInput(),o.pushLeftBeforeRequired(),o.pushLeftBeforeFilled(),r===Oe.LEFT){if(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.ok&&o.pos<=t||(o.popState(),o.ok&&o.pos<=t))return o.pos;o.popState()}return o.ok?o.pos:r===Oe.FORCE_LEFT?0:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:0)}return r===Oe.RIGHT||r===Oe.FORCE_RIGHT?(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.pushRightBeforeFilled()?o.pos:r===Oe.FORCE_RIGHT?this.displayValue.length:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:this.nearestInputPos(t,Oe.LEFT))):t}totalInputPositions(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=0;return this._forEachBlocksInRange(t,r,(n,a,i,s)=>{o+=n.totalInputPositions(i,s)}),o}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){let r=this._maskedBlocks[t];return r?r.map(o=>this._blocks[o]):[]}pad(t){let r=new Ve;return this._forEachBlocksInRange(0,this.displayValue.length,o=>r.aggregate(o.pad(t))),r}};Zt.DEFAULTS=re(V({},Gt.DEFAULTS),{lazy:!0,placeholderChar:"_"});Zt.STOP_CHAR="`";Zt.ESCAPE_CHAR="\\";Zt.InputDefinition=si;Zt.FixedDefinition=Ul;Te.MaskedPattern=Zt;var li=class extends Zt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){let c=t,{to:r=this.to||0,from:o=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix}=c,i=ge(c,["to","from","maxLength","autofix"]);this.to=r,this.from=o,this.maxLength=Math.max(String(r).length,n),this.autofix=a;let s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0"),p=0;for(;p<l.length&&l[p]===s[p];)++p;i.mask=l.slice(0,p).replace(/0/g,"\\0")+"0".repeat(this.maxLength-p),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let r="",o="",[,n,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(n.length)+a,o="9".repeat(n.length)+a),r=r.padEnd(this.maxLength,"0"),o=o.padEnd(this.maxLength,"9"),[r,o]}doPrepareChar(t,r){r===void 0&&(r={});let o;return[t,o]=super.doPrepareChar(t.replace(/\D/g,""),r),t||(o.skip=!this.isComplete),[t,o]}_appendCharRaw(t,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,r);let o=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+t);return Number(i)<this.from?super._appendCharRaw(o[this.value.length],r):Number(a)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(o[this.value.length],r).aggregate(this._appendCharRaw(t,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(t,r)}doValidate(t){let r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;let[n,a]=this.boundaries(r);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){let r=new Ve;if(this.value.length===this.maxLength)return r;let o=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)r.aggregate(super._appendCharRaw("0",t));o.split("").forEach(a=>this._appendCharRaw(a))}return r}};Te.MaskedRange=li;var Wl=class e extends Zt{static extractPatternOptions(t){let a=t,{mask:r,pattern:o}=a,n=ge(a,["mask","pattern"]);return re(V({},n),{mask:co(r)?r:o})}constructor(t){super(e.extractPatternOptions(V(V({},e.DEFAULTS),t)))}updateOptions(t){super.updateOptions(t)}_update(t){let s=V(V({},e.DEFAULTS),t),{mask:r,pattern:o,blocks:n}=s,a=ge(s,["mask","pattern","blocks"]),i=Object.assign({},e.GET_DEFAULT_BLOCKS());t.min&&(i.Y.from=t.min.getFullYear()),t.max&&(i.Y.to=t.max.getFullYear()),t.min&&t.max&&i.Y.from===i.Y.to&&(i.m.from=t.min.getMonth()+1,i.m.to=t.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=t.min.getDate(),i.d.to=t.max.getDate())),Object.assign(i,this.blocks,n),super._update(re(V({},a),{mask:co(r)?r:o,blocks:i}))}doValidate(t){let r=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(e.extractPatternOptions(t))}};Wl.GET_DEFAULT_BLOCKS=()=>({d:{mask:li,from:1,to:31,maxLength:2},m:{mask:li,from:1,to:12,maxLength:2},Y:{mask:li,from:1900,to:9999}});Wl.DEFAULTS=re(V({},Zt.DEFAULTS),{mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";let r=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),n=e.getFullYear();return[r,o,n].join(".")},parse:(e,t)=>{let[r,o,n]=e.split(".").map(Number);return new Date(n,o-1,r)}});Te.MaskedDate=Wl;var tu=class e extends Gt{constructor(t){super(V(V({},e.DEFAULTS),t)),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(r=>{let i=la(r),{expose:o}=i,n=ge(i,["expose"]),a=Ir(V({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid},n));return o&&(this.exposeMask=a),a}):[])}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._applyDispatch(t,r);return this.currentMask&&o.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(r))),o}_applyDispatch(t,r,o){t===void 0&&(t=""),r===void 0&&(r={}),o===void 0&&(o="");let n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,i=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,s=a.slice(i.length),l=this.currentMask,p=new Ve,c=l==null?void 0:l.state;return this.currentMask=this.doDispatch(t,V({},r),o),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),p.tailShift=this.currentMask.value.length-n.length),s&&(p.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),p}_appendPlaceholder(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){let r=new Ve;return t&&r.aggregate(this._applyDispatch("",{},t)),r.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var r,o;return re(V({},t),{_beforeTailState:((r=t._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((o=t._beforeTailState)==null?void 0:o.currentMask)||t._beforeTailState})}doDispatch(t,r,o){return r===void 0&&(r={}),o===void 0&&(o=""),this.dispatch(t,this,r,o)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,r){r===void 0&&(r={});let[o,n]=super.doPrepare(t,r);if(this.currentMask){let a;[o,a]=super.doPrepare(o,this.currentMaskFlags(r)),n=n.aggregate(a)}return[o,n]}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(t,r);if(this.currentMask){let a;[o,a]=super.doPrepareChar(o,this.currentMaskFlags(r)),n=n.aggregate(a)}return[o,n]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(t);this.currentMask&&(this.currentMask.typedValue=t,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,r){let o=new Ve;return this.currentMask&&o.aggregate(this.currentMask.remove(t,r)).aggregate(this._applyDispatch()),o}get state(){var t;return re(V({},super.state),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state})}set state(t){let i=t,{compiledMasks:r,currentMaskRef:o,currentMask:n}=i,a=ge(i,["compiledMasks","currentMaskRef","currentMask"]);r&&this.compiledMasks.forEach((s,l)=>s.state=r[l]),o!=null&&(this.currentMask=o,this.currentMask.state=n),super.state=a}extractInput(t,r,o){return this.currentMask?this.currentMask.extractInput(t,r,o):""}extractTail(t,r){return this.currentMask?this.currentMask.extractTail(t,r):super.extractTail(t,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,r){return this.currentMask?this.currentMask.nearestInputPos(t,r):super.nearestInputPos(t,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((r,o)=>{if(!t[o])return;let i=t[o],{mask:n}=i,a=ge(i,["mask"]);return $l(r,a)&&r.maskEquals(n)}):super.maskEquals(t)}typedValueEquals(t){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(t))}};tu.DEFAULTS=re(V({},Gt.DEFAULTS),{dispatch:(e,t,r,o)=>{if(!t.compiledMasks.length)return;let n=t.rawInputValue,a=t.compiledMasks.map((i,s)=>{let l=t.currentMask===i,p=l?i.displayValue.length:i.nearestInputPos(i.displayValue.length,Oe.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):l||i.remove(p),i.append(e,t.currentMaskFlags(r)),i.appendTail(o),{index:s,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(p,i.nearestInputPos(i.displayValue.length,Oe.FORCE_LEFT)))}});return a.sort((i,s)=>s.weight-i.weight||s.totalInputPositions-i.totalInputPositions),t.compiledMasks[a[0].index]}});Te.MaskedDynamic=tu;var ru=class e extends Zt{constructor(t){super(V(V({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){let n=t,{enum:r}=n,o=ge(n,["enum"]);if(r){let a=r.map(l=>l.length),i=Math.min(...a),s=Math.max(...a)-i;o.mask="*".repeat(i),s&&(o.mask+="["+"*".repeat(s)+"]"),this.enum=r}super._update(o)}_appendCharRaw(t,r){r===void 0&&(r={});let o=Math.min(this.nearestInputPos(0,Oe.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+t,o));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,s)=>{let l=n[0][s];s>=this.value.length||l===i.value||(i.reset(),i._appendChar(l,r))});let a=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new Ve}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Or("",t)}remove(t,r){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),t===r)return new Ve;let o=Math.min(super.nearestInputPos(0,Oe.FORCE_RIGHT),this.value.length),n;for(n=t;n>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(o,n),o)).length>1);--n);let a=super.remove(n,r);return a.tailShift+=n-t,a}};ru.DEFAULTS=re(V({},Zt.DEFAULTS),{matchValue:(e,t,r)=>e.indexOf(t,r)===r});Te.MaskedEnum=ru;var sh=class extends Gt{updateOptions(t){super.updateOptions(t)}_update(t){super._update(re(V({},t),{validate:t.mask}))}};Te.MaskedFunction=sh;var lI,pi=class e extends Gt{constructor(t){super(V(V({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){let t="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",o=(this.scale?"("+rh(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+r+o),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(rh).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(rh(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){let r=t.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),r);return t&&!o&&(n.skip=!0),o&&!this.allowPositive&&!this.value&&o!=="-"&&n.aggregate(this._appendChar("-")),[o,n]}_separatorsCount(t,r){r===void 0&&(r=!1);let o=0;for(let n=0;n<t;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++o,r&&(t+=this.thousandsSeparator.length));return o}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r),this._removeThousandsSeparators(super.extractInput(t,r,o))}_appendCharRaw(t,r){r===void 0&&(r={});let o=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(o);this._value=this._removeThousandsSeparators(this.value);let a=this._value;this._value+=t;let i=this.number,s=!isNaN(i),l=!1;if(s){let f;this.min!=null&&this.min<0&&this.number<this.min&&(f=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(f=this.max),f!=null&&(this.autofix?(this._value=this.format(f,this).replace(e.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!r.tail)):s=!1),s&&(s=!!this._value.match(this._numberRegExp))}let p;s?p=new Ve({inserted:this._value.slice(a.length),rawInserted:l?"":t,skip:l}):(this._value=a,p=new Ve),this._value=this._insertThousandsSeparators(this._value);let c=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,u=this._separatorsCountFromSlice(c);return p.tailShift+=(u-n)*this.thousandsSeparator.length,p}_findSeparatorAround(t){if(this.thousandsSeparator){let r=t-this.thousandsSeparator.length+1,o=this.value.indexOf(this.thousandsSeparator,r);if(o<=t)return o}return-1}_adjustRangeWithSeparators(t,r){let o=this._findSeparatorAround(t);o>=0&&(t=o);let n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[t,r]}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r);let o=this.value.slice(0,t),n=this.value.slice(r),a=this._separatorsCount(o.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(o+n));let i=this._separatorsCountFromSlice(o);return new Ve({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(t,r){if(!this.thousandsSeparator)return t;switch(r){case Oe.NONE:case Oe.LEFT:case Oe.FORCE_LEFT:{let o=this._findSeparatorAround(t-1);if(o>=0){let n=o+this.thousandsSeparator.length;if(t<n||this.value.length<=n||r===Oe.FORCE_LEFT)return o}break}case Oe.RIGHT:case Oe.FORCE_RIGHT:{let o=this._findSeparatorAround(t);if(o>=0)return o+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){let t=this.number,r=t;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==t&&(this.unmaskedValue=this.format(r,this));let o=this.value;this.normalizeZeros&&(o=this._normalizeZeros(o)),this.padFractionalZeros&&this.scale>0&&(o=this._padFractionalZeros(o)),this._value=o}super.doCommit()}_normalizeZeros(t){let r=this._removeThousandsSeparators(t).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(o,n,a,i)=>n+i),t.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(t){if(!t)return t;let r=t.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(t,r,o){r===void 0&&(r={});let n=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===e.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,r,o)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,e.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(e.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}};lI=pi;pi.UNMASKED_RADIX=".";pi.EMPTY_VALUES=[...Gt.EMPTY_VALUES,0];pi.DEFAULTS=re(V({},Gt.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[lI.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})});Te.MaskedNumber=pi;var lh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function yb(e,t,r){t===void 0&&(t=lh.MASKED),r===void 0&&(r=lh.MASKED);let o=Ir(e);return n=>o.runIsolated(a=>(a[t]=n,a[r]))}function pI(e,t,r,o){return yb(t,r,o)(e)}Te.PIPE_TYPE=lh;Te.createPipe=yb;Te.pipe=pI;var ph=class extends Zt{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var r,o,n;let l=la(t),{repeat:a}=l,i=ge(l,["repeat"]);this._blockOpts=Object.assign({},this._blockOpts,i);let s=Ir(this._blockOpts);this.repeat=(r=(o=a!=null?a:s.repeat)!=null?o:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:s},eager:s.eager,overwrite:s.overwrite,skipInvalid:s.skipInvalid,lazy:s.lazy,placeholderChar:s.placeholderChar,displayChar:s.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ir(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,r){r===void 0&&(r={});let o=new Ve;for(let l=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),p,c;p=(i=this._blocks[l])!=null?i:c=!c&&this._allocateBlock(l);++l){var n,a,i,s;let u=p._appendChar(t,re(V({},r),{_beforeTailState:(s=r._beforeTailState)==null||(s=s._blocks)==null?void 0:s[l]}));if(u.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(o.aggregate(u),u.consumed)break}return o}_trimEmptyTail(t,r){var o,n;t===void 0&&(t=0);let a=Math.max(((o=this._mapPosToBlock(t))==null?void 0:o.index)||0,this.repeatFrom,0),i;r!=null&&(i=(n=this._mapPosToBlock(r))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let s=0;for(let l=i;a<=l&&!this._blocks[l].unmaskedValue;--l,++s);s&&(this._blocks.splice(i-s+1,s),this.mask=this.mask.slice(s))}reset(){super.reset(),this._trimEmptyTail()}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._trimEmptyTail(t,r),o}totalInputPositions(t,r){return t===void 0&&(t=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,r)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};Te.RepeatBlock=ph;try{globalThis.IMask=Te}catch(e){}import vb from"react";var Le=Dn(R0(),1);import ch from"react";var cI={mask:Le.default.oneOfType([Le.default.array,Le.default.func,Le.default.string,Le.default.instanceOf(RegExp),Le.default.oneOf([Date,Number,Te.Masked]),Le.default.instanceOf(Te.Masked)]),value:Le.default.any,unmask:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["typed"])]),prepare:Le.default.func,prepareChar:Le.default.func,validate:Le.default.func,commit:Le.default.func,overwrite:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["shift"])]),eager:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["append","remove"])]),skipInvalid:Le.default.bool,onAccept:Le.default.func,onComplete:Le.default.func,placeholderChar:Le.default.string,displayChar:Le.default.string,lazy:Le.default.bool,definitions:Le.default.object,blocks:Le.default.object,enum:Le.default.arrayOf(Le.default.string),maxLength:Le.default.number,from:Le.default.number,to:Le.default.number,pattern:Le.default.string,format:Le.default.func,parse:Le.default.func,autofix:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["pad"])]),radix:Le.default.string,thousandsSeparator:Le.default.string,mapToRadix:Le.default.arrayOf(Le.default.string),scale:Le.default.number,normalizeZeros:Le.default.bool,padFractionalZeros:Le.default.bool,min:Le.default.oneOfType([Le.default.number,Le.default.instanceOf(Date)]),max:Le.default.oneOfType([Le.default.number,Le.default.instanceOf(Date)]),dispatch:Le.default.func,inputRef:Le.default.oneOfType([Le.default.func,Le.default.shape({current:Le.default.object})])},uI=Object.keys(cI).filter(e=>e!=="value"),vW=["value","unmask","onAccept","onComplete","inputRef"],bW=uI.filter(e=>vW.indexOf(e)<0);function gb(e){var t;let r=(t=class extends ch.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){let a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Te(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){let i=ge(a,[]);return Object.keys(i).filter(s=>bW.indexOf(s)<0).forEach(s=>{delete i[s]}),i}_extractNonMaskProps(a){let i=ge(a,[]);return uI.forEach(s=>{s!=="maxLength"&&delete i[s]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return ch.createElement(e,re(V({},this._extractNonMaskProps(this.props)),{inputRef:this._inputRef}))}},t.displayName=void 0,t.propTypes=void 0,t),o=e.displayName||e.name||"Component";return r.displayName="IMask("+o+")",r.propTypes=cI,ch.forwardRef((n,a)=>ch.createElement(r,re(V({},n),{ref:a})))}var xW=gb(e=>{let o=e,{inputRef:t}=o,r=ge(o,["inputRef"]);return vb.createElement("input",re(V({},r),{ref:t}))}),TW=(e,t)=>vb.createElement(xW,re(V({},e),{ref:t})),ca=vb.forwardRef(TW);import{useRef as VGe,useState as $Ge,useCallback as jGe,useEffect as HGe}from"react";import"react";import{jsx as PW}from"react/jsx-runtime";var ci=Nt(PW("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");import{motion as CW}from"framer-motion";var kW=CW(Of),SW=E(kW)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),ou=SW;ou.displayName="DialogActions";var En=ou;var DW=E(Ut,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),AW=E(No,{name:"DatePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),MW=E("div",{name:"DatePicker",slot:"container"})({width:"100%"}),dI=e=>{let t=`${e.getDate()}`,r=`${e.getMonth()+1}`,o=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(r)<10&&(r="0"+r),[o,r,t].join("/")},NW=RW.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=ge(a,["onChange"]);return A(ca,re(V({},n),{inputRef:r,onAccept:i=>o({target:{name:t.name,value:i}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:dI,parse:i=>{let s=i.split("/");return new Date(Number(s[0]),Number(s[1])-1,Number(s[2]))},autofix:"pad",overwrite:!0}))}),uh=EW((e,t)=>{let k=e,{onChange:r,disabled:o,label:n,error:a,helperText:i,minDate:s,maxDate:l,disableFuture:p,disablePast:c,required:u,sx:f,className:d}=k,y=ge(k,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className"]),h=_W(null),[g,b]=Rr(e.value,e.defaultValue||"",bb(S=>r==null?void 0:r({target:{name:e.name,value:S}}),[e.name,r])),[x,v]=wW(null),C=!!x;IW(()=>{var S;x||(S=h.current)==null||S.blur()},[x,h]),OW(t,()=>h.current,[h]);let T=bb(S=>{b(S.target.value)},[b]),P=bb(S=>{v(x?null:S.currentTarget),setTimeout(()=>{var O;(O=h.current)==null||O.focus()},0)},[x,v,h]);return A(MW,{children:A(Gr,{open:!0,children:Pe(Ao,{children:[A(Fr,re(V({},y),{color:a?"danger":y.color,ref:h,size:"sm",value:g,onChange:T,placeholder:"YYYY/MM/DD",disabled:o,required:u,error:a,slotProps:{input:{component:NW,ref:h}},className:d,sx:re(V({},f),{fontFamily:"monospace"}),endDecorator:A(Wt,{variant:"plain",onClick:P,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:A(ci,{})}),label:n,helperText:i})),C&&A(Fn,{onClickAway:()=>v(null),children:A(DW,{id:"date-picker-popper",open:!0,anchorEl:x,placement:"bottom-end",onMouseDown:S=>S.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(AW,{tabIndex:-1,role:"presentation",children:[A(ni,{value:Number.isNaN(new Date(g).getTime())?void 0:[new Date(g),void 0],onChange:([S])=>{T({target:{name:e.name,value:dI(S)}}),v(null)},minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),A(En,{sx:{p:1},children:A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{T({target:{name:e.name,value:""}}),v(null)},children:"Clear"})})]})})})]})})})});var fI=uh;import{motion as LW}from"framer-motion";var BW=LW(vm),nu=e=>{let y=e,{label:t,error:r,helperText:o,color:n,size:a,disabled:i,required:s,minRows:l=2,maxRows:p=4,sx:c,className:u}=y,f=ge(y,["label","error","helperText","color","size","disabled","required","minRows","maxRows","sx","className"]),d=A(BW,V({required:s,disabled:i,color:r?"danger":n,size:a,minRows:l,maxRows:p},f));return Pe(kn,{required:s,disabled:i,color:n,size:a,error:r,sx:c,className:u,children:[t&&A(Sn,{children:t}),d,o&&A(Rn,{children:o})]})};nu.displayName="Textarea";var mI=nu;import{useMemo as zW}from"react";import{motion as FW}from"framer-motion";var VW=FW(em),dh=VW;dh.displayName="Option";function au(e){let h=e,{label:t,helperText:r,error:o,size:n,color:a,disabled:i,required:s,onChange:l,sx:p,className:c}=h,u=ge(h,["label","helperText","error","size","color","disabled","required","onChange","sx","className"]),f=zW(()=>e.options.map(g=>typeof g!="object"?{value:g,label:g}:g),[e.options]),d=(g,b)=>{var C;let x=g||{target:{}},v=re(V({},x),{target:{name:((C=x.target)==null?void 0:C.name)||e.name,value:b||void 0}});l==null||l(v)},y=A(om,re(V({},u),{required:s,disabled:i,size:n,color:o?"danger":a,onChange:d,children:f.map(g=>A(dh,{value:g.value,children:g.label},g.value))}));return Pe(kn,{required:s,disabled:i,size:n,color:a,error:o,sx:p,className:c,children:[t&&A(Sn,{children:t}),y,r&&A(Rn,{children:r})]})}au.displayName="Select";var hI=au;import{motion as $W}from"framer-motion";var jW=$W(xm),iu=e=>A(jW,V({},e));iu.displayName="Tooltip";var yI=iu;import{motion as vI}from"framer-motion";function bI(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var WW=E("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),fh=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function GW(e){let{paginationModel:{page:t,pageSize:r},rowCount:o,onPageChange:n}=e,a=1,i=Math.ceil(o/r),s=[t-2,t-1].filter(u=>u>1),l=[t+1,t+2].filter(u=>u<=i-1),p=i>1&&t<i-3,c=i>1&&t>4;return A(Lt,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center",children:Pe(Lt,{direction:"row",spacing:.5,alignItems:"center",children:[A(Wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-1),disabled:t===a,"aria-label":"Previous page",children:A(Bm,{})}),t!==a&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(a),children:a}),c&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-3),children:"..."}),s.map(u=>A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),A(It,{variant:"soft",size:"sm",children:t}),l.map(u=>A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),p&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+3),children:"..."}),t!==i&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(i),children:i}),A(Wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+1),disabled:t===i,"aria-label":"Next page",children:A(zm,{})})]})})}var JW=e=>A(Lm,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:t=>t.stopPropagation(),onMouseDown:t=>{var i;let r=t.clientX,o=(i=e.current)==null?void 0:i.getBoundingClientRect().width,n=s=>{o&&r&&(e.current.style.width=`${o+(s.clientX-r)}px`)},a=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)}}),qW=E("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"100%"}}),KW=E("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>re(V({},e&&{background:"var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",color:"var(--ceed-palette-text-primary)"}),{"&:hover":{background:"var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"}})),YW=E("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),XW=vI(iI),ZW=e=>{let{width:t,maxWidth:r,minWidth:o,stickyHeader:n,resizable:a,field:i,tableId:s,headerName:l,required:p,editMode:c,sort:u,onSortChange:f,sortable:d=!0,sortOrder:y}=e,h=xb(null),g=nr(()=>`${s}_header_${l!=null?l:i}`.trim(),[s,l,i]),b=a==null||a?JW(h):null,x={width:t,minWidth:o!=null?o:"50px",maxWidth:r,position:n?void 0:"relative",cursor:d?"pointer":"default",userSelect:"none"},v=bI(e),C=y[0],T=d&&A(XW,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":g,"aria-description":(u!=null?u:C)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:u?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(u!=null?u:C)==="desc"?180:0,opacity:u?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}});return Pe(vI.th,{id:g,"aria-label":l!=null?l:i,"aria-sort":u?{asc:"ascending",desc:"descending"}[u]:"none",ref:h,style:x,onClick:P=>d&&(f==null?void 0:f({field:i,currentSort:u,multiple:P.shiftKey})),whileHover:"hover",initial:"initial",children:[Pe(Lt,{gap:1,direction:"row",justifyContent:v,children:[v==="end"&&T,Pe("div",{children:[l!=null?l:i,c&&p&&A(YW,{children:"*"})]}),v==="start"&&T]}),b]},i)},QW=e=>{var T;let{tableId:t,field:r,type:o,renderCell:n,renderEditCell:a,isCellEditable:i,noWrap:s,row:l,rowId:p}=e,[c,u]=gI(l[r]),f=xb(null),d=nr(()=>({row:l,value:c,id:p}),[l,p,c]),y=nr(()=>!!(e.editMode&&(typeof i=="function"?i(d):i==null||i)),[e.editMode,i,d]),h=nr(()=>re(V({},typeof e.componentProps=="function"?e.componentProps(d):e.componentProps||{}),{size:"sm"}),[e,d]),g=nr(()=>V(re(V({},h),{onChange:P=>{var k,S;(k=h.onChange)==null||k.call(h,P),u(P.target.value),o==="select"&&((S=e.onCellEditStop)==null||S.call(e,re(V({},d),{originalRow:l,row:re(V({},d.row),{[r]:P.target.value}),value:P.target.value})))},onFocus:P=>{var k,S;(k=h.onFocus)==null||k.call(h,P),(S=e.onCellEditStart)==null||S.call(e,re(V({},d),{originalRow:l,row:re(V({},d.row),{value:c}),value:c}))},onBlur:P=>{var k,S;(k=h.onBlur)==null||k.call(h,P),o&&["number","text","longText","currency","date"].includes(o)&&((S=e.onCellEditStop)==null||S.call(e,re(V({},d),{originalRow:l,row:re(V({},d.row),{[r]:c}),value:c})))}}),o==="autocomplete"&&{onChangeComplete:P=>{var k,S;(k=h.onChangeComplete)==null||k.call(h,P),u(P.target.value),(S=e.onCellEditStop)==null||S.call(e,re(V({},d),{originalRow:l,row:re(V({},d.row),{[r]:P.target.value}),value:P.target.value}))}}),[d,l,r,c,h,o,e]),b=nr(()=>a?a(d):{date:A(fI,V({value:c},g)),currency:A(aI,V({value:c},g)),number:A(Fr,V({value:c,type:"number"},g)),text:A(Fr,V({value:c,type:"text"},g)),longText:A(mI,V({value:c},g)),autocomplete:A(QE,V({value:c,options:g.options||[c]},g)),select:A(hI,V({value:c,options:g.options||[c]},g))}[o||"text"],[c,g,o]),x=nr(()=>{if(n)return n(d);let P=c;return{link:HW.createElement(e.component||ra,V({children:P},h))}[o||"text"]||P},[c,n,d,o,h,e]),v=nr(()=>y&&b?b:x,[y,b,x]),C=nr(()=>s&&e.type==="longText",[s,e.type]);return mh(()=>{u(l[r])},[l,r]),A("td",{ref:f,headers:`${t}_header_${(T=e.headerName)!=null?T:r}`,style:{textAlign:bI({type:o}),verticalAlign:y?"top":"middle"},children:C?A(yI,{title:c,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500,children:A("div",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:v})}):v},r)},e9=e=>{let{tableId:t,columns:r,rowId:o,editMode:n,noWrap:a,row:i}=e;return A(Ao,{children:r.map((s,l)=>m0(QW,re(V({},s),{tableId:t,key:`${o}_${s.field.toString()}_${l}`,row:i,rowId:o,editMode:n,noWrap:a})))})};function t9({rows:e,columns:t,rowCount:r,pagination:o,paginationMode:n,paginationModel:a,onPaginationModelChange:i,sortModel:s,sortOrder:l=["asc","desc",null],selectionModel:p=[],onSortModelChange:c,onSelectionModelChange:u,editMode:f,getId:d,isTotalSelected:y}){let[h,g]=Rr(s,[],ua(L=>c==null?void 0:c(L),[c])),b=nr(()=>t.reduce((L,U)=>re(V({},L),{[U.field]:U}),{}),[t]),x=ua((L,U)=>{for(let z of h){let{field:R,sort:q}=z,oe=L[R],_=U[R],pe=b[R],me=0;if(pe.sortComparator?me=pe.sortComparator({rowA:L,rowB:U}):typeof oe=="string"&&typeof _=="string"?me=oe.localeCompare(_):typeof oe=="number"&&typeof _=="number"?me=oe-_:oe instanceof Date&&_ instanceof Date&&(me=oe.getTime()-_.getTime()),me!==0)return q==="asc"?me:-me}return 0},[h,b]),v=nr(()=>h.length?[...e].sort(x):e,[e,h,x]),C=nr(()=>Array.from(new Set(l)),[l]),[T,P]=gI((a==null?void 0:a.page)||1),k=(a==null?void 0:a.pageSize)||20,S=ua((L,U)=>{var z,R;return(R=(z=d==null?void 0:d(L))!=null?z:L==null?void 0:L.id)!=null?R:`${(U||0)+(T-1)*k}`},[d!=null?d:T,k]),O=nr(()=>new Set(p),[p]),I=nr(()=>!o||n==="server"?v:v.slice((T-1)*k,(T-1)*k+k),[v,T,k,n,o]),B=nr(()=>I.length>0&&I.every((L,U)=>O.has(S(L,U))),[I,O,S]),M=r||v.length,w=nr(()=>y!=null?y:M>0&&p.length===M,[y,p,M]),$=nr(()=>(t||Object.keys(v[0]||{}).map(U=>({field:U}))).map(U=>{var z,R,q;return re(V({},U),{isCellEditable:f&&(typeof U.isCellEditable=="function"?U.isCellEditable:(z=U.isCellEditable)!=null?z:!0),sort:(R=h.find(oe=>oe.field===U.field))==null?void 0:R.sort,sortOrder:((q=b[U.field])==null?void 0:q.sortOrder)||C})}),[v,t,f,h,b,C]),N=ua(L=>{P(L),i==null||i({page:L,pageSize:k})},[i,k]),D=ua(L=>{let{field:U,currentSort:z,multiple:R}=L,oe=b[U].sortOrder||C;if(z!==void 0){let pe=(oe.indexOf(z)+1)%oe.length,me=oe[pe];if(!me){let ae=R?h.filter(W=>W.field!==U):[];g(ae);return}let we=R?h.map(ae=>ae.field===U?{field:U,sort:me}:ae):[{field:U,sort:me}];g(we)}else{let _=R?[...h,{field:U,sort:oe[0]}]:[{field:U,sort:oe[0]}];g(_)}},[C,b,h,g]);return mh(()=>{a||N(1)},[M,N,a]),mh(()=>{let L=Math.max(1,Math.ceil(M/k));T>L&&N(L)},[T,M,k,N]),mh(()=>{u==null||u([])},[T]),{rowCount:M,page:T,pageSize:k,onPaginationModelChange:N,getId:S,HeadCell:ZW,BodyRow:e9,dataInPage:I,handleSortChange:D,isAllSelected:B,isTotalSelected:w,isSelectedRow:ua(L=>O.has(L),[O]),onAllCheckboxChange:ua(()=>{u==null||u(B?[]:I.map(S))},[B,I,u,S]),onCheckboxChange:ua((L,U)=>{if(O.has(U)){let z=p.filter(R=>R!==U);u==null||u(z)}else{let z=[...p,U];u==null||u(z)}},[p,u,O]),columns:$,onTotalSelect:ua(()=>{u==null||u(w?[]:v.map(S),!w)},[w,v,u,S])}}function Tb(e){let ve=e,{rows:t,checkboxSelection:r,editMode:o,selectionModel:n,onSelectionModelChange:a,disableSelectionOnClick:i,rowCount:s,columns:l,onPaginationModelChange:p,pagination:c,paginationMode:u,paginationModel:f,sortModel:d,sortOrder:y,onSortModelChange:h,loading:g,slots:{checkbox:b=$c,toolbar:x,footer:v,loadingOverlay:C=()=>A(mc,{value:8,variant:"plain"})}={},slotProps:{checkbox:T={},toolbar:P,background:k={}}={},stripe:S}=ve,O=ge(ve,["rows","checkboxSelection","editMode","selectionModel","onSelectionModelChange","disableSelectionOnClick","rowCount","columns","onPaginationModelChange","pagination","paginationMode","paginationModel","sortModel","sortOrder","onSortModelChange","loading","slots","slotProps","stripe"]),I=UW(),B=xb(null),{columns:M,isAllSelected:w,isSelectedRow:$,onAllCheckboxChange:N,onCheckboxChange:D,getId:L,rowCount:U,page:z,pageSize:R,onPaginationModelChange:q,handleSortChange:oe,dataInPage:_,isTotalSelected:pe,onTotalSelect:me,HeadCell:we,BodyRow:ae}=t9(e),W=Am({count:_.length,getScrollElement:()=>B.current,estimateSize:()=>32,measureElement:Ae=>Ae.clientHeight,overscan:20}),de=nr(()=>({page:z,pageSize:R}),[z,R]),fe=W.getTotalSize(),Ce=W.getVirtualItems();return Pe(Lm,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"},children:[(!!r||!!x)&&Pe(Lt,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center",children:[!!r&&Pe(Lt,{direction:"row",spacing:1,children:[!w&&Pe(Yr,{level:"body-xs",children:[fh((n==null?void 0:n.length)||0)," items selected"]}),w&&!pe&&Pe(Lt,{direction:"row",spacing:1,alignItems:"center",children:[Pe(Yr,{level:"body-xs",children:["All ",fh((n==null?void 0:n.length)||0)," items on this page are selected."]}),Pe(It,{size:"sm",variant:"plain",onClick:me,children:["Select all ",fh(U!=null?U:t.length)," items"]})]}),pe&&Pe(Lt,{direction:"row",spacing:1,alignItems:"center",children:[Pe(Yr,{level:"body-xs",children:["All ",fh(U!=null?U:t.length)," items are selected."]}),A(It,{size:"sm",variant:"plain",color:"danger",onClick:me,children:"Cancel"})]})]}),x&&A(x,V({},P||{}))]}),A(No,re(V({variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:B},k),{children:Pe(Zc,re(V({},O),{children:[A("thead",{children:Pe("tr",{children:[r&&A("th",{style:{width:"40px",textAlign:"center"},children:A(b,V({onChange:N,checked:w,indeterminate:(n||[]).length>0&&!w},T))}),M.map((Ae,We)=>A(we,V({tableId:I,stickyHeader:e.stickyHeader,editMode:!!Ae.isCellEditable,onSortChange:oe},Ae),`${Ae.field.toString()}_${We}`))]})}),Pe(qW,{style:{height:`${fe}px`},children:[!!g&&A(WW,{children:A("td",{children:A(Lm,{sx:{position:"absolute",top:0,left:0,right:0},children:A(C,{})})})}),Ce.map((Ae,We)=>{let te=Ae.index,Z=_[te],he=L(Z,te),be=S&&(S==="even"&&(te+1)%2===0||S==="odd"&&(te+1)%2===1);return Pe(KW,{role:r&&!i?"checkbox":void 0,tabIndex:r&&!i?-1:void 0,onClick:r&&!i?Be=>D(Be,he):void 0,"aria-checked":r&&!i?$(he):void 0,striped:be,style:{height:`${Ae.size}px`,transform:`translateY(${Ae.start-We*Ae.size}px)`},children:[r&&A("th",{scope:"row",style:{textAlign:"center"},children:A(b,V({onChange:Be=>D(Be,he),checked:$(he)},T))}),A(ae,{tableId:I,columns:M,row:Z,rowId:he,editMode:o,noWrap:e.noWrap})]},he)})]}),v&&A(v,{})]}))})),R<U&&c&&A(GW,{paginationModel:de,rowCount:U,onPageChange:q})]})}Tb.displayName="DataTable";import r9,{forwardRef as o9,useCallback as hh,useEffect as n9,useImperativeHandle as a9,useMemo as i9,useRef as s9,useState as l9}from"react";var p9=E(Ut,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),c9=E(No,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),u9=E("div",{name:"DateRangePicker",slot:"container"})({width:"100%"}),xI=([e,t])=>{let r=o=>{let n=`${o.getDate()}`,a=`${o.getMonth()+1}`,i=o.getFullYear();return Number(n)<10&&(n="0"+n),Number(a)<10&&(a="0"+a),[i,a,n].join("/")};return[r(e),t?r(t):""].join(" - ")},TI=e=>{let t=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"",o=t.split("/"),n=r.split("/");return[new Date(Number(o[0]),Number(o[1])-1,Number(o[2])),new Date(Number(n[0]),Number(n[1])-1,Number(n[2]))]},d9=r9.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=ge(a,["onChange"]);return A(ca,re(V({},n),{inputRef:r,onAccept:i=>o({target:{name:t.name,value:i}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:xI,parse:TI,autofix:"pad",overwrite:!0}))}),Pb=o9((e,t)=>{let O=e,{onChange:r,disabled:o,label:n,error:a,helperText:i,minDate:s,maxDate:l,disableFuture:p,disablePast:c,required:u,sx:f,className:d}=O,y=ge(O,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className"]),h=s9(null),[g,b]=Rr(e.value,e.defaultValue||"",hh(I=>r==null?void 0:r({target:{name:e.name,value:I}}),[e.name,r])),[x,v]=l9(null),C=!!x,T=i9(()=>g?TI(g):void 0,[g]);n9(()=>{var I;x||(I=h.current)==null||I.blur()},[x,h]),a9(t,()=>h.current,[h]);let P=hh(I=>{b(I.target.value)},[b]),k=hh(I=>{var B;v(x?null:I.currentTarget),(B=h.current)==null||B.focus()},[x,v,h]),S=hh(([I,B])=>{!I||!B||(b(xI([I,B])),v(null))},[b,v]);return A(u9,{children:A(Gr,{open:!0,children:Pe(Ao,{children:[A(Fr,re(V({},y),{color:a?"danger":y.color,ref:t,size:"sm",value:g,onChange:P,disabled:o,required:u,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:d9,ref:h}},error:a,className:d,sx:re(V({},f),{fontFamily:"monospace"}),endDecorator:A(Wt,{variant:"plain",onClick:k,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C,children:A(ci,{})}),label:n,helperText:i})),C&&A(Fn,{onClickAway:()=>v(null),children:A(p9,{id:"date-range-picker-popper",open:!0,anchorEl:x,placement:"bottom-end",onMouseDown:I=>I.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C,children:Pe(c9,{tabIndex:-1,role:"presentation",children:[A(ni,{rangeSelection:!0,defaultValue:T,onChange:S,minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),A(En,{sx:{p:1},children:A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{b(""),v(null)},children:"Clear"})})]})})})]})})})});Pb.displayName="DateRangePicker";import{motion as f9}from"framer-motion";var m9=f9(Rl),Cb=e=>{var i;let a=e,{children:t,size:r}=a,o=ge(a,["children","size"]),n=Ap();return A(m9,re(V({},o),{slotProps:re(V({},o.slotProps),{content:re(V({},(i=o.slotProps)==null?void 0:i.content),{sx:{bgcolor:"transparent",boxShadow:"none",[n.breakpoints.down("md")]:{width:"100%"}}})}),sx:re(V({},e.sx),{"--Drawer-horizontalSize":{sm:"360px",md:"600px",lg:"900px"}[r||"md"]}),children:t}))};Cb.displayName="Drawer";import{motion as h9}from"framer-motion";var y9=h9(wf),g9=E(y9)(({theme:e})=>({padding:e.spacing(0,6,5)})),su=g9;su.displayName="DialogContent";var yh=su;import{motion as v9}from"framer-motion";var b9=v9(Df),x9=E(b9)(({theme:e})=>({padding:e.spacing(4,6)})),lu=x9;lu.displayName="DialogTitle";var gh=lu;import k9 from"react";import{motion as kb}from"framer-motion";var T9=kb(Nf),Sb=T9;Sb.displayName="Modal";var PI=E(Yf)({padding:0}),pu=PI;pu.displayName="ModalDialog";var P9=E(kb(Kf))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),vh=P9;vh.displayName="ModalClose";var C9=kb(Zf),Rb=C9;Rb.displayName="ModalOverflow";function Eb(e){let n=e,{title:t,children:r}=n,o=ge(n,["title","children"]);return Pe(PI,re(V({},o),{children:[A(vh,{}),A(gh,{children:t}),A(yh,{children:r})]}))}Eb.displayName="ModalFrame";var S9=E(pu,{name:"Dialog",slot:"Root"})({padding:0}),Ib=k9.forwardRef((e,t)=>{let s=e,{title:r,children:o,actions:n,fullscreen:a}=s,i=ge(s,["title","children","actions","fullscreen"]);return Pe(S9,re(V({layout:a?"fullscreen":"center",ref:t},i),{children:[A(gh,{children:r}),A(yh,{children:o}),A(En,{children:n})]}))});Ib.displayName="DialogFrame";import{motion as R9}from"framer-motion";var E9=R9(Af),cu=e=>A(E9,V({},e));cu.displayName="Divider";import{motion as I9}from"framer-motion";var O9=I9(Rl),Ob=e=>{var n;let o=e,{children:t}=o,r=ge(o,["children"]);return A(O9,re(V({},r),{slotProps:re(V({},r.slotProps),{content:re(V({},(n=r.slotProps)==null?void 0:n.content),{sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}})}),children:t}))};Ob.displayName="InsetDrawer";import{motion as _9}from"framer-motion";var w9=_9($f),_b=w9;_b.displayName="Grid";function CI(e,t){let r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var D9=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,A9=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,M9={};function bh(e,t){return((t||M9).jsx?A9:D9).test(e)}var N9=/[ \t\n\f\r]/g;function wb(e){return typeof e=="object"?e.type==="text"?kI(e.value):!1:kI(e)}function kI(e){return e.replace(N9,"")===""}var da=class{constructor(t,r,o){this.property=t,this.normal=r,o&&(this.space=o)}};da.prototype.property={};da.prototype.normal={};da.prototype.space=null;function Db(e,t){let r={},o={},n=-1;for(;++n<e.length;)Object.assign(r,e[n].property),Object.assign(o,e[n].normal);return new da(r,o,t)}function uu(e){return e.toLowerCase()}var _r=class{constructor(t,r){this.property=t,this.attribute=r}};_r.prototype.space=null;_r.prototype.boolean=!1;_r.prototype.booleanish=!1;_r.prototype.overloadedBoolean=!1;_r.prototype.number=!1;_r.prototype.commaSeparated=!1;_r.prototype.spaceSeparated=!1;_r.prototype.commaOrSpaceSeparated=!1;_r.prototype.mustUseProperty=!1;_r.prototype.defined=!1;var du={};ET(du,{boolean:()=>$e,booleanish:()=>Ot,commaOrSpaceSeparated:()=>Xr,commaSeparated:()=>ui,number:()=>ye,overloadedBoolean:()=>Ab,spaceSeparated:()=>pt});var L9=0,$e=ms(),Ot=ms(),Ab=ms(),ye=ms(),pt=ms(),ui=ms(),Xr=ms();function ms(){return 2**++L9}var Mb=Object.keys(du),hs=class extends _r{constructor(t,r,o,n){let a=-1;if(super(t,r),SI(this,"space",n),typeof o=="number")for(;++a<Mb.length;){let i=Mb[a];SI(this,Mb[a],(o&du[i])===du[i])}}};hs.prototype.defined=!0;function SI(e,t,r){r&&(e[t]=r)}var B9={}.hasOwnProperty;function Lo(e){let t={},r={},o;for(o in e.properties)if(B9.call(e.properties,o)){let n=e.properties[o],a=new hs(o,e.transform(e.attributes||{},o),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,r[uu(o)]=o,r[uu(a.attribute)]=o}return new da(t,r,e.space)}var Nb=Lo({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var Lb=Lo({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function xh(e,t){return t in e?e[t]:t}function Th(e,t){return xh(e,t.toLowerCase())}var Bb=Lo({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Th,properties:{xmlns:null,xmlnsXLink:null}});var zb=Lo({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ot,ariaAutoComplete:null,ariaBusy:Ot,ariaChecked:Ot,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Ot,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Ot,ariaFlowTo:pt,ariaGrabbed:Ot,ariaHasPopup:null,ariaHidden:Ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:ye,ariaLive:null,ariaModal:Ot,ariaMultiLine:Ot,ariaMultiSelectable:Ot,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:Ot,ariaReadOnly:Ot,ariaRelevant:null,ariaRequired:Ot,ariaRoleDescription:pt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:Ot,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null}});var RI=Lo({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Th,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ui,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:pt,autoFocus:$e,autoPlay:$e,blocking:pt,capture:null,charSet:null,checked:$e,cite:null,className:pt,cols:ye,colSpan:null,content:null,contentEditable:Ot,controls:$e,controlsList:pt,coords:ye|ui,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:Ab,draggable:Ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:pt,height:ye,hidden:$e,high:ye,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:pt,itemRef:pt,itemScope:$e,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,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:$e,optimum:ye,pattern:null,ping:pt,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:pt,required:$e,reversed:$e,rows:ye,rowSpan:ye,sandbox:pt,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:Ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Ot,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:Ot,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:ye,security:null,unselectable:null}});var EI=Lo({space:"svg",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"},transform:xh,properties:{about:Xr,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:pt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:ui,g2:ui,glyphName:ui,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:Xr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,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:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xr,rev:Xr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xr,requiredFeatures:Xr,requiredFonts:Xr,requiredFormats:Xr,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:Xr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xr,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var z9=/^data[-\w.:]+$/i,II=/-[a-z]/g,F9=/[A-Z]/g;function Fb(e,t){let r=uu(t),o=t,n=_r;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&z9.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(II,$9);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!II.test(a)){let i=a.replace(F9,V9);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}n=hs}return new n(o,t)}function V9(e){return"-"+e.toLowerCase()}function $9(e){return e.charAt(1).toUpperCase()}var Vb={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"};var OI=Db([Lb,Nb,Bb,zb,RI],"html"),Ph=Db([Lb,Nb,Bb,zb,EI],"svg");function _I(e){return e.join(" ").trim()}var $b=Dn(BI(),1),zI=$b.default.default||$b.default;var Ch=FI("end"),Gl=FI("start");function FI(e){return t;function t(r){let o=r&&r.position&&r.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function jb(e){let t=Gl(e),r=Ch(e);if(t&&r)return{start:t,end:r}}function di(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?VI(e.position):"start"in e||"end"in e?VI(e):"line"in e||"column"in e?Hb(e):""}function Hb(e){return $I(e&&e.line)+":"+$I(e&&e.column)}function VI(e){return Hb(e&&e.start)+"-"+Hb(e&&e.end)}function $I(e){return e&&typeof e=="number"?e:1}var Bt=class extends Error{constructor(t,r,o){super(),typeof r=="string"&&(o=r,r=void 0);let n="",a={},i=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a=V({},r)),typeof t=="string"?n=t:!a.cause&&t&&(i=!0,n=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof o=="string"){let l=o.indexOf(":");l===-1?a.ruleId=o:(a.source=o.slice(0,l),a.ruleId=o.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){let l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}let s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=s?s.line:void 0,this.name=di(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}};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;var Ub={}.hasOwnProperty,t6=new Map,r6=/[A-Z]/g,o6=/-([a-z])/g,n6=new Set(["table","tbody","thead","tfoot","tr"]),a6=new Set(["td","th"]),jI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Wb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let r=t.filePath||void 0,o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=f6(r,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");o=d6(r,t.jsx,t.jsxs)}let n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ph:OI,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=HI(n,e,void 0);return a&&typeof a!="string"?a:n.create(e,n.Fragment,{children:a||void 0},void 0)}function HI(e,t,r){if(t.type==="element")return i6(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return s6(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return p6(e,t,r);if(t.type==="mdxjsEsm")return l6(e,t);if(t.type==="root")return c6(e,t,r);if(t.type==="text")return u6(e,t)}function i6(e,t,r){let o=e.schema,n=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(n=Ph,e.schema=n),e.ancestors.push(t);let a=WI(e,t.tagName,!1),i=m6(e,t),s=Jb(e,t);return n6.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!wb(l):!0})),UI(e,i,a,t),Gb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function s6(e,t){if(t.data&&t.data.estree&&e.evaluater){let o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}mu(e,t.position)}function l6(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);mu(e,t.position)}function p6(e,t,r){let o=e.schema,n=o;t.name==="svg"&&o.space==="html"&&(n=Ph,e.schema=n),e.ancestors.push(t);let a=t.name===null?e.Fragment:WI(e,t.name,!0),i=h6(e,t),s=Jb(e,t);return UI(e,i,a,t),Gb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function c6(e,t,r){let o={};return Gb(o,Jb(e,t)),e.create(t,e.Fragment,o,r)}function u6(e,t){return t.value}function UI(e,t,r,o){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=o)}function Gb(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function d6(e,t,r){return o;function o(n,a,i,s){let p=Array.isArray(i.children)?r:t;return s?p(a,i,s):p(a,i)}}function f6(e,t){return r;function r(o,n,a,i){let s=Array.isArray(a.children),l=Gl(o);return t(n,a,i,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function m6(e,t){let r={},o,n;for(n in t.properties)if(n!=="children"&&Ub.call(t.properties,n)){let a=y6(e,n,t.properties[n]);if(a){let[i,s]=a;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&a6.has(t.tagName)?o=s:r[i]=s}}if(o){let a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return r}function h6(e,t){let r={};for(let o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){let a=o.data.estree.body[0];a.type;let i=a.expression;i.type;let s=i.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else mu(e,t.position);else{let n=o.name,a;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){let s=o.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else mu(e,t.position);else a=o.value===null?!0:o.value;r[n]=a}return r}function Jb(e,t){let r=[],o=-1,n=e.passKeys?new Map:t6;for(;++o<t.children.length;){let a=t.children[o],i;if(e.passKeys){let l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){let p=n.get(l)||0;i=l+"-"+p,n.set(l,p+1)}}let s=HI(e,a,i);s!==void 0&&r.push(s)}return r}function y6(e,t,r){let o=Fb(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=o.commaSeparated?CI(r):_I(r)),o.property==="style"){let n=typeof r=="object"?r:g6(e,String(r));return e.stylePropertyNameCase==="css"&&(n=v6(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&o.space?Vb[o.property]||o.property:o.attribute,r]}}function g6(e,t){let r={};try{zI(t,o)}catch(n){if(!e.ignoreInvalidStyle){let a=n,i=new Bt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=jI+"#cannot-parse-style-attribute",i}}return r;function o(n,a){let i=n;i.slice(0,2)!=="--"&&(i.slice(0,4)==="-ms-"&&(i="ms-"+i.slice(4)),i=i.replace(o6,x6)),r[i]=a}}function WI(e,t,r){let o;if(!r)o={type:"Literal",value:t};else if(t.includes(".")){let n=t.split("."),a=-1,i;for(;++a<n.length;){let s=bh(n[a])?{type:"Identifier",name:n[a]}:{type:"Literal",value:n[a]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}o=i}else o=bh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){let n=o.value;return Ub.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(o);mu(e)}function mu(e,t){let r=new Bt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=jI+"#cannot-handle-mdx-estrees-without-createevaluater",r}function v6(e){let t={},r;for(r in e)Ub.call(e,r)&&(t[b6(r)]=e[r]);return t}function b6(e){let t=e.replace(r6,T6);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function x6(e,t){return t.toUpperCase()}function T6(e){return"-"+e.toLowerCase()}var hu={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"]};import{Fragment as RG,jsx as EG,jsxs as IG}from"react/jsx-runtime";var P6={};function qb(e,t){let r=t||P6,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return JI(e,o,n)}function JI(e,t,r){if(C6(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return GI(e.children,t,r)}return Array.isArray(e)?GI(e,t,r):""}function GI(e,t,r){let o=[],n=-1;for(;++n<e.length;)o[n]=JI(e[n],t,r);return o.join("")}function C6(e){return!!(e&&typeof e=="object")}var qI=document.createElement("i");function Jl(e){let t="&"+e+";";qI.innerHTML=t;let r=qI.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function wr(e,t,r,o){let n=e.length,a=0,i;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,r=r>0?r:0,o.length<1e4)i=Array.from(o),i.unshift(t,r),e.splice(...i);else for(r&&e.splice(t,r);a<o.length;)i=o.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function Vr(e,t){return e.length>0?(wr(e,e.length,0,t),e):t}var KI={}.hasOwnProperty;function YI(e){let t={},r=-1;for(;++r<e.length;)k6(t,e[r]);return t}function k6(e,t){let r;for(r in t){let n=(KI.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r],i;if(a)for(i in a){KI.call(n,i)||(n[i]=[]);let s=a[i];S6(n[i],Array.isArray(s)?s:s?[s]:[])}}}function S6(e,t){let r=-1,o=[];for(;++r<t.length;)(t[r].add==="after"?e:o).push(t[r]);wr(e,0,0,o)}function kh(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function fa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var uo=fi(/[A-Za-z]/),ar=fi(/[\dA-Za-z]/),XI=fi(/[#-'*+\--9=?A-Z^-~]/);function yu(e){return e!==null&&(e<32||e===127)}var gu=fi(/\d/),ZI=fi(/[\dA-Fa-f]/),QI=fi(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function zt(e){return e!==null&&(e<0||e===32)}function je(e){return e===-2||e===-1||e===32}var eO=fi(new RegExp("\\p{P}|\\p{S}","u")),tO=fi(/\s/);function fi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Bo(e){let t=[],r=-1,o=0,n=0;for(;++r<e.length;){let a=e.charCodeAt(r),i="";if(a===37&&ar(e.charCodeAt(r+1))&&ar(e.charCodeAt(r+2)))n=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){let s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(i=String.fromCharCode(a,s),n=1):i="\uFFFD"}else i=String.fromCharCode(a);i&&(t.push(e.slice(o,r),encodeURIComponent(i)),o=r+n+1,i=""),n&&(r+=n,n=0)}return t.join("")+e.slice(o)}function Ue(e,t,r,o){let n=o?o-1:Number.POSITIVE_INFINITY,a=0;return i;function i(l){return je(l)?(e.enter(r),s(l)):t(l)}function s(l){return je(l)&&a++<n?(e.consume(l),s):(e.exit(r),t(l))}}var rO={tokenize:R6};function R6(e){let t=e.attempt(this.parser.constructs.contentInitial,o,n),r;return t;function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ue(e,t,"linePrefix")}function n(s){return e.enter("paragraph"),a(s)}function a(s){let l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,i(s)}function i(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return _e(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),i)}}var nO={tokenize:E6},oO={tokenize:I6};function E6(e){let t=this,r=[],o=0,n,a,i;return s;function s(v){if(o<r.length){let C=r[o];return t.containerState=C[1],e.attempt(C[0].continuation,l,p)(v)}return p(v)}function l(v){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();let C=t.events.length,T=C,P;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){P=t.events[T][1].end;break}b(o);let k=C;for(;k<t.events.length;)t.events[k][1].end=Object.assign({},P),k++;return wr(t.events,T+1,0,t.events.slice(C)),t.events.length=k,p(v)}return s(v)}function p(v){if(o===r.length){if(!n)return f(v);if(n.currentConstruct&&n.currentConstruct.concrete)return y(v);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(oO,c,u)(v)}function c(v){return n&&x(),b(o),f(v)}function u(v){return t.parser.lazy[t.now().line]=o!==r.length,i=t.now().offset,y(v)}function f(v){return t.containerState={},e.attempt(oO,d,y)(v)}function d(v){return o++,r.push([t.currentConstruct,t.containerState]),f(v)}function y(v){if(v===null){n&&x(),b(0),e.consume(v);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:n}),h(v)}function h(v){if(v===null){g(e.exit("chunkFlow"),!0),b(0),e.consume(v);return}return _e(v)?(e.consume(v),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(v),h)}function g(v,C){let T=t.sliceStream(v);if(C&&T.push(null),v.previous=a,a&&(a.next=v),a=v,n.defineSkip(v.start),n.write(T),t.parser.lazy[v.start.line]){let P=n.events.length;for(;P--;)if(n.events[P][1].start.offset<i&&(!n.events[P][1].end||n.events[P][1].end.offset>i))return;let k=t.events.length,S=k,O,I;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){if(O){I=t.events[S][1].end;break}O=!0}for(b(o),P=k;P<t.events.length;)t.events[P][1].end=Object.assign({},I),P++;wr(t.events,S+1,0,t.events.slice(k)),t.events.length=P}}function b(v){let C=r.length;for(;C-- >v;){let T=r[C];t.containerState=T[1],T[0].exit.call(t,e)}r.length=v}function x(){n.write([null]),a=void 0,n=void 0,t.containerState._closeFlow=void 0}}function I6(e,t,r){return Ue(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Kb(e){if(e===null||zt(e)||tO(e))return 1;if(eO(e))return 2}function ql(e,t,r){let o=[],n=-1;for(;++n<e.length;){let a=e[n].resolveAll;a&&!o.includes(a)&&(t=a(t,r),o.push(a))}return t}var vu={name:"attention",tokenize:_6,resolveAll:O6};function O6(e,t){let r=-1,o,n,a,i,s,l,p,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(o=r;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[o][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[o][1].end.offset-e[o][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let u=Object.assign({},e[o][1].end),f=Object.assign({},e[r][1].start);aO(u,-l),aO(f,l),i={type:l>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[o][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:f},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[r][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},s.end)},e[o][1].end=Object.assign({},i.start),e[r][1].start=Object.assign({},s.end),p=[],e[o][1].end.offset-e[o][1].start.offset&&(p=Vr(p,[["enter",e[o][1],t],["exit",e[o][1],t]])),p=Vr(p,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",a,t]]),p=Vr(p,ql(t.parser.constructs.insideSpan.null,e.slice(o+1,r),t)),p=Vr(p,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",n,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,p=Vr(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,wr(e,o-1,r-o+3,p),r=o+p.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function _6(e,t){let r=this.parser.constructs.attentionMarkers.null,o=this.previous,n=Kb(o),a;return i;function i(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;let p=e.exit("attentionSequence"),c=Kb(l),u=!c||c===2&&n||r.includes(l),f=!n||n===2&&c||r.includes(o);return p._open=!!(a===42?u:u&&(n||!f)),p._close=!!(a===42?f:f&&(c||!u)),t(l)}}function aO(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Yb={name:"autolink",tokenize:w6};function w6(e,t,r){let o=0;return n;function n(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(d){return uo(d)?(e.consume(d),i):p(d)}function i(d){return d===43||d===45||d===46||ar(d)?(o=1,s(d)):p(d)}function s(d){return d===58?(e.consume(d),o=0,l):(d===43||d===45||d===46||ar(d))&&o++<32?(e.consume(d),s):(o=0,p(d))}function l(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||yu(d)?r(d):(e.consume(d),l)}function p(d){return d===64?(e.consume(d),c):XI(d)?(e.consume(d),p):r(d)}function c(d){return ar(d)?u(d):r(d)}function u(d){return d===46?(e.consume(d),o=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):f(d)}function f(d){if((d===45||ar(d))&&o++<63){let y=d===45?f:u;return e.consume(d),y}return r(d)}}var mi={tokenize:D6,partial:!0};function D6(e,t,r){return o;function o(a){return je(a)?Ue(e,n,"linePrefix")(a):n(a)}function n(a){return a===null||_e(a)?t(a):r(a)}}var Sh={name:"blockQuote",tokenize:A6,continuation:{tokenize:M6},exit:N6};function A6(e,t,r){let o=this;return n;function n(i){if(i===62){let s=o.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return r(i)}function a(i){return je(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function M6(e,t,r){let o=this;return n;function n(i){return je(i)?Ue(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(Sh,t,r)(i)}}function N6(e){e.exit("blockQuote")}var Rh={name:"characterEscape",tokenize:L6};function L6(e,t,r){return o;function o(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),n}function n(a){return QI(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}var Eh={name:"characterReference",tokenize:B6};function B6(e,t,r){let o=this,n=0,a,i;return s;function s(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,i=ar,c(u))}function p(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=ZI,c):(e.enter("characterReferenceValue"),a=7,i=gu,c(u))}function c(u){if(u===59&&n){let f=e.exit("characterReferenceValue");return i===ar&&!Jl(o.sliceSerialize(f))?r(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(u)&&n++<a?(e.consume(u),c):r(u)}}var iO={tokenize:F6,partial:!0},Ih={name:"codeFenced",tokenize:z6,concrete:!0};function z6(e,t,r){let o=this,n={tokenize:T,partial:!0},a=0,i=0,s;return l;function l(P){return p(P)}function p(P){let k=o.events[o.events.length-1];return a=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,s=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(P)}function c(P){return P===s?(i++,e.consume(P),c):i<3?r(P):(e.exit("codeFencedFenceSequence"),je(P)?Ue(e,u,"whitespace")(P):u(P))}function u(P){return P===null||_e(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(iO,h,C)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(P))}function f(P){return P===null||_e(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(P)):je(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ue(e,d,"whitespace")(P)):P===96&&P===s?r(P):(e.consume(P),f)}function d(P){return P===null||_e(P)?u(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(P))}function y(P){return P===null||_e(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(P)):P===96&&P===s?r(P):(e.consume(P),y)}function h(P){return e.attempt(n,C,g)(P)}function g(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),b}function b(P){return a>0&&je(P)?Ue(e,x,"linePrefix",a+1)(P):x(P)}function x(P){return P===null||_e(P)?e.check(iO,h,C)(P):(e.enter("codeFlowValue"),v(P))}function v(P){return P===null||_e(P)?(e.exit("codeFlowValue"),x(P)):(e.consume(P),v)}function C(P){return e.exit("codeFenced"),t(P)}function T(P,k,S){let O=0;return I;function I(N){return P.enter("lineEnding"),P.consume(N),P.exit("lineEnding"),B}function B(N){return P.enter("codeFencedFence"),je(N)?Ue(P,M,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):M(N)}function M(N){return N===s?(P.enter("codeFencedFenceSequence"),w(N)):S(N)}function w(N){return N===s?(O++,P.consume(N),w):O>=i?(P.exit("codeFencedFenceSequence"),je(N)?Ue(P,$,"whitespace")(N):$(N)):S(N)}function $(N){return N===null||_e(N)?(P.exit("codeFencedFence"),k(N)):S(N)}}}function F6(e,t,r){let o=this;return n;function n(i){return i===null?r(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}var bu={name:"codeIndented",tokenize:$6},V6={tokenize:j6,partial:!0};function $6(e,t,r){let o=this;return n;function n(p){return e.enter("codeIndented"),Ue(e,a,"linePrefix",5)(p)}function a(p){let c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(p):r(p)}function i(p){return p===null?l(p):_e(p)?e.attempt(V6,i,l)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||_e(p)?(e.exit("codeFlowValue"),i(p)):(e.consume(p),s)}function l(p){return e.exit("codeIndented"),t(p)}}function j6(e,t,r){let o=this;return n;function n(i){return o.parser.lazy[o.now().line]?r(i):_e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n):Ue(e,a,"linePrefix",5)(i)}function a(i){let s=o.events[o.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):_e(i)?n(i):r(i)}}var Xb={name:"codeText",tokenize:W6,resolve:H6,previous:U6};function H6(e){let t=e.length-4,r=3,o,n;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=r;++o<t;)if(e[o][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(o=r-1,t++;++o<=t;)n===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(n=o):(o===t||e[o][1].type==="lineEnding")&&(e[n][1].type="codeTextData",o!==n+2&&(e[n][1].end=e[o-1][1].end,e.splice(n+2,o-n-2),t-=o-n-2,o=n+2),n=void 0);return e}function U6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function W6(e,t,r){let o=this,n=0,a,i;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),n++,l):(e.exit("codeTextSequence"),p(f))}function p(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),p):f===96?(i=e.enter("codeTextSequence"),a=0,u(f)):_e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),p):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||_e(f)?(e.exit("codeTextData"),p(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),a++,u):a===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}var Oh=class{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,r){let o=r==null?Number.POSITIVE_INFINITY:r;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,r,o){let n=r||0;this.setCursor(Math.trunc(t));let a=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return o&&xu(this.left,o),a.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),xu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),xu(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){let r=this.left.splice(t,Number.POSITIVE_INFINITY);xu(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);xu(this.left,r.reverse())}}};function xu(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function _h(e){let t={},r=-1,o,n,a,i,s,l,p,c=new Oh(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(o=c.get(r),r&&o[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=o[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,G6(c,r)),r=t[r],p=!0);else if(o[1]._container){for(a=r,n=void 0;a--&&(i=c.get(a),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=a);n&&(o[1].end=Object.assign({},c.get(n)[1].start),s=c.slice(n,r),s.unshift(o),c.splice(n,r-n+1,s))}}return wr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!p}function G6(e,t){let r=e.get(t)[1],o=e.get(t)[2],n=t-1,a=[],i=r._tokenizer||o.parser[r.contentType](r.start),s=i.events,l=[],p={},c,u,f=-1,d=r,y=0,h=0,g=[h];for(;d;){for(;e.get(++n)[1]!==d;);a.push(n),d._tokenizer||(c=o.sliceStream(d),d.next||c.push(null),u&&i.defineSkip(d.start),d._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),d._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),u=d,d=d.next}for(d=r;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(i.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),f=g.length;f--;){let b=s.slice(g[f],g[f+1]),x=a.pop();l.push([x,x+b.length-1]),e.splice(x,2,b)}for(l.reverse(),f=-1;++f<l.length;)p[y+l[f][0]]=y+l[f][1],y+=l[f][1]-l[f][0]-1;return p}var Zb={tokenize:K6,resolve:q6},J6={tokenize:Y6,partial:!0};function q6(e){return _h(e),e}function K6(e,t){let r;return o;function o(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(s)}function n(s){return s===null?a(s):_e(s)?e.check(J6,i,a)(s):(e.consume(s),n)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function Y6(e,t,r){let o=this;return n;function n(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ue(e,a,"linePrefix")}function a(i){if(i===null||_e(i))return r(i);let s=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(o.parser.constructs.flow,r,t)(i)}}function wh(e,t,r,o,n,a,i,s,l){let p=l||Number.POSITIVE_INFINITY,c=0;return u;function u(b){return b===60?(e.enter(o),e.enter(n),e.enter(a),e.consume(b),e.exit(a),f):b===null||b===32||b===41||yu(b)?r(b):(e.enter(o),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(b))}function f(b){return b===62?(e.enter(a),e.consume(b),e.exit(a),e.exit(n),e.exit(o),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===62?(e.exit("chunkString"),e.exit(s),f(b)):b===null||b===60||_e(b)?r(b):(e.consume(b),b===92?y:d)}function y(b){return b===60||b===62||b===92?(e.consume(b),d):d(b)}function h(b){return!c&&(b===null||b===41||zt(b))?(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(o),t(b)):c<p&&b===40?(e.consume(b),c++,h):b===41?(e.consume(b),c--,h):b===null||b===32||b===40||yu(b)?r(b):(e.consume(b),b===92?g:h)}function g(b){return b===40||b===41||b===92?(e.consume(b),h):h(b)}}function Dh(e,t,r,o,n,a){let i=this,s=0,l;return p;function p(d){return e.enter(o),e.enter(n),e.consume(d),e.exit(n),e.enter(a),c}function c(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?r(d):d===93?(e.exit(a),e.enter(n),e.consume(d),e.exit(n),e.exit(o),t):_e(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===null||d===91||d===93||_e(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!je(d)),d===92?f:u)}function f(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function Ah(e,t,r,o,n,a){let i;return s;function s(f){return f===34||f===39||f===40?(e.enter(o),e.enter(n),e.consume(f),e.exit(n),i=f===40?41:f,l):r(f)}function l(f){return f===i?(e.enter(n),e.consume(f),e.exit(n),e.exit(o),t):(e.enter(a),p(f))}function p(f){return f===i?(e.exit(a),l(i)):f===null?r(f):_e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ue(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===i||f===null||_e(f)?(e.exit("chunkString"),p(f)):(e.consume(f),f===92?u:c)}function u(f){return f===i||f===92?(e.consume(f),c):c(f)}}function gs(e,t){let r;return o;function o(n){return _e(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,o):je(n)?Ue(e,o,r?"linePrefix":"lineSuffix")(n):t(n)}}var Qb={name:"definition",tokenize:Z6},X6={tokenize:Q6,partial:!0};function Z6(e,t,r){let o=this,n;return a;function a(d){return e.enter("definition"),i(d)}function i(d){return Dh.call(o,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return n=fa(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):r(d)}function l(d){return zt(d)?gs(e,p)(d):p(d)}function p(d){return wh(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(X6,u,u)(d)}function u(d){return je(d)?Ue(e,f,"whitespace")(d):f(d)}function f(d){return d===null||_e(d)?(e.exit("definition"),o.parser.defined.push(n),t(d)):r(d)}}function Q6(e,t,r){return o;function o(s){return zt(s)?gs(e,n)(s):r(s)}function n(s){return Ah(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return je(s)?Ue(e,i,"whitespace")(s):i(s)}function i(s){return s===null||_e(s)?t(s):r(s)}}var ex={name:"hardBreakEscape",tokenize:e7};function e7(e,t,r){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),n}function n(a){return _e(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}var tx={name:"headingAtx",tokenize:r7,resolve:t7};function t7(e,t){let r=e.length-2,o=3,n,a;return e[o][1].type==="whitespace"&&(o+=2),r-2>o&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(o===r-1||r-4>o&&e[r-2][1].type==="whitespace")&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},a={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},wr(e,o,r-o+1,[["enter",n,t],["enter",a,t],["exit",a,t],["exit",n,t]])),e}function r7(e,t,r){let o=0;return n;function n(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&o++<6?(e.consume(c),i):c===null||zt(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||_e(c)?(e.exit("atxHeading"),t(c)):je(c)?Ue(e,s,"whitespace")(c):(e.enter("atxHeadingText"),p(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function p(c){return c===null||c===35||zt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),p)}}var sO=["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"],rx=["pre","script","style","textarea"];var ox={name:"htmlFlow",tokenize:i7,resolveTo:a7,concrete:!0},o7={tokenize:l7,partial:!0},n7={tokenize:s7,partial:!0};function a7(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 i7(e,t,r){let o=this,n,a,i,s,l;return p;function p(_){return c(_)}function c(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),u}function u(_){return _===33?(e.consume(_),f):_===47?(e.consume(_),a=!0,h):_===63?(e.consume(_),n=3,o.interrupt?t:R):uo(_)?(e.consume(_),i=String.fromCharCode(_),g):r(_)}function f(_){return _===45?(e.consume(_),n=2,d):_===91?(e.consume(_),n=5,s=0,y):uo(_)?(e.consume(_),n=4,o.interrupt?t:R):r(_)}function d(_){return _===45?(e.consume(_),o.interrupt?t:R):r(_)}function y(_){let pe="CDATA[";return _===pe.charCodeAt(s++)?(e.consume(_),s===pe.length?o.interrupt?t:M:y):r(_)}function h(_){return uo(_)?(e.consume(_),i=String.fromCharCode(_),g):r(_)}function g(_){if(_===null||_===47||_===62||zt(_)){let pe=_===47,me=i.toLowerCase();return!pe&&!a&&rx.includes(me)?(n=1,o.interrupt?t(_):M(_)):sO.includes(i.toLowerCase())?(n=6,pe?(e.consume(_),b):o.interrupt?t(_):M(_)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(_):a?x(_):v(_))}return _===45||ar(_)?(e.consume(_),i+=String.fromCharCode(_),g):r(_)}function b(_){return _===62?(e.consume(_),o.interrupt?t:M):r(_)}function x(_){return je(_)?(e.consume(_),x):I(_)}function v(_){return _===47?(e.consume(_),I):_===58||_===95||uo(_)?(e.consume(_),C):je(_)?(e.consume(_),v):I(_)}function C(_){return _===45||_===46||_===58||_===95||ar(_)?(e.consume(_),C):T(_)}function T(_){return _===61?(e.consume(_),P):je(_)?(e.consume(_),T):v(_)}function P(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(e.consume(_),l=_,k):je(_)?(e.consume(_),P):S(_)}function k(_){return _===l?(e.consume(_),l=null,O):_===null||_e(_)?r(_):(e.consume(_),k)}function S(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||zt(_)?T(_):(e.consume(_),S)}function O(_){return _===47||_===62||je(_)?v(_):r(_)}function I(_){return _===62?(e.consume(_),B):r(_)}function B(_){return _===null||_e(_)?M(_):je(_)?(e.consume(_),B):r(_)}function M(_){return _===45&&n===2?(e.consume(_),D):_===60&&n===1?(e.consume(_),L):_===62&&n===4?(e.consume(_),q):_===63&&n===3?(e.consume(_),R):_===93&&n===5?(e.consume(_),z):_e(_)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(o7,oe,w)(_)):_===null||_e(_)?(e.exit("htmlFlowData"),w(_)):(e.consume(_),M)}function w(_){return e.check(n7,$,oe)(_)}function $(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),N}function N(_){return _===null||_e(_)?w(_):(e.enter("htmlFlowData"),M(_))}function D(_){return _===45?(e.consume(_),R):M(_)}function L(_){return _===47?(e.consume(_),i="",U):M(_)}function U(_){if(_===62){let pe=i.toLowerCase();return rx.includes(pe)?(e.consume(_),q):M(_)}return uo(_)&&i.length<8?(e.consume(_),i+=String.fromCharCode(_),U):M(_)}function z(_){return _===93?(e.consume(_),R):M(_)}function R(_){return _===62?(e.consume(_),q):_===45&&n===2?(e.consume(_),R):M(_)}function q(_){return _===null||_e(_)?(e.exit("htmlFlowData"),oe(_)):(e.consume(_),q)}function oe(_){return e.exit("htmlFlow"),t(_)}}function s7(e,t,r){let o=this;return n;function n(i){return _e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):r(i)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}function l7(e,t,r){return o;function o(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(mi,t,r)}}var nx={name:"htmlText",tokenize:p7};function p7(e,t,r){let o=this,n,a,i;return s;function s(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),l}function l(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),T):R===63?(e.consume(R),v):uo(R)?(e.consume(R),S):r(R)}function p(R){return R===45?(e.consume(R),c):R===91?(e.consume(R),a=0,y):uo(R)?(e.consume(R),x):r(R)}function c(R){return R===45?(e.consume(R),d):r(R)}function u(R){return R===null?r(R):R===45?(e.consume(R),f):_e(R)?(i=u,L(R)):(e.consume(R),u)}function f(R){return R===45?(e.consume(R),d):u(R)}function d(R){return R===62?D(R):R===45?f(R):u(R)}function y(R){let q="CDATA[";return R===q.charCodeAt(a++)?(e.consume(R),a===q.length?h:y):r(R)}function h(R){return R===null?r(R):R===93?(e.consume(R),g):_e(R)?(i=h,L(R)):(e.consume(R),h)}function g(R){return R===93?(e.consume(R),b):h(R)}function b(R){return R===62?D(R):R===93?(e.consume(R),b):h(R)}function x(R){return R===null||R===62?D(R):_e(R)?(i=x,L(R)):(e.consume(R),x)}function v(R){return R===null?r(R):R===63?(e.consume(R),C):_e(R)?(i=v,L(R)):(e.consume(R),v)}function C(R){return R===62?D(R):v(R)}function T(R){return uo(R)?(e.consume(R),P):r(R)}function P(R){return R===45||ar(R)?(e.consume(R),P):k(R)}function k(R){return _e(R)?(i=k,L(R)):je(R)?(e.consume(R),k):D(R)}function S(R){return R===45||ar(R)?(e.consume(R),S):R===47||R===62||zt(R)?O(R):r(R)}function O(R){return R===47?(e.consume(R),D):R===58||R===95||uo(R)?(e.consume(R),I):_e(R)?(i=O,L(R)):je(R)?(e.consume(R),O):D(R)}function I(R){return R===45||R===46||R===58||R===95||ar(R)?(e.consume(R),I):B(R)}function B(R){return R===61?(e.consume(R),M):_e(R)?(i=B,L(R)):je(R)?(e.consume(R),B):O(R)}function M(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),n=R,w):_e(R)?(i=M,L(R)):je(R)?(e.consume(R),M):(e.consume(R),$)}function w(R){return R===n?(e.consume(R),n=void 0,N):R===null?r(R):_e(R)?(i=w,L(R)):(e.consume(R),w)}function $(R){return R===null||R===34||R===39||R===60||R===61||R===96?r(R):R===47||R===62||zt(R)?O(R):(e.consume(R),$)}function N(R){return R===47||R===62||zt(R)?O(R):r(R)}function D(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):r(R)}function L(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),U}function U(R){return je(R)?Ue(e,z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):z(R)}function z(R){return e.enter("htmlTextData"),i(R)}}var vs={name:"labelEnd",tokenize:h7,resolveTo:m7,resolveAll:f7},c7={tokenize:y7},u7={tokenize:g7},d7={tokenize:v7};function f7(e){let t=-1;for(;++t<e.length;){let r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function m7(e,t){let r=e.length,o=0,n,a,i,s;for(;r--;)if(n=e[r][1],a){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[r][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(i){if(e[r][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(a=r,n.type!=="labelLink")){o=2;break}}else n.type==="labelEnd"&&(i=r);let l={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},p={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[i][1].end)},c={type:"labelText",start:Object.assign({},e[a+o+2][1].end),end:Object.assign({},e[i-2][1].start)};return s=[["enter",l,t],["enter",p,t]],s=Vr(s,e.slice(a+1,a+o+3)),s=Vr(s,[["enter",c,t]]),s=Vr(s,ql(t.parser.constructs.insideSpan.null,e.slice(a+o+4,i-3),t)),s=Vr(s,[["exit",c,t],e[i-2],e[i-1],["exit",p,t]]),s=Vr(s,e.slice(i+1)),s=Vr(s,[["exit",l,t]]),wr(e,a,e.length,s),e}function h7(e,t,r){let o=this,n=o.events.length,a,i;for(;n--;)if((o.events[n][1].type==="labelImage"||o.events[n][1].type==="labelLink")&&!o.events[n][1]._balanced){a=o.events[n][1];break}return s;function s(f){return a?a._inactive?u(f):(i=o.parser.defined.includes(fa(o.sliceSerialize({start:a.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):r(f)}function l(f){return f===40?e.attempt(c7,c,i?c:u)(f):f===91?e.attempt(u7,c,i?p:u)(f):i?c(f):u(f)}function p(f){return e.attempt(d7,c,u)(f)}function c(f){return t(f)}function u(f){return a._balanced=!0,r(f)}}function y7(e,t,r){return o;function o(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),n}function n(u){return zt(u)?gs(e,a)(u):a(u)}function a(u){return u===41?c(u):wh(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function i(u){return zt(u)?gs(e,l)(u):c(u)}function s(u){return r(u)}function l(u){return u===34||u===39||u===40?Ah(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):c(u)}function p(u){return zt(u)?gs(e,c)(u):c(u)}function c(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):r(u)}}function g7(e,t,r){let o=this;return n;function n(s){return Dh.call(o,e,a,i,"reference","referenceMarker","referenceString")(s)}function a(s){return o.parser.defined.includes(fa(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function i(s){return r(s)}}function v7(e,t,r){return o;function o(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),n}function n(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}var ax={name:"labelStartImage",tokenize:b7,resolveAll:vs.resolveAll};function b7(e,t,r){let o=this;return n;function n(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):r(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(s):t(s)}}var ix={name:"labelStartLink",tokenize:x7,resolveAll:vs.resolveAll};function x7(e,t,r){let o=this;return n;function n(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(i):t(i)}}var Tu={name:"lineEnding",tokenize:T7};function T7(e,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ue(e,t,"linePrefix")}}var bs={name:"thematicBreak",tokenize:P7};function P7(e,t,r){let o=0,n;return a;function a(p){return e.enter("thematicBreak"),i(p)}function i(p){return n=p,s(p)}function s(p){return p===n?(e.enter("thematicBreakSequence"),l(p)):o>=3&&(p===null||_e(p))?(e.exit("thematicBreak"),t(p)):r(p)}function l(p){return p===n?(e.consume(p),o++,l):(e.exit("thematicBreakSequence"),je(p)?Ue(e,s,"whitespace")(p):s(p))}}var Dr={name:"list",tokenize:S7,continuation:{tokenize:R7},exit:I7},C7={tokenize:O7,partial:!0},k7={tokenize:E7,partial:!0};function S7(e,t,r){let o=this,n=o.events[o.events.length-1],a=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,i=0;return s;function s(d){let y=o.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!o.containerState.marker||d===o.containerState.marker:gu(d)){if(o.containerState.type||(o.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(bs,r,p)(d):p(d);if(!o.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return r(d)}function l(d){return gu(d)&&++i<10?(e.consume(d),l):(!o.interrupt||i<2)&&(o.containerState.marker?d===o.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),p(d)):r(d)}function p(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||d,e.check(mi,o.interrupt?r:c,e.attempt(C7,f,u))}function c(d){return o.containerState.initialBlankLine=!0,a++,f(d)}function u(d){return je(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),f):r(d)}function f(d){return o.containerState.size=a+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function R7(e,t,r){let o=this;return o.containerState._closeFlow=void 0,e.check(mi,n,a);function n(s){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ue(e,t,"listItemIndent",o.containerState.size+1)(s)}function a(s){return o.containerState.furtherBlankLines||!je(s)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,i(s)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(k7,t,i)(s))}function i(s){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ue(e,e.attempt(Dr,t,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function E7(e,t,r){let o=this;return Ue(e,n,"listItemIndent",o.containerState.size+1);function n(a){let i=o.events[o.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===o.containerState.size?t(a):r(a)}}function I7(e){e.exit(this.containerState.type)}function O7(e,t,r){let o=this;return Ue(e,n,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(a){let i=o.events[o.events.length-1];return!je(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}var Mh={name:"setextUnderline",tokenize:w7,resolveTo:_7};function _7(e,t){let r=e.length,o,n,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){o=r;break}e[r][1].type==="paragraph"&&(n=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);let i={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[n][1].type="setextHeadingText",a?(e.splice(n,0,["enter",i,t]),e.splice(a+1,0,["exit",e[o][1],t]),e[o][1].end=Object.assign({},e[a][1].end)):e[o][1]=i,e.push(["exit",i,t]),e}function w7(e,t,r){let o=this,n;return a;function a(p){let c=o.events.length,u;for(;c--;)if(o.events[c][1].type!=="lineEnding"&&o.events[c][1].type!=="linePrefix"&&o.events[c][1].type!=="content"){u=o.events[c][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(e.enter("setextHeadingLine"),n=p,i(p)):r(p)}function i(p){return e.enter("setextHeadingLineSequence"),s(p)}function s(p){return p===n?(e.consume(p),s):(e.exit("setextHeadingLineSequence"),je(p)?Ue(e,l,"lineSuffix")(p):l(p))}function l(p){return p===null||_e(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}var lO={tokenize:D7};function D7(e){let t=this,r=e.attempt(mi,o,e.attempt(this.parser.constructs.flowInitial,n,Ue(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Zb,n)),"linePrefix")));return r;function o(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function n(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var pO={resolveAll:fO()},cO=dO("string"),uO=dO("text");function dO(e){return{tokenize:t,resolveAll:fO(e==="text"?A7:void 0)};function t(r){let o=this,n=this.parser.constructs[e],a=r.attempt(n,i,s);return i;function i(c){return p(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return p(c)?(r.exit("data"),a(c)):(r.consume(c),l)}function p(c){if(c===null)return!0;let u=n[c],f=-1;if(u)for(;++f<u.length;){let d=u[f];if(!d.previous||d.previous.call(o,o.previous))return!0}return!1}}}function fO(e){return t;function t(r,o){let n=-1,a;for(;++n<=r.length;)a===void 0?r[n]&&r[n][1].type==="data"&&(a=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==a+2&&(r[a][1].end=r[n-1][1].end,r.splice(a+2,n-a-2),n=a+2),a=void 0);return e?e(r,o):r}}function A7(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let o=e[r-1][1],n=t.sliceStream(o),a=n.length,i=-1,s=0,l;for(;a--;){let p=n[a];if(typeof p=="string"){for(i=p.length;p.charCodeAt(i-1)===32;)s++,i--;if(i)break;i=-1}else if(p===-2)l=!0,s++;else if(p!==-1){a++;break}}if(s){let p={type:r===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-s,offset:o.end.offset-s,_index:o.start._index+a,_bufferIndex:a?i:o.start._bufferIndex+i},end:Object.assign({},o.end)};o.end=Object.assign({},p.start),o.start.offset===o.end.offset?Object.assign(o,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}function mO(e,t,r){let o=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),n={},a=[],i=[],s=[],l=!0,p={consume:C,enter:T,exit:P,attempt:O(k),check:O(S),interrupt:O(S,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:y,now:g,defineSkip:b,write:d},u=t.tokenize.call(c,p),f;return t.resolveAll&&a.push(t),c;function d(w){return i=Vr(i,w),x(),i[i.length-1]!==null?[]:(I(t,0),c.events=ql(a,c.events,c),c.events)}function y(w,$){return N7(h(w),$)}function h(w){return M7(i,w)}function g(){let{line:w,column:$,offset:N,_index:D,_bufferIndex:L}=o;return{line:w,column:$,offset:N,_index:D,_bufferIndex:L}}function b(w){n[w.line]=w.column,M()}function x(){let w;for(;o._index<i.length;){let $=i[o._index];if(typeof $=="string")for(w=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===w&&o._bufferIndex<$.length;)v($.charCodeAt(o._bufferIndex));else v($)}}function v(w){l=void 0,f=w,u=u(w)}function C(w){_e(w)?(o.line++,o.column=1,o.offset+=w===-3?2:1,M()):w!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===i[o._index].length&&(o._bufferIndex=-1,o._index++)),c.previous=w,l=!0}function T(w,$){let N=$||{};return N.type=w,N.start=g(),c.events.push(["enter",N,c]),s.push(N),N}function P(w){let $=s.pop();return $.end=g(),c.events.push(["exit",$,c]),$}function k(w,$){I(w,$.from)}function S(w,$){$.restore()}function O(w,$){return N;function N(D,L,U){let z,R,q,oe;return Array.isArray(D)?pe(D):"tokenize"in D?pe([D]):_(D);function _(W){return de;function de(fe){let Ce=fe!==null&&W[fe],ve=fe!==null&&W.null,Ae=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return pe(Ae)(fe)}}function pe(W){return z=W,R=0,W.length===0?U:me(W[R])}function me(W){return de;function de(fe){return oe=B(),q=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?ae(fe):W.tokenize.call($?Object.assign(Object.create(c),$):c,p,we,ae)(fe)}}function we(W){return l=!0,w(q,oe),L}function ae(W){return l=!0,oe.restore(),++R<z.length?me(z[R]):U}}}function I(w,$){w.resolveAll&&!a.includes(w)&&a.push(w),w.resolve&&wr(c.events,$,c.events.length-$,w.resolve(c.events.slice($),c)),w.resolveTo&&(c.events=w.resolveTo(c.events,c))}function B(){let w=g(),$=c.previous,N=c.currentConstruct,D=c.events.length,L=Array.from(s);return{restore:U,from:D};function U(){o=w,c.previous=$,c.currentConstruct=N,c.events.length=D,s=L,M()}}function M(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function M7(e,t){let r=t.start._index,o=t.start._bufferIndex,n=t.end._index,a=t.end._bufferIndex,i;if(r===n)i=[e[r].slice(o,a)];else{if(i=e.slice(r,n),o>-1){let s=i[0];typeof s=="string"?i[0]=s.slice(o):i.shift()}a>0&&i.push(e[n].slice(0,a))}return i}function N7(e,t){let r=-1,o=[],n;for(;++r<e.length;){let a=e[r],i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
128
128
  `;break}case-3:{i=`\r
129
129
  `;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&n)continue;i=" ";break}default:i=String.fromCharCode(a)}n=a===-2,o.push(i)}return o.join("")}var sx={};ET(sx,{attentionMarkers:()=>H7,contentInitial:()=>B7,disable:()=>U7,document:()=>L7,flow:()=>F7,flowInitial:()=>z7,insideSpan:()=>j7,string:()=>V7,text:()=>$7});var L7={42:Dr,43:Dr,45:Dr,48:Dr,49:Dr,50:Dr,51:Dr,52:Dr,53:Dr,54:Dr,55:Dr,56:Dr,57:Dr,62:Sh},B7={91:Qb},z7={[-2]:bu,[-1]:bu,32:bu},F7={35:tx,42:bs,45:[Mh,bs],60:ox,61:Mh,95:bs,96:Ih,126:Ih},V7={38:Eh,92:Rh},$7={[-5]:Tu,[-4]:Tu,[-3]:Tu,33:ax,38:Eh,42:vu,60:[Yb,nx],91:ix,92:[ex,Rh],93:vs,95:vu,96:Xb},j7={null:[vu,pO]},H7={null:[42,95]},U7={null:[]};function lx(e){let r=YI([sx,...(e||{}).extensions||[]]),o={defined:[],lazy:{},constructs:r,content:n(rO),document:n(nO),flow:n(lO),string:n(cO),text:n(uO)};return o;function n(a){return i;function i(s){return mO(o,a,s)}}}function px(e){for(;!_h(e););return e}var hO=/[\0\t\n\r]/g;function cx(){let e=1,t="",r=!0,o;return n;function n(a,i,s){let l=[],p,c,u,f,d;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(i||void 0).decode(a)),u=0,t="",r&&(a.charCodeAt(0)===65279&&u++,r=void 0);u<a.length;){if(hO.lastIndex=u,p=hO.exec(a),f=p&&p.index!==void 0?p.index:a.length,d=a.charCodeAt(f),!p){t=a.slice(u);break}if(d===10&&u===f&&o)l.push(-3),o=void 0;else switch(o&&(l.push(-5),o=void 0),u<f&&(l.push(a.slice(u,f)),e+=f-u),d){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:o=!0,e=1}u=f+1}return s&&(o&&l.push(-5),t&&l.push(t),l.push(null)),l}}var W7=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yO(e){return e.replace(W7,G7)}function G7(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let n=r.charCodeAt(1),a=n===120||n===88;return kh(r.slice(a?2:1),a?16:10)}return Jl(r)||e}var vO={}.hasOwnProperty;function ux(e,t,r){return typeof t!="string"&&(r=t,t=void 0),J7(r)(px(lx(r).document().write(cx()(e,t,!0))))}function J7(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(be),autolinkProtocol:O,autolinkEmail:O,atxHeading:a(We),blockQuote:a(de),characterEscape:O,characterReference:O,codeFenced:a(fe),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a(fe,i),codeText:a(Ce,i),codeTextData:O,data:O,codeFlowValue:O,definition:a(ve),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(Ae),hardBreakEscape:a(te),hardBreakTrailing:a(te),htmlFlow:a(Z,i),htmlFlowData:O,htmlText:a(Z,i),htmlTextData:O,image:a(he),label:i,link:a(be),listItem:a(De),listItemValue:f,listOrdered:a(Be,u),listUnordered:a(Be),paragraph:a(Me),reference:_,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(We),strong:a(ze),thematicBreak:a(it)},exit:{atxHeading:l(),atxHeadingSequence:T,autolink:l(),autolinkEmail:W,autolinkProtocol:ae,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:we,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:y,codeFlowValue:I,codeIndented:l(b),codeText:l(N),codeTextData:I,data:I,definition:l(),definitionDestinationString:C,definitionLabelString:x,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(M),hardBreakTrailing:l(M),htmlFlow:l(w),htmlFlowData:I,htmlText:l($),htmlTextData:I,image:l(L),label:z,labelText:U,lineEnding:B,link:l(D),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:pe,resourceDestinationString:R,resourceTitleString:q,resource:oe,setextHeading:l(S),setextHeadingLineSequence:k,setextHeadingText:P,strong:l(),thematicBreak:l()}};bO(t,(e||{}).mdastExtensions||[]);let r={};return o;function o(X){let ue={type:"root",children:[]},ke={stack:[ue],tokenStack:[],config:t,enter:s,exit:p,buffer:i,resume:c,data:r},G=[],J=-1;for(;++J<X.length;)if(X[J][1].type==="listOrdered"||X[J][1].type==="listUnordered")if(X[J][0]==="enter")G.push(J);else{let le=G.pop();J=n(X,le,J)}for(J=-1;++J<X.length;){let le=t[X[J][0]];vO.call(le,X[J][1].type)&&le[X[J][1].type].call(Object.assign({sliceSerialize:X[J][2].sliceSerialize},ke),X[J][1])}if(ke.tokenStack.length>0){let le=ke.tokenStack[ke.tokenStack.length-1];(le[1]||gO).call(ke,void 0,le[0])}for(ue.position={start:hi(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:hi(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<t.transforms.length;)ue=t.transforms[J](ue)||ue;return ue}function n(X,ue,ke){let G=ue-1,J=-1,le=!1,Ie,se,ie,Se;for(;++G<=ke;){let Ne=X[G];switch(Ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ne[0]==="enter"?J++:J--,Se=void 0;break}case"lineEndingBlank":{Ne[0]==="enter"&&(Ie&&!Se&&!J&&!ie&&(ie=G),Se=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Se=void 0}if(!J&&Ne[0]==="enter"&&Ne[1].type==="listItemPrefix"||J===-1&&Ne[0]==="exit"&&(Ne[1].type==="listUnordered"||Ne[1].type==="listOrdered")){if(Ie){let nt=G;for(se=void 0;nt--;){let qe=X[nt];if(qe[1].type==="lineEnding"||qe[1].type==="lineEndingBlank"){if(qe[0]==="exit")continue;se&&(X[se][1].type="lineEndingBlank",le=!0),qe[1].type="lineEnding",se=nt}else if(!(qe[1].type==="linePrefix"||qe[1].type==="blockQuotePrefix"||qe[1].type==="blockQuotePrefixWhitespace"||qe[1].type==="blockQuoteMarker"||qe[1].type==="listItemIndent"))break}ie&&(!se||ie<se)&&(Ie._spread=!0),Ie.end=Object.assign({},se?X[se][1].start:Ne[1].end),X.splice(se||G,0,["exit",Ie,Ne[2]]),G++,ke++}if(Ne[1].type==="listItemPrefix"){let nt={type:"listItem",_spread:!1,start:Object.assign({},Ne[1].start),end:void 0};Ie=nt,X.splice(G,0,["enter",nt,Ne[2]]),G++,ke++,ie=void 0,Se=!0}}}return X[ue][1]._spread=le,ke}function a(X,ue){return ke;function ke(G){s.call(this,X(G),G),ue&&ue.call(this,G)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(X,ue,ke){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([ue,ke]),X.position={start:hi(ue.start),end:void 0}}function l(X){return ue;function ue(ke){X&&X.call(this,ke),p.call(this,ke)}}function p(X,ue){let ke=this.stack.pop(),G=this.tokenStack.pop();if(G)G[0].type!==X.type&&(ue?ue.call(this,X,G[0]):(G[1]||gO).call(this,X,G[0]));else throw new Error("Cannot close `"+X.type+"` ("+di({start:X.start,end:X.end})+"): it\u2019s not open");ke.position.end=hi(X.end)}function c(){return qb(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function f(X){if(this.data.expectingFirstListItemValue){let ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function d(){let X=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=X}function y(){let X=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=X}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){let X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X.replace(/(\r?\n|\r)$/g,"")}function x(X){let ue=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ue,ke.identifier=fa(this.sliceSerialize(X)).toLowerCase()}function v(){let X=this.resume(),ue=this.stack[this.stack.length-1];ue.title=X}function C(){let X=this.resume(),ue=this.stack[this.stack.length-1];ue.url=X}function T(X){let ue=this.stack[this.stack.length-1];if(!ue.depth){let ke=this.sliceSerialize(X).length;ue.depth=ke}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function k(X){let ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function O(X){let ke=this.stack[this.stack.length-1].children,G=ke[ke.length-1];(!G||G.type!=="text")&&(G=Je(),G.position={start:hi(X.start),end:void 0},ke.push(G)),this.stack.push(G)}function I(X){let ue=this.stack.pop();ue.value+=this.sliceSerialize(X),ue.position.end=hi(X.end)}function B(X){let ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){let ke=ue.children[ue.children.length-1];ke.position.end=hi(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(O.call(this,X),I.call(this,X))}function M(){this.data.atHardBreak=!0}function w(){let X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X}function $(){let X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X}function N(){let X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X}function D(){let X=this.stack[this.stack.length-1];if(this.data.inReference){let ue=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ue,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function L(){let X=this.stack[this.stack.length-1];if(this.data.inReference){let ue=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ue,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function U(X){let ue=this.sliceSerialize(X),ke=this.stack[this.stack.length-2];ke.label=yO(ue),ke.identifier=fa(ue).toLowerCase()}function z(){let X=this.stack[this.stack.length-1],ue=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){let G=X.children;ke.children=G}else ke.alt=ue}function R(){let X=this.resume(),ue=this.stack[this.stack.length-1];ue.url=X}function q(){let X=this.resume(),ue=this.stack[this.stack.length-1];ue.title=X}function oe(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function pe(X){let ue=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ue,ke.identifier=fa(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function me(X){this.data.characterReferenceType=X.type}function we(X){let ue=this.sliceSerialize(X),ke=this.data.characterReferenceType,G;ke?(G=kh(ue,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):G=Jl(ue);let J=this.stack.pop();J.value+=G,J.position.end=hi(X.end)}function ae(X){I.call(this,X);let ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(X)}function W(X){I.call(this,X);let ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(X)}function de(){return{type:"blockquote",children:[]}}function fe(){return{type:"code",lang:null,meta:null,value:""}}function Ce(){return{type:"inlineCode",value:""}}function ve(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ae(){return{type:"emphasis",children:[]}}function We(){return{type:"heading",depth:0,children:[]}}function te(){return{type:"break"}}function Z(){return{type:"html",value:""}}function he(){return{type:"image",title:null,url:"",alt:null}}function be(){return{type:"link",title:null,url:"",children:[]}}function Be(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function De(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function Me(){return{type:"paragraph",children:[]}}function ze(){return{type:"strong",children:[]}}function Je(){return{type:"text",value:""}}function it(){return{type:"thematicBreak"}}}function hi(e){return{line:e.line,column:e.column,offset:e.offset}}function bO(e,t){let r=-1;for(;++r<t.length;){let o=t[r];Array.isArray(o)?bO(e,o):q7(e,o)}}function q7(e,t){let r;for(r in t)if(vO.call(t,r))switch(r){case"canContainEols":{let o=t[r];o&&e[r].push(...o);break}case"transforms":{let o=t[r];o&&e[r].push(...o);break}case"enter":case"exit":{let o=t[r];o&&Object.assign(e[r],o);break}}}function gO(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+di({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+di({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+di({start:t.start,end:t.end})+") is still open")}function Nh(e){let t=this;t.parser=r;function r(o){return ux(o,re(V(V({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function xO(e,t){let r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function TO(e,t){let r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
130
130
  `}]}function PO(e,t){let r=t.value?t.value+`