@zydon/common 1.1.80 → 1.1.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as rt, f as C, n as B, r as mn, c as gn, i as tt, d as Ts, a as yn, v as Vs, w as ie, b as yt, e as $, g as R, t as Pt, h as et, j as Ss, k as bs, l as k, m as nt, o as vn, q as xt, s as vt, u as As, x as Ds, y as Cs, z as at, A as Ms, B as Pn, C as $t, D as xn, E as Tn, F as w, G as zt, H as dt, P as ws, I as Ls, L as Rs, S as Bs, J as Vn, K as Sn, M as bn, N as Et, O as jt, Q as ye, R as Ht, T as Fs, U as An, V as Dn, W as Es, X as js, Y as Cn, Z as Mn, _ as ks, $ as Is, a0 as Os, a1 as Us, a2 as Ns, a3 as Gs, a4 as Ks, a5 as $s, a6 as zs, a7 as Hs } from "./index-
|
|
1
|
+
import { p as rt, f as C, n as B, r as mn, c as gn, i as tt, d as Ts, a as yn, v as Vs, w as ie, b as yt, e as $, g as R, t as Pt, h as et, j as Ss, k as bs, l as k, m as nt, o as vn, q as xt, s as vt, u as As, x as Ds, y as Cs, z as at, A as Ms, B as Pn, C as $t, D as xn, E as Tn, F as w, G as zt, H as dt, P as ws, I as Ls, L as Rs, S as Bs, J as Vn, K as Sn, M as bn, N as Et, O as jt, Q as ye, R as Ht, T as Fs, U as An, V as Dn, W as Es, X as js, Y as Cn, Z as Mn, _ as ks, $ as Is, a0 as Os, a1 as Us, a2 as Ns, a3 as Gs, a4 as Ks, a5 as $s, a6 as zs, a7 as Hs } from "./index-f6e0f91c.js";
|
|
2
2
|
import wn, { useContext as _t, useId as _s, useEffect as Ws } from "react";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "@emotion/react";
|
|
@@ -6295,7 +6295,7 @@ const W4 = (e, t, r) => {
|
|
|
6295
6295
|
...n,
|
|
6296
6296
|
children: r
|
|
6297
6297
|
}
|
|
6298
|
-
), V4 = () => import("./features-
|
|
6298
|
+
), V4 = () => import("./features-1e11cf26.js").then((e) => e.default), nv = ({ children: e }) => /* @__PURE__ */ g.jsx(r5, { strict: !0, features: V4, children: /* @__PURE__ */ g.jsxs(Bt.div, { style: { height: "100%" }, children: [
|
|
6299
6299
|
" ",
|
|
6300
6300
|
e,
|
|
6301
6301
|
" "
|
|
@@ -27497,10 +27497,10 @@ const DY = Jr(Ue)(({
|
|
|
27497
27497
|
);
|
|
27498
27498
|
FY.displayName = "Label";
|
|
27499
27499
|
const IY = Ft(Ue)({
|
|
27500
|
-
|
|
27501
|
-
width:
|
|
27500
|
+
padding: "0 40px",
|
|
27501
|
+
width: "100%",
|
|
27502
27502
|
flexGrow: 1,
|
|
27503
|
-
minHeight:
|
|
27503
|
+
minHeight: "100%",
|
|
27504
27504
|
display: "flex",
|
|
27505
27505
|
alignItems: "center",
|
|
27506
27506
|
justifyContent: "center"
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aG as m, a8 as p, aH as d, aI as c, aK as v, aL as C, a9 as S, aa as k, ab as P, ac as F, ad as T, ae as g, af as A, aM as I, aN as M, aO as f, ag as h, a_ as D, ah as B, ai as x, b0 as w, aP as y, aj as E, aQ as R, b1 as N, ak as U, al as L, am as O, aR as G, an as H, ao as W, ap as q, aS as z, bm as K, aq as V, ar as j, as as J, b3 as Z, b4 as Q, b2 as X, aJ as Y, at as _, aT as $, aU as aa, av as sa, au as ea, aV as ra, aw as oa, ax as ta, bn as ia, bo as ba, ay as na, az as la, aW as ua, b5 as ma, aA as pa, a$ as da, aB as ca, aX as va, bp as Ca, aC as Sa, aD as ka, aZ as Pa, aE as Fa, aF as Ta, aY as ga, bq as Aa, bI as Ia, br as Ma, bF as fa, bG as ha, bH as Da, bP as Ba, bN as xa, bM as wa, bJ as ya, bK as Ea, bt as Ra, bu as Na, bv as Ua, bw as La, bx as Oa, by as Ga, bE as Ha, bD as Wa, bC as qa, bz as za, bs as Ka, bA as Va, bB as ja, bO as Ja, bL as Za, bj as Qa, bk as Xa, bl as Ya, bc as _a, bf as $a, b7 as as, b9 as ss, be as es, b6 as rs, bd as os, bb as ts, ba as is, bh as bs, bi as ns, bg as ls, b8 as us } from "./index-
|
|
1
|
+
import { aG as m, a8 as p, aH as d, aI as c, aK as v, aL as C, a9 as S, aa as k, ab as P, ac as F, ad as T, ae as g, af as A, aM as I, aN as M, aO as f, ag as h, a_ as D, ah as B, ai as x, b0 as w, aP as y, aj as E, aQ as R, b1 as N, ak as U, al as L, am as O, aR as G, an as H, ao as W, ap as q, aS as z, bm as K, aq as V, ar as j, as as J, b3 as Z, b4 as Q, b2 as X, aJ as Y, at as _, aT as $, aU as aa, av as sa, au as ea, aV as ra, aw as oa, ax as ta, bn as ia, bo as ba, ay as na, az as la, aW as ua, b5 as ma, aA as pa, a$ as da, aB as ca, aX as va, bp as Ca, aC as Sa, aD as ka, aZ as Pa, aE as Fa, aF as Ta, aY as ga, bq as Aa, bI as Ia, br as Ma, bF as fa, bG as ha, bH as Da, bP as Ba, bN as xa, bM as wa, bJ as ya, bK as Ea, bt as Ra, bu as Na, bv as Ua, bw as La, bx as Oa, by as Ga, bE as Ha, bD as Wa, bC as qa, bz as za, bs as Ka, bA as Va, bB as ja, bO as Ja, bL as Za, bj as Qa, bk as Xa, bl as Ya, bc as _a, bf as $a, b7 as as, b9 as ss, be as es, b6 as rs, bd as os, bb as ts, ba as is, bh as bs, bi as ns, bg as ls, b8 as us } from "./index-f6e0f91c.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "@emotion/react";
|
package/dist/index.umd.cjs
CHANGED
|
@@ -253,7 +253,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
253
253
|
Prefix can't start with '-' when allowNegative is true.
|
|
254
254
|
prefix: `+i+`
|
|
255
255
|
allowNegative: `+a+`
|
|
256
|
-
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function XX(e){e=KX(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=ln);var a=e.onBlur;a===void 0&&(a=ln);var o=e.thousandSeparator,s=e.decimalScale,u=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var c=e.defaultValue,f=e.value,d=e.valueIsNumericString,h=e.onValueChange,g=lx(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),p=nu(e),y=p.decimalSeparator,b=p.allowedDecimalSeparators,x=function(R){return yx(R,e)},C=function(R,U){return GX(R,U,e)},_=la(f)?c:f,w=d??YX(_,l,t);la(f)?la(c)||(w=w||typeof c=="number"):w=w||typeof f=="number";var k=function(R){return ux(R)?R:(typeof R=="number"&&(R=hx(R)),w&&typeof s=="number"?px(R,s,!!u):R)},T=vx(k(f),k(c),!!w,x,C,h),O=T[0],P=O.numAsString,F=O.formattedValue,Z=T[1],be=function(R){var U=R.target,Ce=R.key,fe=U.selectionStart,D=U.selectionEnd,$=U.value;if($===void 0&&($=""),fe!==D){i(R);return}Ce==="Backspace"&&$[0]==="-"&&fe===l.length+1&&r&&Nn(U,1),s&&u&&(Ce==="Backspace"&&$[fe-1]===y?(Nn(U,fe-1),R.preventDefault()):Ce==="Delete"&&$[fe]===y&&R.preventDefault()),b!=null&&b.includes(Ce)&&$[fe]===y&&Nn(U,fe+1);var W=o===!0?",":o;Ce==="Backspace"&&$[fe-1]===W&&Nn(U,fe-1),Ce==="Delete"&&$[fe]===W&&Nn(U,fe+1),i(R)},oe=function(R){var U=P;if(U.match(/\d/g)||(U=""),n||(U=FX(U)),u&&s&&(U=px(U,s,u)),U!==P){var Ce=yx(U,e);Z({formattedValue:Ce,value:U,floatValue:parseFloat(U)},{event:R,source:Mo.event})}a(R)},Q=function(R){return R===y?!0:Oo(R)},H=function(R){var U=R.currentValue,Ce=R.lastValue,fe=R.formattedValue,D=R.currentValueIndex,$=R.formattedValueIndex,W=U[D],se=fe[$],X=gx(Ce,U),ce=X.to;return D>=ce.start&&D<ce.end&&b&&b.includes(W)&&se===y?!0:W===se};return Object.assign(Object.assign({},g),{value:F,valueIsNumericString:!1,isValidInputCharacter:Q,isCharacterSame:H,onValueChange:Z,format:x,removeFormatting:C,getCaretBoundary:function(R){return qX(R,e)},onKeyDown:be,onBlur:oe})}function ZX(e){var t=XX(e);return m.createElement(WX,Object.assign({},t))}const iu=m.forwardRef(({decimalScale:e=0,fixedDecimalScale:t=!0,prefix:r,allowNegative:n,minValue:i,maxValue:a=1/0,maxLength:o,value:s,inputProps:u,InputProps:l,size:c,disabled:f,name:d,helperText:h,error:g,fullWidth:p,label:y,required:b,onChange:x,tabIndex:C},_)=>{const w=m.useRef(null),k=T=>{x&&(w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{const{floatValue:O}=T,P=O||0;if(i!==void 0&&i>P){x({target:{name:d,value:i}});return}if(O!==void 0&&a<P){x({target:{name:d,value:a}});return}x({target:{name:d,value:O}})},600))};return m.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]),v.jsx(ZX,{getInputRef:_,value:s,prefix:r,decimalSeparator:",",thousandSeparator:".",decimalScale:e,fixedDecimalScale:t,autoComplete:"off",allowNegative:n,maxLength:o,onValueChange:k,customInput:E.TextField,InputProps:{...l},inputProps:{...u,tabIndex:C},disabled:f,size:c,helperText:h,error:g,fullWidth:p,label:y,required:b})});iu.displayName="NumberInput";const wh=m.forwardRef(({name:e,increment:t=1,updadteForMultiple:r,allowNegative:n=!1,value:i=0,onChange:a,minValue:o,maxValue:s,decimalScale:u,disabled:l,tabIndex:c,...f},d)=>{const h=ox(i,t,u),g=()=>{if(!n&&i-t<0)return;const b=i-t,x=Math.floor(i/t)*t,C=!h&&r?x:b;o!==void 0&&b<o?a(o):a(yh(C))},p=()=>{const b=Number(i)+t,x=Math.ceil(i/t)*t,_=yh(!h&&r?x:b);s!==void 0&&b>=s?a(s):a(o!==void 0&&_<=o?o:_)},y=b=>{const x=Number(b.target.value),C=Math.ceil(x/t)*t,_=r?C:x;if(o!==void 0&&x<=o){a(o);return}if(s!==void 0&&x>=s){a(s);return}a(_)};return v.jsx(iu,{ref:d,name:e,value:i,minValue:o,maxValue:s,allowNegative:n,decimalScale:u,InputProps:{startAdornment:v.jsx(E.InputAdornment,{position:"start",children:v.jsx(E.IconButton,{size:"medium",disabled:l||(n?!1:!i),onClick:g,children:v.jsx(nt,{icon:"eva:minus-fill",width:14,height:14,color:"primary.main"})})}),endAdornment:v.jsx(E.InputAdornment,{position:"end",children:v.jsx(E.IconButton,{size:"medium",onClick:p,disabled:l,children:v.jsx(nt,{icon:"eva:plus-fill",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:c},onChange:y,disabled:l,...f})});wh.displayName="Incrementer";const QX=Xr(E.Box)(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light",n=t.variant==="filled",i=t.variant==="outlined",a=t.variant==="soft",o={...t.color==="default"&&{...i&&{backgroundColor:"transparent",color:e.palette.text.primary,border:`1px solid ${L(e.palette.grey[500],.32)}`},...a&&{color:r?e.palette.text.primary:e.palette.common.white,backgroundColor:L(e.palette.grey[500],.16)}}},s={...t.color!=="default"&&{...n&&{color:e.palette[t.color].contrastText,backgroundColor:e.palette[t.color].main},...i&&{backgroundColor:"transparent",color:e.palette[t.color].main,border:`1px solid ${e.palette[t.color].main}`},...a&&{color:e.palette[t.color][r?"dark":"light"],backgroundColor:L(e.palette[t.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"none",padding:e.spacing(0,1),color:e.palette.grey[800],fontSize:e.typography.pxToRem(12),fontFamily:e.typography.fontFamily,backgroundColor:e.palette.grey[300],fontWeight:e.typography.fontWeightBold,...s,...o}}),bx=m.forwardRef(({children:e,color:t="default",variant:r="soft",startIcon:n,endIcon:i,sx:a,...o},s)=>{const u=bn(),l={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return v.jsxs(QX,{ref:s,component:"span",ownerState:{color:t,variant:r},sx:{...n&&{pl:.75},...i&&{pr:.75},...a},theme:u,...o,children:[n&&v.jsxs(E.Box,{sx:{mr:.75,...l},children:[" ",n," "]}),e,i&&v.jsxs(E.Box,{sx:{ml:.75,...l},children:[" ",i," "]})]})});bx.displayName="Label";const JX=E.styled(E.Box)({px:5,width:1,flexGrow:1,minHeight:1,display:"flex",alignItems:"center",justifyContent:"center"}),eZ=()=>v.jsx(JX,{children:v.jsx(E.LinearProgress,{color:"inherit",sx:{width:1,maxWidth:360}})});function un(e){return typeof e=="string"||e instanceof String}function xx(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function wx(e,t){return Array.isArray(t)?wx(e,(r,n)=>t.includes(n)):Object.entries(e).reduce((r,n)=>{let[i,a]=n;return t(a,i)&&(r[i]=a),r},{})}const ue={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function tZ(e){switch(e){case ue.LEFT:return ue.FORCE_LEFT;case ue.RIGHT:return ue.FORCE_RIGHT;default:return e}}function Ch(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function au(e,t){if(t===e)return!0;const r=Array.isArray(t),n=Array.isArray(e);let i;if(r&&n){if(t.length!=e.length)return!1;for(i=0;i<t.length;i++)if(!au(t[i],e[i]))return!1;return!0}if(r!=n)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){const a=t instanceof Date,o=e instanceof Date;if(a&&o)return t.getTime()==e.getTime();if(a!=o)return!1;const s=t instanceof RegExp,u=e instanceof RegExp;if(s&&u)return t.toString()==e.toString();if(s!=u)return!1;const l=Object.keys(t);for(i=0;i<l.length;i++)if(!Object.prototype.hasOwnProperty.call(e,l[i]))return!1;for(i=0;i<l.length;i++)if(!au(e[l[i]],t[l[i]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}class rZ{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}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?ue.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ue.RIGHT:ue.LEFT}}function ye(e,t){return new ye.InputMask(e,t)}function Cx(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?ye.MaskedRegExp:un(e)?ye.MaskedPattern:e===Date?ye.MaskedDate:e===Number?ye.MaskedNumber:Array.isArray(e)||e===Array?ye.MaskedDynamic:ye.Masked&&e.prototype instanceof ye.Masked?e:ye.Masked&&e instanceof ye.Masked?e.constructor:e instanceof Function?ye.MaskedFunction:(console.warn("Mask not found for mask",e),ye.Masked)}function ou(e){if(!e)throw new Error("Options in not defined");if(ye.Masked){if(e.prototype instanceof ye.Masked)return{mask:e};const{mask:t=void 0,...r}=e instanceof ye.Masked?{mask:e}:xx(e)&&e.mask instanceof ye.Masked?e:{};if(t){const n=t.mask;return{...wx(t,(i,a)=>!a.startsWith("_")),mask:t.constructor,_mask:n,...r}}}return xx(e)?{...e}:{mask:e}}function Bn(e){if(ye.Masked&&e instanceof ye.Masked)return e;const t=ou(e),r=Cx(t.mask);if(!r)throw new Error("Masked class is not found for provided 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)}ye.createMask=Bn;class Sh{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,r){if(!(t==null||r==null||t===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(t,r)}catch{}}get isActive(){return!1}}ye.MaskElement=Sh;class Vn extends Sh{constructor(t){super(),this.input=t,this._handlers={}}get rootElement(){var t,r,n;return(t=(r=(n=this.input).getRootNode)==null?void 0:r.call(n))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){Object.keys(t).forEach(r=>this._toggleEventHandler(Vn.EVENTS_MAP[r],t[r]))}unbindEvents(){Object.keys(this._handlers).forEach(t=>this._toggleEventHandler(t))}_toggleEventHandler(t,r){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),r&&(this.input.addEventListener(t,r),this._handlers[t]=r)}}Vn.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},ye.HTMLMaskElement=Vn;class nZ extends Vn{constructor(t){super(t),this.input=t,this._handlers={}}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}}ye.HTMLMaskElement=Vn;class Sx extends Vn{get _unsafeSelectionStart(){const t=this.rootElement,r=t.getSelection&&t.getSelection(),n=r&&r.anchorOffset,i=r&&r.focusOffset;return i==null||n==null||n<i?n:i}get _unsafeSelectionEnd(){const t=this.rootElement,r=t.getSelection&&t.getSelection(),n=r&&r.anchorOffset,i=r&&r.focusOffset;return i==null||n==null||n>i?n:i}_unsafeSelect(t,r){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,t),n.setEnd(this.input.lastChild||this.input,r);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(n))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}ye.HTMLContenteditableMaskElement=Sx;class iZ{constructor(t,r){this.el=t instanceof Sh?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new Sx(t):new nZ(t),this.masked=Bn(r),this._listeners={},this._value="",this._unmaskedValue="",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.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 ye.Masked)&&this.masked.constructor===Cx(t)){this.masked.updateOptions({mask:t});return}const r=t instanceof ye.Masked?t:Bn({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(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl(),this.alignCursor())}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})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,r){const n=this._listeners[t];n&&n.forEach(i=>i(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(){const t=this.masked.unmaskedValue,r=this.masked.value,n=this.displayValue,i=this.unmaskedValue!==t||this.value!==r;this._unmaskedValue=t,this._value=r,this.el.value!==n&&(this.el.value=n),i&&this._fireChangeEvents()}updateOptions(t){const{mask:r,...n}=t,i=!this.maskEquals(r),a=!au(this.masked,n);i&&(this.mask=r),a&&this.masked.updateOptions(n),(i||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,ue.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;const n=this._listeners[t].indexOf(r);return n>=0&&this._listeners[t].splice(n,1),this}_onInput(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();const r=new rZ({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,i=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=n===this.masked.rawInputValue?r.removeDirection:ue.NONE;let o=this.masked.nearestInputPos(r.startChangePos+i,a);a!==ue.NONE&&(o=this.masked.nearestInputPos(o,ue.NONE)),this.updateControl(),this.updateCursor(o),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()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}ye.InputMask=iZ;class qe{static normalize(t){return Array.isArray(t)?t:[t,new qe]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},t)}aggregate(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}ye.ChangeDetails=qe;class jr{constructor(t,r,n){t===void 0&&(t=""),r===void 0&&(r=0),this.value=t,this.from=r,this.stop=n}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"";const r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class Kt{constructor(t){this._value="",this._update({...Kt.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){Object.keys(t).length&&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,n){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 jr(this.extractInput(t,r),t)}appendTail(t){return un(t)&&(t=new jr(String(t))),t.appendTo(this)}_appendCharRaw(t,r){return t?(this._value+=t,new qe({inserted:t,rawInserted:t})):new qe}_appendChar(t,r,n){r===void 0&&(r={});const i=this.state;let a;if([t,a]=this.doPrepareChar(t,r),a=a.aggregate(this._appendCharRaw(t,r)),a.inserted){let o,s=this.doValidate(r)!==!1;if(s&&n!=null){const u=this.state;this.overwrite===!0&&(o=n.state,n.unshift(this.displayValue.length-a.tailShift));let l=this.appendTail(n);s=l.rawInserted===n.toString(),!(s&&l.inserted)&&this.overwrite==="shift"&&(this.state=u,o=n.state,n.shift(),l=this.appendTail(n),s=l.rawInserted===n.toString()),s&&l.inserted&&(this.state=u)}s||(a=new qe,this.state=i,n&&o&&(n.state=o))}return a}_appendPlaceholder(){return new qe}_appendEager(){return new qe}append(t,r,n){if(!un(t))throw new Error("value should be string");const i=un(n)?new jr(String(n)):n;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[t,a]=this.doPrepare(t,r);for(let o=0;o<t.length;++o){const s=this._appendChar(t[o],r,i);if(!s.rawInserted&&!this.doSkipInvalid(t[o],r,i))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&t&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).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 qe}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const r=this.rawInputValue,n=this.value,i=t();return this.rawInputValue=r,this.value&&this.value!==n&&n.indexOf(this.value)===0&&this.append(n.slice(this.displayValue.length),{},""),delete this._refreshing,i}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const r=this.state,n=t(this);return this.state=r,delete this._isolated,n}doSkipInvalid(t,r,n){return!!this.skipInvalid}doPrepare(t,r){return r===void 0&&(r={}),qe.normalize(this.prepare?this.prepare(t,this,r):t)}doPrepareChar(t,r){return r===void 0&&(r={}),qe.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,n,i,a){i===void 0&&(i=ue.NONE),a===void 0&&(a={input:!0});const o=t+r,s=this.extractTail(o),u=this.eager===!0||this.eager==="remove";let l;u&&(i=tZ(i),l=this.extractInput(0,o,{raw:!0}));let c=t;const f=new qe;if(i!==ue.NONE&&(c=this.nearestInputPos(t,r>1&&t!==0&&!u?ue.NONE:i),f.tailShift=c-t),f.aggregate(this.remove(c)),u&&i!==ue.NONE&&l===this.rawInputValue)if(i===ue.FORCE_LEFT){let d;for(;l===this.rawInputValue&&(d=this.displayValue.length);)f.aggregate(new qe({tailShift:-1})).aggregate(this.remove(d-1))}else i===ue.FORCE_RIGHT&&s.unshift();return f.aggregate(this.append(n,a,s))}maskEquals(t){return this.mask===t}typedValueEquals(t){const r=this.typedValue;return t===r||Kt.EMPTY_VALUES.includes(t)&&Kt.EMPTY_VALUES.includes(r)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}}Kt.DEFAULTS={skipInvalid:!0},Kt.EMPTY_VALUES=[void 0,null,""],ye.Masked=Kt;class zn{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=un(t)?new jr(String(t)):t;const r=this.chunks[this.chunks.length-1],n=r&&(r.stop===t.stop||t.stop==null)&&t.from===r.from+r.toString().length;if(t instanceof jr)n?r.extend(t.toString()):this.chunks.push(t);else if(t instanceof zn){if(t.stop==null){let i;for(;t.chunks.length&&t.chunks[0].stop==null;)i=t.chunks.shift(),i.from+=t.from,this.extend(i)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof ye.MaskedPattern))return new jr(this.toString()).appendTo(t);const r=new qe;for(let n=0;n<this.chunks.length&&!r.skip;++n){const i=this.chunks[n],a=t._mapPosToBlock(t.displayValue.length),o=i.stop;let s;if(o!=null&&(!a||a.index<=o)){if(i instanceof zn||t._stops.indexOf(o)>=0){const u=t._appendPlaceholder(o);r.aggregate(u)}s=i instanceof zn&&t._blocks[o]}if(s){const u=s.appendTail(i);u.skip=!1,r.aggregate(u),t._value+=u.inserted;const l=i.toString().slice(u.rawInserted.length);l&&r.aggregate(t.append(l,{tail:!0}))}else r.aggregate(t.append(i.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){const{chunks:r,...n}=t;Object.assign(this,n),this.chunks=r.map(i=>{const a="chunks"in i?new zn:new jr;return a.state=i,a})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const r=t!=null?t-this.from:t;let n=0;for(;n<this.chunks.length;){const i=this.chunks[n],a=i.unshift(r);if(i.toString()){if(!a)break;++n}else this.chunks.splice(n,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const r=this.chunks[t],n=r.shift();if(r.toString()){if(!n)break;--t}else this.chunks.splice(t,1);if(n)return n}return""}}class aZ{constructor(t,r){this.masked=t,this._log=[];const{offset:n,index:i}=t._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=i,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(){const 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,ue.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ue.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ue.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ue.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,ue.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ue.NONE),!0})}}class Ex{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 qe}nearestInputPos(t,r){r===void 0&&(r=ue.NONE);const n=0,i=this._value.length;switch(r){case ue.LEFT:case ue.FORCE_LEFT:return n;case ue.NONE:case ue.RIGHT:case ue.FORCE_RIGHT:default:return i}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._isRawInput?r-t:0}extractInput(t,r,n){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),n===void 0&&(n={}),n.raw&&this._isRawInput&&this._value.slice(t,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,r){r===void 0&&(r={});const n=new qe;if(this.isFilled)return n;const i=this.eager===!0||this.eager==="append",o=this.char===t&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!i)&&!r.tail;return o&&(n.rawInserted=this.char),this._value=n.inserted=this.char,this._isRawInput=o&&(r.raw||r.input),n}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new qe;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new jr("")}appendTail(t){return un(t)&&(t=new jr(String(t))),t.appendTo(this)}append(t,r,n){const i=this._appendChar(t[0],r);return n!=null&&(i.tailShift+=this.appendTail(n).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}}class su{constructor(t){const{parent:r,isOptional:n,placeholderChar:i,displayChar:a,lazy:o,eager:s,...u}=t;this.masked=Bn(u),Object.assign(this,{parent:r,isOptional:n,placeholderChar:i,displayChar:a,lazy:o,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 qe}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 qe;const n=this.masked.state,i=this.masked._appendChar(t,this.currentMaskFlags(r));return i.inserted&&this.doValidate(r)===!1&&(i.inserted=i.rawInserted="",this.masked.state=n),!i.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(t,r,n){return this.masked.append(t,this.currentMaskFlags(r),n)}_appendPlaceholder(){const t=new qe;return this.isFilled||this.isOptional||(this.isFilled=!0,t.inserted=this.placeholderChar),t}_appendEager(){return new qe}extractTail(t,r){return this.masked.extractTail(t,r)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,r,n){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.masked.extractInput(t,r,n)}nearestInputPos(t,r){r===void 0&&(r=ue.NONE);const n=0,i=this.value.length,a=Math.min(Math.max(t,n),i);switch(r){case ue.LEFT:case ue.FORCE_LEFT:return this.isComplete?a:n;case ue.RIGHT:case ue.FORCE_RIGHT:return this.isComplete?a:i;case ue.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{...t,_beforeTailState:(t==null||(r=t._beforeTailState)==null?void 0:r.masked)||(t==null?void 0:t._beforeTailState)}}}su.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]/,"*":/./};class oZ extends Kt{updateOptions(t){super.updateOptions(t)}_update(t){const r=t.mask;r&&(t.validate=n=>n.search(r)>=0),super._update(t)}}ye.MaskedRegExp=oZ;class Xt extends Kt{constructor(t){super({...Xt.DEFAULTS,...t,definitions:Object.assign({},su.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(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const r=this.mask;if(!r||!t)return;let n=!1,i=!1;for(let a=0;a<r.length;++a){if(this.blocks){const l=r.slice(a),c=Object.keys(this.blocks).filter(d=>l.indexOf(d)===0);c.sort((d,h)=>h.length-d.length);const f=c[0];if(f){const{expose:d,...h}=ou(this.blocks[f]),g=Bn({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...h,parent:this});g&&(this._blocks.push(g),d&&(this.exposeBlock=g),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),a+=f.length-1;continue}}let o=r[a],s=o in t;if(o===Xt.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){n=!n;continue}if(o==="["||o==="]"){i=!i;continue}if(o===Xt.ESCAPE_CHAR){if(++a,o=r[a],!o)break;s=!1}const u=s?new su({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...ou(t[o]),parent:this}):new Ex({char:o,eager:this.eager,isUnmasking:n});this._blocks.push(u)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){const{_blocks:r,...n}=t;this._blocks.forEach((i,a)=>i.state=r[a]),super.state=n}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){const 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){const 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){const 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;const r=new qe;let n=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(n==null)return r;this._blocks[n].isFilled&&++n;for(let i=n;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(t,r){r===void 0&&(r={});const n=this._mapPosToBlock(this.displayValue.length),i=new qe;if(!n)return i;for(let o=n.index;;++o){var a;const s=this._blocks[o];if(!s)break;const u=s._appendChar(t,{...r,_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[o]}),l=u.skip;if(i.aggregate(u),l||u.rawInserted)break}return i}extractTail(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);const n=new zn;return t===r||this._forEachBlocksInRange(t,r,(i,a,o,s)=>{const u=i.extractTail(o,s);u.stop=this._findStopBefore(a),u.from=this._blockStartPos(a),u instanceof zn&&(u.blockIndex=a),n.extend(u)}),n}extractInput(t,r,n){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),n===void 0&&(n={}),t===r)return"";let i="";return this._forEachBlocksInRange(t,r,(a,o,s,u)=>{i+=a.extractInput(s,u,n)}),i}_findStopBefore(t){let r;for(let n=0;n<this._stops.length;++n){const i=this._stops[n];if(i<=t)r=i;else break}return r}_appendPlaceholder(t){const r=new qe;if(this.lazy&&t==null)return r;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return r;const i=n.index,a=t??this._blocks.length;return this._blocks.slice(i,a).forEach(o=>{if(!o.lazy||t!=null){var s;const u=o._appendPlaceholder((s=o._blocks)==null?void 0:s.length);this._value+=u.inserted,r.aggregate(u)}}),r}_mapPosToBlock(t){let r="";for(let n=0;n<this._blocks.length;++n){const i=this._blocks[n],a=r.length;if(r+=i.displayValue,t<=r.length)return{index:n,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((r,n)=>r+=n.displayValue.length,0)}_forEachBlocksInRange(t,r,n){r===void 0&&(r=this.displayValue.length);const i=this._mapPosToBlock(t);if(i){const a=this._mapPosToBlock(r),o=a&&i.index===a.index,s=i.offset,u=a&&o?a.offset:this._blocks[i.index].displayValue.length;if(n(this._blocks[i.index],i.index,s,u),a&&!o){for(let l=i.index+1;l<a.index;++l)n(this._blocks[l],l,0,this._blocks[l].displayValue.length);n(this._blocks[a.index],a.index,0,a.offset)}}}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);const n=super.remove(t,r);return this._forEachBlocksInRange(t,r,(i,a,o,s)=>{n.aggregate(i.remove(o,s))}),n}nearestInputPos(t,r){if(r===void 0&&(r=ue.NONE),!this._blocks.length)return 0;const n=new aZ(this,t);if(r===ue.NONE)return n.pushRightBeforeInput()||(n.popState(),n.pushLeftBeforeInput())?n.pos:this.displayValue.length;if(r===ue.LEFT||r===ue.FORCE_LEFT){if(r===ue.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===t)return t;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),r===ue.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=t||(n.popState(),n.ok&&n.pos<=t))return n.pos;n.popState()}return n.ok?n.pos:r===ue.FORCE_LEFT?0:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:0)}return r===ue.RIGHT||r===ue.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:r===ue.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:this.nearestInputPos(t,ue.LEFT))):t}totalInputPositions(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let n=0;return this._forEachBlocksInRange(t,r,(i,a,o,s)=>{n+=i.totalInputPositions(o,s)}),n}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const r=this._maskedBlocks[t];return r?r.map(n=>this._blocks[n]):[]}}Xt.DEFAULTS={lazy:!0,placeholderChar:"_"},Xt.STOP_CHAR="`",Xt.ESCAPE_CHAR="\\",Xt.InputDefinition=su,Xt.FixedDefinition=Ex,ye.MaskedPattern=Xt;class lu extends Xt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:r=this.to||0,from:n=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...o}=t;this.to=r,this.from=n,this.maxLength=Math.max(String(r).length,i),this.autofix=a;const s=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<u.length&&u[l]===s[l];)++l;o.mask=u.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let r="",n="";const[,i,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(i.length)+a,n="9".repeat(i.length)+a),r=r.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[r,n]}doPrepareChar(t,r){r===void 0&&(r={});let n;if([t,n]=super.doPrepareChar(t.replace(/\D/g,""),r),!this.autofix||!t)return[t,n];const i=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),o=this.value+t;if(o.length>this.maxLength)return["",n];const[s,u]=this.boundaries(o);return Number(u)<this.from?[i[o.length-1],n]:Number(s)>this.to?this.autofix==="pad"&&o.length<this.maxLength?["",n.aggregate(this.append(i[o.length-1]+t,r))]:[a[o.length-1],n]:[t,n]}doValidate(t){const r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;const[i,a]=this.boundaries(r);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(t)}}ye.MaskedRange=lu;class Wn extends Xt{constructor(t){const{mask:r,pattern:n,...i}={...Wn.DEFAULTS,...t};super({...i,mask:un(r)?r:n})}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:r,pattern:n,blocks:i,...a}={...Wn.DEFAULTS,...t},o=Object.assign({},Wn.GET_DEFAULT_BLOCKS());t.min&&(o.Y.from=t.min.getFullYear()),t.max&&(o.Y.to=t.max.getFullYear()),t.min&&t.max&&o.Y.from===o.Y.to&&(o.m.from=t.min.getMonth()+1,o.m.to=t.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=t.min.getDate(),o.d.to=t.max.getDate())),Object.assign(o,this.blocks,i),Object.keys(o).forEach(s=>{const u=o[s];!("autofix"in u)&&"autofix"in t&&(u.autofix=t.autofix)}),super._update({...a,mask:un(r)?r:n,blocks:o})}doValidate(t){const 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)}}Wn.GET_DEFAULT_BLOCKS=()=>({d:{mask:lu,from:1,to:31,maxLength:2},m:{mask:lu,from:1,to:12,maxLength:2},Y:{mask:lu,from:1900,to:9999}}),Wn.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";const r=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),i=e.getFullYear();return[r,n,i].join(".")},parse:(e,t)=>{const[r,n,i]=e.split(".").map(Number);return new Date(i,n-1,r)}},ye.MaskedDate=Wn;class Ao extends Kt{constructor(t){super({...Ao.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=>{const{expose:n,...i}=ou(r),a=Bn({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return n&&(this.exposeMask=a),a}):[])}_appendCharRaw(t,r){r===void 0&&(r={});const n=this._applyDispatch(t,r);return this.currentMask&&n.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(r))),n}_applyDispatch(t,r,n){t===void 0&&(t=""),r===void 0&&(r={}),n===void 0&&(n="");const i=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,o=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,s=a.slice(o.length),u=this.currentMask,l=new qe,c=u==null?void 0:u.state;if(this.currentMask=this.doDispatch(t,{...r},n),this.currentMask)if(this.currentMask!==u){if(this.currentMask.reset(),o){const f=this.currentMask.append(o,{raw:!0});l.tailShift=f.inserted.length-i.length}s&&(l.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)}else c&&(this.currentMask.state=c);return l}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const r=new qe;return t&&r.aggregate(this._applyDispatch("",{},t)),r.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var r,n;return{...t,_beforeTailState:((r=t._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((n=t._beforeTailState)==null?void 0:n.currentMask)||t._beforeTailState}}doDispatch(t,r,n){return r===void 0&&(r={}),n===void 0&&(n=""),this.dispatch(t,this,r,n)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,r){r===void 0&&(r={});let[n,i]=super.doPrepare(t,r);if(this.currentMask){let a;[n,a]=super.doPrepare(n,this.currentMaskFlags(r)),i=i.aggregate(a)}return[n,i]}doPrepareChar(t,r){r===void 0&&(r={});let[n,i]=super.doPrepareChar(t,r);if(this.currentMask){let a;[n,a]=super.doPrepareChar(n,this.currentMaskFlags(r)),i=i.aggregate(a)}return[n,i]}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){const n=new qe;return this.currentMask&&n.aggregate(this.currentMask.remove(t,r)).aggregate(this._applyDispatch()),n}get state(){var t;return{...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){const{compiledMasks:r,currentMaskRef:n,currentMask:i,...a}=t;r&&this.compiledMasks.forEach((o,s)=>o.state=r[s]),n!=null&&(this.currentMask=n,this.currentMask.state=i),super.state=a}extractInput(t,r,n){return this.currentMask?this.currentMask.extractInput(t,r,n):""}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}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((r,n)=>{if(!t[n])return;const{mask:i,...a}=t[n];return au(r,a)&&r.maskEquals(i)}):super.maskEquals(t)}typedValueEquals(t){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(t))}}Ao.DEFAULTS=void 0,Ao.DEFAULTS={dispatch:(e,t,r,n)=>{if(!t.compiledMasks.length)return;const i=t.rawInputValue,a=t.compiledMasks.map((o,s)=>{const u=t.currentMask===o,l=u?o.displayValue.length:o.nearestInputPos(o.displayValue.length,ue.FORCE_LEFT);return o.rawInputValue!==i?(o.reset(),o.append(i,{raw:!0})):u||o.remove(l),o.append(e,t.currentMaskFlags(r)),o.appendTail(n),{index:s,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(l,o.nearestInputPos(o.displayValue.length,ue.FORCE_LEFT)))}});return a.sort((o,s)=>s.weight-o.weight||s.totalInputPositions-o.totalInputPositions),t.compiledMasks[a[0].index]}},ye.MaskedDynamic=Ao;class sZ extends Xt{constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:r,...n}=t;if(r){const i=r.map(s=>s.length),a=Math.min(...i),o=Math.max(...i)-a;n.mask="*".repeat(a),o&&(n.mask+="["+"*".repeat(o)+"]"),this.enum=r}super._update(n)}doValidate(t){return this.enum.some(r=>r.indexOf(this.unmaskedValue)===0)&&super.doValidate(t)}}ye.MaskedEnum=sZ;class lZ extends Kt{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}ye.MaskedFunction=lZ;class rr extends Kt{constructor(t){super({...rr.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",n=(this.scale?"("+Ch(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+r+n),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Ch).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Ch(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const 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={});const[n,i]=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&&!n&&(i.skip=!0),n&&!this.allowPositive&&!this.value&&n!=="-"&&i.aggregate(this._appendChar("-")),[n,i]}_separatorsCount(t,r){r===void 0&&(r=!1);let n=0;for(let i=0;i<t;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++n,r&&(t+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,r,n){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,n))}_appendCharRaw(t,r){if(r===void 0&&(r={}),!this.thousandsSeparator)return super._appendCharRaw(t,r);const n=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const a=super._appendCharRaw(t,r);this._value=this._insertThousandsSeparators(this._value);const o=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(o);return a.tailShift+=(s-i)*this.thousandsSeparator.length,a.skip=!a.rawInserted&&t===this.thousandsSeparator,a}_findSeparatorAround(t){if(this.thousandsSeparator){const r=t-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,r);if(n<=t)return n}return-1}_adjustRangeWithSeparators(t,r){const n=this._findSeparatorAround(t);n>=0&&(t=n);const i=this._findSeparatorAround(r);return i>=0&&(r=i+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);const n=this.value.slice(0,t),i=this.value.slice(r),a=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+i));const o=this._separatorsCountFromSlice(n);return new qe({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(t,r){if(!this.thousandsSeparator)return t;switch(r){case ue.NONE:case ue.LEFT:case ue.FORCE_LEFT:{const n=this._findSeparatorAround(t-1);if(n>=0){const i=n+this.thousandsSeparator.length;if(t<i||this.value.length<=i||r===ue.FORCE_LEFT)return n}break}case ue.RIGHT:case ue.FORCE_RIGHT:{const n=this._findSeparatorAround(t);if(n>=0)return n+this.thousandsSeparator.length}}return t}doValidate(t){let r=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(r){const n=this.number;r=r&&!isNaN(n)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return r&&super.doValidate(t)}doCommit(){if(this.value){const t=this.number;let 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 n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(t){const r=this._removeThousandsSeparators(t).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(n,i,a,o)=>i+o),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;const 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,n){r===void 0&&(r={});const i=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===rr.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,r,n)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,rr.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(rr.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)||rr.EMPTY_VALUES.includes(t)&&rr.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}rr.UNMASKED_RADIX=".",rr.EMPTY_VALUES=[...Kt.EMPTY_VALUES,0],rr.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[rr.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})},ye.MaskedNumber=rr;const Eh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Tx(e,t,r){t===void 0&&(t=Eh.MASKED),r===void 0&&(r=Eh.MASKED);const n=Bn(e);return i=>n.runIsolated(a=>(a[t]=i,a[r]))}function uZ(e,t,r,n){return Tx(t,r,n)(e)}ye.PIPE_TYPE=Eh,ye.createPipe=Tx,ye.pipe=uZ;try{globalThis.IMask=ye}catch{}const kx={mask:M.oneOfType([M.array,M.func,M.string,M.instanceOf(RegExp),M.oneOf([Date,Number,ye.Masked]),M.instanceOf(ye.Masked)]),value:M.any,unmask:M.oneOfType([M.bool,M.oneOf(["typed"])]),prepare:M.func,prepareChar:M.func,validate:M.func,commit:M.func,overwrite:M.oneOfType([M.bool,M.oneOf(["shift"])]),eager:M.oneOfType([M.bool,M.oneOf(["append","remove"])]),skipInvalid:M.bool,onAccept:M.func,onComplete:M.func,placeholderChar:M.string,displayChar:M.string,lazy:M.bool,definitions:M.object,blocks:M.object,enum:M.arrayOf(M.string),maxLength:M.number,from:M.number,to:M.number,pattern:M.string,format:M.func,parse:M.func,autofix:M.oneOfType([M.bool,M.oneOf(["pad"])]),radix:M.string,thousandsSeparator:M.string,mapToRadix:M.arrayOf(M.string),scale:M.number,normalizeZeros:M.bool,padFractionalZeros:M.bool,min:M.oneOfType([M.number,M.instanceOf(Date)]),max:M.oneOfType([M.number,M.instanceOf(Date)]),dispatch:M.func,inputRef:M.oneOfType([M.func,M.shape({current:M.object})])},_x=Object.keys(kx).filter(e=>e!=="value"),cZ=["value","unmask","onAccept","onComplete","inputRef"],fZ=_x.filter(e=>cZ.indexOf(e)<0);function Mx(e){var t;const r=(t=class extends m.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,o=this._extractMaskOptionsFromProps(a);if(o.mask)this.maskRef?(this.maskRef.updateOptions(o),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(o);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=ye(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){const{...o}=a;return Object.keys(o).filter(s=>fZ.indexOf(s)<0).forEach(s=>{delete o[s]}),o}_extractNonMaskProps(a){const{...o}=a;return _x.forEach(s=>{delete o[s]}),"defaultValue"in o||(o.defaultValue=a.mask?"":o.value),delete o.value,o}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 m.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},t.displayName=void 0,t.propTypes=void 0,t),n=e.displayName||e.name||"Component";return r.displayName="IMask("+n+")",r.propTypes=kx,m.forwardRef((i,a)=>m.createElement(r,{...i,ref:a}))}const dZ=Mx(e=>{let{inputRef:t,...r}=e;return m.createElement("input",{...r,ref:t})}),hZ=(e,t)=>m.createElement(dZ,{...e,ref:t});m.forwardRef(hZ);const pZ=Mx(e=>{const{inputRef:t,"data-value":r,defaultValue:n,tabIndex:i,...a}=e;return v.jsx(E.TextField,{inputRef:t,fullWidth:!0,...a,inputProps:{...a.inputProps,tabIndex:i},value:r})}),Th=m.forwardRef(({onChange:e,name:t,...r},n)=>{const[i,a]=m.useState("");return v.jsx(pZ,{inputRef:n,name:t,"data-value":i,...r,onAccept:(o,s)=>{a(o),e({target:{name:t,value:s._unmaskedValue}})}})});Th.displayName="MaskedInput";function gZ(e){let t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return t}const mZ=Xr("span")(({arrow:e,theme:t})=>{const i=`solid 1px ${L(t.palette.grey[500],.12)}`,a={borderRadius:"0 0 3px 0",top:-6,borderBottom:i,borderRight:i},o={borderRadius:"3px 0 0 0",bottom:-6,borderTop:i,borderLeft:i},s={borderRadius:"0 3px 0 0",left:-6,borderTop:i,borderRight:i},u={borderRadius:"0 0 0 3px",right:-6,borderBottom:i,borderLeft:i};return{display:"none",[t.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:t.palette.background.paper},...e==="top-left"&&{...a,left:20},...e==="top-center"&&{...a,left:0,right:0,margin:"auto"},...e==="top-right"&&{...a,right:20},...e==="bottom-left"&&{...o,left:20},...e==="bottom-center"&&{...o,left:0,right:0,margin:"auto"},...e==="bottom-right"&&{...o,right:20},...e==="left-top"&&{...s,top:20},...e==="left-center"&&{...s,top:0,bottom:0,margin:"auto"},...e==="left-bottom"&&{...s,bottom:20},...e==="right-top"&&{...u,top:20},...e==="right-center"&&{...u,top:0,bottom:0,margin:"auto"},...e==="right-bottom"&&{...u,bottom:20}}}),vZ=({open:e,children:t,arrow:r="top-right",disabledArrow:n,sx:i,...a})=>{const{style:o,anchorOrigin:s,transformOrigin:u}=gZ(r);return v.jsxs(E.Popover,{open:!!e,anchorEl:e,anchorOrigin:s,transformOrigin:u,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...o,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...i}},...a,children:[!n&&v.jsx(mZ,{arrow:r}),t]})},yZ=E.styled(E.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[300]}`,button:{marginRight:24}})),bZ=E.styled(E.DialogContent)({padding:"24px !important"}),xZ=E.styled(E.DialogActions)(({theme:e})=>({borderTop:`1px solid ${e.palette.grey[300]}`,backgroundColor:e.palette.grey[50]})),wZ=({children:e,actionsProps:t})=>v.jsx(xZ,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...t,children:e}),Ox=({actions:e,actionsProps:t,children:r,dialogContentProps:n,dialogTitle:i,dialogTitleProps:a,onClose:o,id:s,...u})=>{const l=s||"modal-actions";return v.jsxs(E.Dialog,{id:s,scroll:"body",...u,onClose:o,children:[v.jsxs(yZ,{children:[i&&v.jsx(E.DialogTitle,{variant:"subtitle1",...a,children:i}),v.jsx(E.IconButton,{onClick:o,children:v.jsx(nt,{icon:"ic:round-close"})})]}),v.jsx(bZ,{...n,children:r}),e&&v.jsx(wZ,{actionsProps:{...t,id:l},children:e})]})},Ax=({children:e,container:t,waitBeforeShow:r=50})=>{const[n,i]=m.useState(!1);return m.useEffect(()=>{const a=setTimeout(()=>i(!0),r);return()=>clearTimeout(a)},[r]),n?Nh.createPortal(e,document.getElementById(t)||document.body):null},CZ=({children:e,id:t="modal-actions"})=>v.jsx(Ax,{container:t,children:e}),SZ=e=>{if(!e||(e=e==null?void 0:e.replace(/[^\d]+/g,""),e.length!==11||e==="00000000000"||e==="11111111111"||e==="22222222222"||e==="33333333333"||e==="44444444444"||e==="55555555555"||e==="66666666666"||e==="77777777777"||e==="88888888888"||e==="99999999999"))return!1;let t=0;for(let n=0;n<9;n++)t+=parseInt(e.charAt(n))*(10-n);let r=11-t%11;if((r===10||r===11)&&(r=0),r!==parseInt(e.charAt(9)))return!1;t=0;for(let n=0;n<10;n++)t+=parseInt(e.charAt(n))*(11-n);return r=11-t%11,(r===10||r===11)&&(r=0),r===parseInt(e.charAt(10))},EZ=e=>{if(!e||(e=e.replace(/[^\d]+/g,""),e.length!==14)||e==="00000000000000"||e==="11111111111111"||e==="22222222222222"||e==="33333333333333"||e==="44444444444444"||e==="55555555555555"||e==="66666666666666"||e==="77777777777777"||e==="88888888888888"||e==="99999999999999")return!1;let t=e.length-2,r=e.substring(0,t);const n=e.substring(t);let i=0,a=t-7;for(let s=t;s>=1;s--)i+=parseInt(r.charAt(t-s))*a--,a<2&&(a=9);let o=i%11<2?0:11-i%11;if(o!==parseInt(n.charAt(0)))return!1;t+=1,r=e.substring(0,t),i=0,a=t-7;for(let s=t;s>=1;s--)i+=parseInt(r.charAt(t-s))*a--,a<2&&(a=9);return o=i%11<2?0:11-i%11,o===parseInt(n.charAt(1))},uu=(e="",t=[8,20],r=!1,n=!1,i=!1)=>{const a=e.length>=t[0]&&e.length<=t[1],o=!i||/[A-Z]/.test(e),s=!n||/[!@#$%^&*(),.?":{}|<>]/.test(e),u=!r||/\d/.test(e);return{isLengthValid:a,hasUpperCaseChar:o,hasSpecialCharacter:s,hasNumberChar:u}},TZ=Object.freeze(Object.defineProperty({__proto__:null,cnpjIsValid:EZ,cpfIsValid:SZ,validatePassword:uu},Symbol.toStringTag,{value:"Module"})),kZ=E.styled(E.Stack)(({theme:e})=>({width:"100%",border:`solid 1px ${E.alpha(e.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),_Z=E.styled(E.Stack)(()=>({gap:4})),cu=E.styled(E.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",gap:8,color:e.palette.text.secondary,div:{fontSize:12},strong:{fontWeight:700,color:e.palette.text.primary}})),fu=({passed:e})=>e?v.jsx(nt,{icon:"ic:round-check",color:"success.main"}):v.jsx(nt,{icon:"ic:outline-warning",color:"warning.main"}),MZ=({password:e,passwordSize:t,numberChar:r=!1,specialCharacter:n=!1,upperCaseChar:i=!1})=>{const{hasSpecialCharacter:a,hasUpperCaseChar:o,isLengthValid:s,hasNumberChar:u}=uu(e,t,r,n,i);return v.jsxs(kZ,{children:[v.jsx(E.Typography,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),v.jsxs(_Z,{children:[v.jsxs(cu,{children:[v.jsx(fu,{passed:s}),v.jsxs(E.Typography,{component:"div",children:[v.jsxs("strong",{children:[t[0],"-",t[1]]})," ","caracteres"]})]}),i&&v.jsxs(cu,{children:[v.jsx(fu,{passed:o}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos uma ",v.jsx("strong",{children:"letra maiúscula"})]})]}),r&&v.jsxs(cu,{children:[v.jsx(fu,{passed:u}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos ",v.jsx("strong",{children:"um número"})]})]}),n&&v.jsxs(cu,{children:[v.jsx(fu,{passed:a}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos um ",v.jsx("strong",{children:"caracter especial"})," ",v.jsx("span",{children:"(#,@,!,?)"})]})]})]})]})},OZ=({onSearch:e,onChange:t,trigger:r="click",iconPosition:n="end",tabIndex:i,...a})=>{const o=m.useRef(null),s=v.jsx(E.InputAdornment,{position:n,children:v.jsx(E.IconButton,{color:"inherit",onClick:()=>{var u;e((u=o.current)==null?void 0:u.value)},children:v.jsx(nt,{icon:"eva:search-fill",sx:{width:20,height:20}})})});return v.jsx(E.TextField,{inputRef:o,InputProps:{onKeyDown:u=>{var l;u.key==="Enter"&&e((l=o.current)==null?void 0:l.value)},...n==="start"?{startAdornment:s}:{endAdornment:s}},inputProps:{tabIndex:i,...a.inputProps},onChange:u=>{if(r==="change"){e(u.target.value);return}u.target.value===""&&e(""),t&&t(u)},...a})},AZ=({children:e})=>v.jsx(E.Box,{sx:{right:0,width:1,bottom:0,height:1,zIndex:9998,display:"flex",position:"absolute",alignItems:"center",justifyContent:"center",bgcolor:"background.default"},children:v.jsxs(v.Fragment,{children:[v.jsx(Ft.div,{animate:{scale:[1,.9,.9,1,1],opacity:[1,.48,.48,1,1]},transition:{duration:2,ease:"easeInOut",repeatDelay:1,repeat:1/0},children:e}),v.jsx(E.Box,{component:Ft.div,animate:{scale:[1.6,1,1,1.6,1.6],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:100,height:100,position:"absolute",border:t=>`solid 3px ${E.alpha(t.palette.primary.dark,.24)}`}}),v.jsx(E.Box,{component:Ft.div,animate:{scale:[1,1.2,1.2,1,1],rotate:[0,270,270,0,0],opacity:[1,.25,.25,.25,1],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:120,height:120,position:"absolute",border:t=>`solid 8px ${E.alpha(t.palette.primary.dark,.24)}`}})]})}),PZ=E.styled(E.StepConnector)(({theme:e})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:e.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:e.palette.primary.main}}})),DZ=({active:e,completed:t})=>v.jsx(E.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...e&&{color:"primary.main"}},children:t?v.jsx(nt,{icon:"eva:checkmark-fill",sx:{color:"primary.main"}}):v.jsx(E.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),$Z=({steps:e,activeStep:t,showLabels:r=!0,sx:n,...i})=>v.jsx(E.Stepper,{alternativeLabel:!0,activeStep:t,connector:v.jsx(PZ,{}),sx:n,...i,children:e.map(a=>v.jsx(E.Step,{children:v.jsx(E.StepLabel,{StepIconComponent:DZ,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:r&&a})},a))}),FZ=({children:e,value:t,index:r,sx:n})=>v.jsx(E.Box,{role:"tabpanel",id:`simple-tabpanel-${r}`,"aria-labelledby":`simple-tab-${r}`,sx:{mt:3,...t.toString()!==r.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"},...n},children:e});function ua(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{l(n.next(c))}catch(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((n=n.apply(e,t||[])).next())})}function ca(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){r.label=l[1];break}if(l[0]===6&&r.label<a[1]){r.label=a[1],a=l;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(l);break}a[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Px(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function Dx(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var IZ=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Po(e,t){var r=jZ(e);if(typeof r.path!="string"){var n=e.webkitRelativePath;Object.defineProperty(r,"path",{value:typeof t=="string"?t:typeof n=="string"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function jZ(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),i=IZ.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var LZ=[".DS_Store","Thumbs.db"];function RZ(e){return ua(this,void 0,void 0,function(){return ca(this,function(t){return du(e)&&NZ(e.dataTransfer)?[2,WZ(e.dataTransfer,e.type)]:BZ(e)?[2,VZ(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,zZ(e)]:[2,[]]})})}function NZ(e){return du(e)}function BZ(e){return du(e)&&du(e.target)}function du(e){return typeof e=="object"&&e!==null}function VZ(e){return kh(e.target.files).map(function(t){return Po(t)})}function zZ(e){return ua(this,void 0,void 0,function(){var t;return ca(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return Po(n)})]}})})}function WZ(e,t){return ua(this,void 0,void 0,function(){var r,n;return ca(this,function(i){switch(i.label){case 0:return e.items?(r=kh(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(HZ))]):[3,2];case 1:return n=i.sent(),[2,$x(Fx(n))];case 2:return[2,$x(kh(e.files).map(function(a){return Po(a)}))]}})})}function $x(e){return e.filter(function(t){return LZ.indexOf(t.name)===-1})}function kh(e){if(e===null)return[];for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(n)}return t}function HZ(e){if(typeof e.webkitGetAsEntry!="function")return Ix(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?jx(t):Ix(e)}function Fx(e){return e.reduce(function(t,r){return Dx(Dx([],Px(t),!1),Px(Array.isArray(r)?Fx(r):[r]),!1)},[])}function Ix(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var r=Po(t);return Promise.resolve(r)}function UZ(e){return ua(this,void 0,void 0,function(){return ca(this,function(t){return[2,e.isDirectory?jx(e):YZ(e)]})})}function jx(e){var t=e.createReader();return new Promise(function(r,n){var i=[];function a(){var o=this;t.readEntries(function(s){return ua(o,void 0,void 0,function(){var u,l,c;return ca(this,function(f){switch(f.label){case 0:if(s.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return u=f.sent(),r(u),[3,4];case 3:return l=f.sent(),n(l),[3,4];case 4:return[3,6];case 5:c=Promise.all(s.map(UZ)),i.push(c),a(),f.label=6;case 6:return[2]}})})},function(s){n(s)})}a()})}function YZ(e){return ua(this,void 0,void 0,function(){return ca(this,function(t){return[2,new Promise(function(r,n){e.file(function(i){var a=Po(i,e.fullPath);r(a)},function(i){n(i)})})]})})}var GZ=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function Lx(e){return XZ(e)||KZ(e)||Vx(e)||qZ()}function qZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
256
|
+
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function XX(e){e=KX(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=ln);var a=e.onBlur;a===void 0&&(a=ln);var o=e.thousandSeparator,s=e.decimalScale,u=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var c=e.defaultValue,f=e.value,d=e.valueIsNumericString,h=e.onValueChange,g=lx(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),p=nu(e),y=p.decimalSeparator,b=p.allowedDecimalSeparators,x=function(R){return yx(R,e)},C=function(R,U){return GX(R,U,e)},_=la(f)?c:f,w=d??YX(_,l,t);la(f)?la(c)||(w=w||typeof c=="number"):w=w||typeof f=="number";var k=function(R){return ux(R)?R:(typeof R=="number"&&(R=hx(R)),w&&typeof s=="number"?px(R,s,!!u):R)},T=vx(k(f),k(c),!!w,x,C,h),O=T[0],P=O.numAsString,F=O.formattedValue,Z=T[1],be=function(R){var U=R.target,Ce=R.key,fe=U.selectionStart,D=U.selectionEnd,$=U.value;if($===void 0&&($=""),fe!==D){i(R);return}Ce==="Backspace"&&$[0]==="-"&&fe===l.length+1&&r&&Nn(U,1),s&&u&&(Ce==="Backspace"&&$[fe-1]===y?(Nn(U,fe-1),R.preventDefault()):Ce==="Delete"&&$[fe]===y&&R.preventDefault()),b!=null&&b.includes(Ce)&&$[fe]===y&&Nn(U,fe+1);var W=o===!0?",":o;Ce==="Backspace"&&$[fe-1]===W&&Nn(U,fe-1),Ce==="Delete"&&$[fe]===W&&Nn(U,fe+1),i(R)},oe=function(R){var U=P;if(U.match(/\d/g)||(U=""),n||(U=FX(U)),u&&s&&(U=px(U,s,u)),U!==P){var Ce=yx(U,e);Z({formattedValue:Ce,value:U,floatValue:parseFloat(U)},{event:R,source:Mo.event})}a(R)},Q=function(R){return R===y?!0:Oo(R)},H=function(R){var U=R.currentValue,Ce=R.lastValue,fe=R.formattedValue,D=R.currentValueIndex,$=R.formattedValueIndex,W=U[D],se=fe[$],X=gx(Ce,U),ce=X.to;return D>=ce.start&&D<ce.end&&b&&b.includes(W)&&se===y?!0:W===se};return Object.assign(Object.assign({},g),{value:F,valueIsNumericString:!1,isValidInputCharacter:Q,isCharacterSame:H,onValueChange:Z,format:x,removeFormatting:C,getCaretBoundary:function(R){return qX(R,e)},onKeyDown:be,onBlur:oe})}function ZX(e){var t=XX(e);return m.createElement(WX,Object.assign({},t))}const iu=m.forwardRef(({decimalScale:e=0,fixedDecimalScale:t=!0,prefix:r,allowNegative:n,minValue:i,maxValue:a=1/0,maxLength:o,value:s,inputProps:u,InputProps:l,size:c,disabled:f,name:d,helperText:h,error:g,fullWidth:p,label:y,required:b,onChange:x,tabIndex:C},_)=>{const w=m.useRef(null),k=T=>{x&&(w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{const{floatValue:O}=T,P=O||0;if(i!==void 0&&i>P){x({target:{name:d,value:i}});return}if(O!==void 0&&a<P){x({target:{name:d,value:a}});return}x({target:{name:d,value:O}})},600))};return m.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]),v.jsx(ZX,{getInputRef:_,value:s,prefix:r,decimalSeparator:",",thousandSeparator:".",decimalScale:e,fixedDecimalScale:t,autoComplete:"off",allowNegative:n,maxLength:o,onValueChange:k,customInput:E.TextField,InputProps:{...l},inputProps:{...u,tabIndex:C},disabled:f,size:c,helperText:h,error:g,fullWidth:p,label:y,required:b})});iu.displayName="NumberInput";const wh=m.forwardRef(({name:e,increment:t=1,updadteForMultiple:r,allowNegative:n=!1,value:i=0,onChange:a,minValue:o,maxValue:s,decimalScale:u,disabled:l,tabIndex:c,...f},d)=>{const h=ox(i,t,u),g=()=>{if(!n&&i-t<0)return;const b=i-t,x=Math.floor(i/t)*t,C=!h&&r?x:b;o!==void 0&&b<o?a(o):a(yh(C))},p=()=>{const b=Number(i)+t,x=Math.ceil(i/t)*t,_=yh(!h&&r?x:b);s!==void 0&&b>=s?a(s):a(o!==void 0&&_<=o?o:_)},y=b=>{const x=Number(b.target.value),C=Math.ceil(x/t)*t,_=r?C:x;if(o!==void 0&&x<=o){a(o);return}if(s!==void 0&&x>=s){a(s);return}a(_)};return v.jsx(iu,{ref:d,name:e,value:i,minValue:o,maxValue:s,allowNegative:n,decimalScale:u,InputProps:{startAdornment:v.jsx(E.InputAdornment,{position:"start",children:v.jsx(E.IconButton,{size:"medium",disabled:l||(n?!1:!i),onClick:g,children:v.jsx(nt,{icon:"eva:minus-fill",width:14,height:14,color:"primary.main"})})}),endAdornment:v.jsx(E.InputAdornment,{position:"end",children:v.jsx(E.IconButton,{size:"medium",onClick:p,disabled:l,children:v.jsx(nt,{icon:"eva:plus-fill",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:c},onChange:y,disabled:l,...f})});wh.displayName="Incrementer";const QX=Xr(E.Box)(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light",n=t.variant==="filled",i=t.variant==="outlined",a=t.variant==="soft",o={...t.color==="default"&&{...i&&{backgroundColor:"transparent",color:e.palette.text.primary,border:`1px solid ${L(e.palette.grey[500],.32)}`},...a&&{color:r?e.palette.text.primary:e.palette.common.white,backgroundColor:L(e.palette.grey[500],.16)}}},s={...t.color!=="default"&&{...n&&{color:e.palette[t.color].contrastText,backgroundColor:e.palette[t.color].main},...i&&{backgroundColor:"transparent",color:e.palette[t.color].main,border:`1px solid ${e.palette[t.color].main}`},...a&&{color:e.palette[t.color][r?"dark":"light"],backgroundColor:L(e.palette[t.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"none",padding:e.spacing(0,1),color:e.palette.grey[800],fontSize:e.typography.pxToRem(12),fontFamily:e.typography.fontFamily,backgroundColor:e.palette.grey[300],fontWeight:e.typography.fontWeightBold,...s,...o}}),bx=m.forwardRef(({children:e,color:t="default",variant:r="soft",startIcon:n,endIcon:i,sx:a,...o},s)=>{const u=bn(),l={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return v.jsxs(QX,{ref:s,component:"span",ownerState:{color:t,variant:r},sx:{...n&&{pl:.75},...i&&{pr:.75},...a},theme:u,...o,children:[n&&v.jsxs(E.Box,{sx:{mr:.75,...l},children:[" ",n," "]}),e,i&&v.jsxs(E.Box,{sx:{ml:.75,...l},children:[" ",i," "]})]})});bx.displayName="Label";const JX=E.styled(E.Box)({padding:"0 40px",width:"100%",flexGrow:1,minHeight:"100%",display:"flex",alignItems:"center",justifyContent:"center"}),eZ=()=>v.jsx(JX,{children:v.jsx(E.LinearProgress,{color:"inherit",sx:{width:1,maxWidth:360}})});function un(e){return typeof e=="string"||e instanceof String}function xx(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function wx(e,t){return Array.isArray(t)?wx(e,(r,n)=>t.includes(n)):Object.entries(e).reduce((r,n)=>{let[i,a]=n;return t(a,i)&&(r[i]=a),r},{})}const ue={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function tZ(e){switch(e){case ue.LEFT:return ue.FORCE_LEFT;case ue.RIGHT:return ue.FORCE_RIGHT;default:return e}}function Ch(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function au(e,t){if(t===e)return!0;const r=Array.isArray(t),n=Array.isArray(e);let i;if(r&&n){if(t.length!=e.length)return!1;for(i=0;i<t.length;i++)if(!au(t[i],e[i]))return!1;return!0}if(r!=n)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){const a=t instanceof Date,o=e instanceof Date;if(a&&o)return t.getTime()==e.getTime();if(a!=o)return!1;const s=t instanceof RegExp,u=e instanceof RegExp;if(s&&u)return t.toString()==e.toString();if(s!=u)return!1;const l=Object.keys(t);for(i=0;i<l.length;i++)if(!Object.prototype.hasOwnProperty.call(e,l[i]))return!1;for(i=0;i<l.length;i++)if(!au(e[l[i]],t[l[i]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}class rZ{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}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?ue.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ue.RIGHT:ue.LEFT}}function ye(e,t){return new ye.InputMask(e,t)}function Cx(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?ye.MaskedRegExp:un(e)?ye.MaskedPattern:e===Date?ye.MaskedDate:e===Number?ye.MaskedNumber:Array.isArray(e)||e===Array?ye.MaskedDynamic:ye.Masked&&e.prototype instanceof ye.Masked?e:ye.Masked&&e instanceof ye.Masked?e.constructor:e instanceof Function?ye.MaskedFunction:(console.warn("Mask not found for mask",e),ye.Masked)}function ou(e){if(!e)throw new Error("Options in not defined");if(ye.Masked){if(e.prototype instanceof ye.Masked)return{mask:e};const{mask:t=void 0,...r}=e instanceof ye.Masked?{mask:e}:xx(e)&&e.mask instanceof ye.Masked?e:{};if(t){const n=t.mask;return{...wx(t,(i,a)=>!a.startsWith("_")),mask:t.constructor,_mask:n,...r}}}return xx(e)?{...e}:{mask:e}}function Bn(e){if(ye.Masked&&e instanceof ye.Masked)return e;const t=ou(e),r=Cx(t.mask);if(!r)throw new Error("Masked class is not found for provided 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)}ye.createMask=Bn;class Sh{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,r){if(!(t==null||r==null||t===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(t,r)}catch{}}get isActive(){return!1}}ye.MaskElement=Sh;class Vn extends Sh{constructor(t){super(),this.input=t,this._handlers={}}get rootElement(){var t,r,n;return(t=(r=(n=this.input).getRootNode)==null?void 0:r.call(n))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){Object.keys(t).forEach(r=>this._toggleEventHandler(Vn.EVENTS_MAP[r],t[r]))}unbindEvents(){Object.keys(this._handlers).forEach(t=>this._toggleEventHandler(t))}_toggleEventHandler(t,r){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),r&&(this.input.addEventListener(t,r),this._handlers[t]=r)}}Vn.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},ye.HTMLMaskElement=Vn;class nZ extends Vn{constructor(t){super(t),this.input=t,this._handlers={}}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}}ye.HTMLMaskElement=Vn;class Sx extends Vn{get _unsafeSelectionStart(){const t=this.rootElement,r=t.getSelection&&t.getSelection(),n=r&&r.anchorOffset,i=r&&r.focusOffset;return i==null||n==null||n<i?n:i}get _unsafeSelectionEnd(){const t=this.rootElement,r=t.getSelection&&t.getSelection(),n=r&&r.anchorOffset,i=r&&r.focusOffset;return i==null||n==null||n>i?n:i}_unsafeSelect(t,r){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,t),n.setEnd(this.input.lastChild||this.input,r);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(n))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}ye.HTMLContenteditableMaskElement=Sx;class iZ{constructor(t,r){this.el=t instanceof Sh?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new Sx(t):new nZ(t),this.masked=Bn(r),this._listeners={},this._value="",this._unmaskedValue="",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.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 ye.Masked)&&this.masked.constructor===Cx(t)){this.masked.updateOptions({mask:t});return}const r=t instanceof ye.Masked?t:Bn({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(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl(),this.alignCursor())}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})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,r){const n=this._listeners[t];n&&n.forEach(i=>i(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(){const t=this.masked.unmaskedValue,r=this.masked.value,n=this.displayValue,i=this.unmaskedValue!==t||this.value!==r;this._unmaskedValue=t,this._value=r,this.el.value!==n&&(this.el.value=n),i&&this._fireChangeEvents()}updateOptions(t){const{mask:r,...n}=t,i=!this.maskEquals(r),a=!au(this.masked,n);i&&(this.mask=r),a&&this.masked.updateOptions(n),(i||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,ue.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;const n=this._listeners[t].indexOf(r);return n>=0&&this._listeners[t].splice(n,1),this}_onInput(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();const r=new rZ({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,i=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=n===this.masked.rawInputValue?r.removeDirection:ue.NONE;let o=this.masked.nearestInputPos(r.startChangePos+i,a);a!==ue.NONE&&(o=this.masked.nearestInputPos(o,ue.NONE)),this.updateControl(),this.updateCursor(o),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()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}ye.InputMask=iZ;class qe{static normalize(t){return Array.isArray(t)?t:[t,new qe]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},t)}aggregate(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}ye.ChangeDetails=qe;class jr{constructor(t,r,n){t===void 0&&(t=""),r===void 0&&(r=0),this.value=t,this.from=r,this.stop=n}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"";const r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class Kt{constructor(t){this._value="",this._update({...Kt.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){Object.keys(t).length&&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,n){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 jr(this.extractInput(t,r),t)}appendTail(t){return un(t)&&(t=new jr(String(t))),t.appendTo(this)}_appendCharRaw(t,r){return t?(this._value+=t,new qe({inserted:t,rawInserted:t})):new qe}_appendChar(t,r,n){r===void 0&&(r={});const i=this.state;let a;if([t,a]=this.doPrepareChar(t,r),a=a.aggregate(this._appendCharRaw(t,r)),a.inserted){let o,s=this.doValidate(r)!==!1;if(s&&n!=null){const u=this.state;this.overwrite===!0&&(o=n.state,n.unshift(this.displayValue.length-a.tailShift));let l=this.appendTail(n);s=l.rawInserted===n.toString(),!(s&&l.inserted)&&this.overwrite==="shift"&&(this.state=u,o=n.state,n.shift(),l=this.appendTail(n),s=l.rawInserted===n.toString()),s&&l.inserted&&(this.state=u)}s||(a=new qe,this.state=i,n&&o&&(n.state=o))}return a}_appendPlaceholder(){return new qe}_appendEager(){return new qe}append(t,r,n){if(!un(t))throw new Error("value should be string");const i=un(n)?new jr(String(n)):n;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[t,a]=this.doPrepare(t,r);for(let o=0;o<t.length;++o){const s=this._appendChar(t[o],r,i);if(!s.rawInserted&&!this.doSkipInvalid(t[o],r,i))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&t&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).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 qe}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const r=this.rawInputValue,n=this.value,i=t();return this.rawInputValue=r,this.value&&this.value!==n&&n.indexOf(this.value)===0&&this.append(n.slice(this.displayValue.length),{},""),delete this._refreshing,i}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const r=this.state,n=t(this);return this.state=r,delete this._isolated,n}doSkipInvalid(t,r,n){return!!this.skipInvalid}doPrepare(t,r){return r===void 0&&(r={}),qe.normalize(this.prepare?this.prepare(t,this,r):t)}doPrepareChar(t,r){return r===void 0&&(r={}),qe.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,n,i,a){i===void 0&&(i=ue.NONE),a===void 0&&(a={input:!0});const o=t+r,s=this.extractTail(o),u=this.eager===!0||this.eager==="remove";let l;u&&(i=tZ(i),l=this.extractInput(0,o,{raw:!0}));let c=t;const f=new qe;if(i!==ue.NONE&&(c=this.nearestInputPos(t,r>1&&t!==0&&!u?ue.NONE:i),f.tailShift=c-t),f.aggregate(this.remove(c)),u&&i!==ue.NONE&&l===this.rawInputValue)if(i===ue.FORCE_LEFT){let d;for(;l===this.rawInputValue&&(d=this.displayValue.length);)f.aggregate(new qe({tailShift:-1})).aggregate(this.remove(d-1))}else i===ue.FORCE_RIGHT&&s.unshift();return f.aggregate(this.append(n,a,s))}maskEquals(t){return this.mask===t}typedValueEquals(t){const r=this.typedValue;return t===r||Kt.EMPTY_VALUES.includes(t)&&Kt.EMPTY_VALUES.includes(r)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}}Kt.DEFAULTS={skipInvalid:!0},Kt.EMPTY_VALUES=[void 0,null,""],ye.Masked=Kt;class zn{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=un(t)?new jr(String(t)):t;const r=this.chunks[this.chunks.length-1],n=r&&(r.stop===t.stop||t.stop==null)&&t.from===r.from+r.toString().length;if(t instanceof jr)n?r.extend(t.toString()):this.chunks.push(t);else if(t instanceof zn){if(t.stop==null){let i;for(;t.chunks.length&&t.chunks[0].stop==null;)i=t.chunks.shift(),i.from+=t.from,this.extend(i)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof ye.MaskedPattern))return new jr(this.toString()).appendTo(t);const r=new qe;for(let n=0;n<this.chunks.length&&!r.skip;++n){const i=this.chunks[n],a=t._mapPosToBlock(t.displayValue.length),o=i.stop;let s;if(o!=null&&(!a||a.index<=o)){if(i instanceof zn||t._stops.indexOf(o)>=0){const u=t._appendPlaceholder(o);r.aggregate(u)}s=i instanceof zn&&t._blocks[o]}if(s){const u=s.appendTail(i);u.skip=!1,r.aggregate(u),t._value+=u.inserted;const l=i.toString().slice(u.rawInserted.length);l&&r.aggregate(t.append(l,{tail:!0}))}else r.aggregate(t.append(i.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){const{chunks:r,...n}=t;Object.assign(this,n),this.chunks=r.map(i=>{const a="chunks"in i?new zn:new jr;return a.state=i,a})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const r=t!=null?t-this.from:t;let n=0;for(;n<this.chunks.length;){const i=this.chunks[n],a=i.unshift(r);if(i.toString()){if(!a)break;++n}else this.chunks.splice(n,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const r=this.chunks[t],n=r.shift();if(r.toString()){if(!n)break;--t}else this.chunks.splice(t,1);if(n)return n}return""}}class aZ{constructor(t,r){this.masked=t,this._log=[];const{offset:n,index:i}=t._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=i,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(){const 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,ue.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ue.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ue.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ue.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,ue.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ue.NONE),!0})}}class Ex{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 qe}nearestInputPos(t,r){r===void 0&&(r=ue.NONE);const n=0,i=this._value.length;switch(r){case ue.LEFT:case ue.FORCE_LEFT:return n;case ue.NONE:case ue.RIGHT:case ue.FORCE_RIGHT:default:return i}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._isRawInput?r-t:0}extractInput(t,r,n){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),n===void 0&&(n={}),n.raw&&this._isRawInput&&this._value.slice(t,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,r){r===void 0&&(r={});const n=new qe;if(this.isFilled)return n;const i=this.eager===!0||this.eager==="append",o=this.char===t&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!i)&&!r.tail;return o&&(n.rawInserted=this.char),this._value=n.inserted=this.char,this._isRawInput=o&&(r.raw||r.input),n}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new qe;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new jr("")}appendTail(t){return un(t)&&(t=new jr(String(t))),t.appendTo(this)}append(t,r,n){const i=this._appendChar(t[0],r);return n!=null&&(i.tailShift+=this.appendTail(n).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}}class su{constructor(t){const{parent:r,isOptional:n,placeholderChar:i,displayChar:a,lazy:o,eager:s,...u}=t;this.masked=Bn(u),Object.assign(this,{parent:r,isOptional:n,placeholderChar:i,displayChar:a,lazy:o,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 qe}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 qe;const n=this.masked.state,i=this.masked._appendChar(t,this.currentMaskFlags(r));return i.inserted&&this.doValidate(r)===!1&&(i.inserted=i.rawInserted="",this.masked.state=n),!i.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(t,r,n){return this.masked.append(t,this.currentMaskFlags(r),n)}_appendPlaceholder(){const t=new qe;return this.isFilled||this.isOptional||(this.isFilled=!0,t.inserted=this.placeholderChar),t}_appendEager(){return new qe}extractTail(t,r){return this.masked.extractTail(t,r)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,r,n){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.masked.extractInput(t,r,n)}nearestInputPos(t,r){r===void 0&&(r=ue.NONE);const n=0,i=this.value.length,a=Math.min(Math.max(t,n),i);switch(r){case ue.LEFT:case ue.FORCE_LEFT:return this.isComplete?a:n;case ue.RIGHT:case ue.FORCE_RIGHT:return this.isComplete?a:i;case ue.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{...t,_beforeTailState:(t==null||(r=t._beforeTailState)==null?void 0:r.masked)||(t==null?void 0:t._beforeTailState)}}}su.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]/,"*":/./};class oZ extends Kt{updateOptions(t){super.updateOptions(t)}_update(t){const r=t.mask;r&&(t.validate=n=>n.search(r)>=0),super._update(t)}}ye.MaskedRegExp=oZ;class Xt extends Kt{constructor(t){super({...Xt.DEFAULTS,...t,definitions:Object.assign({},su.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(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const r=this.mask;if(!r||!t)return;let n=!1,i=!1;for(let a=0;a<r.length;++a){if(this.blocks){const l=r.slice(a),c=Object.keys(this.blocks).filter(d=>l.indexOf(d)===0);c.sort((d,h)=>h.length-d.length);const f=c[0];if(f){const{expose:d,...h}=ou(this.blocks[f]),g=Bn({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...h,parent:this});g&&(this._blocks.push(g),d&&(this.exposeBlock=g),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),a+=f.length-1;continue}}let o=r[a],s=o in t;if(o===Xt.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){n=!n;continue}if(o==="["||o==="]"){i=!i;continue}if(o===Xt.ESCAPE_CHAR){if(++a,o=r[a],!o)break;s=!1}const u=s?new su({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...ou(t[o]),parent:this}):new Ex({char:o,eager:this.eager,isUnmasking:n});this._blocks.push(u)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){const{_blocks:r,...n}=t;this._blocks.forEach((i,a)=>i.state=r[a]),super.state=n}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){const 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){const 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){const 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;const r=new qe;let n=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(n==null)return r;this._blocks[n].isFilled&&++n;for(let i=n;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(t,r){r===void 0&&(r={});const n=this._mapPosToBlock(this.displayValue.length),i=new qe;if(!n)return i;for(let o=n.index;;++o){var a;const s=this._blocks[o];if(!s)break;const u=s._appendChar(t,{...r,_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[o]}),l=u.skip;if(i.aggregate(u),l||u.rawInserted)break}return i}extractTail(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);const n=new zn;return t===r||this._forEachBlocksInRange(t,r,(i,a,o,s)=>{const u=i.extractTail(o,s);u.stop=this._findStopBefore(a),u.from=this._blockStartPos(a),u instanceof zn&&(u.blockIndex=a),n.extend(u)}),n}extractInput(t,r,n){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),n===void 0&&(n={}),t===r)return"";let i="";return this._forEachBlocksInRange(t,r,(a,o,s,u)=>{i+=a.extractInput(s,u,n)}),i}_findStopBefore(t){let r;for(let n=0;n<this._stops.length;++n){const i=this._stops[n];if(i<=t)r=i;else break}return r}_appendPlaceholder(t){const r=new qe;if(this.lazy&&t==null)return r;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return r;const i=n.index,a=t??this._blocks.length;return this._blocks.slice(i,a).forEach(o=>{if(!o.lazy||t!=null){var s;const u=o._appendPlaceholder((s=o._blocks)==null?void 0:s.length);this._value+=u.inserted,r.aggregate(u)}}),r}_mapPosToBlock(t){let r="";for(let n=0;n<this._blocks.length;++n){const i=this._blocks[n],a=r.length;if(r+=i.displayValue,t<=r.length)return{index:n,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((r,n)=>r+=n.displayValue.length,0)}_forEachBlocksInRange(t,r,n){r===void 0&&(r=this.displayValue.length);const i=this._mapPosToBlock(t);if(i){const a=this._mapPosToBlock(r),o=a&&i.index===a.index,s=i.offset,u=a&&o?a.offset:this._blocks[i.index].displayValue.length;if(n(this._blocks[i.index],i.index,s,u),a&&!o){for(let l=i.index+1;l<a.index;++l)n(this._blocks[l],l,0,this._blocks[l].displayValue.length);n(this._blocks[a.index],a.index,0,a.offset)}}}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);const n=super.remove(t,r);return this._forEachBlocksInRange(t,r,(i,a,o,s)=>{n.aggregate(i.remove(o,s))}),n}nearestInputPos(t,r){if(r===void 0&&(r=ue.NONE),!this._blocks.length)return 0;const n=new aZ(this,t);if(r===ue.NONE)return n.pushRightBeforeInput()||(n.popState(),n.pushLeftBeforeInput())?n.pos:this.displayValue.length;if(r===ue.LEFT||r===ue.FORCE_LEFT){if(r===ue.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===t)return t;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),r===ue.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=t||(n.popState(),n.ok&&n.pos<=t))return n.pos;n.popState()}return n.ok?n.pos:r===ue.FORCE_LEFT?0:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:0)}return r===ue.RIGHT||r===ue.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:r===ue.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:this.nearestInputPos(t,ue.LEFT))):t}totalInputPositions(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let n=0;return this._forEachBlocksInRange(t,r,(i,a,o,s)=>{n+=i.totalInputPositions(o,s)}),n}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const r=this._maskedBlocks[t];return r?r.map(n=>this._blocks[n]):[]}}Xt.DEFAULTS={lazy:!0,placeholderChar:"_"},Xt.STOP_CHAR="`",Xt.ESCAPE_CHAR="\\",Xt.InputDefinition=su,Xt.FixedDefinition=Ex,ye.MaskedPattern=Xt;class lu extends Xt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:r=this.to||0,from:n=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...o}=t;this.to=r,this.from=n,this.maxLength=Math.max(String(r).length,i),this.autofix=a;const s=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<u.length&&u[l]===s[l];)++l;o.mask=u.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let r="",n="";const[,i,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(i.length)+a,n="9".repeat(i.length)+a),r=r.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[r,n]}doPrepareChar(t,r){r===void 0&&(r={});let n;if([t,n]=super.doPrepareChar(t.replace(/\D/g,""),r),!this.autofix||!t)return[t,n];const i=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),o=this.value+t;if(o.length>this.maxLength)return["",n];const[s,u]=this.boundaries(o);return Number(u)<this.from?[i[o.length-1],n]:Number(s)>this.to?this.autofix==="pad"&&o.length<this.maxLength?["",n.aggregate(this.append(i[o.length-1]+t,r))]:[a[o.length-1],n]:[t,n]}doValidate(t){const r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;const[i,a]=this.boundaries(r);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(t)}}ye.MaskedRange=lu;class Wn extends Xt{constructor(t){const{mask:r,pattern:n,...i}={...Wn.DEFAULTS,...t};super({...i,mask:un(r)?r:n})}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:r,pattern:n,blocks:i,...a}={...Wn.DEFAULTS,...t},o=Object.assign({},Wn.GET_DEFAULT_BLOCKS());t.min&&(o.Y.from=t.min.getFullYear()),t.max&&(o.Y.to=t.max.getFullYear()),t.min&&t.max&&o.Y.from===o.Y.to&&(o.m.from=t.min.getMonth()+1,o.m.to=t.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=t.min.getDate(),o.d.to=t.max.getDate())),Object.assign(o,this.blocks,i),Object.keys(o).forEach(s=>{const u=o[s];!("autofix"in u)&&"autofix"in t&&(u.autofix=t.autofix)}),super._update({...a,mask:un(r)?r:n,blocks:o})}doValidate(t){const 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)}}Wn.GET_DEFAULT_BLOCKS=()=>({d:{mask:lu,from:1,to:31,maxLength:2},m:{mask:lu,from:1,to:12,maxLength:2},Y:{mask:lu,from:1900,to:9999}}),Wn.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";const r=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),i=e.getFullYear();return[r,n,i].join(".")},parse:(e,t)=>{const[r,n,i]=e.split(".").map(Number);return new Date(i,n-1,r)}},ye.MaskedDate=Wn;class Ao extends Kt{constructor(t){super({...Ao.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=>{const{expose:n,...i}=ou(r),a=Bn({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return n&&(this.exposeMask=a),a}):[])}_appendCharRaw(t,r){r===void 0&&(r={});const n=this._applyDispatch(t,r);return this.currentMask&&n.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(r))),n}_applyDispatch(t,r,n){t===void 0&&(t=""),r===void 0&&(r={}),n===void 0&&(n="");const i=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,o=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,s=a.slice(o.length),u=this.currentMask,l=new qe,c=u==null?void 0:u.state;if(this.currentMask=this.doDispatch(t,{...r},n),this.currentMask)if(this.currentMask!==u){if(this.currentMask.reset(),o){const f=this.currentMask.append(o,{raw:!0});l.tailShift=f.inserted.length-i.length}s&&(l.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)}else c&&(this.currentMask.state=c);return l}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const r=new qe;return t&&r.aggregate(this._applyDispatch("",{},t)),r.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var r,n;return{...t,_beforeTailState:((r=t._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((n=t._beforeTailState)==null?void 0:n.currentMask)||t._beforeTailState}}doDispatch(t,r,n){return r===void 0&&(r={}),n===void 0&&(n=""),this.dispatch(t,this,r,n)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,r){r===void 0&&(r={});let[n,i]=super.doPrepare(t,r);if(this.currentMask){let a;[n,a]=super.doPrepare(n,this.currentMaskFlags(r)),i=i.aggregate(a)}return[n,i]}doPrepareChar(t,r){r===void 0&&(r={});let[n,i]=super.doPrepareChar(t,r);if(this.currentMask){let a;[n,a]=super.doPrepareChar(n,this.currentMaskFlags(r)),i=i.aggregate(a)}return[n,i]}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){const n=new qe;return this.currentMask&&n.aggregate(this.currentMask.remove(t,r)).aggregate(this._applyDispatch()),n}get state(){var t;return{...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){const{compiledMasks:r,currentMaskRef:n,currentMask:i,...a}=t;r&&this.compiledMasks.forEach((o,s)=>o.state=r[s]),n!=null&&(this.currentMask=n,this.currentMask.state=i),super.state=a}extractInput(t,r,n){return this.currentMask?this.currentMask.extractInput(t,r,n):""}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}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((r,n)=>{if(!t[n])return;const{mask:i,...a}=t[n];return au(r,a)&&r.maskEquals(i)}):super.maskEquals(t)}typedValueEquals(t){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(t))}}Ao.DEFAULTS=void 0,Ao.DEFAULTS={dispatch:(e,t,r,n)=>{if(!t.compiledMasks.length)return;const i=t.rawInputValue,a=t.compiledMasks.map((o,s)=>{const u=t.currentMask===o,l=u?o.displayValue.length:o.nearestInputPos(o.displayValue.length,ue.FORCE_LEFT);return o.rawInputValue!==i?(o.reset(),o.append(i,{raw:!0})):u||o.remove(l),o.append(e,t.currentMaskFlags(r)),o.appendTail(n),{index:s,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(l,o.nearestInputPos(o.displayValue.length,ue.FORCE_LEFT)))}});return a.sort((o,s)=>s.weight-o.weight||s.totalInputPositions-o.totalInputPositions),t.compiledMasks[a[0].index]}},ye.MaskedDynamic=Ao;class sZ extends Xt{constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:r,...n}=t;if(r){const i=r.map(s=>s.length),a=Math.min(...i),o=Math.max(...i)-a;n.mask="*".repeat(a),o&&(n.mask+="["+"*".repeat(o)+"]"),this.enum=r}super._update(n)}doValidate(t){return this.enum.some(r=>r.indexOf(this.unmaskedValue)===0)&&super.doValidate(t)}}ye.MaskedEnum=sZ;class lZ extends Kt{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}ye.MaskedFunction=lZ;class rr extends Kt{constructor(t){super({...rr.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",n=(this.scale?"("+Ch(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+r+n),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Ch).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Ch(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const 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={});const[n,i]=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&&!n&&(i.skip=!0),n&&!this.allowPositive&&!this.value&&n!=="-"&&i.aggregate(this._appendChar("-")),[n,i]}_separatorsCount(t,r){r===void 0&&(r=!1);let n=0;for(let i=0;i<t;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++n,r&&(t+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,r,n){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,n))}_appendCharRaw(t,r){if(r===void 0&&(r={}),!this.thousandsSeparator)return super._appendCharRaw(t,r);const n=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const a=super._appendCharRaw(t,r);this._value=this._insertThousandsSeparators(this._value);const o=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(o);return a.tailShift+=(s-i)*this.thousandsSeparator.length,a.skip=!a.rawInserted&&t===this.thousandsSeparator,a}_findSeparatorAround(t){if(this.thousandsSeparator){const r=t-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,r);if(n<=t)return n}return-1}_adjustRangeWithSeparators(t,r){const n=this._findSeparatorAround(t);n>=0&&(t=n);const i=this._findSeparatorAround(r);return i>=0&&(r=i+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);const n=this.value.slice(0,t),i=this.value.slice(r),a=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+i));const o=this._separatorsCountFromSlice(n);return new qe({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(t,r){if(!this.thousandsSeparator)return t;switch(r){case ue.NONE:case ue.LEFT:case ue.FORCE_LEFT:{const n=this._findSeparatorAround(t-1);if(n>=0){const i=n+this.thousandsSeparator.length;if(t<i||this.value.length<=i||r===ue.FORCE_LEFT)return n}break}case ue.RIGHT:case ue.FORCE_RIGHT:{const n=this._findSeparatorAround(t);if(n>=0)return n+this.thousandsSeparator.length}}return t}doValidate(t){let r=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(r){const n=this.number;r=r&&!isNaN(n)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return r&&super.doValidate(t)}doCommit(){if(this.value){const t=this.number;let 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 n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(t){const r=this._removeThousandsSeparators(t).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(n,i,a,o)=>i+o),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;const 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,n){r===void 0&&(r={});const i=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===rr.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,r,n)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,rr.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(rr.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)||rr.EMPTY_VALUES.includes(t)&&rr.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}rr.UNMASKED_RADIX=".",rr.EMPTY_VALUES=[...Kt.EMPTY_VALUES,0],rr.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[rr.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})},ye.MaskedNumber=rr;const Eh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Tx(e,t,r){t===void 0&&(t=Eh.MASKED),r===void 0&&(r=Eh.MASKED);const n=Bn(e);return i=>n.runIsolated(a=>(a[t]=i,a[r]))}function uZ(e,t,r,n){return Tx(t,r,n)(e)}ye.PIPE_TYPE=Eh,ye.createPipe=Tx,ye.pipe=uZ;try{globalThis.IMask=ye}catch{}const kx={mask:M.oneOfType([M.array,M.func,M.string,M.instanceOf(RegExp),M.oneOf([Date,Number,ye.Masked]),M.instanceOf(ye.Masked)]),value:M.any,unmask:M.oneOfType([M.bool,M.oneOf(["typed"])]),prepare:M.func,prepareChar:M.func,validate:M.func,commit:M.func,overwrite:M.oneOfType([M.bool,M.oneOf(["shift"])]),eager:M.oneOfType([M.bool,M.oneOf(["append","remove"])]),skipInvalid:M.bool,onAccept:M.func,onComplete:M.func,placeholderChar:M.string,displayChar:M.string,lazy:M.bool,definitions:M.object,blocks:M.object,enum:M.arrayOf(M.string),maxLength:M.number,from:M.number,to:M.number,pattern:M.string,format:M.func,parse:M.func,autofix:M.oneOfType([M.bool,M.oneOf(["pad"])]),radix:M.string,thousandsSeparator:M.string,mapToRadix:M.arrayOf(M.string),scale:M.number,normalizeZeros:M.bool,padFractionalZeros:M.bool,min:M.oneOfType([M.number,M.instanceOf(Date)]),max:M.oneOfType([M.number,M.instanceOf(Date)]),dispatch:M.func,inputRef:M.oneOfType([M.func,M.shape({current:M.object})])},_x=Object.keys(kx).filter(e=>e!=="value"),cZ=["value","unmask","onAccept","onComplete","inputRef"],fZ=_x.filter(e=>cZ.indexOf(e)<0);function Mx(e){var t;const r=(t=class extends m.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,o=this._extractMaskOptionsFromProps(a);if(o.mask)this.maskRef?(this.maskRef.updateOptions(o),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(o);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=ye(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){const{...o}=a;return Object.keys(o).filter(s=>fZ.indexOf(s)<0).forEach(s=>{delete o[s]}),o}_extractNonMaskProps(a){const{...o}=a;return _x.forEach(s=>{delete o[s]}),"defaultValue"in o||(o.defaultValue=a.mask?"":o.value),delete o.value,o}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 m.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},t.displayName=void 0,t.propTypes=void 0,t),n=e.displayName||e.name||"Component";return r.displayName="IMask("+n+")",r.propTypes=kx,m.forwardRef((i,a)=>m.createElement(r,{...i,ref:a}))}const dZ=Mx(e=>{let{inputRef:t,...r}=e;return m.createElement("input",{...r,ref:t})}),hZ=(e,t)=>m.createElement(dZ,{...e,ref:t});m.forwardRef(hZ);const pZ=Mx(e=>{const{inputRef:t,"data-value":r,defaultValue:n,tabIndex:i,...a}=e;return v.jsx(E.TextField,{inputRef:t,fullWidth:!0,...a,inputProps:{...a.inputProps,tabIndex:i},value:r})}),Th=m.forwardRef(({onChange:e,name:t,...r},n)=>{const[i,a]=m.useState("");return v.jsx(pZ,{inputRef:n,name:t,"data-value":i,...r,onAccept:(o,s)=>{a(o),e({target:{name:t,value:s._unmaskedValue}})}})});Th.displayName="MaskedInput";function gZ(e){let t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return t}const mZ=Xr("span")(({arrow:e,theme:t})=>{const i=`solid 1px ${L(t.palette.grey[500],.12)}`,a={borderRadius:"0 0 3px 0",top:-6,borderBottom:i,borderRight:i},o={borderRadius:"3px 0 0 0",bottom:-6,borderTop:i,borderLeft:i},s={borderRadius:"0 3px 0 0",left:-6,borderTop:i,borderRight:i},u={borderRadius:"0 0 0 3px",right:-6,borderBottom:i,borderLeft:i};return{display:"none",[t.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:t.palette.background.paper},...e==="top-left"&&{...a,left:20},...e==="top-center"&&{...a,left:0,right:0,margin:"auto"},...e==="top-right"&&{...a,right:20},...e==="bottom-left"&&{...o,left:20},...e==="bottom-center"&&{...o,left:0,right:0,margin:"auto"},...e==="bottom-right"&&{...o,right:20},...e==="left-top"&&{...s,top:20},...e==="left-center"&&{...s,top:0,bottom:0,margin:"auto"},...e==="left-bottom"&&{...s,bottom:20},...e==="right-top"&&{...u,top:20},...e==="right-center"&&{...u,top:0,bottom:0,margin:"auto"},...e==="right-bottom"&&{...u,bottom:20}}}),vZ=({open:e,children:t,arrow:r="top-right",disabledArrow:n,sx:i,...a})=>{const{style:o,anchorOrigin:s,transformOrigin:u}=gZ(r);return v.jsxs(E.Popover,{open:!!e,anchorEl:e,anchorOrigin:s,transformOrigin:u,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...o,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...i}},...a,children:[!n&&v.jsx(mZ,{arrow:r}),t]})},yZ=E.styled(E.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[300]}`,button:{marginRight:24}})),bZ=E.styled(E.DialogContent)({padding:"24px !important"}),xZ=E.styled(E.DialogActions)(({theme:e})=>({borderTop:`1px solid ${e.palette.grey[300]}`,backgroundColor:e.palette.grey[50]})),wZ=({children:e,actionsProps:t})=>v.jsx(xZ,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...t,children:e}),Ox=({actions:e,actionsProps:t,children:r,dialogContentProps:n,dialogTitle:i,dialogTitleProps:a,onClose:o,id:s,...u})=>{const l=s||"modal-actions";return v.jsxs(E.Dialog,{id:s,scroll:"body",...u,onClose:o,children:[v.jsxs(yZ,{children:[i&&v.jsx(E.DialogTitle,{variant:"subtitle1",...a,children:i}),v.jsx(E.IconButton,{onClick:o,children:v.jsx(nt,{icon:"ic:round-close"})})]}),v.jsx(bZ,{...n,children:r}),e&&v.jsx(wZ,{actionsProps:{...t,id:l},children:e})]})},Ax=({children:e,container:t,waitBeforeShow:r=50})=>{const[n,i]=m.useState(!1);return m.useEffect(()=>{const a=setTimeout(()=>i(!0),r);return()=>clearTimeout(a)},[r]),n?Nh.createPortal(e,document.getElementById(t)||document.body):null},CZ=({children:e,id:t="modal-actions"})=>v.jsx(Ax,{container:t,children:e}),SZ=e=>{if(!e||(e=e==null?void 0:e.replace(/[^\d]+/g,""),e.length!==11||e==="00000000000"||e==="11111111111"||e==="22222222222"||e==="33333333333"||e==="44444444444"||e==="55555555555"||e==="66666666666"||e==="77777777777"||e==="88888888888"||e==="99999999999"))return!1;let t=0;for(let n=0;n<9;n++)t+=parseInt(e.charAt(n))*(10-n);let r=11-t%11;if((r===10||r===11)&&(r=0),r!==parseInt(e.charAt(9)))return!1;t=0;for(let n=0;n<10;n++)t+=parseInt(e.charAt(n))*(11-n);return r=11-t%11,(r===10||r===11)&&(r=0),r===parseInt(e.charAt(10))},EZ=e=>{if(!e||(e=e.replace(/[^\d]+/g,""),e.length!==14)||e==="00000000000000"||e==="11111111111111"||e==="22222222222222"||e==="33333333333333"||e==="44444444444444"||e==="55555555555555"||e==="66666666666666"||e==="77777777777777"||e==="88888888888888"||e==="99999999999999")return!1;let t=e.length-2,r=e.substring(0,t);const n=e.substring(t);let i=0,a=t-7;for(let s=t;s>=1;s--)i+=parseInt(r.charAt(t-s))*a--,a<2&&(a=9);let o=i%11<2?0:11-i%11;if(o!==parseInt(n.charAt(0)))return!1;t+=1,r=e.substring(0,t),i=0,a=t-7;for(let s=t;s>=1;s--)i+=parseInt(r.charAt(t-s))*a--,a<2&&(a=9);return o=i%11<2?0:11-i%11,o===parseInt(n.charAt(1))},uu=(e="",t=[8,20],r=!1,n=!1,i=!1)=>{const a=e.length>=t[0]&&e.length<=t[1],o=!i||/[A-Z]/.test(e),s=!n||/[!@#$%^&*(),.?":{}|<>]/.test(e),u=!r||/\d/.test(e);return{isLengthValid:a,hasUpperCaseChar:o,hasSpecialCharacter:s,hasNumberChar:u}},TZ=Object.freeze(Object.defineProperty({__proto__:null,cnpjIsValid:EZ,cpfIsValid:SZ,validatePassword:uu},Symbol.toStringTag,{value:"Module"})),kZ=E.styled(E.Stack)(({theme:e})=>({width:"100%",border:`solid 1px ${E.alpha(e.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),_Z=E.styled(E.Stack)(()=>({gap:4})),cu=E.styled(E.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",gap:8,color:e.palette.text.secondary,div:{fontSize:12},strong:{fontWeight:700,color:e.palette.text.primary}})),fu=({passed:e})=>e?v.jsx(nt,{icon:"ic:round-check",color:"success.main"}):v.jsx(nt,{icon:"ic:outline-warning",color:"warning.main"}),MZ=({password:e,passwordSize:t,numberChar:r=!1,specialCharacter:n=!1,upperCaseChar:i=!1})=>{const{hasSpecialCharacter:a,hasUpperCaseChar:o,isLengthValid:s,hasNumberChar:u}=uu(e,t,r,n,i);return v.jsxs(kZ,{children:[v.jsx(E.Typography,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),v.jsxs(_Z,{children:[v.jsxs(cu,{children:[v.jsx(fu,{passed:s}),v.jsxs(E.Typography,{component:"div",children:[v.jsxs("strong",{children:[t[0],"-",t[1]]})," ","caracteres"]})]}),i&&v.jsxs(cu,{children:[v.jsx(fu,{passed:o}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos uma ",v.jsx("strong",{children:"letra maiúscula"})]})]}),r&&v.jsxs(cu,{children:[v.jsx(fu,{passed:u}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos ",v.jsx("strong",{children:"um número"})]})]}),n&&v.jsxs(cu,{children:[v.jsx(fu,{passed:a}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos um ",v.jsx("strong",{children:"caracter especial"})," ",v.jsx("span",{children:"(#,@,!,?)"})]})]})]})]})},OZ=({onSearch:e,onChange:t,trigger:r="click",iconPosition:n="end",tabIndex:i,...a})=>{const o=m.useRef(null),s=v.jsx(E.InputAdornment,{position:n,children:v.jsx(E.IconButton,{color:"inherit",onClick:()=>{var u;e((u=o.current)==null?void 0:u.value)},children:v.jsx(nt,{icon:"eva:search-fill",sx:{width:20,height:20}})})});return v.jsx(E.TextField,{inputRef:o,InputProps:{onKeyDown:u=>{var l;u.key==="Enter"&&e((l=o.current)==null?void 0:l.value)},...n==="start"?{startAdornment:s}:{endAdornment:s}},inputProps:{tabIndex:i,...a.inputProps},onChange:u=>{if(r==="change"){e(u.target.value);return}u.target.value===""&&e(""),t&&t(u)},...a})},AZ=({children:e})=>v.jsx(E.Box,{sx:{right:0,width:1,bottom:0,height:1,zIndex:9998,display:"flex",position:"absolute",alignItems:"center",justifyContent:"center",bgcolor:"background.default"},children:v.jsxs(v.Fragment,{children:[v.jsx(Ft.div,{animate:{scale:[1,.9,.9,1,1],opacity:[1,.48,.48,1,1]},transition:{duration:2,ease:"easeInOut",repeatDelay:1,repeat:1/0},children:e}),v.jsx(E.Box,{component:Ft.div,animate:{scale:[1.6,1,1,1.6,1.6],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:100,height:100,position:"absolute",border:t=>`solid 3px ${E.alpha(t.palette.primary.dark,.24)}`}}),v.jsx(E.Box,{component:Ft.div,animate:{scale:[1,1.2,1.2,1,1],rotate:[0,270,270,0,0],opacity:[1,.25,.25,.25,1],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:120,height:120,position:"absolute",border:t=>`solid 8px ${E.alpha(t.palette.primary.dark,.24)}`}})]})}),PZ=E.styled(E.StepConnector)(({theme:e})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:e.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:e.palette.primary.main}}})),DZ=({active:e,completed:t})=>v.jsx(E.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...e&&{color:"primary.main"}},children:t?v.jsx(nt,{icon:"eva:checkmark-fill",sx:{color:"primary.main"}}):v.jsx(E.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),$Z=({steps:e,activeStep:t,showLabels:r=!0,sx:n,...i})=>v.jsx(E.Stepper,{alternativeLabel:!0,activeStep:t,connector:v.jsx(PZ,{}),sx:n,...i,children:e.map(a=>v.jsx(E.Step,{children:v.jsx(E.StepLabel,{StepIconComponent:DZ,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:r&&a})},a))}),FZ=({children:e,value:t,index:r,sx:n})=>v.jsx(E.Box,{role:"tabpanel",id:`simple-tabpanel-${r}`,"aria-labelledby":`simple-tab-${r}`,sx:{mt:3,...t.toString()!==r.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"},...n},children:e});function ua(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{l(n.next(c))}catch(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((n=n.apply(e,t||[])).next())})}function ca(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){r.label=l[1];break}if(l[0]===6&&r.label<a[1]){r.label=a[1],a=l;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(l);break}a[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Px(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function Dx(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var IZ=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Po(e,t){var r=jZ(e);if(typeof r.path!="string"){var n=e.webkitRelativePath;Object.defineProperty(r,"path",{value:typeof t=="string"?t:typeof n=="string"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function jZ(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),i=IZ.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var LZ=[".DS_Store","Thumbs.db"];function RZ(e){return ua(this,void 0,void 0,function(){return ca(this,function(t){return du(e)&&NZ(e.dataTransfer)?[2,WZ(e.dataTransfer,e.type)]:BZ(e)?[2,VZ(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,zZ(e)]:[2,[]]})})}function NZ(e){return du(e)}function BZ(e){return du(e)&&du(e.target)}function du(e){return typeof e=="object"&&e!==null}function VZ(e){return kh(e.target.files).map(function(t){return Po(t)})}function zZ(e){return ua(this,void 0,void 0,function(){var t;return ca(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return Po(n)})]}})})}function WZ(e,t){return ua(this,void 0,void 0,function(){var r,n;return ca(this,function(i){switch(i.label){case 0:return e.items?(r=kh(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(HZ))]):[3,2];case 1:return n=i.sent(),[2,$x(Fx(n))];case 2:return[2,$x(kh(e.files).map(function(a){return Po(a)}))]}})})}function $x(e){return e.filter(function(t){return LZ.indexOf(t.name)===-1})}function kh(e){if(e===null)return[];for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(n)}return t}function HZ(e){if(typeof e.webkitGetAsEntry!="function")return Ix(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?jx(t):Ix(e)}function Fx(e){return e.reduce(function(t,r){return Dx(Dx([],Px(t),!1),Px(Array.isArray(r)?Fx(r):[r]),!1)},[])}function Ix(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var r=Po(t);return Promise.resolve(r)}function UZ(e){return ua(this,void 0,void 0,function(){return ca(this,function(t){return[2,e.isDirectory?jx(e):YZ(e)]})})}function jx(e){var t=e.createReader();return new Promise(function(r,n){var i=[];function a(){var o=this;t.readEntries(function(s){return ua(o,void 0,void 0,function(){var u,l,c;return ca(this,function(f){switch(f.label){case 0:if(s.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return u=f.sent(),r(u),[3,4];case 3:return l=f.sent(),n(l),[3,4];case 4:return[3,6];case 5:c=Promise.all(s.map(UZ)),i.push(c),a(),f.label=6;case 6:return[2]}})})},function(s){n(s)})}a()})}function YZ(e){return ua(this,void 0,void 0,function(){return ca(this,function(t){return[2,new Promise(function(r,n){e.file(function(i){var a=Po(i,e.fullPath);r(a)},function(i){n(i)})})]})})}var GZ=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function Lx(e){return XZ(e)||KZ(e)||Vx(e)||qZ()}function qZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
257
257
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XZ(e){if(Array.isArray(e))return _h(e)}function Rx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rx(Object(r),!0).forEach(function(n){Bx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bx(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Do(e,t){return JZ(e)||QZ(e,t)||Vx(e,t)||ZZ()}function ZZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
258
258
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vx(e,t){if(e){if(typeof e=="string")return _h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _h(e,t)}}function _h(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function QZ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,o,s;try{for(r=r.call(e);!(i=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));i=!0);}catch(u){a=!0,s=u}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}return n}}function JZ(e){if(Array.isArray(e))return e}var eQ="file-invalid-type",tQ="file-too-large",rQ="file-too-small",nQ="too-many-files",iQ=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var r=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:eQ,message:"File type must be ".concat(r)}},zx=function(t){return{code:tQ,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Wx=function(t){return{code:rQ,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},aQ={code:nQ,message:"Too many files"};function Hx(e,t){var r=e.type==="application/x-moz-file"||GZ(e,t);return[r,r?null:iQ(t)]}function Ux(e,t,r){if(Hn(e.size))if(Hn(t)&&Hn(r)){if(e.size>r)return[!1,zx(r)];if(e.size<t)return[!1,Wx(t)]}else{if(Hn(t)&&e.size<t)return[!1,Wx(t)];if(Hn(r)&&e.size>r)return[!1,zx(r)]}return[!0,null]}function Hn(e){return e!=null}function oQ(e){var t=e.files,r=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(u){var l=Hx(u,r),c=Do(l,1),f=c[0],d=Ux(u,n,i),h=Do(d,1),g=h[0],p=s?s(u):null;return f&&g&&!p})}function hu(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function pu(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Yx(e){e.preventDefault()}function sQ(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function lQ(e){return e.indexOf("Edge/")!==-1}function uQ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return sQ(e)||lQ(e)}function Cr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.some(function(s){return!hu(n)&&s&&s.apply(void 0,[n].concat(a)),hu(n)})}}function cQ(){return"showOpenFilePicker"in window}function fQ(e){if(Hn(e)){var t=Object.entries(e).filter(function(r){var n=Do(r,2),i=n[0],a=n[1],o=!0;return Gx(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(qx))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(r,n){var i=Do(n,2),a=i[0],o=i[1];return Nx(Nx({},r),{},Bx({},a,o))},{});return[{description:"Files",accept:t}]}return e}function dQ(e){if(Hn(e))return Object.entries(e).reduce(function(t,r){var n=Do(r,2),i=n[0],a=n[1];return[].concat(Lx(t),[i],Lx(a))},[]).filter(function(t){return Gx(t)||qx(t)}).join(",")}function hQ(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function pQ(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Gx(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function qx(e){return/^.*\.[\w]+$/.test(e)}var gQ=["children"],mQ=["open"],vQ=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],yQ=["refKey","onChange","onClick"];function bQ(e){return CQ(e)||wQ(e)||Kx(e)||xQ()}function xQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
259
259
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CQ(e){if(Array.isArray(e))return Oh(e)}function Mh(e,t){return TQ(e)||EQ(e,t)||Kx(e,t)||SQ()}function SQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|