@ceed/cds 0.0.147 → 0.0.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/framer/index.js +1 -1
- package/package.json +1 -1
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 n7(e){e=o7(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=Ci);var l=e.onBlur;l===void 0&&(l=Ci);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=m_(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=oy(e),v=x.decimalSeparator,S=x.allowedDecimalSeparators,T=function(z){return d_(z,e)},P=function(z,R){return t7(z,R,e)},k=fp(y)?d:y,C=h!=null?h:e7(k,f,n);fp(y)?fp(d)||(C=C||typeof d=="number"):C=C||typeof y=="number";var O=function(z){return h_(z)?z:(typeof z=="number"&&(z=v_(z)),C&&typeof c=="number"?c_(z,c,!!u):z)},I=x_(O(y),O(d),!!C,T,P,g),M=I[0],N=M.numAsString,D=M.formattedValue,$=I[1],L=function(z){var R=z.target,K=z.key,oe=R.selectionStart,_=R.selectionEnd,ce=R.value;if(ce===void 0&&(ce=""),oe!==_){s(z);return}K==="Backspace"&&ce[0]==="-"&&oe===f.length+1&&a&&Ds(R,1),c&&u&&(K==="Backspace"&&ce[oe-1]===v?(Ds(R,oe-1),z.preventDefault()):K==="Delete"&&ce[oe]===v&&z.preventDefault()),S!=null&&S.includes(K)&&ce[oe]===v&&Ds(R,oe+1);var me=p===!0?",":p;K==="Backspace"&&ce[oe-1]===me&&Ds(R,oe-1),K==="Delete"&&ce[oe]===me&&Ds(R,oe+1),s(z)},w=function(z){var R=N;if(R.match(/\d/g)||(R=""),i||(R=j6(R)),u&&c&&(R=c_(R,c,u)),R!==N){var K=d_(R,e);$({formattedValue:K,value:R,floatValue:parseFloat(R)},{event:z,source:Ou.event})}l(z)},B=function(z){return z===v?!0:_u(z)},U=function(z){var R=z.currentValue,K=z.lastValue,oe=z.formattedValue,_=z.currentValueIndex,ce=z.formattedValueIndex,me=R[_],Me=oe[ce],ie=b_(K,R),W=ie.to;return _>=W.start&&_<W.end&&S&&S.includes(me)&&Me===v?!0:me===Me};return Object.assign(Object.assign({},b),{value:D,valueIsNumericString:!1,isValidInputCharacter:B,isCharacterSame:U,onValueChange:$,format:T,removeFormatting:P,getCaretBoundary:function(z){return r7(z,e)},onKeyDown:L,onBlur:w})}function T_(e){var t=n7(e);return dp.createElement(X6,Object.assign({},t))}import a7 from"react";import{motion as i7}from"framer-motion";var s7=i7(gm),wu=a7.forwardRef((e,t)=>{var h;let y=e,{label:r,helperText:o,error:n,style:a,size:i,color:s,disabled:l,required:p,sx:c,className:u}=y,f=xe(y,["label","helperText","error","style","size","color","disabled","required","sx","className"]),d=A(s7,V({required:p,color:n?"danger":s,size:i,disabled:l,slotProps:V({input:V({ref:t},(h=f.slotProps)==null?void 0:h.input)},f.slotProps)},f));return Ee(Ln,{required:p,color:s,size:i,error:n,disabled:l,sx:c,className:u,children:[r&&A(Bn,{children:r}),d,o&&A(zn,{children:o})]})});wu.displayName="Input";var Wr=wu;var l7={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},P_=(e="USD")=>{let[t,r,o,...n]=new l_(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=l7[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 c7=k_.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=xe(a,["onChange"]);return A(T_,ne(V({},n),{onValueChange:({value:i})=>{o==null||o({target:{name:t.name,value:i}})},valueIsNumericString:!0,getInputRef:r,allowNegative:!1}))}),ny=k_.forwardRef(function(t,r){let N=t,{currency:o="USD",name:n,onChange:a,label:i,error:s,helperText:l,required:p,disabled:c,useMinorUnit:u,sx:f,className:d}=N,y=xe(N,["currency","name","onChange","label","error","helperText","required","disabled","useMinorUnit","sx","className"]),{symbol:h,thousandSeparator:g,decimalSeparator:b,placeholder:x,fixedDecimalScale:v,decimalScale:S}=P_(o),[T,P]=ro(t.value,t.defaultValue,C_(D=>a==null?void 0:a({target:{name:n,value:D}}),[a,n])),k=S_(()=>T&&u?T/Math.pow(10,S):T,[T,u,S]),C=S_(()=>t.max&&u?t.max/Math.pow(10,S):t.max,[t.max,u,S]),[O,I]=p7(!!C&&!!k&&k>C),M=C_(D=>{var L;if(D.target.value===""){P(void 0);return}let $=Number(u?(L=D.target.value)==null?void 0:L.replace(b,""):D.target.value);C&&Number(D.target.value)>C?I(!0):I(!1),P($)},[b,C,u,P]);return A(Wr,ne(V({},y),{size:"sm",ref:r,value:k,placeholder:x,onChange:M,error:s||O,disabled:c,required:p,color:s||O?"danger":t.color,label:i,helperText:O?new ry(`limit: {amount, number, ::currency/${o} unit-width-narrow}`).format({amount:C}):l,slotProps:{input:{component:c7,decimalSeparator:b,thousandSeparator:g,prefix:h,fixedDecimalScale:v,decimalScale:S,"aria-label":y["aria-label"]}},sx:ne(V({},f),{fontFamily:"monospace"}),className:d}))});var R_=ny;import $7,{useCallback as Pa,useEffect as gy,useMemo as pr,useRef as Kx,useState as z_,useId as V7}from"react";import{jsx as u7}from"react/jsx-runtime";var E_=Ft(u7("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 d7}from"framer-motion";var f7=d7(nh),Du=f7;Du.displayName="Sheet";var Go=Du;var Au=e=>{let o=e,{children:t}=o,r=xe(o,["children"]);return A(dh,ne(V({},r),{children:t}))};Au.displayName="Table";function Fx(e){let{headCells:t,showCheckbox:r,onCheckboxChange:o,slots:{checkbox:n=Pu}={},slotProps:{checkbox:a={}}={}}=e;return A("thead",{children:Ee("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))]})})}Fx.displayName="TableHead";function $x(e){let{rows:t,cellOrder:r,rowOptions:o,showCheckbox:n,onCheckboxChange:a,slots:{checkbox:i=Pu}={},slotProps:{checkbox:s={}}={}}=e;return A("tbody",{children:t.map((l,p)=>Ee("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))})}$x.displayName="TableBody";import C7,{forwardRef as S7,useCallback as qx,useEffect as k7,useImperativeHandle as R7,useRef as E7,useState as I7}from"react";function vo(e){return typeof e=="string"||e instanceof String}function Vx(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function jx(e,t){return Array.isArray(t)?jx(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 we={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Hx(e){switch(e){case we.LEFT:return we.FORCE_LEFT;case we.RIGHT:return we.FORCE_RIGHT;default:return e}}function ay(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function mp(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(!mp(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(!mp(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 iy=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?we.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?we.RIGHT:we.LEFT}};function Ce(e,t){return new Ce.InputMask(e,t)}function Ux(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?Ce.MaskedRegExp:vo(e)?Ce.MaskedPattern:e===Date?Ce.MaskedDate:e===Number?Ce.MaskedNumber:Array.isArray(e)||e===Array?Ce.MaskedDynamic:Ce.Masked&&e.prototype instanceof Ce.Masked?e:Ce.Masked&&e instanceof Ce.Masked?e.constructor:e instanceof Function?Ce.MaskedFunction:(console.warn("Mask not found for mask",e),Ce.Masked)}function ba(e){if(!e)throw new Error("Options in not defined");if(Ce.Masked){if(e.prototype instanceof Ce.Masked)return{mask:e};let t=e instanceof Ce.Masked?{mask:e}:Vx(e)&&e.mask instanceof Ce.Masked?e:{},{mask:r=void 0}=t,o=xe(t,["mask"]);if(r){let n=r.mask;return V(ne(V({},jx(r,(a,i)=>!i.startsWith("_"))),{mask:r.constructor,_mask:n}),o)}}return Vx(e)?V({},e):{mask:e}}function Nr(e){if(Ce.Masked&&e instanceof Ce.Masked)return e;let t=ba(e),r=Ux(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)}Ce.createMask=Nr;var Si=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}};Ce.MaskElement=Si;var I_=90,m7=89,xa=class extends Si{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===I_&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===m7&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===I_&&(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={}}};Ce.HTMLMaskElement=xa;var Nu=class extends xa{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}};Ce.HTMLMaskElement=xa;var hp=class extends xa{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}};Ce.HTMLContenteditableMaskElement=hp;var Mu=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}};Mu.MAX_LENGTH=100;var sy=class{constructor(t,r){this.el=t instanceof Si?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new hp(t):new Nu(t),this.masked=Nr(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Mu,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 Ce.Masked)&&this.masked.constructor===Ux(t)){this.masked.updateOptions({mask:t});return}let r=t instanceof Ce.Masked?t:Nr({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=xe(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,we.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 iy({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:we.NONE,i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==we.NONE&&(i=this.masked.nearestInputPos(i,we.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}};Ce.InputMask=sy;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}};Ce.ChangeDetails=Ve;var Mr=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 Jt=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 Mr(this.extractInput(t,r),t)}appendTail(t){return vo(t)&&(t=new Mr(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(!vo(t))throw new Error("value should be string");let n=vo(o)?new Mr(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=we.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=Hx(n),p=this.extractInput(0,i,{raw:!0}));let c=t,u=new Ve;if(n!==we.NONE&&(c=this.nearestInputPos(t,r>1&&t!==0&&!l?we.NONE:n),u.tailShift=c-t),u.aggregate(this.remove(c)),l&&n!==we.NONE&&p===this.rawInputValue)if(n===we.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===we.FORCE_RIGHT&&s.unshift();return u.aggregate(this.append(o,a,s))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!mp(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}};Jt.DEFAULTS={skipInvalid:!0};Jt.EMPTY_VALUES=[void 0,null,""];Ce.Masked=Jt;var yp=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=vo(t)?new Mr(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 Mr)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 Ce.MaskedPattern))return new Mr(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=xe(n,["chunks"]);Object.assign(this,o),this.chunks=r.map(a=>{let i="chunks"in a?new e:new Mr;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 ly=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,we.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,we.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,we.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,we.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,we.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,we.NONE),!0})}};var gp=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=we.NONE);let o=0,n=this._value.length;switch(r){case we.LEFT:case we.FORCE_LEFT:return o;case we.NONE:case we.RIGHT:case we.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 Mr("")}appendTail(t){return vo(t)&&(t=new Mr(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 ki=class{constructor(t){let p=t,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s}=p,l=xe(p,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=Nr(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=we.NONE);let o=0,n=this.value.length,a=Math.min(Math.max(t,o),n);switch(r){case we.LEFT:case we.FORCE_LEFT:return this.isComplete?a:o;case we.RIGHT:case we.FORCE_RIGHT:return this.isComplete?a:n;case we.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 ne(V({},t),{_beforeTailState:(t==null||(r=t._beforeTailState)==null?void 0:r.masked)||(t==null?void 0:t._beforeTailState)})}pad(t){return new Ve}};ki.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 py=class extends Jt{updateOptions(t){super.updateOptions(t)}_update(t){let r=t.mask;r&&(t.validate=o=>o.search(r)>=0),super._update(t)}};Ce.MaskedRegExp=py;var rr=class e extends Jt{constructor(t){super(ne(V(V({},e.DEFAULTS),t),{definitions:Object.assign({},ki.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=ba(this.blocks[f]),{expose:d,repeat:y}=a,h=xe(a,["expose","repeat"]),g=ne(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 Ce.RepeatBlock(g):Nr(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 ki(ne(V({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},ba(t[s])),{parent:this})):new gp({char:s,eager:this.eager,isUnmasking:o});this._blocks.push(p)}}get state(){return ne(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=xe(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,ne(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 yp;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 yp&&(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=we.NONE),!this._blocks.length)return 0;let o=new ly(this,t);if(r===we.NONE)return o.pushRightBeforeInput()||(o.popState(),o.pushLeftBeforeInput())?o.pos:this.displayValue.length;if(r===we.LEFT||r===we.FORCE_LEFT){if(r===we.LEFT){if(o.pushRightBeforeFilled(),o.ok&&o.pos===t)return t;o.popState()}if(o.pushLeftBeforeInput(),o.pushLeftBeforeRequired(),o.pushLeftBeforeFilled(),r===we.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===we.FORCE_LEFT?0:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:0)}return r===we.RIGHT||r===we.FORCE_RIGHT?(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.pushRightBeforeFilled()?o.pos:r===we.FORCE_RIGHT?this.displayValue.length:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:this.nearestInputPos(t,we.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}};rr.DEFAULTS=ne(V({},Jt.DEFAULTS),{lazy:!0,placeholderChar:"_"});rr.STOP_CHAR="`";rr.ESCAPE_CHAR="\\";rr.InputDefinition=ki;rr.FixedDefinition=gp;Ce.MaskedPattern=rr;var Ri=class extends rr{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=xe(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}};Ce.MaskedRange=Ri;var vp=class e extends rr{static extractPatternOptions(t){let a=t,{mask:r,pattern:o}=a,n=xe(a,["mask","pattern"]);return ne(V({},n),{mask:vo(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=xe(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(ne(V({},a),{mask:vo(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))}};vp.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ri,from:1,to:31,maxLength:2},m:{mask:Ri,from:1,to:12,maxLength:2},Y:{mask:Ri,from:1900,to:9999}});vp.DEFAULTS=ne(V({},rr.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)}});Ce.MaskedDate=vp;var Lu=class e extends Jt{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=ba(r),{expose:o}=i,n=xe(i,["expose"]),a=Nr(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 ne(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 ne(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=xe(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=xe(i,["mask"]);return mp(r,a)&&r.maskEquals(n)}):super.maskEquals(t)}typedValueEquals(t){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(t))}};Lu.DEFAULTS=ne(V({},Jt.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,we.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,we.FORCE_LEFT)))}});return a.sort((i,s)=>s.weight-i.weight||s.totalInputPositions-i.totalInputPositions),t.compiledMasks[a[0].index]}});Ce.MaskedDynamic=Lu;var Bu=class e extends rr{constructor(t){super(V(V({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){let n=t,{enum:r}=n,o=xe(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,we.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 Mr("",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,we.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}};Bu.DEFAULTS=ne(V({},rr.DEFAULTS),{matchValue:(e,t,r)=>e.indexOf(t,r)===r});Ce.MaskedEnum=Bu;var cy=class extends Jt{updateOptions(t){super.updateOptions(t)}_update(t){super._update(ne(V({},t),{validate:t.mask}))}};Ce.MaskedFunction=cy;var O_,Ei=class e extends Jt{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?"("+ay(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+r+o),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(ay).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(ay(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 we.NONE:case we.LEFT:case we.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===we.FORCE_LEFT)return o}break}case we.RIGHT:case we.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==="")}};O_=Ei;Ei.UNMASKED_RADIX=".";Ei.EMPTY_VALUES=[...Jt.EMPTY_VALUES,0];Ei.DEFAULTS=ne(V({},Jt.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[O_.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})});Ce.MaskedNumber=Ei;var uy={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Wx(e,t,r){t===void 0&&(t=uy.MASKED),r===void 0&&(r=uy.MASKED);let o=Nr(e);return n=>o.runIsolated(a=>(a[t]=n,a[r]))}function __(e,t,r,o){return Wx(t,r,o)(e)}Ce.PIPE_TYPE=uy;Ce.createPipe=Wx;Ce.pipe=__;var dy=class extends rr{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=ba(t),{repeat:a}=l,i=xe(l,["repeat"]);this._blockOpts=Object.assign({},this._blockOpts,i);let s=Nr(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(Nr(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,ne(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}};Ce.RepeatBlock=dy;try{globalThis.IMask=Ce}catch(e){}import Jx from"react";var ze=So(fC(),1);import fy from"react";var w_={mask:ze.default.oneOfType([ze.default.array,ze.default.func,ze.default.string,ze.default.instanceOf(RegExp),ze.default.oneOf([Date,Number,Ce.Masked]),ze.default.instanceOf(Ce.Masked)]),value:ze.default.any,unmask:ze.default.oneOfType([ze.default.bool,ze.default.oneOf(["typed"])]),prepare:ze.default.func,prepareChar:ze.default.func,validate:ze.default.func,commit:ze.default.func,overwrite:ze.default.oneOfType([ze.default.bool,ze.default.oneOf(["shift"])]),eager:ze.default.oneOfType([ze.default.bool,ze.default.oneOf(["append","remove"])]),skipInvalid:ze.default.bool,onAccept:ze.default.func,onComplete:ze.default.func,placeholderChar:ze.default.string,displayChar:ze.default.string,lazy:ze.default.bool,definitions:ze.default.object,blocks:ze.default.object,enum:ze.default.arrayOf(ze.default.string),maxLength:ze.default.number,from:ze.default.number,to:ze.default.number,pattern:ze.default.string,format:ze.default.func,parse:ze.default.func,autofix:ze.default.oneOfType([ze.default.bool,ze.default.oneOf(["pad"])]),radix:ze.default.string,thousandsSeparator:ze.default.string,mapToRadix:ze.default.arrayOf(ze.default.string),scale:ze.default.number,normalizeZeros:ze.default.bool,padFractionalZeros:ze.default.bool,min:ze.default.oneOfType([ze.default.number,ze.default.instanceOf(Date)]),max:ze.default.oneOfType([ze.default.number,ze.default.instanceOf(Date)]),dispatch:ze.default.func,inputRef:ze.default.oneOfType([ze.default.func,ze.default.shape({current:ze.default.object})])},D_=Object.keys(w_).filter(e=>e!=="value"),h7=["value","unmask","onAccept","onComplete","inputRef"],y7=D_.filter(e=>h7.indexOf(e)<0);function Gx(e){var t;let r=(t=class extends fy.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=Ce(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=xe(a,[]);return Object.keys(i).filter(s=>y7.indexOf(s)<0).forEach(s=>{delete i[s]}),i}_extractNonMaskProps(a){let i=xe(a,[]);return D_.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 fy.createElement(e,ne(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=w_,fy.forwardRef((n,a)=>fy.createElement(r,ne(V({},n),{ref:a})))}var g7=Gx(e=>{let o=e,{inputRef:t}=o,r=xe(o,["inputRef"]);return Jx.createElement("input",ne(V({},r),{ref:t}))}),v7=(e,t)=>Jx.createElement(g7,ne(V({},e),{ref:t})),Ta=Jx.forwardRef(v7);import{useRef as gKe,useState as vKe,useCallback as bKe,useEffect as xKe}from"react";import"react";import{jsx as b7}from"react/jsx-runtime";var Ii=Ft(b7("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 x7}from"framer-motion";var T7=x7(Om),P7=E(T7)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),zu=P7;zu.displayName="DialogActions";var Fn=zu;var O7=E(Gt,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),_7=E(Go,{name:"DatePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),w7=E("div",{name:"DatePicker",slot:"container"})({width:"100%"}),A_=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("/")},D7=C7.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=xe(a,["onChange"]);return A(Ta,ne(V({},n),{inputRef:r,onAccept:i=>o({target:{name:t.name,value:i}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Ce.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Ce.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Ce.MaskedRange,from:1900,to:9999}},format:A_,parse:i=>{let s=i.split("/");return new Date(Number(s[0]),Number(s[1])-1,Number(s[2]))},autofix:"pad",overwrite:!0}))}),my=S7((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=xe(k,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className"]),h=E7(null),[g,b]=ro(e.value,e.defaultValue||"",qx(C=>r==null?void 0:r({target:{name:e.name,value:C}}),[e.name,r])),[x,v]=I7(null),S=!!x;k7(()=>{var C;x||(C=h.current)==null||C.blur()},[x,h]),R7(t,()=>h.current,[h]);let T=qx(C=>{b(C.target.value)},[b]),P=qx(C=>{v(x?null:C.currentTarget),setTimeout(()=>{var O;(O=h.current)==null||O.focus()},0)},[x,v,h]);return A(w7,{children:A(Zr,{open:!0,children:Ee(jo,{children:[A(Wr,ne(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:D7,ref:h}},className:d,sx:ne(V({},f),{fontFamily:"monospace"}),endDecorator:A(lr,{variant:"plain",onClick:P,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":S,children:A(Ii,{})}),label:n,helperText:i})),S&&A(Kn,{onClickAway:()=>v(null),children:A(O7,{id:"date-picker-popper",open:!0,anchorEl:x,placement:"bottom-end",onMouseDown:C=>C.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":S,children:Ee(_7,{tabIndex:-1,role:"presentation",children:[A(Pi,{value:Number.isNaN(new Date(g).getTime())?void 0:[new Date(g),void 0],onChange:([C])=>{T({target:{name:e.name,value:A_(C)}}),v(null)},minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),A(Fn,{sx:{p:1},children:A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{T({target:{name:e.name,value:""}}),v(null)},children:"Clear"})})]})})})]})})})});var N_=my;import{motion as A7}from"framer-motion";var N7=A7(vh),Fu=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=xe(y,["label","error","helperText","color","size","disabled","required","minRows","maxRows","sx","className"]),d=A(N7,V({required:s,disabled:i,color:r?"danger":n,size:a,minRows:l,maxRows:p},f));return Ee(Ln,{required:s,disabled:i,color:n,size:a,error:r,sx:c,className:u,children:[t&&A(Bn,{children:t}),d,o&&A(zn,{children:o})]})};Fu.displayName="Textarea";var M_=Fu;import{useMemo as M7}from"react";import{motion as L7}from"framer-motion";var B7=L7(eh),hy=B7;hy.displayName="Option";function $u(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=xe(h,["label","helperText","error","size","color","disabled","required","onChange","sx","className"]),f=M7(()=>e.options.map(g=>typeof g!="object"?{value:g,label:g}:g),[e.options]),d=(g,b)=>{var S;let x=g||{target:{}},v=ne(V({},x),{target:{name:((S=x.target)==null?void 0:S.name)||e.name,value:b||void 0}});l==null||l(v)},y=A(oh,ne(V({},u),{required:s,disabled:i,size:n,color:o?"danger":a,onChange:d,children:f.map(g=>A(hy,{value:g.value,children:g.label},g.value))}));return Ee(Ln,{required:s,disabled:i,size:n,color:a,error:o,sx:p,className:c,children:[t&&A(Bn,{children:t}),y,r&&A(zn,{children:r})]})}$u.displayName="Select";var L_=$u;import{motion as z7}from"framer-motion";var F7=z7(xh),Vu=e=>A(F7,V({},e));Vu.displayName="Tooltip";var B_=Vu;import{motion as F_}from"framer-motion";Wi();function $_(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var j7=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"}}),yy=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function H7(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(tr,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center",children:Ee(tr,{direction:"row",spacing:.5,alignItems:"center",children:[A(lr,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-1),disabled:t===a,"aria-label":"Previous page",children:A($h,{})}),t!==a&&A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(a),children:a}),c&&A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-3),children:"..."}),s.map(u=>A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),A(wt,{variant:"soft",size:"sm",children:t}),l.map(u=>A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),p&&A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+3),children:"..."}),t!==i&&A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(i),children:i}),A(lr,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+1),disabled:t===i,"aria-label":"Next page",children:A(Vh,{})})]})})}var U7=e=>A(Fh,{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)}}),W7=E("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"100%"}}),G7=E("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>ne(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))"}})),J7=E("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),q7=F_(E_),K7=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=Kx(null),g=pr(()=>`${s}_header_${l!=null?l:i}`.trim(),[s,l,i]),b=a==null||a?U7(h):null,x={width:t,minWidth:o!=null?o:"50px",maxWidth:r,position:n?void 0:"relative",cursor:d?"pointer":"default",userSelect:"none"},v=$_(e),S=y[0],T=d&&A(q7,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":g,"aria-description":(u!=null?u:S)==="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:S)==="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 Ee(F_.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:[Ee(tr,{gap:1,direction:"row",justifyContent:v,children:[v==="end"&&T,Ee("div",{children:[l!=null?l:i,c&&p&&A(J7,{children:"*"})]}),v==="start"&&T]}),b]},i)},Y7=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]=z_(l[r]),f=Kx(null),d=pr(()=>({row:l,value:c,id:p}),[l,p,c]),y=pr(()=>!!(e.editMode&&(typeof i=="function"?i(d):i==null||i)),[e.editMode,i,d]),h=pr(()=>ne(V({},typeof e.componentProps=="function"?e.componentProps(d):e.componentProps||{}),{size:"sm"}),[e,d]),g=pr(()=>V(ne(V({},h),{onChange:P=>{var k,C;(k=h.onChange)==null||k.call(h,P),u(P.target.value),o==="select"&&((C=e.onCellEditStop)==null||C.call(e,ne(V({},d),{originalRow:l,row:ne(V({},d.row),{[r]:P.target.value}),value:P.target.value})))},onFocus:P=>{var k,C;(k=h.onFocus)==null||k.call(h,P),(C=e.onCellEditStart)==null||C.call(e,ne(V({},d),{originalRow:l,row:ne(V({},d.row),{value:c}),value:c}))},onBlur:P=>{var k,C;(k=h.onBlur)==null||k.call(h,P),o&&["number","text","longText","currency","date"].includes(o)&&((C=e.onCellEditStop)==null||C.call(e,ne(V({},d),{originalRow:l,row:ne(V({},d.row),{[r]:c}),value:c})))}}),o==="autocomplete"&&{onChangeComplete:P=>{var k,C;(k=h.onChangeComplete)==null||k.call(h,P),u(P.target.value),(C=e.onCellEditStop)==null||C.call(e,ne(V({},d),{originalRow:l,row:ne(V({},d.row),{[r]:P.target.value}),value:P.target.value}))}}),[d,l,r,c,h,o,e]),b=pr(()=>a?a(d):{date:A(N_,V({value:c},g)),currency:A(R_,V({value:c},g)),number:A(Wr,V({value:c,type:"number"},g)),text:A(Wr,V({value:c,type:"text"},g)),longText:A(M_,V({value:c},g)),autocomplete:A(xO,V({value:c,options:g.options||[c]},g)),select:A(L_,V({value:c,options:g.options||[c]},g))}[o||"text"],[c,g,o]),x=pr(()=>{if(n)return n(d);let P=c;return{link:$7.createElement(e.component||da,V({children:P},h))}[o||"text"]||P},[c,n,d,o,h,e]),v=pr(()=>y&&b?b:x,[y,b,x]),S=pr(()=>s&&e.type==="longText",[s,e.type]);return gy(()=>{u(l[r])},[l,r]),A("td",{ref:f,headers:`${t}_header_${(T=e.headerName)!=null?T:r}`,style:{textAlign:$_({type:o}),verticalAlign:y?"top":"middle"},children:S?A(B_,{title:c,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500,children:A("div",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:v})}):v},r)},X7=e=>{let{tableId:t,columns:r,rowId:o,editMode:n,noWrap:a,row:i}=e;return A(jo,{children:r.map((s,l)=>QP(Y7,ne(V({},s),{tableId:t,key:`${o}_${s.field.toString()}_${l}`,row:i,rowId:o,editMode:n,noWrap:a})))})};function Z7({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]=ro(s,[],Pa(B=>c==null?void 0:c(B),[c])),b=pr(()=>t.reduce((B,U)=>ne(V({},B),{[U.field]:U}),{}),[t]),x=Pa((B,U)=>{for(let z of h){let{field:R,sort:K}=z,oe=B[R],_=U[R],ce=b[R],me=0;if(ce.sortComparator?me=ce.sortComparator({rowA:B,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 K==="asc"?me:-me}return 0},[h,b]),v=pr(()=>h.length?[...e].sort(x):e,[e,h,x]),S=pr(()=>Array.from(new Set(l)),[l]),[T,P]=z_((a==null?void 0:a.page)||1),k=(a==null?void 0:a.pageSize)||20,C=Pa((B,U)=>{var z,R;return(R=(z=d==null?void 0:d(B))!=null?z:B==null?void 0:B.id)!=null?R:`${(U||0)+(T-1)*k}`},[d!=null?d:T,k]),O=pr(()=>new Set(p),[p]),I=pr(()=>!o||n==="server"?v:v.slice((T-1)*k,(T-1)*k+k),[v,T,k,n,o]),M=pr(()=>I.length>0&&I.every((B,U)=>O.has(C(B,U))),[I,O,C]),N=r||v.length,D=pr(()=>y!=null?y:N>0&&p.length===N,[y,p,N]),$=pr(()=>(t||Object.keys(v[0]||{}).map(U=>({field:U}))).map(U=>{var z,R,K;return ne(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:((K=b[U.field])==null?void 0:K.sortOrder)||S})}),[v,t,f,h,b,S]),L=Pa(B=>{P(B),i==null||i({page:B,pageSize:k})},[i,k]),w=Pa(B=>{let{field:U,currentSort:z,multiple:R}=B,oe=b[U].sortOrder||S;if(z!==void 0){let ce=(oe.indexOf(z)+1)%oe.length,me=oe[ce];if(!me){let ie=R?h.filter(W=>W.field!==U):[];g(ie);return}let Me=R?h.map(ie=>ie.field===U?{field:U,sort:me}:ie):[{field:U,sort:me}];g(Me)}else{let _=R?[...h,{field:U,sort:oe[0]}]:[{field:U,sort:oe[0]}];g(_)}},[S,b,h,g]);return gy(()=>{a||L(1)},[N,L,a]),gy(()=>{let B=Math.max(1,Math.ceil(N/k));T>B&&L(B)},[T,N,k,L]),gy(()=>{u==null||u([])},[T]),{rowCount:N,page:T,pageSize:k,onPaginationModelChange:L,getId:C,HeadCell:K7,BodyRow:X7,dataInPage:I,handleSortChange:w,isAllSelected:M,isTotalSelected:D,isSelectedRow:Pa(B=>O.has(B),[O]),onAllCheckboxChange:Pa(()=>{u==null||u(M?[]:I.map(C))},[M,I,u,C]),onCheckboxChange:Pa((B,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:Pa(()=>{u==null||u(D?[]:v.map(C),!D)},[D,v,u,C])}}function Yx(e){let Te=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=Pu,toolbar:x,footer:v,loadingOverlay:S=()=>A(Jc,{value:8,variant:"plain"})}={},slotProps:{checkbox:T={},toolbar:P,background:k={}}={},stripe:C}=Te,O=xe(Te,["rows","checkboxSelection","editMode","selectionModel","onSelectionModelChange","disableSelectionOnClick","rowCount","columns","onPaginationModelChange","pagination","paginationMode","paginationModel","sortModel","sortOrder","onSortModelChange","loading","slots","slotProps","stripe"]),I=V7(),M=Kx(null),{columns:N,isAllSelected:D,isSelectedRow:$,onAllCheckboxChange:L,onCheckboxChange:w,getId:B,rowCount:U,page:z,pageSize:R,onPaginationModelChange:K,handleSortChange:oe,dataInPage:_,isTotalSelected:ce,onTotalSelect:me,HeadCell:Me,BodyRow:ie}=Z7(e),W=Lh({count:_.length,getScrollElement:()=>M.current,estimateSize:()=>32,measureElement:Le=>Le.clientHeight,overscan:20}),fe=pr(()=>({page:z,pageSize:R}),[z,R]),he=W.getTotalSize(),ke=W.getVirtualItems();return Ee(Fh,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"},children:[(!!r||!!x)&&Ee(tr,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center",children:[!!r&&Ee(tr,{direction:"row",spacing:1,children:[!D&&Ee(oo,{level:"body-xs",children:[yy((n==null?void 0:n.length)||0)," items selected"]}),D&&!ce&&Ee(tr,{direction:"row",spacing:1,alignItems:"center",children:[Ee(oo,{level:"body-xs",children:["All ",yy((n==null?void 0:n.length)||0)," items on this page are selected."]}),Ee(wt,{size:"sm",variant:"plain",onClick:me,children:["Select all ",yy(U!=null?U:t.length)," items"]})]}),ce&&Ee(tr,{direction:"row",spacing:1,alignItems:"center",children:[Ee(oo,{level:"body-xs",children:["All ",yy(U!=null?U:t.length)," items are selected."]}),A(wt,{size:"sm",variant:"plain",color:"danger",onClick:me,children:"Cancel"})]})]}),x&&A(x,V({},P||{}))]}),A(Go,ne(V({variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:M},k),{children:Ee(Au,ne(V({},O),{children:[A("thead",{children:Ee("tr",{children:[r&&A("th",{style:{width:"40px",textAlign:"center"},children:A(b,V({onChange:L,checked:D,indeterminate:(n||[]).length>0&&!D},T))}),N.map((Le,Ke)=>A(Me,V({tableId:I,stickyHeader:e.stickyHeader,editMode:!!Le.isCellEditable,onSortChange:oe},Le),`${Le.field.toString()}_${Ke}`))]})}),Ee(W7,{style:{height:`${he}px`},children:[!!g&&A(j7,{children:A("td",{children:A(Fh,{sx:{position:"absolute",top:0,left:0,right:0},children:A(S,{})})})}),ke.map((Le,Ke)=>{let re=Le.index,Z=_[re],ve=B(Z,re),ye=C&&(C==="even"&&(re+1)%2===0||C==="odd"&&(re+1)%2===1);return Ee(G7,{role:r&&!i?"checkbox":void 0,tabIndex:r&&!i?-1:void 0,onClick:r&&!i?$e=>w($e,ve):void 0,"aria-checked":r&&!i?$(ve):void 0,striped:ye,style:{height:`${Le.size}px`,transform:`translateY(${Le.start-Ke*Le.size}px)`},children:[r&&A("th",{scope:"row",style:{textAlign:"center"},children:A(b,V({onChange:$e=>w($e,ve),checked:$(ve)},T))}),A(ie,{tableId:I,columns:N,row:Z,rowId:ve,editMode:o,noWrap:e.noWrap})]},ve)})]}),v&&A(v,{})]}))})),R<U&&c&&A(H7,{paginationModel:fe,rowCount:U,onPageChange:K})]})}Yx.displayName="DataTable";import Q7,{forwardRef as eG,useCallback as vy,useEffect as tG,useImperativeHandle as rG,useMemo as oG,useRef as nG,useState as aG}from"react";var iG=E(Gt,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),sG=E(Go,{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})),lG=E("div",{name:"DateRangePicker",slot:"container"})({width:"100%"}),V_=([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(" - ")},j_=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]))]},pG=Q7.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=xe(a,["onChange"]);return A(Ta,ne(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:Ce.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Ce.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Ce.MaskedRange,from:1900,to:9999}},format:V_,parse:j_,autofix:"pad",overwrite:!0}))}),Xx=eG((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=xe(O,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className"]),h=nG(null),[g,b]=ro(e.value,e.defaultValue||"",vy(I=>r==null?void 0:r({target:{name:e.name,value:I}}),[e.name,r])),[x,v]=aG(null),S=!!x,T=oG(()=>g?j_(g):void 0,[g]);tG(()=>{var I;x||(I=h.current)==null||I.blur()},[x,h]),rG(t,()=>h.current,[h]);let P=vy(I=>{b(I.target.value)},[b]),k=vy(I=>{var M;v(x?null:I.currentTarget),(M=h.current)==null||M.focus()},[x,v,h]),C=vy(([I,M])=>{!I||!M||(b(V_([I,M])),v(null))},[b,v]);return A(lG,{children:A(Zr,{open:!0,children:Ee(jo,{children:[A(Wr,ne(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:pG,ref:h}},error:a,className:d,sx:ne(V({},f),{fontFamily:"monospace"}),endDecorator:A(lr,{variant:"plain",onClick:k,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":S,children:A(Ii,{})}),label:n,helperText:i})),S&&A(Kn,{onClickAway:()=>v(null),children:A(iG,{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":S,children:Ee(sG,{tabIndex:-1,role:"presentation",children:[A(Pi,{rangeSelection:!0,defaultValue:T,onChange:C,minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),A(Fn,{sx:{p:1},children:A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{b(""),v(null)},children:"Clear"})})]})})})]})})})});Xx.displayName="DateRangePicker";import{motion as cG}from"framer-motion";var uG=cG(Kl),Zx=e=>{var i;let a=e,{children:t,size:r}=a,o=xe(a,["children","size"]),n=dc();return A(uG,ne(V({},o),{slotProps:ne(V({},o.slotProps),{content:ne(V({},(i=o.slotProps)==null?void 0:i.content),{sx:{bgcolor:"transparent",boxShadow:"none",[n.breakpoints.down("md")]:{width:"100%"}}})}),sx:ne(V({},e.sx),{"--Drawer-horizontalSize":{sm:"350px",md:"576px",lg:"768px"}[r||"md"]}),children:t}))};Zx.displayName="Drawer";import{motion as dG}from"framer-motion";var fG=dG(wm),mG=E(fG)(({theme:e})=>({padding:e.spacing(0,6,5)})),ju=mG;ju.displayName="DialogContent";var by=ju;import{motion as hG}from"framer-motion";var yG=hG(Dm),gG=E(yG)(({theme:e})=>({padding:e.spacing(4,6)})),Hu=gG;Hu.displayName="DialogTitle";var xy=Hu;import TG from"react";import{motion as Qx}from"framer-motion";var vG=Qx(Mm),eT=vG;eT.displayName="Modal";var H_=E(Ym)({padding:0}),Uu=H_;Uu.displayName="ModalDialog";var bG=E(Qx(Km))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),Ty=bG;Ty.displayName="ModalClose";var xG=Qx(Zm),tT=xG;tT.displayName="ModalOverflow";function rT(e){let n=e,{title:t,children:r}=n,o=xe(n,["title","children"]);return Ee(H_,ne(V({},o),{children:[A(Ty,{}),A(xy,{children:t}),A(by,{children:r})]}))}rT.displayName="ModalFrame";var PG=E(Uu,{name:"Dialog",slot:"Root"})({padding:0}),oT=TG.forwardRef((e,t)=>{let s=e,{title:r,children:o,actions:n,fullscreen:a}=s,i=xe(s,["title","children","actions","fullscreen"]);return Ee(PG,ne(V({layout:a?"fullscreen":"center",ref:t},i),{children:[A(xy,{children:r}),A(by,{children:o}),A(Fn,{children:n})]}))});oT.displayName="DialogFrame";import{motion as CG}from"framer-motion";var SG=CG(Am),Wu=e=>A(SG,V({},e));Wu.displayName="Divider";import{motion as kG}from"framer-motion";var RG=kG(Kl),nT=e=>{var n;let o=e,{children:t}=o,r=xe(o,["children"]);return A(RG,ne(V({},r),{slotProps:ne(V({},r.slotProps),{content:ne(V({},(n=r.slotProps)==null?void 0:n.content),{sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}})}),children:t}))};nT.displayName="InsetDrawer";import{motion as EG}from"framer-motion";var IG=EG(Vm),aT=IG;aT.displayName="Grid";function U_(e,t){let r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var OG=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_G=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wG={};function Py(e,t){return((t||wG).jsx?_G:OG).test(e)}var DG=/[ \t\n\f\r]/g;function iT(e){return typeof e=="object"?e.type==="text"?W_(e.value):!1:W_(e)}function W_(e){return e.replace(DG,"")===""}var Ca=class{constructor(t,r,o){this.property=t,this.normal=r,o&&(this.space=o)}};Ca.prototype.property={};Ca.prototype.normal={};Ca.prototype.space=null;function sT(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 Ca(r,o,t)}function Gu(e){return e.toLowerCase()}var Lr=class{constructor(t,r){this.property=t,this.attribute=r}};Lr.prototype.space=null;Lr.prototype.boolean=!1;Lr.prototype.booleanish=!1;Lr.prototype.overloadedBoolean=!1;Lr.prototype.number=!1;Lr.prototype.commaSeparated=!1;Lr.prototype.spaceSeparated=!1;Lr.prototype.commaOrSpaceSeparated=!1;Lr.prototype.mustUseProperty=!1;Lr.prototype.defined=!1;var Ju={};Pn(Ju,{boolean:()=>Ue,booleanish:()=>Dt,commaOrSpaceSeparated:()=>no,commaSeparated:()=>Oi,number:()=>ge,overloadedBoolean:()=>lT,spaceSeparated:()=>dt});var AG=0,Ue=As(),Dt=As(),lT=As(),ge=As(),dt=As(),Oi=As(),no=As();function As(){return 2**++AG}var pT=Object.keys(Ju),Ns=class extends Lr{constructor(t,r,o,n){let a=-1;if(super(t,r),G_(this,"space",n),typeof o=="number")for(;++a<pT.length;){let i=pT[a];G_(this,pT[a],(o&Ju[i])===Ju[i])}}};Ns.prototype.defined=!0;function G_(e,t,r){r&&(e[t]=r)}var NG={}.hasOwnProperty;function Jo(e){let t={},r={},o;for(o in e.properties)if(NG.call(e.properties,o)){let n=e.properties[o],a=new Ns(o,e.transform(e.attributes||{},o),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,r[Gu(o)]=o,r[Gu(a.attribute)]=o}return new Ca(t,r,e.space)}var cT=Jo({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 uT=Jo({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Cy(e,t){return t in e?e[t]:t}function Sy(e,t){return Cy(e,t.toLowerCase())}var dT=Jo({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Sy,properties:{xmlns:null,xmlnsXLink:null}});var fT=Jo({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:dt,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:ge,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:dt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Dt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null}});var J_=Jo({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Sy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Oi,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:dt,autoFocus:Ue,autoPlay:Ue,blocking:dt,capture:null,charSet:null,checked:Ue,cite:null,className:dt,cols:ge,colSpan:null,content:null,contentEditable:Dt,controls:Ue,controlsList:dt,coords:ge|Oi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:lT,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:dt,height:ge,hidden:Ue,high:ge,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:dt,itemRef:dt,itemScope:Ue,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,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:Ue,optimum:ge,pattern:null,ping:dt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:dt,required:Ue,reversed:Ue,rows:ge,rowSpan:ge,sandbox:dt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Dt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:ge,security:null,unselectable:null}});var q_=Jo({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:Cy,properties:{about:no,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:dt,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:Oi,g2:Oi,glyphName:Oi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:no,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:no,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:no,rev:no,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:no,requiredFeatures:no,requiredFonts:no,requiredFormats:no,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:no,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:no,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:no,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var MG=/^data[-\w.:]+$/i,K_=/-[a-z]/g,LG=/[A-Z]/g;function mT(e,t){let r=Gu(t),o=t,n=Lr;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&MG.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(K_,zG);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!K_.test(a)){let i=a.replace(LG,BG);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}n=Ns}return new n(o,t)}function BG(e){return"-"+e.toLowerCase()}function zG(e){return e.charAt(1).toUpperCase()}var hT={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 Y_=sT([uT,cT,dT,fT,J_],"html"),ky=sT([uT,cT,dT,fT,q_],"svg");function X_(e){return e.join(" ").trim()}var yT=So(nw(),1),aw=yT.default.default||yT.default;var Ry=iw("end"),bp=iw("start");function iw(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 gT(e){let t=bp(e),r=Ry(e);if(t&&r)return{start:t,end:r}}function _i(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?sw(e.position):"start"in e||"end"in e?sw(e):"line"in e||"column"in e?vT(e):""}function vT(e){return lw(e&&e.line)+":"+lw(e&&e.column)}function sw(e){return vT(e&&e.start)+"-"+vT(e&&e.end)}function lw(e){return e&&typeof e=="number"?e:1}var $t=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=_i(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}};$t.prototype.file="";$t.prototype.name="";$t.prototype.reason="";$t.prototype.message="";$t.prototype.stack="";$t.prototype.column=void 0;$t.prototype.line=void 0;$t.prototype.ancestors=void 0;$t.prototype.cause=void 0;$t.prototype.fatal=void 0;$t.prototype.place=void 0;$t.prototype.ruleId=void 0;$t.prototype.source=void 0;var bT={}.hasOwnProperty,ZG=new Map,QG=/[A-Z]/g,e8=/-([a-z])/g,t8=new Set(["table","tbody","thead","tfoot","tr"]),r8=new Set(["td","th"]),pw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xT(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=c8(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=p8(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"?ky:Y_,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=cw(n,e,void 0);return a&&typeof a!="string"?a:n.create(e,n.Fragment,{children:a||void 0},void 0)}function cw(e,t,r){if(t.type==="element")return o8(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return n8(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return i8(e,t,r);if(t.type==="mdxjsEsm")return a8(e,t);if(t.type==="root")return s8(e,t,r);if(t.type==="text")return l8(e,t)}function o8(e,t,r){let o=e.schema,n=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(n=ky,e.schema=n),e.ancestors.push(t);let a=dw(e,t.tagName,!1),i=u8(e,t),s=PT(e,t);return t8.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!iT(l):!0})),uw(e,i,a,t),TT(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function n8(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)}Ku(e,t.position)}function a8(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ku(e,t.position)}function i8(e,t,r){let o=e.schema,n=o;t.name==="svg"&&o.space==="html"&&(n=ky,e.schema=n),e.ancestors.push(t);let a=t.name===null?e.Fragment:dw(e,t.name,!0),i=d8(e,t),s=PT(e,t);return uw(e,i,a,t),TT(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function s8(e,t,r){let o={};return TT(o,PT(e,t)),e.create(t,e.Fragment,o,r)}function l8(e,t){return t.value}function uw(e,t,r,o){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=o)}function TT(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function p8(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 c8(e,t){return r;function r(o,n,a,i){let s=Array.isArray(a.children),l=bp(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 u8(e,t){let r={},o,n;for(n in t.properties)if(n!=="children"&&bT.call(t.properties,n)){let a=f8(e,n,t.properties[n]);if(a){let[i,s]=a;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&r8.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 d8(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 Ku(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 Ku(e,t.position);else a=o.value===null?!0:o.value;r[n]=a}return r}function PT(e,t){let r=[],o=-1,n=e.passKeys?new Map:ZG;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=cw(e,a,i);s!==void 0&&r.push(s)}return r}function f8(e,t,r){let o=mT(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=o.commaSeparated?U_(r):X_(r)),o.property==="style"){let n=typeof r=="object"?r:m8(e,String(r));return e.stylePropertyNameCase==="css"&&(n=h8(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&o.space?hT[o.property]||o.property:o.attribute,r]}}function m8(e,t){let r={};try{aw(t,o)}catch(n){if(!e.ignoreInvalidStyle){let a=n,i=new $t("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=pw+"#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(e8,g8)),r[i]=a}}function dw(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=Py(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=Py(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){let n=o.value;return bT.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(o);Ku(e)}function Ku(e,t){let r=new $t("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=pw+"#cannot-handle-mdx-estrees-without-createevaluater",r}function h8(e){let t={},r;for(r in e)bT.call(e,r)&&(t[y8(r)]=e[r]);return t}function y8(e){let t=e.replace(QG,v8);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function g8(e,t){return t.toUpperCase()}function v8(e){return"-"+e.toLowerCase()}var Yu={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 Cq,jsx as Sq,jsxs as kq}from"react/jsx-runtime";var b8={};function CT(e,t){let r=t||b8,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return mw(e,o,n)}function mw(e,t,r){if(x8(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 fw(e.children,t,r)}return Array.isArray(e)?fw(e,t,r):""}function fw(e,t,r){let o=[],n=-1;for(;++n<e.length;)o[n]=mw(e[n],t,r);return o.join("")}function x8(e){return!!(e&&typeof e=="object")}var hw=document.createElement("i");function xp(e){let t="&"+e+";";hw.innerHTML=t;let r=hw.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Br(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 Gr(e,t){return e.length>0?(Br(e,e.length,0,t),e):t}var yw={}.hasOwnProperty;function gw(e){let t={},r=-1;for(;++r<e.length;)T8(t,e[r]);return t}function T8(e,t){let r;for(r in t){let n=(yw.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r],i;if(a)for(i in a){yw.call(n,i)||(n[i]=[]);let s=a[i];P8(n[i],Array.isArray(s)?s:s?[s]:[])}}}function P8(e,t){let r=-1,o=[];for(;++r<t.length;)(t[r].add==="after"?e:o).push(t[r]);Br(e,0,0,o)}function Ey(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 Sa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var bo=wi(/[A-Za-z]/),cr=wi(/[\dA-Za-z]/),vw=wi(/[#-'*+\--9=?A-Z^-~]/);function Xu(e){return e!==null&&(e<32||e===127)}var Zu=wi(/\d/),bw=wi(/[\dA-Fa-f]/),xw=wi(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function Vt(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}var Tw=wi(new RegExp("\\p{P}|\\p{S}","u")),Pw=wi(/\s/);function wi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function qo(e){let t=[],r=-1,o=0,n=0;for(;++r<e.length;){let a=e.charCodeAt(r),i="";if(a===37&&cr(e.charCodeAt(r+1))&&cr(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 qe(e,t,r,o){let n=o?o-1:Number.POSITIVE_INFINITY,a=0;return i;function i(l){return We(l)?(e.enter(r),s(l)):t(l)}function s(l){return We(l)&&a++<n?(e.consume(l),s):(e.exit(r),t(l))}}var Cw={tokenize:C8};function C8(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"),qe(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 De(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),i)}}var kw={tokenize:S8},Sw={tokenize:k8};function S8(e){let t=this,r=[],o=0,n,a,i;return s;function s(v){if(o<r.length){let S=r[o];return t.containerState=S[1],e.attempt(S[0].continuation,l,p)(v)}return p(v)}function l(v){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();let S=t.events.length,T=S,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=S;for(;k<t.events.length;)t.events[k][1].end=Object.assign({},P),k++;return Br(t.events,T+1,0,t.events.slice(S)),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(Sw,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(Sw,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 De(v)?(e.consume(v),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(v),h)}function g(v,S){let T=t.sliceStream(v);if(S&&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,C=k,O,I;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){if(O){I=t.events[C][1].end;break}O=!0}for(b(o),P=k;P<t.events.length;)t.events[P][1].end=Object.assign({},I),P++;Br(t.events,C+1,0,t.events.slice(k)),t.events.length=P}}function b(v){let S=r.length;for(;S-- >v;){let T=r[S];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 k8(e,t,r){return qe(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ST(e){if(e===null||Vt(e)||Pw(e))return 1;if(Tw(e))return 2}function Tp(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 Qu={name:"attention",tokenize:E8,resolveAll:R8};function R8(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);Rw(u,-l),Rw(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=Gr(p,[["enter",e[o][1],t],["exit",e[o][1],t]])),p=Gr(p,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",a,t]]),p=Gr(p,Tp(t.parser.constructs.insideSpan.null,e.slice(o+1,r),t)),p=Gr(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=Gr(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,Br(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 E8(e,t){let r=this.parser.constructs.attentionMarkers.null,o=this.previous,n=ST(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=ST(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 Rw(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var kT={name:"autolink",tokenize:I8};function I8(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 bo(d)?(e.consume(d),i):p(d)}function i(d){return d===43||d===45||d===46||cr(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||cr(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||Xu(d)?r(d):(e.consume(d),l)}function p(d){return d===64?(e.consume(d),c):vw(d)?(e.consume(d),p):r(d)}function c(d){return cr(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||cr(d))&&o++<63){let y=d===45?f:u;return e.consume(d),y}return r(d)}}var Di={tokenize:O8,partial:!0};function O8(e,t,r){return o;function o(a){return We(a)?qe(e,n,"linePrefix")(a):n(a)}function n(a){return a===null||De(a)?t(a):r(a)}}var Iy={name:"blockQuote",tokenize:_8,continuation:{tokenize:w8},exit:D8};function _8(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 We(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function w8(e,t,r){let o=this;return n;function n(i){return We(i)?qe(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(Iy,t,r)(i)}}function D8(e){e.exit("blockQuote")}var Oy={name:"characterEscape",tokenize:A8};function A8(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 xw(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}var _y={name:"characterReference",tokenize:N8};function N8(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=cr,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=bw,c):(e.enter("characterReferenceValue"),a=7,i=Zu,c(u))}function c(u){if(u===59&&n){let f=e.exit("characterReferenceValue");return i===cr&&!xp(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 Ew={tokenize:L8,partial:!0},wy={name:"codeFenced",tokenize:M8,concrete:!0};function M8(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"),We(P)?qe(e,u,"whitespace")(P):u(P))}function u(P){return P===null||De(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(Ew,h,S)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(P))}function f(P){return P===null||De(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(P)):We(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),qe(e,d,"whitespace")(P)):P===96&&P===s?r(P):(e.consume(P),f)}function d(P){return P===null||De(P)?u(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(P))}function y(P){return P===null||De(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,S,g)(P)}function g(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),b}function b(P){return a>0&&We(P)?qe(e,x,"linePrefix",a+1)(P):x(P)}function x(P){return P===null||De(P)?e.check(Ew,h,S)(P):(e.enter("codeFlowValue"),v(P))}function v(P){return P===null||De(P)?(e.exit("codeFlowValue"),x(P)):(e.consume(P),v)}function S(P){return e.exit("codeFenced"),t(P)}function T(P,k,C){let O=0;return I;function I(L){return P.enter("lineEnding"),P.consume(L),P.exit("lineEnding"),M}function M(L){return P.enter("codeFencedFence"),We(L)?qe(P,N,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):N(L)}function N(L){return L===s?(P.enter("codeFencedFenceSequence"),D(L)):C(L)}function D(L){return L===s?(O++,P.consume(L),D):O>=i?(P.exit("codeFencedFenceSequence"),We(L)?qe(P,$,"whitespace")(L):$(L)):C(L)}function $(L){return L===null||De(L)?(P.exit("codeFencedFence"),k(L)):C(L)}}}function L8(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 ed={name:"codeIndented",tokenize:z8},B8={tokenize:F8,partial:!0};function z8(e,t,r){let o=this;return n;function n(p){return e.enter("codeIndented"),qe(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):De(p)?e.attempt(B8,i,l)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||De(p)?(e.exit("codeFlowValue"),i(p)):(e.consume(p),s)}function l(p){return e.exit("codeIndented"),t(p)}}function F8(e,t,r){let o=this;return n;function n(i){return o.parser.lazy[o.now().line]?r(i):De(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n):qe(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):De(i)?n(i):r(i)}}var RT={name:"codeText",tokenize:j8,resolve:$8,previous:V8};function $8(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 V8(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function j8(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)):De(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||De(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 Dy=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&&td(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),td(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),td(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);td(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);td(this.left,r.reverse())}}};function td(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 Ay(e){let t={},r=-1,o,n,a,i,s,l,p,c=new Dy(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,H8(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 Br(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!p}function H8(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 ET={tokenize:G8,resolve:W8},U8={tokenize:J8,partial:!0};function W8(e){return Ay(e),e}function G8(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):De(s)?e.check(U8,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 J8(e,t,r){let o=this;return n;function n(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),qe(e,a,"linePrefix")}function a(i){if(i===null||De(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 Ny(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||Xu(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||De(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||Vt(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||Xu(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 My(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):De(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||De(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!We(d)),d===92?f:u)}function f(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function Ly(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):De(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),qe(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===i||f===null||De(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 Ls(e,t){let r;return o;function o(n){return De(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,o):We(n)?qe(e,o,r?"linePrefix":"lineSuffix")(n):t(n)}}var IT={name:"definition",tokenize:K8},q8={tokenize:Y8,partial:!0};function K8(e,t,r){let o=this,n;return a;function a(d){return e.enter("definition"),i(d)}function i(d){return My.call(o,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return n=Sa(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 Vt(d)?Ls(e,p)(d):p(d)}function p(d){return Ny(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(q8,u,u)(d)}function u(d){return We(d)?qe(e,f,"whitespace")(d):f(d)}function f(d){return d===null||De(d)?(e.exit("definition"),o.parser.defined.push(n),t(d)):r(d)}}function Y8(e,t,r){return o;function o(s){return Vt(s)?Ls(e,n)(s):r(s)}function n(s){return Ly(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return We(s)?qe(e,i,"whitespace")(s):i(s)}function i(s){return s===null||De(s)?t(s):r(s)}}var OT={name:"hardBreakEscape",tokenize:X8};function X8(e,t,r){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),n}function n(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}var _T={name:"headingAtx",tokenize:Q8,resolve:Z8};function Z8(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"},Br(e,o,r-o+1,[["enter",n,t],["enter",a,t],["exit",a,t],["exit",n,t]])),e}function Q8(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||Vt(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||De(c)?(e.exit("atxHeading"),t(c)):We(c)?qe(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||Vt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),p)}}var Iw=["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"],wT=["pre","script","style","textarea"];var DT={name:"htmlFlow",tokenize:oJ,resolveTo:rJ,concrete:!0},eJ={tokenize:aJ,partial:!0},tJ={tokenize:nJ,partial:!0};function rJ(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 oJ(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):bo(_)?(e.consume(_),i=String.fromCharCode(_),g):r(_)}function f(_){return _===45?(e.consume(_),n=2,d):_===91?(e.consume(_),n=5,s=0,y):bo(_)?(e.consume(_),n=4,o.interrupt?t:R):r(_)}function d(_){return _===45?(e.consume(_),o.interrupt?t:R):r(_)}function y(_){let ce="CDATA[";return _===ce.charCodeAt(s++)?(e.consume(_),s===ce.length?o.interrupt?t:N:y):r(_)}function h(_){return bo(_)?(e.consume(_),i=String.fromCharCode(_),g):r(_)}function g(_){if(_===null||_===47||_===62||Vt(_)){let ce=_===47,me=i.toLowerCase();return!ce&&!a&&wT.includes(me)?(n=1,o.interrupt?t(_):N(_)):Iw.includes(i.toLowerCase())?(n=6,ce?(e.consume(_),b):o.interrupt?t(_):N(_)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(_):a?x(_):v(_))}return _===45||cr(_)?(e.consume(_),i+=String.fromCharCode(_),g):r(_)}function b(_){return _===62?(e.consume(_),o.interrupt?t:N):r(_)}function x(_){return We(_)?(e.consume(_),x):I(_)}function v(_){return _===47?(e.consume(_),I):_===58||_===95||bo(_)?(e.consume(_),S):We(_)?(e.consume(_),v):I(_)}function S(_){return _===45||_===46||_===58||_===95||cr(_)?(e.consume(_),S):T(_)}function T(_){return _===61?(e.consume(_),P):We(_)?(e.consume(_),T):v(_)}function P(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(e.consume(_),l=_,k):We(_)?(e.consume(_),P):C(_)}function k(_){return _===l?(e.consume(_),l=null,O):_===null||De(_)?r(_):(e.consume(_),k)}function C(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Vt(_)?T(_):(e.consume(_),C)}function O(_){return _===47||_===62||We(_)?v(_):r(_)}function I(_){return _===62?(e.consume(_),M):r(_)}function M(_){return _===null||De(_)?N(_):We(_)?(e.consume(_),M):r(_)}function N(_){return _===45&&n===2?(e.consume(_),w):_===60&&n===1?(e.consume(_),B):_===62&&n===4?(e.consume(_),K):_===63&&n===3?(e.consume(_),R):_===93&&n===5?(e.consume(_),z):De(_)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(eJ,oe,D)(_)):_===null||De(_)?(e.exit("htmlFlowData"),D(_)):(e.consume(_),N)}function D(_){return e.check(tJ,$,oe)(_)}function $(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),L}function L(_){return _===null||De(_)?D(_):(e.enter("htmlFlowData"),N(_))}function w(_){return _===45?(e.consume(_),R):N(_)}function B(_){return _===47?(e.consume(_),i="",U):N(_)}function U(_){if(_===62){let ce=i.toLowerCase();return wT.includes(ce)?(e.consume(_),K):N(_)}return bo(_)&&i.length<8?(e.consume(_),i+=String.fromCharCode(_),U):N(_)}function z(_){return _===93?(e.consume(_),R):N(_)}function R(_){return _===62?(e.consume(_),K):_===45&&n===2?(e.consume(_),R):N(_)}function K(_){return _===null||De(_)?(e.exit("htmlFlowData"),oe(_)):(e.consume(_),K)}function oe(_){return e.exit("htmlFlow"),t(_)}}function nJ(e,t,r){let o=this;return n;function n(i){return De(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 aJ(e,t,r){return o;function o(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(Di,t,r)}}var AT={name:"htmlText",tokenize:iJ};function iJ(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):bo(R)?(e.consume(R),C):r(R)}function p(R){return R===45?(e.consume(R),c):R===91?(e.consume(R),a=0,y):bo(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):De(R)?(i=u,B(R)):(e.consume(R),u)}function f(R){return R===45?(e.consume(R),d):u(R)}function d(R){return R===62?w(R):R===45?f(R):u(R)}function y(R){let K="CDATA[";return R===K.charCodeAt(a++)?(e.consume(R),a===K.length?h:y):r(R)}function h(R){return R===null?r(R):R===93?(e.consume(R),g):De(R)?(i=h,B(R)):(e.consume(R),h)}function g(R){return R===93?(e.consume(R),b):h(R)}function b(R){return R===62?w(R):R===93?(e.consume(R),b):h(R)}function x(R){return R===null||R===62?w(R):De(R)?(i=x,B(R)):(e.consume(R),x)}function v(R){return R===null?r(R):R===63?(e.consume(R),S):De(R)?(i=v,B(R)):(e.consume(R),v)}function S(R){return R===62?w(R):v(R)}function T(R){return bo(R)?(e.consume(R),P):r(R)}function P(R){return R===45||cr(R)?(e.consume(R),P):k(R)}function k(R){return De(R)?(i=k,B(R)):We(R)?(e.consume(R),k):w(R)}function C(R){return R===45||cr(R)?(e.consume(R),C):R===47||R===62||Vt(R)?O(R):r(R)}function O(R){return R===47?(e.consume(R),w):R===58||R===95||bo(R)?(e.consume(R),I):De(R)?(i=O,B(R)):We(R)?(e.consume(R),O):w(R)}function I(R){return R===45||R===46||R===58||R===95||cr(R)?(e.consume(R),I):M(R)}function M(R){return R===61?(e.consume(R),N):De(R)?(i=M,B(R)):We(R)?(e.consume(R),M):O(R)}function N(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),n=R,D):De(R)?(i=N,B(R)):We(R)?(e.consume(R),N):(e.consume(R),$)}function D(R){return R===n?(e.consume(R),n=void 0,L):R===null?r(R):De(R)?(i=D,B(R)):(e.consume(R),D)}function $(R){return R===null||R===34||R===39||R===60||R===61||R===96?r(R):R===47||R===62||Vt(R)?O(R):(e.consume(R),$)}function L(R){return R===47||R===62||Vt(R)?O(R):r(R)}function w(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):r(R)}function B(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),U}function U(R){return We(R)?qe(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 Bs={name:"labelEnd",tokenize:dJ,resolveTo:uJ,resolveAll:cJ},sJ={tokenize:fJ},lJ={tokenize:mJ},pJ={tokenize:hJ};function cJ(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 uJ(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=Gr(s,e.slice(a+1,a+o+3)),s=Gr(s,[["enter",c,t]]),s=Gr(s,Tp(t.parser.constructs.insideSpan.null,e.slice(a+o+4,i-3),t)),s=Gr(s,[["exit",c,t],e[i-2],e[i-1],["exit",p,t]]),s=Gr(s,e.slice(i+1)),s=Gr(s,[["exit",l,t]]),Br(e,a,e.length,s),e}function dJ(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(Sa(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(sJ,c,i?c:u)(f):f===91?e.attempt(lJ,c,i?p:u)(f):i?c(f):u(f)}function p(f){return e.attempt(pJ,c,u)(f)}function c(f){return t(f)}function u(f){return a._balanced=!0,r(f)}}function fJ(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 Vt(u)?Ls(e,a)(u):a(u)}function a(u){return u===41?c(u):Ny(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function i(u){return Vt(u)?Ls(e,l)(u):c(u)}function s(u){return r(u)}function l(u){return u===34||u===39||u===40?Ly(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):c(u)}function p(u){return Vt(u)?Ls(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 mJ(e,t,r){let o=this;return n;function n(s){return My.call(o,e,a,i,"reference","referenceMarker","referenceString")(s)}function a(s){return o.parser.defined.includes(Sa(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function i(s){return r(s)}}function hJ(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 NT={name:"labelStartImage",tokenize:yJ,resolveAll:Bs.resolveAll};function yJ(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 MT={name:"labelStartLink",tokenize:gJ,resolveAll:Bs.resolveAll};function gJ(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 rd={name:"lineEnding",tokenize:vJ};function vJ(e,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),qe(e,t,"linePrefix")}}var zs={name:"thematicBreak",tokenize:bJ};function bJ(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||De(p))?(e.exit("thematicBreak"),t(p)):r(p)}function l(p){return p===n?(e.consume(p),o++,l):(e.exit("thematicBreakSequence"),We(p)?qe(e,s,"whitespace")(p):s(p))}}var zr={name:"list",tokenize:PJ,continuation:{tokenize:CJ},exit:kJ},xJ={tokenize:RJ,partial:!0},TJ={tokenize:SJ,partial:!0};function PJ(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:Zu(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(zs,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 Zu(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(Di,o.interrupt?r:c,e.attempt(xJ,f,u))}function c(d){return o.containerState.initialBlankLine=!0,a++,f(d)}function u(d){return We(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 CJ(e,t,r){let o=this;return o.containerState._closeFlow=void 0,e.check(Di,n,a);function n(s){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,qe(e,t,"listItemIndent",o.containerState.size+1)(s)}function a(s){return o.containerState.furtherBlankLines||!We(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(TJ,t,i)(s))}function i(s){return o.containerState._closeFlow=!0,o.interrupt=void 0,qe(e,e.attempt(zr,t,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function SJ(e,t,r){let o=this;return qe(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 kJ(e){e.exit(this.containerState.type)}function RJ(e,t,r){let o=this;return qe(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!We(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}var By={name:"setextUnderline",tokenize:IJ,resolveTo:EJ};function EJ(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 IJ(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"),We(p)?qe(e,l,"lineSuffix")(p):l(p))}function l(p){return p===null||De(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}var Ow={tokenize:OJ};function OJ(e){let t=this,r=e.attempt(Di,o,e.attempt(this.parser.constructs.flowInitial,n,qe(e,e.attempt(this.parser.constructs.flow,n,e.attempt(ET,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 _w={resolveAll:Nw()},ww=Aw("string"),Dw=Aw("text");function Aw(e){return{tokenize:t,resolveAll:Nw(e==="text"?_J: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 Nw(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 _J(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 Mw(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:S,enter:T,exit:P,attempt:O(k),check:O(C),interrupt:O(C,{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(D){return i=Gr(i,D),x(),i[i.length-1]!==null?[]:(I(t,0),c.events=Tp(a,c.events,c),c.events)}function y(D,$){return DJ(h(D),$)}function h(D){return wJ(i,D)}function g(){let{line:D,column:$,offset:L,_index:w,_bufferIndex:B}=o;return{line:D,column:$,offset:L,_index:w,_bufferIndex:B}}function b(D){n[D.line]=D.column,N()}function x(){let D;for(;o._index<i.length;){let $=i[o._index];if(typeof $=="string")for(D=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===D&&o._bufferIndex<$.length;)v($.charCodeAt(o._bufferIndex));else v($)}}function v(D){l=void 0,f=D,u=u(D)}function S(D){De(D)?(o.line++,o.column=1,o.offset+=D===-3?2:1,N()):D!==-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=D,l=!0}function T(D,$){let L=$||{};return L.type=D,L.start=g(),c.events.push(["enter",L,c]),s.push(L),L}function P(D){let $=s.pop();return $.end=g(),c.events.push(["exit",$,c]),$}function k(D,$){I(D,$.from)}function C(D,$){$.restore()}function O(D,$){return L;function L(w,B,U){let z,R,K,oe;return Array.isArray(w)?ce(w):"tokenize"in w?ce([w]):_(w);function _(W){return fe;function fe(he){let ke=he!==null&&W[he],Te=he!==null&&W.null,Le=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Te)?Te:Te?[Te]:[]];return ce(Le)(he)}}function ce(W){return z=W,R=0,W.length===0?U:me(W[R])}function me(W){return fe;function fe(he){return oe=M(),K=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?ie(he):W.tokenize.call($?Object.assign(Object.create(c),$):c,p,Me,ie)(he)}}function Me(W){return l=!0,D(K,oe),B}function ie(W){return l=!0,oe.restore(),++R<z.length?me(z[R]):U}}}function I(D,$){D.resolveAll&&!a.includes(D)&&a.push(D),D.resolve&&Br(c.events,$,c.events.length-$,D.resolve(c.events.slice($),c)),D.resolveTo&&(c.events=D.resolveTo(c.events,c))}function M(){let D=g(),$=c.previous,L=c.currentConstruct,w=c.events.length,B=Array.from(s);return{restore:U,from:w};function U(){o=D,c.previous=$,c.currentConstruct=L,c.events.length=w,s=B,N()}}function N(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function wJ(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 DJ(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 n7(e){e=o7(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=Ci);var l=e.onBlur;l===void 0&&(l=Ci);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=m_(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=oy(e),v=x.decimalSeparator,S=x.allowedDecimalSeparators,T=function(z){return d_(z,e)},P=function(z,R){return t7(z,R,e)},k=fp(y)?d:y,C=h!=null?h:e7(k,f,n);fp(y)?fp(d)||(C=C||typeof d=="number"):C=C||typeof y=="number";var O=function(z){return h_(z)?z:(typeof z=="number"&&(z=v_(z)),C&&typeof c=="number"?c_(z,c,!!u):z)},I=x_(O(y),O(d),!!C,T,P,g),M=I[0],N=M.numAsString,D=M.formattedValue,$=I[1],L=function(z){var R=z.target,K=z.key,oe=R.selectionStart,_=R.selectionEnd,ce=R.value;if(ce===void 0&&(ce=""),oe!==_){s(z);return}K==="Backspace"&&ce[0]==="-"&&oe===f.length+1&&a&&Ds(R,1),c&&u&&(K==="Backspace"&&ce[oe-1]===v?(Ds(R,oe-1),z.preventDefault()):K==="Delete"&&ce[oe]===v&&z.preventDefault()),S!=null&&S.includes(K)&&ce[oe]===v&&Ds(R,oe+1);var me=p===!0?",":p;K==="Backspace"&&ce[oe-1]===me&&Ds(R,oe-1),K==="Delete"&&ce[oe]===me&&Ds(R,oe+1),s(z)},w=function(z){var R=N;if(R.match(/\d/g)||(R=""),i||(R=j6(R)),u&&c&&(R=c_(R,c,u)),R!==N){var K=d_(R,e);$({formattedValue:K,value:R,floatValue:parseFloat(R)},{event:z,source:Ou.event})}l(z)},B=function(z){return z===v?!0:_u(z)},U=function(z){var R=z.currentValue,K=z.lastValue,oe=z.formattedValue,_=z.currentValueIndex,ce=z.formattedValueIndex,me=R[_],Me=oe[ce],ie=b_(K,R),W=ie.to;return _>=W.start&&_<W.end&&S&&S.includes(me)&&Me===v?!0:me===Me};return Object.assign(Object.assign({},b),{value:D,valueIsNumericString:!1,isValidInputCharacter:B,isCharacterSame:U,onValueChange:$,format:T,removeFormatting:P,getCaretBoundary:function(z){return r7(z,e)},onKeyDown:L,onBlur:w})}function T_(e){var t=n7(e);return dp.createElement(X6,Object.assign({},t))}import a7 from"react";import{motion as i7}from"framer-motion";var s7=i7(gm),wu=a7.forwardRef((e,t)=>{var h;let y=e,{label:r,helperText:o,error:n,style:a,size:i,color:s,disabled:l,required:p,sx:c,className:u}=y,f=xe(y,["label","helperText","error","style","size","color","disabled","required","sx","className"]),d=A(s7,V({required:p,color:n?"danger":s,size:i,disabled:l,slotProps:V({input:V({ref:t},(h=f.slotProps)==null?void 0:h.input)},f.slotProps)},f));return Ee(Ln,{required:p,color:s,size:i,error:n,disabled:l,sx:c,className:u,children:[r&&A(Bn,{children:r}),d,o&&A(zn,{children:o})]})});wu.displayName="Input";var Wr=wu;var l7={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},P_=(e="USD")=>{let[t,r,o,...n]=new l_(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=l7[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 c7=k_.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=xe(a,["onChange"]);return A(T_,ne(V({},n),{onValueChange:({value:i})=>{o==null||o({target:{name:t.name,value:i}})},valueIsNumericString:!0,getInputRef:r,allowNegative:!1}))}),ny=k_.forwardRef(function(t,r){let N=t,{currency:o="USD",name:n,onChange:a,label:i,error:s,helperText:l,required:p,disabled:c,useMinorUnit:u,sx:f,className:d}=N,y=xe(N,["currency","name","onChange","label","error","helperText","required","disabled","useMinorUnit","sx","className"]),{symbol:h,thousandSeparator:g,decimalSeparator:b,placeholder:x,fixedDecimalScale:v,decimalScale:S}=P_(o),[T,P]=ro(t.value,t.defaultValue,C_(D=>a==null?void 0:a({target:{name:n,value:D}}),[a,n])),k=S_(()=>T&&u?T/Math.pow(10,S):T,[T,u,S]),C=S_(()=>t.max&&u?t.max/Math.pow(10,S):t.max,[t.max,u,S]),[O,I]=p7(!!C&&!!k&&k>C),M=C_(D=>{var L;if(D.target.value===""){P(void 0);return}let $=Number(u?(L=D.target.value)==null?void 0:L.replace(b,""):D.target.value);C&&Number(D.target.value)>C?I(!0):I(!1),P($)},[b,C,u,P]);return A(Wr,ne(V({},y),{size:"sm",ref:r,value:k,placeholder:x,onChange:M,error:s||O,disabled:c,required:p,color:s||O?"danger":t.color,label:i,helperText:O?new ry(`limit: {amount, number, ::currency/${o} unit-width-narrow}`).format({amount:C}):l,slotProps:{input:{component:c7,decimalSeparator:b,thousandSeparator:g,prefix:h,fixedDecimalScale:v,decimalScale:S,"aria-label":y["aria-label"]}},sx:ne(V({},f),{fontFamily:"monospace"}),className:d}))});var R_=ny;import $7,{useCallback as Pa,useEffect as gy,useMemo as pr,useRef as Kx,useState as z_,useId as V7}from"react";import{jsx as u7}from"react/jsx-runtime";var E_=Ft(u7("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 d7}from"framer-motion";var f7=d7(nh),Du=f7;Du.displayName="Sheet";var Go=Du;var Au=e=>{let o=e,{children:t}=o,r=xe(o,["children"]);return A(dh,ne(V({},r),{children:t}))};Au.displayName="Table";function Fx(e){let{headCells:t,showCheckbox:r,onCheckboxChange:o,slots:{checkbox:n=Pu}={},slotProps:{checkbox:a={}}={}}=e;return A("thead",{children:Ee("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))]})})}Fx.displayName="TableHead";function $x(e){let{rows:t,cellOrder:r,rowOptions:o,showCheckbox:n,onCheckboxChange:a,slots:{checkbox:i=Pu}={},slotProps:{checkbox:s={}}={}}=e;return A("tbody",{children:t.map((l,p)=>Ee("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))})}$x.displayName="TableBody";import C7,{forwardRef as S7,useCallback as qx,useEffect as k7,useImperativeHandle as R7,useRef as E7,useState as I7}from"react";function vo(e){return typeof e=="string"||e instanceof String}function Vx(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function jx(e,t){return Array.isArray(t)?jx(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 we={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Hx(e){switch(e){case we.LEFT:return we.FORCE_LEFT;case we.RIGHT:return we.FORCE_RIGHT;default:return e}}function ay(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function mp(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(!mp(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(!mp(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 iy=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?we.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?we.RIGHT:we.LEFT}};function Ce(e,t){return new Ce.InputMask(e,t)}function Ux(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?Ce.MaskedRegExp:vo(e)?Ce.MaskedPattern:e===Date?Ce.MaskedDate:e===Number?Ce.MaskedNumber:Array.isArray(e)||e===Array?Ce.MaskedDynamic:Ce.Masked&&e.prototype instanceof Ce.Masked?e:Ce.Masked&&e instanceof Ce.Masked?e.constructor:e instanceof Function?Ce.MaskedFunction:(console.warn("Mask not found for mask",e),Ce.Masked)}function ba(e){if(!e)throw new Error("Options in not defined");if(Ce.Masked){if(e.prototype instanceof Ce.Masked)return{mask:e};let t=e instanceof Ce.Masked?{mask:e}:Vx(e)&&e.mask instanceof Ce.Masked?e:{},{mask:r=void 0}=t,o=xe(t,["mask"]);if(r){let n=r.mask;return V(ne(V({},jx(r,(a,i)=>!i.startsWith("_"))),{mask:r.constructor,_mask:n}),o)}}return Vx(e)?V({},e):{mask:e}}function Nr(e){if(Ce.Masked&&e instanceof Ce.Masked)return e;let t=ba(e),r=Ux(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)}Ce.createMask=Nr;var Si=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}};Ce.MaskElement=Si;var I_=90,m7=89,xa=class extends Si{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===I_&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===m7&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===I_&&(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={}}};Ce.HTMLMaskElement=xa;var Nu=class extends xa{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}};Ce.HTMLMaskElement=xa;var hp=class extends xa{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}};Ce.HTMLContenteditableMaskElement=hp;var Mu=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}};Mu.MAX_LENGTH=100;var sy=class{constructor(t,r){this.el=t instanceof Si?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new hp(t):new Nu(t),this.masked=Nr(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Mu,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 Ce.Masked)&&this.masked.constructor===Ux(t)){this.masked.updateOptions({mask:t});return}let r=t instanceof Ce.Masked?t:Nr({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=xe(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,we.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 iy({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:we.NONE,i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==we.NONE&&(i=this.masked.nearestInputPos(i,we.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}};Ce.InputMask=sy;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}};Ce.ChangeDetails=Ve;var Mr=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 Jt=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 Mr(this.extractInput(t,r),t)}appendTail(t){return vo(t)&&(t=new Mr(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(!vo(t))throw new Error("value should be string");let n=vo(o)?new Mr(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=we.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=Hx(n),p=this.extractInput(0,i,{raw:!0}));let c=t,u=new Ve;if(n!==we.NONE&&(c=this.nearestInputPos(t,r>1&&t!==0&&!l?we.NONE:n),u.tailShift=c-t),u.aggregate(this.remove(c)),l&&n!==we.NONE&&p===this.rawInputValue)if(n===we.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===we.FORCE_RIGHT&&s.unshift();return u.aggregate(this.append(o,a,s))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!mp(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}};Jt.DEFAULTS={skipInvalid:!0};Jt.EMPTY_VALUES=[void 0,null,""];Ce.Masked=Jt;var yp=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=vo(t)?new Mr(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 Mr)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 Ce.MaskedPattern))return new Mr(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=xe(n,["chunks"]);Object.assign(this,o),this.chunks=r.map(a=>{let i="chunks"in a?new e:new Mr;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 ly=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,we.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,we.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,we.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,we.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,we.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,we.NONE),!0})}};var gp=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=we.NONE);let o=0,n=this._value.length;switch(r){case we.LEFT:case we.FORCE_LEFT:return o;case we.NONE:case we.RIGHT:case we.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 Mr("")}appendTail(t){return vo(t)&&(t=new Mr(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 ki=class{constructor(t){let p=t,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s}=p,l=xe(p,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=Nr(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=we.NONE);let o=0,n=this.value.length,a=Math.min(Math.max(t,o),n);switch(r){case we.LEFT:case we.FORCE_LEFT:return this.isComplete?a:o;case we.RIGHT:case we.FORCE_RIGHT:return this.isComplete?a:n;case we.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 ne(V({},t),{_beforeTailState:(t==null||(r=t._beforeTailState)==null?void 0:r.masked)||(t==null?void 0:t._beforeTailState)})}pad(t){return new Ve}};ki.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 py=class extends Jt{updateOptions(t){super.updateOptions(t)}_update(t){let r=t.mask;r&&(t.validate=o=>o.search(r)>=0),super._update(t)}};Ce.MaskedRegExp=py;var rr=class e extends Jt{constructor(t){super(ne(V(V({},e.DEFAULTS),t),{definitions:Object.assign({},ki.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=ba(this.blocks[f]),{expose:d,repeat:y}=a,h=xe(a,["expose","repeat"]),g=ne(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 Ce.RepeatBlock(g):Nr(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 ki(ne(V({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},ba(t[s])),{parent:this})):new gp({char:s,eager:this.eager,isUnmasking:o});this._blocks.push(p)}}get state(){return ne(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=xe(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,ne(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 yp;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 yp&&(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=we.NONE),!this._blocks.length)return 0;let o=new ly(this,t);if(r===we.NONE)return o.pushRightBeforeInput()||(o.popState(),o.pushLeftBeforeInput())?o.pos:this.displayValue.length;if(r===we.LEFT||r===we.FORCE_LEFT){if(r===we.LEFT){if(o.pushRightBeforeFilled(),o.ok&&o.pos===t)return t;o.popState()}if(o.pushLeftBeforeInput(),o.pushLeftBeforeRequired(),o.pushLeftBeforeFilled(),r===we.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===we.FORCE_LEFT?0:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:0)}return r===we.RIGHT||r===we.FORCE_RIGHT?(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.pushRightBeforeFilled()?o.pos:r===we.FORCE_RIGHT?this.displayValue.length:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:this.nearestInputPos(t,we.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}};rr.DEFAULTS=ne(V({},Jt.DEFAULTS),{lazy:!0,placeholderChar:"_"});rr.STOP_CHAR="`";rr.ESCAPE_CHAR="\\";rr.InputDefinition=ki;rr.FixedDefinition=gp;Ce.MaskedPattern=rr;var Ri=class extends rr{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=xe(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}};Ce.MaskedRange=Ri;var vp=class e extends rr{static extractPatternOptions(t){let a=t,{mask:r,pattern:o}=a,n=xe(a,["mask","pattern"]);return ne(V({},n),{mask:vo(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=xe(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(ne(V({},a),{mask:vo(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))}};vp.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ri,from:1,to:31,maxLength:2},m:{mask:Ri,from:1,to:12,maxLength:2},Y:{mask:Ri,from:1900,to:9999}});vp.DEFAULTS=ne(V({},rr.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)}});Ce.MaskedDate=vp;var Lu=class e extends Jt{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=ba(r),{expose:o}=i,n=xe(i,["expose"]),a=Nr(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 ne(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 ne(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=xe(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=xe(i,["mask"]);return mp(r,a)&&r.maskEquals(n)}):super.maskEquals(t)}typedValueEquals(t){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(t))}};Lu.DEFAULTS=ne(V({},Jt.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,we.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,we.FORCE_LEFT)))}});return a.sort((i,s)=>s.weight-i.weight||s.totalInputPositions-i.totalInputPositions),t.compiledMasks[a[0].index]}});Ce.MaskedDynamic=Lu;var Bu=class e extends rr{constructor(t){super(V(V({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){let n=t,{enum:r}=n,o=xe(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,we.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 Mr("",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,we.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}};Bu.DEFAULTS=ne(V({},rr.DEFAULTS),{matchValue:(e,t,r)=>e.indexOf(t,r)===r});Ce.MaskedEnum=Bu;var cy=class extends Jt{updateOptions(t){super.updateOptions(t)}_update(t){super._update(ne(V({},t),{validate:t.mask}))}};Ce.MaskedFunction=cy;var O_,Ei=class e extends Jt{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?"("+ay(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+r+o),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(ay).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(ay(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 we.NONE:case we.LEFT:case we.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===we.FORCE_LEFT)return o}break}case we.RIGHT:case we.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==="")}};O_=Ei;Ei.UNMASKED_RADIX=".";Ei.EMPTY_VALUES=[...Jt.EMPTY_VALUES,0];Ei.DEFAULTS=ne(V({},Jt.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[O_.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})});Ce.MaskedNumber=Ei;var uy={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Wx(e,t,r){t===void 0&&(t=uy.MASKED),r===void 0&&(r=uy.MASKED);let o=Nr(e);return n=>o.runIsolated(a=>(a[t]=n,a[r]))}function __(e,t,r,o){return Wx(t,r,o)(e)}Ce.PIPE_TYPE=uy;Ce.createPipe=Wx;Ce.pipe=__;var dy=class extends rr{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=ba(t),{repeat:a}=l,i=xe(l,["repeat"]);this._blockOpts=Object.assign({},this._blockOpts,i);let s=Nr(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(Nr(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,ne(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}};Ce.RepeatBlock=dy;try{globalThis.IMask=Ce}catch(e){}import Jx from"react";var ze=So(fC(),1);import fy from"react";var w_={mask:ze.default.oneOfType([ze.default.array,ze.default.func,ze.default.string,ze.default.instanceOf(RegExp),ze.default.oneOf([Date,Number,Ce.Masked]),ze.default.instanceOf(Ce.Masked)]),value:ze.default.any,unmask:ze.default.oneOfType([ze.default.bool,ze.default.oneOf(["typed"])]),prepare:ze.default.func,prepareChar:ze.default.func,validate:ze.default.func,commit:ze.default.func,overwrite:ze.default.oneOfType([ze.default.bool,ze.default.oneOf(["shift"])]),eager:ze.default.oneOfType([ze.default.bool,ze.default.oneOf(["append","remove"])]),skipInvalid:ze.default.bool,onAccept:ze.default.func,onComplete:ze.default.func,placeholderChar:ze.default.string,displayChar:ze.default.string,lazy:ze.default.bool,definitions:ze.default.object,blocks:ze.default.object,enum:ze.default.arrayOf(ze.default.string),maxLength:ze.default.number,from:ze.default.number,to:ze.default.number,pattern:ze.default.string,format:ze.default.func,parse:ze.default.func,autofix:ze.default.oneOfType([ze.default.bool,ze.default.oneOf(["pad"])]),radix:ze.default.string,thousandsSeparator:ze.default.string,mapToRadix:ze.default.arrayOf(ze.default.string),scale:ze.default.number,normalizeZeros:ze.default.bool,padFractionalZeros:ze.default.bool,min:ze.default.oneOfType([ze.default.number,ze.default.instanceOf(Date)]),max:ze.default.oneOfType([ze.default.number,ze.default.instanceOf(Date)]),dispatch:ze.default.func,inputRef:ze.default.oneOfType([ze.default.func,ze.default.shape({current:ze.default.object})])},D_=Object.keys(w_).filter(e=>e!=="value"),h7=["value","unmask","onAccept","onComplete","inputRef"],y7=D_.filter(e=>h7.indexOf(e)<0);function Gx(e){var t;let r=(t=class extends fy.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=Ce(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=xe(a,[]);return Object.keys(i).filter(s=>y7.indexOf(s)<0).forEach(s=>{delete i[s]}),i}_extractNonMaskProps(a){let i=xe(a,[]);return D_.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 fy.createElement(e,ne(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=w_,fy.forwardRef((n,a)=>fy.createElement(r,ne(V({},n),{ref:a})))}var g7=Gx(e=>{let o=e,{inputRef:t}=o,r=xe(o,["inputRef"]);return Jx.createElement("input",ne(V({},r),{ref:t}))}),v7=(e,t)=>Jx.createElement(g7,ne(V({},e),{ref:t})),Ta=Jx.forwardRef(v7);import{useRef as gKe,useState as vKe,useCallback as bKe,useEffect as xKe}from"react";import"react";import{jsx as b7}from"react/jsx-runtime";var Ii=Ft(b7("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 x7}from"framer-motion";var T7=x7(Om),P7=E(T7)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),zu=P7;zu.displayName="DialogActions";var Fn=zu;var O7=E(Gt,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),_7=E(Go,{name:"DatePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),w7=E("div",{name:"DatePicker",slot:"container"})({width:"100%"}),A_=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("/")},D7=C7.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=xe(a,["onChange"]);return A(Ta,ne(V({},n),{inputRef:r,onAccept:i=>o({target:{name:t.name,value:i}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Ce.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Ce.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Ce.MaskedRange,from:1900,to:9999}},format:A_,parse:i=>{let s=i.split("/");return new Date(Number(s[0]),Number(s[1])-1,Number(s[2]))},autofix:"pad",overwrite:!0}))}),my=S7((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=xe(k,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className"]),h=E7(null),[g,b]=ro(e.value,e.defaultValue||"",qx(C=>r==null?void 0:r({target:{name:e.name,value:C}}),[e.name,r])),[x,v]=I7(null),S=!!x;k7(()=>{var C;x||(C=h.current)==null||C.blur()},[x,h]),R7(t,()=>h.current,[h]);let T=qx(C=>{b(C.target.value)},[b]),P=qx(C=>{v(x?null:C.currentTarget),setTimeout(()=>{var O;(O=h.current)==null||O.focus()},0)},[x,v,h]);return A(w7,{children:A(Zr,{open:!0,children:Ee(jo,{children:[A(Wr,ne(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:D7,ref:h}},className:d,sx:ne(V({},f),{fontFamily:"monospace"}),endDecorator:A(lr,{variant:"plain",onClick:P,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":S,children:A(Ii,{})}),label:n,helperText:i})),S&&A(Kn,{onClickAway:()=>v(null),children:A(O7,{id:"date-picker-popper",open:!0,anchorEl:x,placement:"bottom-end",onMouseDown:C=>C.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":S,children:Ee(_7,{tabIndex:-1,role:"presentation",children:[A(Pi,{value:Number.isNaN(new Date(g).getTime())?void 0:[new Date(g),void 0],onChange:([C])=>{T({target:{name:e.name,value:A_(C)}}),v(null)},minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),A(Fn,{sx:{p:1},children:A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{T({target:{name:e.name,value:""}}),v(null)},children:"Clear"})})]})})})]})})})});var N_=my;import{motion as A7}from"framer-motion";var N7=A7(vh),Fu=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=xe(y,["label","error","helperText","color","size","disabled","required","minRows","maxRows","sx","className"]),d=A(N7,V({required:s,disabled:i,color:r?"danger":n,size:a,minRows:l,maxRows:p},f));return Ee(Ln,{required:s,disabled:i,color:n,size:a,error:r,sx:c,className:u,children:[t&&A(Bn,{children:t}),d,o&&A(zn,{children:o})]})};Fu.displayName="Textarea";var M_=Fu;import{useMemo as M7}from"react";import{motion as L7}from"framer-motion";var B7=L7(eh),hy=B7;hy.displayName="Option";function $u(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=xe(h,["label","helperText","error","size","color","disabled","required","onChange","sx","className"]),f=M7(()=>e.options.map(g=>typeof g!="object"?{value:g,label:g}:g),[e.options]),d=(g,b)=>{var S;let x=g||{target:{}},v=ne(V({},x),{target:{name:((S=x.target)==null?void 0:S.name)||e.name,value:b||void 0}});l==null||l(v)},y=A(oh,ne(V({},u),{required:s,disabled:i,size:n,color:o?"danger":a,onChange:d,children:f.map(g=>A(hy,{value:g.value,children:g.label},g.value))}));return Ee(Ln,{required:s,disabled:i,size:n,color:a,error:o,sx:p,className:c,children:[t&&A(Bn,{children:t}),y,r&&A(zn,{children:r})]})}$u.displayName="Select";var L_=$u;import{motion as z7}from"framer-motion";var F7=z7(xh),Vu=e=>A(F7,V({},e));Vu.displayName="Tooltip";var B_=Vu;import{motion as F_}from"framer-motion";Wi();function $_(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var j7=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"}}),yy=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function H7(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(tr,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center",children:Ee(tr,{direction:"row",spacing:.5,alignItems:"center",children:[A(lr,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-1),disabled:t===a,"aria-label":"Previous page",children:A($h,{})}),t!==a&&A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(a),children:a}),c&&A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-3),children:"..."}),s.map(u=>A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),A(wt,{variant:"soft",size:"sm",children:t}),l.map(u=>A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),p&&A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+3),children:"..."}),t!==i&&A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(i),children:i}),A(lr,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+1),disabled:t===i,"aria-label":"Next page",children:A(Vh,{})})]})})}var U7=e=>A(Fh,{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)}}),W7=E("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"100%"}}),G7=E("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>ne(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))"}})),J7=E("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),q7=F_(E_),K7=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=Kx(null),g=pr(()=>`${s}_header_${l!=null?l:i}`.trim(),[s,l,i]),b=a==null||a?U7(h):null,x={width:t,minWidth:o!=null?o:"50px",maxWidth:r,position:n?void 0:"relative",cursor:d?"pointer":"default",userSelect:"none"},v=$_(e),S=y[0],T=d&&A(q7,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":g,"aria-description":(u!=null?u:S)==="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:S)==="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 Ee(F_.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:[Ee(tr,{gap:1,direction:"row",justifyContent:v,children:[v==="end"&&T,Ee("div",{children:[l!=null?l:i,c&&p&&A(J7,{children:"*"})]}),v==="start"&&T]}),b]},i)},Y7=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]=z_(l[r]),f=Kx(null),d=pr(()=>({row:l,value:c,id:p}),[l,p,c]),y=pr(()=>!!(e.editMode&&(typeof i=="function"?i(d):i==null||i)),[e.editMode,i,d]),h=pr(()=>ne(V({},typeof e.componentProps=="function"?e.componentProps(d):e.componentProps||{}),{size:"sm"}),[e,d]),g=pr(()=>V(ne(V({},h),{onChange:P=>{var k,C;(k=h.onChange)==null||k.call(h,P),u(P.target.value),o==="select"&&((C=e.onCellEditStop)==null||C.call(e,ne(V({},d),{originalRow:l,row:ne(V({},d.row),{[r]:P.target.value}),value:P.target.value})))},onFocus:P=>{var k,C;(k=h.onFocus)==null||k.call(h,P),(C=e.onCellEditStart)==null||C.call(e,ne(V({},d),{originalRow:l,row:ne(V({},d.row),{value:c}),value:c}))},onBlur:P=>{var k,C;(k=h.onBlur)==null||k.call(h,P),o&&["number","text","longText","currency","date"].includes(o)&&((C=e.onCellEditStop)==null||C.call(e,ne(V({},d),{originalRow:l,row:ne(V({},d.row),{[r]:c}),value:c})))}}),o==="autocomplete"&&{onChangeComplete:P=>{var k,C;(k=h.onChangeComplete)==null||k.call(h,P),u(P.target.value),(C=e.onCellEditStop)==null||C.call(e,ne(V({},d),{originalRow:l,row:ne(V({},d.row),{[r]:P.target.value}),value:P.target.value}))}}),[d,l,r,c,h,o,e]),b=pr(()=>a?a(d):{date:A(N_,V({value:c},g)),currency:A(R_,V({value:c},g)),number:A(Wr,V({value:c,type:"number"},g)),text:A(Wr,V({value:c,type:"text"},g)),longText:A(M_,V({value:c},g)),autocomplete:A(xO,V({value:c,options:g.options||[c]},g)),select:A(L_,V({value:c,options:g.options||[c]},g))}[o||"text"],[c,g,o]),x=pr(()=>{if(n)return n(d);let P=c;return{link:$7.createElement(e.component||da,V({children:P},h))}[o||"text"]||P},[c,n,d,o,h,e]),v=pr(()=>y&&b?b:x,[y,b,x]),S=pr(()=>s&&e.type==="longText",[s,e.type]);return gy(()=>{u(l[r])},[l,r]),A("td",{ref:f,headers:`${t}_header_${(T=e.headerName)!=null?T:r}`,style:{textAlign:$_({type:o}),verticalAlign:y?"top":"middle"},children:S?A(B_,{title:c,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500,children:A("div",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:v})}):v},r)},X7=e=>{let{tableId:t,columns:r,rowId:o,editMode:n,noWrap:a,row:i}=e;return A(jo,{children:r.map((s,l)=>QP(Y7,ne(V({},s),{tableId:t,key:`${o}_${s.field.toString()}_${l}`,row:i,rowId:o,editMode:n,noWrap:a})))})};function Z7({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]=ro(s,[],Pa(B=>c==null?void 0:c(B),[c])),b=pr(()=>t.reduce((B,U)=>ne(V({},B),{[U.field]:U}),{}),[t]),x=Pa((B,U)=>{for(let z of h){let{field:R,sort:K}=z,oe=B[R],_=U[R],ce=b[R],me=0;if(ce.sortComparator?me=ce.sortComparator({rowA:B,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 K==="asc"?me:-me}return 0},[h,b]),v=pr(()=>h.length?[...e].sort(x):e,[e,h,x]),S=pr(()=>Array.from(new Set(l)),[l]),[T,P]=z_((a==null?void 0:a.page)||1),k=(a==null?void 0:a.pageSize)||20,C=Pa((B,U)=>{var z,R;return(R=(z=d==null?void 0:d(B))!=null?z:B==null?void 0:B.id)!=null?R:`${(U||0)+(T-1)*k}`},[d!=null?d:T,k]),O=pr(()=>new Set(p),[p]),I=pr(()=>!o||n==="server"?v:v.slice((T-1)*k,(T-1)*k+k),[v,T,k,n,o]),M=pr(()=>I.length>0&&I.every((B,U)=>O.has(C(B,U))),[I,O,C]),N=r||v.length,D=pr(()=>y!=null?y:N>0&&p.length===N,[y,p,N]),$=pr(()=>(t||Object.keys(v[0]||{}).map(U=>({field:U}))).map(U=>{var z,R,K;return ne(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:((K=b[U.field])==null?void 0:K.sortOrder)||S})}),[v,t,f,h,b,S]),L=Pa(B=>{P(B),i==null||i({page:B,pageSize:k})},[i,k]),w=Pa(B=>{let{field:U,currentSort:z,multiple:R}=B,oe=b[U].sortOrder||S;if(z!==void 0){let ce=(oe.indexOf(z)+1)%oe.length,me=oe[ce];if(!me){let ie=R?h.filter(W=>W.field!==U):[];g(ie);return}let Me=R?h.map(ie=>ie.field===U?{field:U,sort:me}:ie):[{field:U,sort:me}];g(Me)}else{let _=R?[...h,{field:U,sort:oe[0]}]:[{field:U,sort:oe[0]}];g(_)}},[S,b,h,g]);return gy(()=>{a||L(1)},[N,L,a]),gy(()=>{let B=Math.max(1,Math.ceil(N/k));T>B&&L(B)},[T,N,k,L]),gy(()=>{u==null||u([])},[T]),{rowCount:N,page:T,pageSize:k,onPaginationModelChange:L,getId:C,HeadCell:K7,BodyRow:X7,dataInPage:I,handleSortChange:w,isAllSelected:M,isTotalSelected:D,isSelectedRow:Pa(B=>O.has(B),[O]),onAllCheckboxChange:Pa(()=>{u==null||u(M?[]:I.map(C))},[M,I,u,C]),onCheckboxChange:Pa((B,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:Pa(()=>{u==null||u(D?[]:v.map(C),!D)},[D,v,u,C])}}function Yx(e){let Te=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=Pu,toolbar:x,footer:v,loadingOverlay:S=()=>A(Jc,{value:8,variant:"plain"})}={},slotProps:{checkbox:T={},toolbar:P,background:k={}}={},stripe:C}=Te,O=xe(Te,["rows","checkboxSelection","editMode","selectionModel","onSelectionModelChange","disableSelectionOnClick","rowCount","columns","onPaginationModelChange","pagination","paginationMode","paginationModel","sortModel","sortOrder","onSortModelChange","loading","slots","slotProps","stripe"]),I=V7(),M=Kx(null),{columns:N,isAllSelected:D,isSelectedRow:$,onAllCheckboxChange:L,onCheckboxChange:w,getId:B,rowCount:U,page:z,pageSize:R,onPaginationModelChange:K,handleSortChange:oe,dataInPage:_,isTotalSelected:ce,onTotalSelect:me,HeadCell:Me,BodyRow:ie}=Z7(e),W=Lh({count:_.length,getScrollElement:()=>M.current,estimateSize:()=>32,measureElement:Le=>Le.clientHeight,overscan:20}),fe=pr(()=>({page:z,pageSize:R}),[z,R]),he=W.getTotalSize(),ke=W.getVirtualItems();return Ee(Fh,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"},children:[(!!r||!!x)&&Ee(tr,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center",children:[!!r&&Ee(tr,{direction:"row",spacing:1,children:[!D&&Ee(oo,{level:"body-xs",children:[yy((n==null?void 0:n.length)||0)," items selected"]}),D&&!ce&&Ee(tr,{direction:"row",spacing:1,alignItems:"center",children:[Ee(oo,{level:"body-xs",children:["All ",yy((n==null?void 0:n.length)||0)," items on this page are selected."]}),Ee(wt,{size:"sm",variant:"plain",onClick:me,children:["Select all ",yy(U!=null?U:t.length)," items"]})]}),ce&&Ee(tr,{direction:"row",spacing:1,alignItems:"center",children:[Ee(oo,{level:"body-xs",children:["All ",yy(U!=null?U:t.length)," items are selected."]}),A(wt,{size:"sm",variant:"plain",color:"danger",onClick:me,children:"Cancel"})]})]}),x&&A(x,V({},P||{}))]}),A(Go,ne(V({variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:M},k),{children:Ee(Au,ne(V({},O),{children:[A("thead",{children:Ee("tr",{children:[r&&A("th",{style:{width:"40px",textAlign:"center"},children:A(b,V({onChange:L,checked:D,indeterminate:(n||[]).length>0&&!D},T))}),N.map((Le,Ke)=>A(Me,V({tableId:I,stickyHeader:e.stickyHeader,editMode:!!Le.isCellEditable,onSortChange:oe},Le),`${Le.field.toString()}_${Ke}`))]})}),Ee(W7,{style:{height:`${he}px`},children:[!!g&&A(j7,{children:A("td",{children:A(Fh,{sx:{position:"absolute",top:0,left:0,right:0},children:A(S,{})})})}),ke.map((Le,Ke)=>{let re=Le.index,Z=_[re],ve=B(Z,re),ye=C&&(C==="even"&&(re+1)%2===0||C==="odd"&&(re+1)%2===1);return Ee(G7,{role:r&&!i?"checkbox":void 0,tabIndex:r&&!i?-1:void 0,onClick:r&&!i?$e=>w($e,ve):void 0,"aria-checked":r&&!i?$(ve):void 0,striped:ye,style:{height:`${Le.size}px`,transform:`translateY(${Le.start-Ke*Le.size}px)`},children:[r&&A("th",{scope:"row",style:{textAlign:"center"},children:A(b,V({onChange:$e=>w($e,ve),checked:$(ve)},T))}),A(ie,{tableId:I,columns:N,row:Z,rowId:ve,editMode:o,noWrap:e.noWrap})]},ve)})]}),v&&A(v,{})]}))})),R<U&&c&&A(H7,{paginationModel:fe,rowCount:U,onPageChange:K})]})}Yx.displayName="DataTable";import Q7,{forwardRef as eG,useCallback as vy,useEffect as tG,useImperativeHandle as rG,useMemo as oG,useRef as nG,useState as aG}from"react";var iG=E(Gt,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),sG=E(Go,{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})),lG=E("div",{name:"DateRangePicker",slot:"container"})({width:"100%"}),V_=([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(" - ")},j_=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]))]},pG=Q7.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=xe(a,["onChange"]);return A(Ta,ne(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:Ce.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Ce.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Ce.MaskedRange,from:1900,to:9999}},format:V_,parse:j_,autofix:"pad",overwrite:!0}))}),Xx=eG((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=xe(O,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required","sx","className"]),h=nG(null),[g,b]=ro(e.value,e.defaultValue||"",vy(I=>r==null?void 0:r({target:{name:e.name,value:I}}),[e.name,r])),[x,v]=aG(null),S=!!x,T=oG(()=>g?j_(g):void 0,[g]);tG(()=>{var I;x||(I=h.current)==null||I.blur()},[x,h]),rG(t,()=>h.current,[h]);let P=vy(I=>{b(I.target.value)},[b]),k=vy(I=>{var M;v(x?null:I.currentTarget),(M=h.current)==null||M.focus()},[x,v,h]),C=vy(([I,M])=>{!I||!M||(b(V_([I,M])),v(null))},[b,v]);return A(lG,{children:A(Zr,{open:!0,children:Ee(jo,{children:[A(Wr,ne(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:pG,ref:h}},error:a,className:d,sx:ne(V({},f),{fontFamily:"monospace"}),endDecorator:A(lr,{variant:"plain",onClick:k,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":S,children:A(Ii,{})}),label:n,helperText:i})),S&&A(Kn,{onClickAway:()=>v(null),children:A(iG,{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":S,children:Ee(sG,{tabIndex:-1,role:"presentation",children:[A(Pi,{rangeSelection:!0,defaultValue:T,onChange:C,minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),A(Fn,{sx:{p:1},children:A(wt,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{b(""),v(null)},children:"Clear"})})]})})})]})})})});Xx.displayName="DateRangePicker";import{motion as cG}from"framer-motion";var uG=cG(Kl),Zx=e=>{var i;let a=e,{children:t,size:r}=a,o=xe(a,["children","size"]),n=dc();return A(uG,ne(V({},o),{slotProps:ne(V({},o.slotProps),{content:ne(V({},(i=o.slotProps)==null?void 0:i.content),{sx:{bgcolor:"transparent",boxShadow:"none",[n.breakpoints.down("md")]:{width:"100%"}}})}),sx:ne(V({},e.sx),{"--Drawer-horizontalSize":{sm:"360px",md:"600px",lg:"900px"}[r||"md"]}),children:t}))};Zx.displayName="Drawer";import{motion as dG}from"framer-motion";var fG=dG(wm),mG=E(fG)(({theme:e})=>({padding:e.spacing(0,6,5)})),ju=mG;ju.displayName="DialogContent";var by=ju;import{motion as hG}from"framer-motion";var yG=hG(Dm),gG=E(yG)(({theme:e})=>({padding:e.spacing(4,6)})),Hu=gG;Hu.displayName="DialogTitle";var xy=Hu;import TG from"react";import{motion as Qx}from"framer-motion";var vG=Qx(Mm),eT=vG;eT.displayName="Modal";var H_=E(Ym)({padding:0}),Uu=H_;Uu.displayName="ModalDialog";var bG=E(Qx(Km))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),Ty=bG;Ty.displayName="ModalClose";var xG=Qx(Zm),tT=xG;tT.displayName="ModalOverflow";function rT(e){let n=e,{title:t,children:r}=n,o=xe(n,["title","children"]);return Ee(H_,ne(V({},o),{children:[A(Ty,{}),A(xy,{children:t}),A(by,{children:r})]}))}rT.displayName="ModalFrame";var PG=E(Uu,{name:"Dialog",slot:"Root"})({padding:0}),oT=TG.forwardRef((e,t)=>{let s=e,{title:r,children:o,actions:n,fullscreen:a}=s,i=xe(s,["title","children","actions","fullscreen"]);return Ee(PG,ne(V({layout:a?"fullscreen":"center",ref:t},i),{children:[A(xy,{children:r}),A(by,{children:o}),A(Fn,{children:n})]}))});oT.displayName="DialogFrame";import{motion as CG}from"framer-motion";var SG=CG(Am),Wu=e=>A(SG,V({},e));Wu.displayName="Divider";import{motion as kG}from"framer-motion";var RG=kG(Kl),nT=e=>{var n;let o=e,{children:t}=o,r=xe(o,["children"]);return A(RG,ne(V({},r),{slotProps:ne(V({},r.slotProps),{content:ne(V({},(n=r.slotProps)==null?void 0:n.content),{sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}})}),children:t}))};nT.displayName="InsetDrawer";import{motion as EG}from"framer-motion";var IG=EG(Vm),aT=IG;aT.displayName="Grid";function U_(e,t){let r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var OG=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_G=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wG={};function Py(e,t){return((t||wG).jsx?_G:OG).test(e)}var DG=/[ \t\n\f\r]/g;function iT(e){return typeof e=="object"?e.type==="text"?W_(e.value):!1:W_(e)}function W_(e){return e.replace(DG,"")===""}var Ca=class{constructor(t,r,o){this.property=t,this.normal=r,o&&(this.space=o)}};Ca.prototype.property={};Ca.prototype.normal={};Ca.prototype.space=null;function sT(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 Ca(r,o,t)}function Gu(e){return e.toLowerCase()}var Lr=class{constructor(t,r){this.property=t,this.attribute=r}};Lr.prototype.space=null;Lr.prototype.boolean=!1;Lr.prototype.booleanish=!1;Lr.prototype.overloadedBoolean=!1;Lr.prototype.number=!1;Lr.prototype.commaSeparated=!1;Lr.prototype.spaceSeparated=!1;Lr.prototype.commaOrSpaceSeparated=!1;Lr.prototype.mustUseProperty=!1;Lr.prototype.defined=!1;var Ju={};Pn(Ju,{boolean:()=>Ue,booleanish:()=>Dt,commaOrSpaceSeparated:()=>no,commaSeparated:()=>Oi,number:()=>ge,overloadedBoolean:()=>lT,spaceSeparated:()=>dt});var AG=0,Ue=As(),Dt=As(),lT=As(),ge=As(),dt=As(),Oi=As(),no=As();function As(){return 2**++AG}var pT=Object.keys(Ju),Ns=class extends Lr{constructor(t,r,o,n){let a=-1;if(super(t,r),G_(this,"space",n),typeof o=="number")for(;++a<pT.length;){let i=pT[a];G_(this,pT[a],(o&Ju[i])===Ju[i])}}};Ns.prototype.defined=!0;function G_(e,t,r){r&&(e[t]=r)}var NG={}.hasOwnProperty;function Jo(e){let t={},r={},o;for(o in e.properties)if(NG.call(e.properties,o)){let n=e.properties[o],a=new Ns(o,e.transform(e.attributes||{},o),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,r[Gu(o)]=o,r[Gu(a.attribute)]=o}return new Ca(t,r,e.space)}var cT=Jo({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 uT=Jo({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Cy(e,t){return t in e?e[t]:t}function Sy(e,t){return Cy(e,t.toLowerCase())}var dT=Jo({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Sy,properties:{xmlns:null,xmlnsXLink:null}});var fT=Jo({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:dt,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:ge,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:dt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Dt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null}});var J_=Jo({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Sy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Oi,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:dt,autoFocus:Ue,autoPlay:Ue,blocking:dt,capture:null,charSet:null,checked:Ue,cite:null,className:dt,cols:ge,colSpan:null,content:null,contentEditable:Dt,controls:Ue,controlsList:dt,coords:ge|Oi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:lT,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:dt,height:ge,hidden:Ue,high:ge,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:dt,itemRef:dt,itemScope:Ue,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,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:Ue,optimum:ge,pattern:null,ping:dt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:dt,required:Ue,reversed:Ue,rows:ge,rowSpan:ge,sandbox:dt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Dt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:ge,security:null,unselectable:null}});var q_=Jo({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:Cy,properties:{about:no,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:dt,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:Oi,g2:Oi,glyphName:Oi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:no,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:no,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:no,rev:no,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:no,requiredFeatures:no,requiredFonts:no,requiredFormats:no,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:no,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:no,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:no,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var MG=/^data[-\w.:]+$/i,K_=/-[a-z]/g,LG=/[A-Z]/g;function mT(e,t){let r=Gu(t),o=t,n=Lr;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&MG.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(K_,zG);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!K_.test(a)){let i=a.replace(LG,BG);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}n=Ns}return new n(o,t)}function BG(e){return"-"+e.toLowerCase()}function zG(e){return e.charAt(1).toUpperCase()}var hT={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 Y_=sT([uT,cT,dT,fT,J_],"html"),ky=sT([uT,cT,dT,fT,q_],"svg");function X_(e){return e.join(" ").trim()}var yT=So(nw(),1),aw=yT.default.default||yT.default;var Ry=iw("end"),bp=iw("start");function iw(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 gT(e){let t=bp(e),r=Ry(e);if(t&&r)return{start:t,end:r}}function _i(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?sw(e.position):"start"in e||"end"in e?sw(e):"line"in e||"column"in e?vT(e):""}function vT(e){return lw(e&&e.line)+":"+lw(e&&e.column)}function sw(e){return vT(e&&e.start)+"-"+vT(e&&e.end)}function lw(e){return e&&typeof e=="number"?e:1}var $t=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=_i(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}};$t.prototype.file="";$t.prototype.name="";$t.prototype.reason="";$t.prototype.message="";$t.prototype.stack="";$t.prototype.column=void 0;$t.prototype.line=void 0;$t.prototype.ancestors=void 0;$t.prototype.cause=void 0;$t.prototype.fatal=void 0;$t.prototype.place=void 0;$t.prototype.ruleId=void 0;$t.prototype.source=void 0;var bT={}.hasOwnProperty,ZG=new Map,QG=/[A-Z]/g,e8=/-([a-z])/g,t8=new Set(["table","tbody","thead","tfoot","tr"]),r8=new Set(["td","th"]),pw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xT(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=c8(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=p8(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"?ky:Y_,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=cw(n,e,void 0);return a&&typeof a!="string"?a:n.create(e,n.Fragment,{children:a||void 0},void 0)}function cw(e,t,r){if(t.type==="element")return o8(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return n8(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return i8(e,t,r);if(t.type==="mdxjsEsm")return a8(e,t);if(t.type==="root")return s8(e,t,r);if(t.type==="text")return l8(e,t)}function o8(e,t,r){let o=e.schema,n=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(n=ky,e.schema=n),e.ancestors.push(t);let a=dw(e,t.tagName,!1),i=u8(e,t),s=PT(e,t);return t8.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!iT(l):!0})),uw(e,i,a,t),TT(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function n8(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)}Ku(e,t.position)}function a8(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ku(e,t.position)}function i8(e,t,r){let o=e.schema,n=o;t.name==="svg"&&o.space==="html"&&(n=ky,e.schema=n),e.ancestors.push(t);let a=t.name===null?e.Fragment:dw(e,t.name,!0),i=d8(e,t),s=PT(e,t);return uw(e,i,a,t),TT(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function s8(e,t,r){let o={};return TT(o,PT(e,t)),e.create(t,e.Fragment,o,r)}function l8(e,t){return t.value}function uw(e,t,r,o){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=o)}function TT(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function p8(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 c8(e,t){return r;function r(o,n,a,i){let s=Array.isArray(a.children),l=bp(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 u8(e,t){let r={},o,n;for(n in t.properties)if(n!=="children"&&bT.call(t.properties,n)){let a=f8(e,n,t.properties[n]);if(a){let[i,s]=a;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&r8.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 d8(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 Ku(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 Ku(e,t.position);else a=o.value===null?!0:o.value;r[n]=a}return r}function PT(e,t){let r=[],o=-1,n=e.passKeys?new Map:ZG;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=cw(e,a,i);s!==void 0&&r.push(s)}return r}function f8(e,t,r){let o=mT(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=o.commaSeparated?U_(r):X_(r)),o.property==="style"){let n=typeof r=="object"?r:m8(e,String(r));return e.stylePropertyNameCase==="css"&&(n=h8(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&o.space?hT[o.property]||o.property:o.attribute,r]}}function m8(e,t){let r={};try{aw(t,o)}catch(n){if(!e.ignoreInvalidStyle){let a=n,i=new $t("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=pw+"#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(e8,g8)),r[i]=a}}function dw(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=Py(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=Py(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){let n=o.value;return bT.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(o);Ku(e)}function Ku(e,t){let r=new $t("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=pw+"#cannot-handle-mdx-estrees-without-createevaluater",r}function h8(e){let t={},r;for(r in e)bT.call(e,r)&&(t[y8(r)]=e[r]);return t}function y8(e){let t=e.replace(QG,v8);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function g8(e,t){return t.toUpperCase()}function v8(e){return"-"+e.toLowerCase()}var Yu={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 Cq,jsx as Sq,jsxs as kq}from"react/jsx-runtime";var b8={};function CT(e,t){let r=t||b8,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return mw(e,o,n)}function mw(e,t,r){if(x8(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 fw(e.children,t,r)}return Array.isArray(e)?fw(e,t,r):""}function fw(e,t,r){let o=[],n=-1;for(;++n<e.length;)o[n]=mw(e[n],t,r);return o.join("")}function x8(e){return!!(e&&typeof e=="object")}var hw=document.createElement("i");function xp(e){let t="&"+e+";";hw.innerHTML=t;let r=hw.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Br(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 Gr(e,t){return e.length>0?(Br(e,e.length,0,t),e):t}var yw={}.hasOwnProperty;function gw(e){let t={},r=-1;for(;++r<e.length;)T8(t,e[r]);return t}function T8(e,t){let r;for(r in t){let n=(yw.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r],i;if(a)for(i in a){yw.call(n,i)||(n[i]=[]);let s=a[i];P8(n[i],Array.isArray(s)?s:s?[s]:[])}}}function P8(e,t){let r=-1,o=[];for(;++r<t.length;)(t[r].add==="after"?e:o).push(t[r]);Br(e,0,0,o)}function Ey(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 Sa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var bo=wi(/[A-Za-z]/),cr=wi(/[\dA-Za-z]/),vw=wi(/[#-'*+\--9=?A-Z^-~]/);function Xu(e){return e!==null&&(e<32||e===127)}var Zu=wi(/\d/),bw=wi(/[\dA-Fa-f]/),xw=wi(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function Vt(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}var Tw=wi(new RegExp("\\p{P}|\\p{S}","u")),Pw=wi(/\s/);function wi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function qo(e){let t=[],r=-1,o=0,n=0;for(;++r<e.length;){let a=e.charCodeAt(r),i="";if(a===37&&cr(e.charCodeAt(r+1))&&cr(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 qe(e,t,r,o){let n=o?o-1:Number.POSITIVE_INFINITY,a=0;return i;function i(l){return We(l)?(e.enter(r),s(l)):t(l)}function s(l){return We(l)&&a++<n?(e.consume(l),s):(e.exit(r),t(l))}}var Cw={tokenize:C8};function C8(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"),qe(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 De(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),i)}}var kw={tokenize:S8},Sw={tokenize:k8};function S8(e){let t=this,r=[],o=0,n,a,i;return s;function s(v){if(o<r.length){let S=r[o];return t.containerState=S[1],e.attempt(S[0].continuation,l,p)(v)}return p(v)}function l(v){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();let S=t.events.length,T=S,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=S;for(;k<t.events.length;)t.events[k][1].end=Object.assign({},P),k++;return Br(t.events,T+1,0,t.events.slice(S)),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(Sw,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(Sw,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 De(v)?(e.consume(v),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(v),h)}function g(v,S){let T=t.sliceStream(v);if(S&&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,C=k,O,I;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){if(O){I=t.events[C][1].end;break}O=!0}for(b(o),P=k;P<t.events.length;)t.events[P][1].end=Object.assign({},I),P++;Br(t.events,C+1,0,t.events.slice(k)),t.events.length=P}}function b(v){let S=r.length;for(;S-- >v;){let T=r[S];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 k8(e,t,r){return qe(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ST(e){if(e===null||Vt(e)||Pw(e))return 1;if(Tw(e))return 2}function Tp(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 Qu={name:"attention",tokenize:E8,resolveAll:R8};function R8(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);Rw(u,-l),Rw(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=Gr(p,[["enter",e[o][1],t],["exit",e[o][1],t]])),p=Gr(p,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",a,t]]),p=Gr(p,Tp(t.parser.constructs.insideSpan.null,e.slice(o+1,r),t)),p=Gr(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=Gr(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,Br(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 E8(e,t){let r=this.parser.constructs.attentionMarkers.null,o=this.previous,n=ST(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=ST(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 Rw(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var kT={name:"autolink",tokenize:I8};function I8(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 bo(d)?(e.consume(d),i):p(d)}function i(d){return d===43||d===45||d===46||cr(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||cr(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||Xu(d)?r(d):(e.consume(d),l)}function p(d){return d===64?(e.consume(d),c):vw(d)?(e.consume(d),p):r(d)}function c(d){return cr(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||cr(d))&&o++<63){let y=d===45?f:u;return e.consume(d),y}return r(d)}}var Di={tokenize:O8,partial:!0};function O8(e,t,r){return o;function o(a){return We(a)?qe(e,n,"linePrefix")(a):n(a)}function n(a){return a===null||De(a)?t(a):r(a)}}var Iy={name:"blockQuote",tokenize:_8,continuation:{tokenize:w8},exit:D8};function _8(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 We(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function w8(e,t,r){let o=this;return n;function n(i){return We(i)?qe(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(Iy,t,r)(i)}}function D8(e){e.exit("blockQuote")}var Oy={name:"characterEscape",tokenize:A8};function A8(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 xw(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}var _y={name:"characterReference",tokenize:N8};function N8(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=cr,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=bw,c):(e.enter("characterReferenceValue"),a=7,i=Zu,c(u))}function c(u){if(u===59&&n){let f=e.exit("characterReferenceValue");return i===cr&&!xp(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 Ew={tokenize:L8,partial:!0},wy={name:"codeFenced",tokenize:M8,concrete:!0};function M8(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"),We(P)?qe(e,u,"whitespace")(P):u(P))}function u(P){return P===null||De(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(Ew,h,S)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(P))}function f(P){return P===null||De(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(P)):We(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),qe(e,d,"whitespace")(P)):P===96&&P===s?r(P):(e.consume(P),f)}function d(P){return P===null||De(P)?u(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(P))}function y(P){return P===null||De(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,S,g)(P)}function g(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),b}function b(P){return a>0&&We(P)?qe(e,x,"linePrefix",a+1)(P):x(P)}function x(P){return P===null||De(P)?e.check(Ew,h,S)(P):(e.enter("codeFlowValue"),v(P))}function v(P){return P===null||De(P)?(e.exit("codeFlowValue"),x(P)):(e.consume(P),v)}function S(P){return e.exit("codeFenced"),t(P)}function T(P,k,C){let O=0;return I;function I(L){return P.enter("lineEnding"),P.consume(L),P.exit("lineEnding"),M}function M(L){return P.enter("codeFencedFence"),We(L)?qe(P,N,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):N(L)}function N(L){return L===s?(P.enter("codeFencedFenceSequence"),D(L)):C(L)}function D(L){return L===s?(O++,P.consume(L),D):O>=i?(P.exit("codeFencedFenceSequence"),We(L)?qe(P,$,"whitespace")(L):$(L)):C(L)}function $(L){return L===null||De(L)?(P.exit("codeFencedFence"),k(L)):C(L)}}}function L8(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 ed={name:"codeIndented",tokenize:z8},B8={tokenize:F8,partial:!0};function z8(e,t,r){let o=this;return n;function n(p){return e.enter("codeIndented"),qe(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):De(p)?e.attempt(B8,i,l)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||De(p)?(e.exit("codeFlowValue"),i(p)):(e.consume(p),s)}function l(p){return e.exit("codeIndented"),t(p)}}function F8(e,t,r){let o=this;return n;function n(i){return o.parser.lazy[o.now().line]?r(i):De(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n):qe(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):De(i)?n(i):r(i)}}var RT={name:"codeText",tokenize:j8,resolve:$8,previous:V8};function $8(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 V8(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function j8(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)):De(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||De(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 Dy=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&&td(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),td(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),td(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);td(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);td(this.left,r.reverse())}}};function td(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 Ay(e){let t={},r=-1,o,n,a,i,s,l,p,c=new Dy(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,H8(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 Br(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!p}function H8(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 ET={tokenize:G8,resolve:W8},U8={tokenize:J8,partial:!0};function W8(e){return Ay(e),e}function G8(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):De(s)?e.check(U8,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 J8(e,t,r){let o=this;return n;function n(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),qe(e,a,"linePrefix")}function a(i){if(i===null||De(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 Ny(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||Xu(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||De(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||Vt(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||Xu(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 My(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):De(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||De(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!We(d)),d===92?f:u)}function f(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function Ly(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):De(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),qe(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===i||f===null||De(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 Ls(e,t){let r;return o;function o(n){return De(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,o):We(n)?qe(e,o,r?"linePrefix":"lineSuffix")(n):t(n)}}var IT={name:"definition",tokenize:K8},q8={tokenize:Y8,partial:!0};function K8(e,t,r){let o=this,n;return a;function a(d){return e.enter("definition"),i(d)}function i(d){return My.call(o,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return n=Sa(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 Vt(d)?Ls(e,p)(d):p(d)}function p(d){return Ny(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(q8,u,u)(d)}function u(d){return We(d)?qe(e,f,"whitespace")(d):f(d)}function f(d){return d===null||De(d)?(e.exit("definition"),o.parser.defined.push(n),t(d)):r(d)}}function Y8(e,t,r){return o;function o(s){return Vt(s)?Ls(e,n)(s):r(s)}function n(s){return Ly(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return We(s)?qe(e,i,"whitespace")(s):i(s)}function i(s){return s===null||De(s)?t(s):r(s)}}var OT={name:"hardBreakEscape",tokenize:X8};function X8(e,t,r){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),n}function n(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}var _T={name:"headingAtx",tokenize:Q8,resolve:Z8};function Z8(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"},Br(e,o,r-o+1,[["enter",n,t],["enter",a,t],["exit",a,t],["exit",n,t]])),e}function Q8(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||Vt(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||De(c)?(e.exit("atxHeading"),t(c)):We(c)?qe(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||Vt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),p)}}var Iw=["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"],wT=["pre","script","style","textarea"];var DT={name:"htmlFlow",tokenize:oJ,resolveTo:rJ,concrete:!0},eJ={tokenize:aJ,partial:!0},tJ={tokenize:nJ,partial:!0};function rJ(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 oJ(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):bo(_)?(e.consume(_),i=String.fromCharCode(_),g):r(_)}function f(_){return _===45?(e.consume(_),n=2,d):_===91?(e.consume(_),n=5,s=0,y):bo(_)?(e.consume(_),n=4,o.interrupt?t:R):r(_)}function d(_){return _===45?(e.consume(_),o.interrupt?t:R):r(_)}function y(_){let ce="CDATA[";return _===ce.charCodeAt(s++)?(e.consume(_),s===ce.length?o.interrupt?t:N:y):r(_)}function h(_){return bo(_)?(e.consume(_),i=String.fromCharCode(_),g):r(_)}function g(_){if(_===null||_===47||_===62||Vt(_)){let ce=_===47,me=i.toLowerCase();return!ce&&!a&&wT.includes(me)?(n=1,o.interrupt?t(_):N(_)):Iw.includes(i.toLowerCase())?(n=6,ce?(e.consume(_),b):o.interrupt?t(_):N(_)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(_):a?x(_):v(_))}return _===45||cr(_)?(e.consume(_),i+=String.fromCharCode(_),g):r(_)}function b(_){return _===62?(e.consume(_),o.interrupt?t:N):r(_)}function x(_){return We(_)?(e.consume(_),x):I(_)}function v(_){return _===47?(e.consume(_),I):_===58||_===95||bo(_)?(e.consume(_),S):We(_)?(e.consume(_),v):I(_)}function S(_){return _===45||_===46||_===58||_===95||cr(_)?(e.consume(_),S):T(_)}function T(_){return _===61?(e.consume(_),P):We(_)?(e.consume(_),T):v(_)}function P(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(e.consume(_),l=_,k):We(_)?(e.consume(_),P):C(_)}function k(_){return _===l?(e.consume(_),l=null,O):_===null||De(_)?r(_):(e.consume(_),k)}function C(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Vt(_)?T(_):(e.consume(_),C)}function O(_){return _===47||_===62||We(_)?v(_):r(_)}function I(_){return _===62?(e.consume(_),M):r(_)}function M(_){return _===null||De(_)?N(_):We(_)?(e.consume(_),M):r(_)}function N(_){return _===45&&n===2?(e.consume(_),w):_===60&&n===1?(e.consume(_),B):_===62&&n===4?(e.consume(_),K):_===63&&n===3?(e.consume(_),R):_===93&&n===5?(e.consume(_),z):De(_)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(eJ,oe,D)(_)):_===null||De(_)?(e.exit("htmlFlowData"),D(_)):(e.consume(_),N)}function D(_){return e.check(tJ,$,oe)(_)}function $(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),L}function L(_){return _===null||De(_)?D(_):(e.enter("htmlFlowData"),N(_))}function w(_){return _===45?(e.consume(_),R):N(_)}function B(_){return _===47?(e.consume(_),i="",U):N(_)}function U(_){if(_===62){let ce=i.toLowerCase();return wT.includes(ce)?(e.consume(_),K):N(_)}return bo(_)&&i.length<8?(e.consume(_),i+=String.fromCharCode(_),U):N(_)}function z(_){return _===93?(e.consume(_),R):N(_)}function R(_){return _===62?(e.consume(_),K):_===45&&n===2?(e.consume(_),R):N(_)}function K(_){return _===null||De(_)?(e.exit("htmlFlowData"),oe(_)):(e.consume(_),K)}function oe(_){return e.exit("htmlFlow"),t(_)}}function nJ(e,t,r){let o=this;return n;function n(i){return De(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 aJ(e,t,r){return o;function o(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(Di,t,r)}}var AT={name:"htmlText",tokenize:iJ};function iJ(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):bo(R)?(e.consume(R),C):r(R)}function p(R){return R===45?(e.consume(R),c):R===91?(e.consume(R),a=0,y):bo(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):De(R)?(i=u,B(R)):(e.consume(R),u)}function f(R){return R===45?(e.consume(R),d):u(R)}function d(R){return R===62?w(R):R===45?f(R):u(R)}function y(R){let K="CDATA[";return R===K.charCodeAt(a++)?(e.consume(R),a===K.length?h:y):r(R)}function h(R){return R===null?r(R):R===93?(e.consume(R),g):De(R)?(i=h,B(R)):(e.consume(R),h)}function g(R){return R===93?(e.consume(R),b):h(R)}function b(R){return R===62?w(R):R===93?(e.consume(R),b):h(R)}function x(R){return R===null||R===62?w(R):De(R)?(i=x,B(R)):(e.consume(R),x)}function v(R){return R===null?r(R):R===63?(e.consume(R),S):De(R)?(i=v,B(R)):(e.consume(R),v)}function S(R){return R===62?w(R):v(R)}function T(R){return bo(R)?(e.consume(R),P):r(R)}function P(R){return R===45||cr(R)?(e.consume(R),P):k(R)}function k(R){return De(R)?(i=k,B(R)):We(R)?(e.consume(R),k):w(R)}function C(R){return R===45||cr(R)?(e.consume(R),C):R===47||R===62||Vt(R)?O(R):r(R)}function O(R){return R===47?(e.consume(R),w):R===58||R===95||bo(R)?(e.consume(R),I):De(R)?(i=O,B(R)):We(R)?(e.consume(R),O):w(R)}function I(R){return R===45||R===46||R===58||R===95||cr(R)?(e.consume(R),I):M(R)}function M(R){return R===61?(e.consume(R),N):De(R)?(i=M,B(R)):We(R)?(e.consume(R),M):O(R)}function N(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),n=R,D):De(R)?(i=N,B(R)):We(R)?(e.consume(R),N):(e.consume(R),$)}function D(R){return R===n?(e.consume(R),n=void 0,L):R===null?r(R):De(R)?(i=D,B(R)):(e.consume(R),D)}function $(R){return R===null||R===34||R===39||R===60||R===61||R===96?r(R):R===47||R===62||Vt(R)?O(R):(e.consume(R),$)}function L(R){return R===47||R===62||Vt(R)?O(R):r(R)}function w(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):r(R)}function B(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),U}function U(R){return We(R)?qe(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 Bs={name:"labelEnd",tokenize:dJ,resolveTo:uJ,resolveAll:cJ},sJ={tokenize:fJ},lJ={tokenize:mJ},pJ={tokenize:hJ};function cJ(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 uJ(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=Gr(s,e.slice(a+1,a+o+3)),s=Gr(s,[["enter",c,t]]),s=Gr(s,Tp(t.parser.constructs.insideSpan.null,e.slice(a+o+4,i-3),t)),s=Gr(s,[["exit",c,t],e[i-2],e[i-1],["exit",p,t]]),s=Gr(s,e.slice(i+1)),s=Gr(s,[["exit",l,t]]),Br(e,a,e.length,s),e}function dJ(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(Sa(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(sJ,c,i?c:u)(f):f===91?e.attempt(lJ,c,i?p:u)(f):i?c(f):u(f)}function p(f){return e.attempt(pJ,c,u)(f)}function c(f){return t(f)}function u(f){return a._balanced=!0,r(f)}}function fJ(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 Vt(u)?Ls(e,a)(u):a(u)}function a(u){return u===41?c(u):Ny(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function i(u){return Vt(u)?Ls(e,l)(u):c(u)}function s(u){return r(u)}function l(u){return u===34||u===39||u===40?Ly(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):c(u)}function p(u){return Vt(u)?Ls(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 mJ(e,t,r){let o=this;return n;function n(s){return My.call(o,e,a,i,"reference","referenceMarker","referenceString")(s)}function a(s){return o.parser.defined.includes(Sa(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function i(s){return r(s)}}function hJ(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 NT={name:"labelStartImage",tokenize:yJ,resolveAll:Bs.resolveAll};function yJ(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 MT={name:"labelStartLink",tokenize:gJ,resolveAll:Bs.resolveAll};function gJ(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 rd={name:"lineEnding",tokenize:vJ};function vJ(e,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),qe(e,t,"linePrefix")}}var zs={name:"thematicBreak",tokenize:bJ};function bJ(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||De(p))?(e.exit("thematicBreak"),t(p)):r(p)}function l(p){return p===n?(e.consume(p),o++,l):(e.exit("thematicBreakSequence"),We(p)?qe(e,s,"whitespace")(p):s(p))}}var zr={name:"list",tokenize:PJ,continuation:{tokenize:CJ},exit:kJ},xJ={tokenize:RJ,partial:!0},TJ={tokenize:SJ,partial:!0};function PJ(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:Zu(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(zs,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 Zu(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(Di,o.interrupt?r:c,e.attempt(xJ,f,u))}function c(d){return o.containerState.initialBlankLine=!0,a++,f(d)}function u(d){return We(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 CJ(e,t,r){let o=this;return o.containerState._closeFlow=void 0,e.check(Di,n,a);function n(s){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,qe(e,t,"listItemIndent",o.containerState.size+1)(s)}function a(s){return o.containerState.furtherBlankLines||!We(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(TJ,t,i)(s))}function i(s){return o.containerState._closeFlow=!0,o.interrupt=void 0,qe(e,e.attempt(zr,t,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function SJ(e,t,r){let o=this;return qe(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 kJ(e){e.exit(this.containerState.type)}function RJ(e,t,r){let o=this;return qe(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!We(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}var By={name:"setextUnderline",tokenize:IJ,resolveTo:EJ};function EJ(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 IJ(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"),We(p)?qe(e,l,"lineSuffix")(p):l(p))}function l(p){return p===null||De(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}var Ow={tokenize:OJ};function OJ(e){let t=this,r=e.attempt(Di,o,e.attempt(this.parser.constructs.flowInitial,n,qe(e,e.attempt(this.parser.constructs.flow,n,e.attempt(ET,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 _w={resolveAll:Nw()},ww=Aw("string"),Dw=Aw("text");function Aw(e){return{tokenize:t,resolveAll:Nw(e==="text"?_J: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 Nw(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 _J(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 Mw(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:S,enter:T,exit:P,attempt:O(k),check:O(C),interrupt:O(C,{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(D){return i=Gr(i,D),x(),i[i.length-1]!==null?[]:(I(t,0),c.events=Tp(a,c.events,c),c.events)}function y(D,$){return DJ(h(D),$)}function h(D){return wJ(i,D)}function g(){let{line:D,column:$,offset:L,_index:w,_bufferIndex:B}=o;return{line:D,column:$,offset:L,_index:w,_bufferIndex:B}}function b(D){n[D.line]=D.column,N()}function x(){let D;for(;o._index<i.length;){let $=i[o._index];if(typeof $=="string")for(D=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===D&&o._bufferIndex<$.length;)v($.charCodeAt(o._bufferIndex));else v($)}}function v(D){l=void 0,f=D,u=u(D)}function S(D){De(D)?(o.line++,o.column=1,o.offset+=D===-3?2:1,N()):D!==-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=D,l=!0}function T(D,$){let L=$||{};return L.type=D,L.start=g(),c.events.push(["enter",L,c]),s.push(L),L}function P(D){let $=s.pop();return $.end=g(),c.events.push(["exit",$,c]),$}function k(D,$){I(D,$.from)}function C(D,$){$.restore()}function O(D,$){return L;function L(w,B,U){let z,R,K,oe;return Array.isArray(w)?ce(w):"tokenize"in w?ce([w]):_(w);function _(W){return fe;function fe(he){let ke=he!==null&&W[he],Te=he!==null&&W.null,Le=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Te)?Te:Te?[Te]:[]];return ce(Le)(he)}}function ce(W){return z=W,R=0,W.length===0?U:me(W[R])}function me(W){return fe;function fe(he){return oe=M(),K=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?ie(he):W.tokenize.call($?Object.assign(Object.create(c),$):c,p,Me,ie)(he)}}function Me(W){return l=!0,D(K,oe),B}function ie(W){return l=!0,oe.restore(),++R<z.length?me(z[R]):U}}}function I(D,$){D.resolveAll&&!a.includes(D)&&a.push(D),D.resolve&&Br(c.events,$,c.events.length-$,D.resolve(c.events.slice($),c)),D.resolveTo&&(c.events=D.resolveTo(c.events,c))}function M(){let D=g(),$=c.previous,L=c.currentConstruct,w=c.events.length,B=Array.from(s);return{restore:U,from:w};function U(){o=D,c.previous=$,c.currentConstruct=L,c.events.length=w,s=B,N()}}function N(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function wJ(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 DJ(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 LT={};Pn(LT,{attentionMarkers:()=>$J,contentInitial:()=>NJ,disable:()=>VJ,document:()=>AJ,flow:()=>LJ,flowInitial:()=>MJ,insideSpan:()=>FJ,string:()=>BJ,text:()=>zJ});var AJ={42:zr,43:zr,45:zr,48:zr,49:zr,50:zr,51:zr,52:zr,53:zr,54:zr,55:zr,56:zr,57:zr,62:Iy},NJ={91:IT},MJ={[-2]:ed,[-1]:ed,32:ed},LJ={35:_T,42:zs,45:[By,zs],60:DT,61:By,95:zs,96:wy,126:wy},BJ={38:_y,92:Oy},zJ={[-5]:rd,[-4]:rd,[-3]:rd,33:NT,38:_y,42:Qu,60:[kT,AT],91:MT,92:[OT,Oy],93:Bs,95:Qu,96:RT},FJ={null:[Qu,_w]},$J={null:[42,95]},VJ={null:[]};function BT(e){let r=gw([LT,...(e||{}).extensions||[]]),o={defined:[],lazy:{},constructs:r,content:n(Cw),document:n(kw),flow:n(Ow),string:n(ww),text:n(Dw)};return o;function n(a){return i;function i(s){return Mw(o,a,s)}}}function zT(e){for(;!Ay(e););return e}var Lw=/[\0\t\n\r]/g;function FT(){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(Lw.lastIndex=u,p=Lw.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 jJ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Bw(e){return e.replace(jJ,HJ)}function HJ(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let n=r.charCodeAt(1),a=n===120||n===88;return Ey(r.slice(a?2:1),a?16:10)}return xp(r)||e}var Fw={}.hasOwnProperty;function $T(e,t,r){return typeof t!="string"&&(r=t,t=void 0),UJ(r)(zT(BT(r).document().write(FT()(e,t,!0))))}function UJ(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ye),autolinkProtocol:O,autolinkEmail:O,atxHeading:a(Ke),blockQuote:a(fe),characterEscape:O,characterReference:O,codeFenced:a(he),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a(he,i),codeText:a(ke,i),codeTextData:O,data:O,codeFlowValue:O,definition:a(Te),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(Le),hardBreakEscape:a(re),hardBreakTrailing:a(re),htmlFlow:a(Z,i),htmlFlowData:O,htmlText:a(Z,i),htmlTextData:O,image:a(ve),label:i,link:a(ye),listItem:a(Ae),listItemValue:f,listOrdered:a($e,u),listUnordered:a($e),paragraph:a(Fe),reference:_,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(Ke),strong:a(Ye),thematicBreak:a(pt)},exit:{atxHeading:l(),atxHeadingSequence:T,autolink:l(),autolinkEmail:W,autolinkProtocol:ie,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:Me,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:y,codeFlowValue:I,codeIndented:l(b),codeText:l(L),codeTextData:I,data:I,definition:l(),definitionDestinationString:S,definitionLabelString:x,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(N),hardBreakTrailing:l(N),htmlFlow:l(D),htmlFlowData:I,htmlText:l($),htmlTextData:I,image:l(B),label:z,labelText:U,lineEnding:M,link:l(w),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ce,resourceDestinationString:R,resourceTitleString:K,resource:oe,setextHeading:l(C),setextHeadingLineSequence:k,setextHeadingText:P,strong:l(),thematicBreak:l()}};$w(t,(e||{}).mdastExtensions||[]);let r={};return o;function o(X){let de={type:"root",children:[]},Re={stack:[de],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 se=G.pop();J=n(X,se,J)}for(J=-1;++J<X.length;){let se=t[X[J][0]];Fw.call(se,X[J][1].type)&&se[X[J][1].type].call(Object.assign({sliceSerialize:X[J][2].sliceSerialize},Re),X[J][1])}if(Re.tokenStack.length>0){let se=Re.tokenStack[Re.tokenStack.length-1];(se[1]||zw).call(Re,void 0,se[0])}for(de.position={start:Ai(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:Ai(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<t.transforms.length;)de=t.transforms[J](de)||de;return de}function n(X,de,Re){let G=de-1,J=-1,se=!1,Oe,le,pe,Se;for(;++G<=Re;){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"&&(Oe&&!Se&&!J&&!pe&&(pe=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(Oe){let it=G;for(le=void 0;it--;){let Ge=X[it];if(Ge[1].type==="lineEnding"||Ge[1].type==="lineEndingBlank"){if(Ge[0]==="exit")continue;le&&(X[le][1].type="lineEndingBlank",se=!0),Ge[1].type="lineEnding",le=it}else if(!(Ge[1].type==="linePrefix"||Ge[1].type==="blockQuotePrefix"||Ge[1].type==="blockQuotePrefixWhitespace"||Ge[1].type==="blockQuoteMarker"||Ge[1].type==="listItemIndent"))break}pe&&(!le||pe<le)&&(Oe._spread=!0),Oe.end=Object.assign({},le?X[le][1].start:Ne[1].end),X.splice(le||G,0,["exit",Oe,Ne[2]]),G++,Re++}if(Ne[1].type==="listItemPrefix"){let it={type:"listItem",_spread:!1,start:Object.assign({},Ne[1].start),end:void 0};Oe=it,X.splice(G,0,["enter",it,Ne[2]]),G++,Re++,pe=void 0,Se=!0}}}return X[de][1]._spread=se,Re}function a(X,de){return Re;function Re(G){s.call(this,X(G),G),de&&de.call(this,G)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(X,de,Re){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([de,Re]),X.position={start:Ai(de.start),end:void 0}}function l(X){return de;function de(Re){X&&X.call(this,Re),p.call(this,Re)}}function p(X,de){let Re=this.stack.pop(),G=this.tokenStack.pop();if(G)G[0].type!==X.type&&(de?de.call(this,X,G[0]):(G[1]||zw).call(this,X,G[0]));else throw new Error("Cannot close `"+X.type+"` ("+_i({start:X.start,end:X.end})+"): it\u2019s not open");Re.position.end=Ai(X.end)}function c(){return CT(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function f(X){if(this.data.expectingFirstListItemValue){let de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function d(){let X=this.resume(),de=this.stack[this.stack.length-1];de.lang=X}function y(){let X=this.resume(),de=this.stack[this.stack.length-1];de.meta=X}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let X=this.resume(),de=this.stack[this.stack.length-1];de.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){let X=this.resume(),de=this.stack[this.stack.length-1];de.value=X.replace(/(\r?\n|\r)$/g,"")}function x(X){let de=this.resume(),Re=this.stack[this.stack.length-1];Re.label=de,Re.identifier=Sa(this.sliceSerialize(X)).toLowerCase()}function v(){let X=this.resume(),de=this.stack[this.stack.length-1];de.title=X}function S(){let X=this.resume(),de=this.stack[this.stack.length-1];de.url=X}function T(X){let de=this.stack[this.stack.length-1];if(!de.depth){let Re=this.sliceSerialize(X).length;de.depth=Re}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function k(X){let de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function O(X){let Re=this.stack[this.stack.length-1].children,G=Re[Re.length-1];(!G||G.type!=="text")&&(G=He(),G.position={start:Ai(X.start),end:void 0},Re.push(G)),this.stack.push(G)}function I(X){let de=this.stack.pop();de.value+=this.sliceSerialize(X),de.position.end=Ai(X.end)}function M(X){let de=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Re=de.children[de.children.length-1];Re.position.end=Ai(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(de.type)&&(O.call(this,X),I.call(this,X))}function N(){this.data.atHardBreak=!0}function D(){let X=this.resume(),de=this.stack[this.stack.length-1];de.value=X}function $(){let X=this.resume(),de=this.stack[this.stack.length-1];de.value=X}function L(){let X=this.resume(),de=this.stack[this.stack.length-1];de.value=X}function w(){let X=this.stack[this.stack.length-1];if(this.data.inReference){let de=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=de,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function B(){let X=this.stack[this.stack.length-1];if(this.data.inReference){let de=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=de,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function U(X){let de=this.sliceSerialize(X),Re=this.stack[this.stack.length-2];Re.label=Bw(de),Re.identifier=Sa(de).toLowerCase()}function z(){let X=this.stack[this.stack.length-1],de=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){let G=X.children;Re.children=G}else Re.alt=de}function R(){let X=this.resume(),de=this.stack[this.stack.length-1];de.url=X}function K(){let X=this.resume(),de=this.stack[this.stack.length-1];de.title=X}function oe(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function ce(X){let de=this.resume(),Re=this.stack[this.stack.length-1];Re.label=de,Re.identifier=Sa(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function me(X){this.data.characterReferenceType=X.type}function Me(X){let de=this.sliceSerialize(X),Re=this.data.characterReferenceType,G;Re?(G=Ey(de,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):G=xp(de);let J=this.stack.pop();J.value+=G,J.position.end=Ai(X.end)}function ie(X){I.call(this,X);let de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(X)}function W(X){I.call(this,X);let de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(X)}function fe(){return{type:"blockquote",children:[]}}function he(){return{type:"code",lang:null,meta:null,value:""}}function ke(){return{type:"inlineCode",value:""}}function Te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Le(){return{type:"emphasis",children:[]}}function Ke(){return{type:"heading",depth:0,children:[]}}function re(){return{type:"break"}}function Z(){return{type:"html",value:""}}function ve(){return{type:"image",title:null,url:"",alt:null}}function ye(){return{type:"link",title:null,url:"",children:[]}}function $e(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function Ae(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function Fe(){return{type:"paragraph",children:[]}}function Ye(){return{type:"strong",children:[]}}function He(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function Ai(e){return{line:e.line,column:e.column,offset:e.offset}}function $w(e,t){let r=-1;for(;++r<t.length;){let o=t[r];Array.isArray(o)?$w(e,o):WJ(e,o)}}function WJ(e,t){let r;for(r in t)if(Fw.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 zw(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_i({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_i({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_i({start:t.start,end:t.end})+") is still open")}function zy(e){let t=this;t.parser=r;function r(o){return $T(o,ne(V(V({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function Vw(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 jw(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 Hw(e,t){let r=t.value?t.value+`
|