@zydon/common 1.4.68 → 1.4.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts.map +1 -1
- package/dist/components/NumberInput/index.d.ts.map +1 -1
- package/dist/components/NumberInput/props.d.ts +2 -0
- package/dist/components/NumberInput/props.d.ts.map +1 -1
- package/dist/components/SelectableCards/index.d.ts.map +1 -1
- package/dist/components/SelectableCards/props.d.ts +1 -1
- package/dist/components/SelectableCards/props.d.ts.map +1 -1
- package/dist/components/hook-form/NumberInput/props.d.ts +1 -0
- package/dist/components/hook-form/NumberInput/props.d.ts.map +1 -1
- package/dist/{features-74d03adb.js → features-3c69a581.js} +1 -1
- package/dist/{index-d8872729.js → index-d87320d7.js} +328 -327
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -35429,8 +35429,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
35429
35429
|
Prefix can't start with '-' when allowNegative is true.
|
|
35430
35430
|
prefix: `+r+`
|
|
35431
35431
|
allowNegative: `+u+`
|
|
35432
|
-
`),u=!1),Object.assign(Object.assign({},e),{allowNegative:u})}function jo2(e){e=Oo2(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,a=e.allowLeadingZeros,r=e.onKeyDown;r===void 0&&(r=qO);var u=e.onBlur;u===void 0&&(u=qO);var c=e.thousandSeparator,l=e.decimalScale,f=e.fixedDecimalScale,s=e.prefix;s===void 0&&(s="");var g=e.defaultValue,_=e.value,m=e.valueIsNumericString,v=e.onValueChange,C=LUn(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),h=WCt(e),b=h.decimalSeparator,p=h.allowedDecimalSeparators,y=function(H){return xUn(H,e)},M=function(H,Z){return yo2(H,Z,e)},E=tle(_)?g:_,L=m??bo2(E,s,t);tle(_)?tle(g)||(L=L||typeof g=="number"):L=L||typeof _=="number";var w=function(H){return PUn(H)?H:(typeof H=="number"&&(H=DUn(H)),L&&typeof l=="number"?BUn(H,l,!!f):H)},k=$Un(w(_),w(g),!!L,y,M,v),D=k[0],S=D.numAsString,I=D.formattedValue,A=k[1],F=function(H){var Z=H.target,Q=H.key,J=Z.selectionStart,V=Z.selectionEnd,N=Z.value;if(N===void 0&&(N=""),J!==V){r(H);return}Q==="Backspace"&&N[0]==="-"&&J===s.length+1&&n&&CT(Z,1),l&&f&&(Q==="Backspace"&&N[J-1]===b?(CT(Z,J-1),H.preventDefault()):Q==="Delete"&&N[J]===b&&H.preventDefault()),p!=null&&p.includes(Q)&&N[J]===b&&CT(Z,J+1);var Y=c===!0?",":c;Q==="Backspace"&&N[J-1]===Y&&CT(Z,J-1),Q==="Delete"&&N[J]===Y&&CT(Z,J+1),r(H)},W=function(H){var Z=S;if(Z.match(/\d/g)||(Z=""),a||(Z=uo2(Z)),f&&l&&(Z=BUn(Z,l,f)),Z!==S){var Q=xUn(Z,e);A({formattedValue:Q,value:Z,floatValue:parseFloat(Z)},{event:H,source:Cmt.event})}u(H)},z=function(H){return H===b?!0:bmt(H)},T=function(H){var Z=H.currentValue,Q=H.lastValue,J=H.formattedValue,V=H.currentValueIndex,N=H.formattedValueIndex,Y=Z[V],oe=J[N],te=IUn(Q,Z),se=te.to;return V>=se.start&&V<se.end&&p&&p.includes(Y)&&oe===b?!0:Y===oe};return Object.assign(Object.assign({},C),{value:I,valueIsNumericString:!1,isValidInputCharacter:z,isCharacterSame:T,onValueChange:A,format:y,removeFormatting:M,getCaretBoundary:function(H){return po2(H,e)},onKeyDown:F,onBlur:W})}function wo2(e){var t=jo2(e);return o.createElement(vo2,Object.assign({},t))}const $Ct=o.forwardRef(({decimalScale:e=0,fixedDecimalScale:t=!0,prefix:n,allowNegative:a,minValue:r,maxValue:u=1/0,maxLength:c,value:l,inputProps:f,InputProps:s,size:g,disabled:_,name:m,helperText:v,error:C,fullWidth:h,label:b,required:p,onChange:y,tabIndex:M},E)=>{const[L,w]=o.useState(Date.now()),k=o.useRef(null),D=()=>w(Date.now()),S=I=>{y&&(k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{const{floatValue:A}=I,F=A||0;if(r!==void 0&&r>F){y({target:{name:m,value:r}}),D();return}if(A!==void 0&&u<F){y({target:{name:m,value:u}}),D();return}y({target:{name:m,value:A}})},600))};return o.useEffect(()=>()=>{k.current&&clearTimeout(k.current)},[]),d.jsx(wo2,{getInputRef:E,value:l,prefix:n,decimalSeparator:",",thousandSeparator:".",decimalScale:e,fixedDecimalScale:t,autoComplete:"off",allowNegative:a,maxLength:c,onValueChange:S,customInput:O.TextField,InputProps:{...s},inputProps:{...f,tabIndex:M},disabled:_,size:g,helperText:v,error:C,fullWidth:h,label:b,required:p},L)});$Ct.displayName="NumberInput";const YBn=o.forwardRef(({name:e,increment:t=1,updadteForMultiple:n,allowNegative:a=!1,value:r=0,onChange:u,minValue:c,maxValue:l,decimalScale:f,disabled:s,tabIndex:g,..._},m)=>{const v=wUn(r,t,f),C=()=>{if(!a&&r-t<0)return;const p=r-t,y=Math.floor(r/t)*t,M=!v&&n?y:p;c!==void 0&&p<c?u(c):u(ZBn(M))},h=()=>{const p=Number(r)+t,y=Math.ceil(r/t)*t,E=ZBn(!v&&n?y:p);l!==void 0&&p>=l?u(l):u(c!==void 0&&E<=c?c:E)},b=p=>{const y=Number(p.target.value),M=Math.ceil(y/t)*t,E=n?M:y;if(c!==void 0&&y<=c){u(c);return}if(l!==void 0&&y>=l){u(l);return}u(E)};return d.jsx($Ct,{ref:m,name:e,value:r,minValue:c,maxValue:l,allowNegative:a,decimalScale:f,InputProps:{startAdornment:d.jsx(O.InputAdornment,{position:"start",children:d.jsx(O.IconButton,{size:"medium",disabled:s||(a?!1:!r),onClick:C,children:d.jsx(Ce,{icon:"MINUS_SIGN",width:14,height:14,color:"primary.main"})})}),endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.IconButton,{size:"medium",onClick:h,disabled:s,children:d.jsx(Ce,{icon:"SIMPLE_ADD",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:g},onChange:b,disabled:s,..._})});YBn.displayName="Incrementer";const Mo2=at(O.Box)(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",a=t.variant==="filled",r=t.variant==="outlined",u=t.variant==="soft",c={...t.color==="default"&&{...r&&{backgroundColor:"transparent",color:e.palette.text.primary,border:`1px solid ${fj(e.palette.grey[500],.32)}`},...u&&{color:n?e.palette.text.primary:e.palette.common.white,backgroundColor:fj(e.palette.grey[500],.84)}}},l={...t.color!=="default"&&{...a&&{color:e.palette[t.color].contrastText,backgroundColor:e.palette[t.color].main},...r&&{backgroundColor:"transparent",color:e.palette[t.color].main,border:`1px solid ${e.palette[t.color].main}`},...u&&{color:e.palette[t.color][n?"dark":"light"],backgroundColor:fj(e.palette[t.color].main,.84)}}};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,...l,...c}}),zUn=o.forwardRef(({children:e,color:t="default",variant:n="soft",startIcon:a,endIcon:r,sx:u,...c},l)=>{const f=Wc(),s={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return d.jsxs(Mo2,{ref:l,component:"span",ownerState:{color:t,variant:n},sx:{...a&&{pl:.75},...r&&{pr:.75},...u},theme:f,...c,children:[a&&d.jsxs(O.Box,{sx:{mr:.75,...s},children:[" ",a," "]}),e,r&&d.jsxs(O.Box,{sx:{ml:.75,...s},children:[" ",r," "]})]})});zUn.displayName="Label";const Lo2=O.styled(O.Box)({padding:"0 40px",width:"100%",minHeight:"100%",flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center"}),Po2=()=>d.jsx(Lo2,{children:d.jsx(O.LinearProgress,{color:"inherit",sx:{width:1,maxWidth:360}})});function ej(e){return typeof e=="string"||e instanceof String}function HUn(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function AUn(e,t){return Array.isArray(t)?AUn(e,(n,a)=>t.includes(a)):Object.entries(e).reduce((n,a)=>{let[r,u]=a;return t(u,r)&&(n[r]=u),n},{})}const Le={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Eo2(e){switch(e){case Le.LEFT:return Le.FORCE_LEFT;case Le.RIGHT:return Le.FORCE_RIGHT;default:return e}}function KBn(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function xCt(e,t){if(t===e)return!0;const n=Array.isArray(t),a=Array.isArray(e);let r;if(n&&a){if(t.length!=e.length)return!1;for(r=0;r<t.length;r++)if(!xCt(t[r],e[r]))return!1;return!0}if(n!=a)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){const u=t instanceof Date,c=e instanceof Date;if(u&&c)return t.getTime()==e.getTime();if(u!=c)return!1;const l=t instanceof RegExp,f=e instanceof RegExp;if(l&&f)return t.toString()==e.toString();if(l!=f)return!1;const s=Object.keys(t);for(r=0;r<s.length;r++)if(!Object.prototype.hasOwnProperty.call(e,s[r]))return!1;for(r=0;r<s.length;r++)if(!xCt(e[s[r]],t[s[r]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}class ko2{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?Le.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Le.RIGHT:Le.LEFT}}function Ie(e,t){return new Ie.InputMask(e,t)}function RUn(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?Ie.MaskedRegExp:ej(e)?Ie.MaskedPattern:e===Date?Ie.MaskedDate:e===Number?Ie.MaskedNumber:Array.isArray(e)||e===Array?Ie.MaskedDynamic:Ie.Masked&&e.prototype instanceof Ie.Masked?e:Ie.Masked&&e instanceof Ie.Masked?e.constructor:e instanceof Function?Ie.MaskedFunction:(console.warn("Mask not found for mask",e),Ie.Masked)}function zCt(e){if(!e)throw new Error("Options in not defined");if(Ie.Masked){if(e.prototype instanceof Ie.Masked)return{mask:e};const{mask:t=void 0,...n}=e instanceof Ie.Masked?{mask:e}:HUn(e)&&e.mask instanceof Ie.Masked?e:{};if(t){const a=t.mask;return{...AUn(t,(r,u)=>!u.startsWith("_")),mask:t.constructor,_mask:a,...n}}}return HUn(e)?{...e}:{mask:e}}function bT(e){if(Ie.Masked&&e instanceof Ie.Masked)return e;const t=zCt(e),n=RUn(t.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}Ie.createMask=bT;class XBn{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,n){if(!(t==null||n==null||t===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(t,n)}catch{}}get isActive(){return!1}}Ie.MaskElement=XBn;class yT extends XBn{constructor(t){super(),this.input=t,this._handlers={}}get rootElement(){var t,n,a;return(t=(n=(a=this.input).getRootNode)==null?void 0:n.call(a))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){Object.keys(t).forEach(n=>this._toggleEventHandler(yT.EVENTS_MAP[n],t[n]))}unbindEvents(){Object.keys(this._handlers).forEach(t=>this._toggleEventHandler(t))}_toggleEventHandler(t,n){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),n&&(this.input.addEventListener(t,n),this._handlers[t]=n)}}yT.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},Ie.HTMLMaskElement=yT;class So2 extends yT{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,n){this.input.setSelectionRange(t,n)}get value(){return this.input.value}set value(t){this.input.value=t}}Ie.HTMLMaskElement=yT;class VUn extends yT{get _unsafeSelectionStart(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),a=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||a==null||a<r?a:r}get _unsafeSelectionEnd(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),a=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||a==null||a>r?a:r}_unsafeSelect(t,n){if(!this.rootElement.createRange)return;const a=this.rootElement.createRange();a.setStart(this.input.firstChild||this.input,t),a.setEnd(this.input.lastChild||this.input,n);const r=this.rootElement,u=r.getSelection&&r.getSelection();u&&(u.removeAllRanges(),u.addRange(a))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}Ie.HTMLContenteditableMaskElement=VUn;class Do2{constructor(t,n){this.el=t instanceof XBn?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new VUn(t):new So2(t),this.masked=bT(n),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 n;return t==null||((n=this.masked)==null?void 0:n.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof Ie.Masked)&&this.masked.constructor===RUn(t)){this.masked.updateOptions({mask:t});return}const n=t instanceof Ie.Masked?t:bT({mask:t});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}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,n){const a=this._listeners[t];a&&a.forEach(r=>r(n))}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,n=this.masked.value,a=this.displayValue,r=this.unmaskedValue!==t||this.value!==n;this._unmaskedValue=t,this._value=n,this.el.value!==a&&(this.el.value=a),r&&this._fireChangeEvents()}updateOptions(t){const{mask:n,...a}=t,r=!this.maskEquals(n),u=!xCt(this.masked,a);r&&(this.mask=n),u&&this.masked.updateOptions(a),(r||u)&&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,Le.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,n){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(n),this}off(t,n){if(!this._listeners[t])return this;if(!n)return delete this._listeners[t],this;const a=this._listeners[t].indexOf(n);return a>=0&&this._listeners[t].splice(a,1),this}_onInput(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new ko2({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),a=this.masked.rawInputValue,r=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,u=a===this.masked.rawInputValue?n.removeDirection:Le.NONE;let c=this.masked.nearestInputPos(n.startChangePos+r,u);u!==Le.NONE&&(c=this.masked.nearestInputPos(c,Le.NONE)),this.updateControl(),this.updateCursor(c),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}}Ie.InputMask=Do2;class mt{static normalize(t){return Array.isArray(t)?t:[t,new mt]}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}}Ie.ChangeDetails=mt;class z3{constructor(t,n,a){t===void 0&&(t=""),n===void 0&&(n=0),this.value=t,this.from=n,this.stop=a}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 n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class Pr{constructor(t){this._value="",this._update({...Pr.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,n){n===void 0&&(n={input:!0}),this.reset(),this.append(t,n,""),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,n){return t}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-t)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(t,n)}extractTail(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),new z3(this.extractInput(t,n),t)}appendTail(t){return ej(t)&&(t=new z3(String(t))),t.appendTo(this)}_appendCharRaw(t,n){return t?(this._value+=t,new mt({inserted:t,rawInserted:t})):new mt}_appendChar(t,n,a){n===void 0&&(n={});const r=this.state;let u;if([t,u]=this.doPrepareChar(t,n),u=u.aggregate(this._appendCharRaw(t,n)),u.inserted){let c,l=this.doValidate(n)!==!1;if(l&&a!=null){const f=this.state;this.overwrite===!0&&(c=a.state,a.unshift(this.displayValue.length-u.tailShift));let s=this.appendTail(a);l=s.rawInserted===a.toString(),!(l&&s.inserted)&&this.overwrite==="shift"&&(this.state=f,c=a.state,a.shift(),s=this.appendTail(a),l=s.rawInserted===a.toString()),l&&s.inserted&&(this.state=f)}l||(u=new mt,this.state=r,a&&c&&(a.state=c))}return u}_appendPlaceholder(){return new mt}_appendEager(){return new mt}append(t,n,a){if(!ej(t))throw new Error("value should be string");const r=ej(a)?new z3(String(a)):a;n!=null&&n.tail&&(n._beforeTailState=this.state);let u;[t,u]=this.doPrepare(t,n);for(let c=0;c<t.length;++c){const l=this._appendChar(t[c],n,r);if(!l.rawInserted&&!this.doSkipInvalid(t[c],n,r))break;u.aggregate(l)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&t&&u.aggregate(this._appendEager()),r!=null&&(u.tailShift+=this.appendTail(r).tailShift),u}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(n),new mt}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const n=this.rawInputValue,a=this.value,r=t();return this.rawInputValue=n,this.value&&this.value!==a&&a.indexOf(this.value)===0&&this.append(a.slice(this.displayValue.length),{},""),delete this._refreshing,r}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const n=this.state,a=t(this);return this.state=n,delete this._isolated,a}doSkipInvalid(t,n,a){return!!this.skipInvalid}doPrepare(t,n){return n===void 0&&(n={}),mt.normalize(this.prepare?this.prepare(t,this,n):t)}doPrepareChar(t,n){return n===void 0&&(n={}),mt.normalize(this.prepareChar?this.prepareChar(t,this,n):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,n,a,r,u){r===void 0&&(r=Le.NONE),u===void 0&&(u={input:!0});const c=t+n,l=this.extractTail(c),f=this.eager===!0||this.eager==="remove";let s;f&&(r=Eo2(r),s=this.extractInput(0,c,{raw:!0}));let g=t;const _=new mt;if(r!==Le.NONE&&(g=this.nearestInputPos(t,n>1&&t!==0&&!f?Le.NONE:r),_.tailShift=g-t),_.aggregate(this.remove(g)),f&&r!==Le.NONE&&s===this.rawInputValue)if(r===Le.FORCE_LEFT){let m;for(;s===this.rawInputValue&&(m=this.displayValue.length);)_.aggregate(new mt({tailShift:-1})).aggregate(this.remove(m-1))}else r===Le.FORCE_RIGHT&&l.unshift();return _.aggregate(this.append(a,u,l))}maskEquals(t){return this.mask===t}typedValueEquals(t){const n=this.typedValue;return t===n||Pr.EMPTY_VALUES.includes(t)&&Pr.EMPTY_VALUES.includes(n)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}}Pr.DEFAULTS={skipInvalid:!0},Pr.EMPTY_VALUES=[void 0,null,""],Ie.Masked=Pr;class pT{constructor(t,n){t===void 0&&(t=[]),n===void 0&&(n=0),this.chunks=t,this.from=n}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=ej(t)?new z3(String(t)):t;const n=this.chunks[this.chunks.length-1],a=n&&(n.stop===t.stop||t.stop==null)&&t.from===n.from+n.toString().length;if(t instanceof z3)a?n.extend(t.toString()):this.chunks.push(t);else if(t instanceof pT){if(t.stop==null){let r;for(;t.chunks.length&&t.chunks[0].stop==null;)r=t.chunks.shift(),r.from+=t.from,this.extend(r)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Ie.MaskedPattern))return new z3(this.toString()).appendTo(t);const n=new mt;for(let a=0;a<this.chunks.length&&!n.skip;++a){const r=this.chunks[a],u=t._mapPosToBlock(t.displayValue.length),c=r.stop;let l;if(c!=null&&(!u||u.index<=c)){if(r instanceof pT||t._stops.indexOf(c)>=0){const f=t._appendPlaceholder(c);n.aggregate(f)}l=r instanceof pT&&t._blocks[c]}if(l){const f=l.appendTail(r);f.skip=!1,n.aggregate(f),t._value+=f.inserted;const s=r.toString().slice(f.rawInserted.length);s&&n.aggregate(t.append(s,{tail:!0}))}else n.aggregate(t.append(r.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:n,...a}=t;Object.assign(this,a),this.chunks=n.map(r=>{const u="chunks"in r?new pT:new z3;return u.state=r,u})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const n=t!=null?t-this.from:t;let a=0;for(;a<this.chunks.length;){const r=this.chunks[a],u=r.unshift(n);if(r.toString()){if(!u)break;++a}else this.chunks.splice(a,1);if(u)return u}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const n=this.chunks[t],a=n.shift();if(n.toString()){if(!a)break;--t}else this.chunks.splice(t,1);if(a)return a}return""}}class Bo2{constructor(t,n){this.masked=t,this._log=[];const{offset:a,index:r}=t._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=a,this.index=r,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=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;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,Le.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Le.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,Le.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.NONE),!0})}}class FUn{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,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(n),this._value||(this._isRawInput=!1),new mt}nearestInputPos(t,n){n===void 0&&(n=Le.NONE);const a=0,r=this._value.length;switch(n){case Le.LEFT:case Le.FORCE_LEFT:return a;case Le.NONE:case Le.RIGHT:case Le.FORCE_RIGHT:default:return r}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._isRawInput?n-t:0}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),a===void 0&&(a={}),a.raw&&this._isRawInput&&this._value.slice(t,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,n){n===void 0&&(n={});const a=new mt;if(this.isFilled)return a;const r=this.eager===!0||this.eager==="append",c=this.char===t&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!r)&&!n.tail;return c&&(a.rawInserted=this.char),this._value=a.inserted=this.char,this._isRawInput=c&&(n.raw||n.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new mt;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new z3("")}appendTail(t){return ej(t)&&(t=new z3(String(t))),t.appendTo(this)}append(t,n,a){const r=this._appendChar(t[0],n);return a!=null&&(r.tailShift+=this.appendTail(a).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}}class HCt{constructor(t){const{parent:n,isOptional:a,placeholderChar:r,displayChar:u,lazy:c,eager:l,...f}=t;this.masked=bT(f),Object.assign(this,{parent:n,isOptional:a,placeholderChar:r,displayChar:u,lazy:c,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),t===0&&n>=1?(this.isFilled=!1,this.masked.remove(t,n)):new mt}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,n){if(n===void 0&&(n={}),this.isFilled)return new mt;const a=this.masked.state,r=this.masked._appendChar(t,this.currentMaskFlags(n));return r.inserted&&this.doValidate(n)===!1&&(r.inserted=r.rawInserted="",this.masked.state=a),!r.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=!!r.inserted,r}append(t,n,a){return this.masked.append(t,this.currentMaskFlags(n),a)}_appendPlaceholder(){const t=new mt;return this.isFilled||this.isOptional||(this.isFilled=!0,t.inserted=this.placeholderChar),t}_appendEager(){return new mt}extractTail(t,n){return this.masked.extractTail(t,n)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.masked.extractInput(t,n,a)}nearestInputPos(t,n){n===void 0&&(n=Le.NONE);const a=0,r=this.value.length,u=Math.min(Math.max(t,a),r);switch(n){case Le.LEFT:case Le.FORCE_LEFT:return this.isComplete?u:a;case Le.RIGHT:case Le.FORCE_RIGHT:return this.isComplete?u:r;case Le.NONE:default:return u}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.value.slice(t,n).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 n;return{...t,_beforeTailState:(t==null||(n=t._beforeTailState)==null?void 0:n.masked)||(t==null?void 0:t._beforeTailState)}}}HCt.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 Io2 extends Pr{updateOptions(t){super.updateOptions(t)}_update(t){const n=t.mask;n&&(t.validate=a=>a.search(n)>=0),super._update(t)}}Ie.MaskedRegExp=Io2;class Er extends Pr{constructor(t){super({...Er.DEFAULTS,...t,definitions:Object.assign({},HCt.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 n=this.mask;if(!n||!t)return;let a=!1,r=!1;for(let u=0;u<n.length;++u){if(this.blocks){const s=n.slice(u),g=Object.keys(this.blocks).filter(m=>s.indexOf(m)===0);g.sort((m,v)=>v.length-m.length);const _=g[0];if(_){const{expose:m,...v}=zCt(this.blocks[_]),C=bT({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...v,parent:this});C&&(this._blocks.push(C),m&&(this.exposeBlock=C),this._maskedBlocks[_]||(this._maskedBlocks[_]=[]),this._maskedBlocks[_].push(this._blocks.length-1)),u+=_.length-1;continue}}let c=n[u],l=c in t;if(c===Er.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(c==="{"||c==="}"){a=!a;continue}if(c==="["||c==="]"){r=!r;continue}if(c===Er.ESCAPE_CHAR){if(++u,c=n[u],!c)break;l=!1}const f=l?new HCt({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...zCt(t[c]),parent:this}):new FUn({char:c,eager:this.eager,isUnmasking:a});this._blocks.push(f)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){const{_blocks:n,...a}=t;this._blocks.forEach((r,u)=>r.state=n[u]),super.state=a}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,n)=>t+=n.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(n),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,n)=>t+=n.value,"")}set value(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(n),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(n),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,n)=>t+=n.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const n=new mt;let a=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(a==null)return n;this._blocks[a].isFilled&&++a;for(let r=a;r<this._blocks.length;++r){const u=this._blocks[r]._appendEager();if(!u.inserted)break;n.aggregate(u)}return n}_appendCharRaw(t,n){n===void 0&&(n={});const a=this._mapPosToBlock(this.displayValue.length),r=new mt;if(!a)return r;for(let c=a.index;;++c){var u;const l=this._blocks[c];if(!l)break;const f=l._appendChar(t,{...n,_beforeTailState:(u=n._beforeTailState)==null||(u=u._blocks)==null?void 0:u[c]}),s=f.skip;if(r.aggregate(f),s||f.rawInserted)break}return r}extractTail(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const a=new pT;return t===n||this._forEachBlocksInRange(t,n,(r,u,c,l)=>{const f=r.extractTail(c,l);f.stop=this._findStopBefore(u),f.from=this._blockStartPos(u),f instanceof pT&&(f.blockIndex=u),a.extend(f)}),a}extractInput(t,n,a){if(t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),a===void 0&&(a={}),t===n)return"";let r="";return this._forEachBlocksInRange(t,n,(u,c,l,f)=>{r+=u.extractInput(l,f,a)}),r}_findStopBefore(t){let n;for(let a=0;a<this._stops.length;++a){const r=this._stops[a];if(r<=t)n=r;else break}return n}_appendPlaceholder(t){const n=new mt;if(this.lazy&&t==null)return n;const a=this._mapPosToBlock(this.displayValue.length);if(!a)return n;const r=a.index,u=t??this._blocks.length;return this._blocks.slice(r,u).forEach(c=>{if(!c.lazy||t!=null){var l;const f=c._appendPlaceholder((l=c._blocks)==null?void 0:l.length);this._value+=f.inserted,n.aggregate(f)}}),n}_mapPosToBlock(t){let n="";for(let a=0;a<this._blocks.length;++a){const r=this._blocks[a],u=n.length;if(n+=r.displayValue,t<=n.length)return{index:a,offset:t-u}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((n,a)=>n+=a.displayValue.length,0)}_forEachBlocksInRange(t,n,a){n===void 0&&(n=this.displayValue.length);const r=this._mapPosToBlock(t);if(r){const u=this._mapPosToBlock(n),c=u&&r.index===u.index,l=r.offset,f=u&&c?u.offset:this._blocks[r.index].displayValue.length;if(a(this._blocks[r.index],r.index,l,f),u&&!c){for(let s=r.index+1;s<u.index;++s)a(this._blocks[s],s,0,this._blocks[s].displayValue.length);a(this._blocks[u.index],u.index,0,u.offset)}}}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const a=super.remove(t,n);return this._forEachBlocksInRange(t,n,(r,u,c,l)=>{a.aggregate(r.remove(c,l))}),a}nearestInputPos(t,n){if(n===void 0&&(n=Le.NONE),!this._blocks.length)return 0;const a=new Bo2(this,t);if(n===Le.NONE)return a.pushRightBeforeInput()||(a.popState(),a.pushLeftBeforeInput())?a.pos:this.displayValue.length;if(n===Le.LEFT||n===Le.FORCE_LEFT){if(n===Le.LEFT){if(a.pushRightBeforeFilled(),a.ok&&a.pos===t)return t;a.popState()}if(a.pushLeftBeforeInput(),a.pushLeftBeforeRequired(),a.pushLeftBeforeFilled(),n===Le.LEFT){if(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.ok&&a.pos<=t||(a.popState(),a.ok&&a.pos<=t))return a.pos;a.popState()}return a.ok?a.pos:n===Le.FORCE_LEFT?0:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:0)}return n===Le.RIGHT||n===Le.FORCE_RIGHT?(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.pushRightBeforeFilled()?a.pos:n===Le.FORCE_RIGHT?this.displayValue.length:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:this.nearestInputPos(t,Le.LEFT))):t}totalInputPositions(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);let a=0;return this._forEachBlocksInRange(t,n,(r,u,c,l)=>{a+=r.totalInputPositions(c,l)}),a}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const n=this._maskedBlocks[t];return n?n.map(a=>this._blocks[a]):[]}}Er.DEFAULTS={lazy:!0,placeholderChar:"_"},Er.STOP_CHAR="`",Er.ESCAPE_CHAR="\\",Er.InputDefinition=HCt,Er.FixedDefinition=FUn,Ie.MaskedPattern=Er;class ACt extends Er{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:n=this.to||0,from:a=this.from||0,maxLength:r=this.maxLength||0,autofix:u=this.autofix,...c}=t;this.to=n,this.from=a,this.maxLength=Math.max(String(n).length,r),this.autofix=u;const l=String(this.from).padStart(this.maxLength,"0"),f=String(this.to).padStart(this.maxLength,"0");let s=0;for(;s<f.length&&f[s]===l[s];)++s;c.mask=f.slice(0,s).replace(/0/g,"\\0")+"0".repeat(this.maxLength-s),super._update(c)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let n="",a="";const[,r,u]=t.match(/^(\D*)(\d*)(\D*)/)||[];return u&&(n="0".repeat(r.length)+u,a="9".repeat(r.length)+u),n=n.padEnd(this.maxLength,"0"),a=a.padEnd(this.maxLength,"9"),[n,a]}doPrepareChar(t,n){n===void 0&&(n={});let a;if([t,a]=super.doPrepareChar(t.replace(/\D/g,""),n),!this.autofix||!t)return[t,a];const r=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0"),c=this.value+t;if(c.length>this.maxLength)return["",a];const[l,f]=this.boundaries(c);return Number(f)<this.from?[r[c.length-1],a]:Number(l)>this.to?this.autofix==="pad"&&c.length<this.maxLength?["",a.aggregate(this.append(r[c.length-1]+t,n))]:[u[c.length-1],a]:[t,a]}doValidate(t){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[r,u]=this.boundaries(n);return this.from<=Number(u)&&Number(r)<=this.to&&super.doValidate(t)}}Ie.MaskedRange=ACt;class OT extends Er{constructor(t){const{mask:n,pattern:a,...r}={...OT.DEFAULTS,...t};super({...r,mask:ej(n)?n:a})}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:n,pattern:a,blocks:r,...u}={...OT.DEFAULTS,...t},c=Object.assign({},OT.GET_DEFAULT_BLOCKS());t.min&&(c.Y.from=t.min.getFullYear()),t.max&&(c.Y.to=t.max.getFullYear()),t.min&&t.max&&c.Y.from===c.Y.to&&(c.m.from=t.min.getMonth()+1,c.m.to=t.max.getMonth()+1,c.m.from===c.m.to&&(c.d.from=t.min.getDate(),c.d.to=t.max.getDate())),Object.assign(c,this.blocks,r),Object.keys(c).forEach(l=>{const f=c[l];!("autofix"in f)&&"autofix"in t&&(f.autofix=t.autofix)}),super._update({...u,mask:ej(n)?n:a,blocks:c})}doValidate(t){const n=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=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)}}OT.GET_DEFAULT_BLOCKS=()=>({d:{mask:ACt,from:1,to:31,maxLength:2},m:{mask:ACt,from:1,to:12,maxLength:2},Y:{mask:ACt,from:1900,to:9999}}),OT.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),r=e.getFullYear();return[n,a,r].join(".")},parse:(e,t)=>{const[n,a,r]=e.split(".").map(Number);return new Date(r,a-1,n)}},Ie.MaskedDate=OT;class ymt extends Pr{constructor(t){super({...ymt.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(n=>{const{expose:a,...r}=zCt(n),u=bT({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});return a&&(this.exposeMask=u),u}):[])}_appendCharRaw(t,n){n===void 0&&(n={});const a=this._applyDispatch(t,n);return this.currentMask&&a.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(n))),a}_applyDispatch(t,n,a){t===void 0&&(t=""),n===void 0&&(n={}),a===void 0&&(a="");const r=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,u=this.rawInputValue,c=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:u,l=u.slice(c.length),f=this.currentMask,s=new mt,g=f==null?void 0:f.state;if(this.currentMask=this.doDispatch(t,{...n},a),this.currentMask)if(this.currentMask!==f){if(this.currentMask.reset(),c){const _=this.currentMask.append(c,{raw:!0});s.tailShift=_.inserted.length-r.length}l&&(s.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)}else g&&(this.currentMask.state=g);return s}_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 n=new mt;return t&&n.aggregate(this._applyDispatch("",{},t)),n.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var n,a;return{...t,_beforeTailState:((n=t._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((a=t._beforeTailState)==null?void 0:a.currentMask)||t._beforeTailState}}doDispatch(t,n,a){return n===void 0&&(n={}),a===void 0&&(a=""),this.dispatch(t,this,n,a)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,n){n===void 0&&(n={});let[a,r]=super.doPrepare(t,n);if(this.currentMask){let u;[a,u]=super.doPrepare(a,this.currentMaskFlags(n)),r=r.aggregate(u)}return[a,r]}doPrepareChar(t,n){n===void 0&&(n={});let[a,r]=super.doPrepareChar(t,n);if(this.currentMask){let u;[a,u]=super.doPrepareChar(a,this.currentMaskFlags(n)),r=r.aggregate(u)}return[a,r]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(n=>n.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 n=String(t);this.currentMask&&(this.currentMask.typedValue=t,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}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,n){const a=new mt;return this.currentMask&&a.aggregate(this.currentMask.remove(t,n)).aggregate(this._applyDispatch()),a}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:n,currentMaskRef:a,currentMask:r,...u}=t;n&&this.compiledMasks.forEach((c,l)=>c.state=n[l]),a!=null&&(this.currentMask=a,this.currentMask.state=r),super.state=u}extractInput(t,n,a){return this.currentMask?this.currentMask.extractInput(t,n,a):""}extractTail(t,n){return this.currentMask?this.currentMask.extractTail(t,n):super.extractTail(t,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,n){return this.currentMask?this.currentMask.nearestInputPos(t,n):super.nearestInputPos(t,n)}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((n,a)=>{if(!t[a])return;const{mask:r,...u}=t[a];return xCt(n,u)&&n.maskEquals(r)}):super.maskEquals(t)}typedValueEquals(t){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(t))}}ymt.DEFAULTS=void 0,ymt.DEFAULTS={dispatch:(e,t,n,a)=>{if(!t.compiledMasks.length)return;const r=t.rawInputValue,u=t.compiledMasks.map((c,l)=>{const f=t.currentMask===c,s=f?c.displayValue.length:c.nearestInputPos(c.displayValue.length,Le.FORCE_LEFT);return c.rawInputValue!==r?(c.reset(),c.append(r,{raw:!0})):f||c.remove(s),c.append(e,t.currentMaskFlags(n)),c.appendTail(a),{index:l,weight:c.rawInputValue.length,totalInputPositions:c.totalInputPositions(0,Math.max(s,c.nearestInputPos(c.displayValue.length,Le.FORCE_LEFT)))}});return u.sort((c,l)=>l.weight-c.weight||l.totalInputPositions-c.totalInputPositions),t.compiledMasks[u[0].index]}},Ie.MaskedDynamic=ymt;class Wo2 extends Er{constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:n,...a}=t;if(n){const r=n.map(l=>l.length),u=Math.min(...r),c=Math.max(...r)-u;a.mask="*".repeat(u),c&&(a.mask+="["+"*".repeat(c)+"]"),this.enum=n}super._update(a)}doValidate(t){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(t)}}Ie.MaskedEnum=Wo2;class $o2 extends Pr{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}Ie.MaskedFunction=$o2;class L1 extends Pr{constructor(t){super({...L1.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",a=(this.scale?"("+KBn(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+n+a),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(KBn).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(KBn(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const n=t.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(t,n){n===void 0&&(n={});const[a,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),n);return t&&!a&&(r.skip=!0),a&&!this.allowPositive&&!this.value&&a!=="-"&&r.aggregate(this._appendChar("-")),[a,r]}_separatorsCount(t,n){n===void 0&&(n=!1);let a=0;for(let r=0;r<t;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++a,n&&(t+=this.thousandsSeparator.length));return a}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n),this._removeThousandsSeparators(super.extractInput(t,n,a))}_appendCharRaw(t,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(t,n);const a=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(a);this._value=this._removeThousandsSeparators(this.value);const u=super._appendCharRaw(t,n);this._value=this._insertThousandsSeparators(this._value);const c=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(c);return u.tailShift+=(l-r)*this.thousandsSeparator.length,u.skip=!u.rawInserted&&t===this.thousandsSeparator,u}_findSeparatorAround(t){if(this.thousandsSeparator){const n=t-this.thousandsSeparator.length+1,a=this.value.indexOf(this.thousandsSeparator,n);if(a<=t)return a}return-1}_adjustRangeWithSeparators(t,n){const a=this._findSeparatorAround(t);a>=0&&(t=a);const r=this._findSeparatorAround(n);return r>=0&&(n=r+this.thousandsSeparator.length),[t,n]}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n);const a=this.value.slice(0,t),r=this.value.slice(n),u=this._separatorsCount(a.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(a+r));const c=this._separatorsCountFromSlice(a);return new mt({tailShift:(c-u)*this.thousandsSeparator.length})}nearestInputPos(t,n){if(!this.thousandsSeparator)return t;switch(n){case Le.NONE:case Le.LEFT:case Le.FORCE_LEFT:{const a=this._findSeparatorAround(t-1);if(a>=0){const r=a+this.thousandsSeparator.length;if(t<r||this.value.length<=r||n===Le.FORCE_LEFT)return a}break}case Le.RIGHT:case Le.FORCE_RIGHT:{const a=this._findSeparatorAround(t);if(a>=0)return a+this.thousandsSeparator.length}}return t}doValidate(t){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const a=this.number;n=n&&!isNaN(a)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(t)}doCommit(){if(this.value){const t=this.number;let n=t;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==t&&(this.unmaskedValue=this.format(n,this));let a=this.value;this.normalizeZeros&&(a=this._normalizeZeros(a)),this.padFractionalZeros&&this.scale>0&&(a=this._padFractionalZeros(a)),this._value=a}super.doCommit()}_normalizeZeros(t){const n=this._removeThousandsSeparators(t).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(a,r,u,c)=>r+c),t.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const n=t.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(t,n,a){n===void 0&&(n={});const r=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===L1.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,n,a)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,L1.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(L1.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)||L1.EMPTY_VALUES.includes(t)&&L1.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}L1.UNMASKED_RADIX=".",L1.EMPTY_VALUES=[...Pr.EMPTY_VALUES,0],L1.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[L1.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})},Ie.MaskedNumber=L1;const QBn={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function NUn(e,t,n){t===void 0&&(t=QBn.MASKED),n===void 0&&(n=QBn.MASKED);const a=bT(e);return r=>a.runIsolated(u=>(u[t]=r,u[n]))}function xo2(e,t,n,a){return NUn(t,n,a)(e)}Ie.PIPE_TYPE=QBn,Ie.createPipe=NUn,Ie.pipe=xo2;try{globalThis.IMask=Ie}catch{}const TUn={mask:j.oneOfType([j.array,j.func,j.string,j.instanceOf(RegExp),j.oneOf([Date,Number,Ie.Masked]),j.instanceOf(Ie.Masked)]),value:j.any,unmask:j.oneOfType([j.bool,j.oneOf(["typed"])]),prepare:j.func,prepareChar:j.func,validate:j.func,commit:j.func,overwrite:j.oneOfType([j.bool,j.oneOf(["shift"])]),eager:j.oneOfType([j.bool,j.oneOf(["append","remove"])]),skipInvalid:j.bool,onAccept:j.func,onComplete:j.func,placeholderChar:j.string,displayChar:j.string,lazy:j.bool,definitions:j.object,blocks:j.object,enum:j.arrayOf(j.string),maxLength:j.number,from:j.number,to:j.number,pattern:j.string,format:j.func,parse:j.func,autofix:j.oneOfType([j.bool,j.oneOf(["pad"])]),radix:j.string,thousandsSeparator:j.string,mapToRadix:j.arrayOf(j.string),scale:j.number,normalizeZeros:j.bool,padFractionalZeros:j.bool,min:j.oneOfType([j.number,j.instanceOf(Date)]),max:j.oneOfType([j.number,j.instanceOf(Date)]),dispatch:j.func,inputRef:j.oneOfType([j.func,j.shape({current:j.object})])},ZUn=Object.keys(TUn).filter(e=>e!=="value"),zo2=["value","unmask","onAccept","onComplete","inputRef"],Ho2=ZUn.filter(e=>zo2.indexOf(e)<0);function UUn(e){var t;const n=(t=class extends o.Component{constructor(u){super(u),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const u=this.props,c=this._extractMaskOptionsFromProps(u);if(c.mask)this.maskRef?(this.maskRef.updateOptions(c),"value"in u&&u.value!==void 0&&(this.maskValue=u.value)):this.initMask(c);else if(this.destroyMask(),"value"in u&&u.value!==void 0){var l;(l=this.element)!=null&&l.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=u.value:this.element.value=u.value}}componentWillUnmount(){this.destroyMask()}_inputRef(u){this.element=u,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=u:this.props.inputRef(u))}initMask(u){u===void 0&&(u=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Ie(this.element,u).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(u){const{...c}=u;return Object.keys(c).filter(l=>Ho2.indexOf(l)<0).forEach(l=>{delete c[l]}),c}_extractNonMaskProps(u){const{...c}=u;return ZUn.forEach(l=>{delete c[l]}),"defaultValue"in c||(c.defaultValue=u.mask?"":c.value),delete c.value,c}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(u){this.maskRef&&(u=u==null&&this.props.unmask!=="typed"?"":u,this.props.unmask==="typed"?this.maskRef.typedValue=u:this.props.unmask?this.maskRef.unmaskedValue=u:this.maskRef.value=u)}_onAccept(u){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,u)}_onComplete(u){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,u)}render(){return o.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},t.displayName=void 0,t.propTypes=void 0,t),a=e.displayName||e.name||"Component";return n.displayName="IMask("+a+")",n.propTypes=TUn,o.forwardRef((r,u)=>o.createElement(n,{...r,ref:u}))}const Ao2=UUn(e=>{let{inputRef:t,...n}=e;return o.createElement("input",{...n,ref:t})}),Ro2=(e,t)=>o.createElement(Ao2,{...e,ref:t});o.forwardRef(Ro2);const Vo2=UUn(e=>{const{inputRef:t,"data-value":n,defaultValue:a,tabIndex:r,...u}=e;return d.jsx(O.TextField,{inputRef:t,fullWidth:!0,...u,inputProps:{...u.inputProps,tabIndex:r},value:n})}),JBn=o.forwardRef(({onChange:e,name:t,...n},a)=>{const[r,u]=o.useState("");return d.jsx(Vo2,{inputRef:a,name:t,"data-value":r,...n,onAccept:(c,l)=>{u(c),e({target:{name:t,value:l._unmaskedValue}})}})});JBn.displayName="MaskedInput";function Fo2(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 No2=at("span")(({arrow:e,theme:t})=>{const r=`solid 1px ${X(t.palette.grey[500],.12)}`,u={borderRadius:"0 0 3px 0",top:-6,borderBottom:r,borderRight:r},c={borderRadius:"3px 0 0 0",bottom:-6,borderTop:r,borderLeft:r},l={borderRadius:"0 3px 0 0",left:-6,borderTop:r,borderRight:r},f={borderRadius:"0 0 0 3px",right:-6,borderBottom:r,borderLeft:r};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"&&{...u,left:20},...e==="top-center"&&{...u,left:0,right:0,margin:"auto"},...e==="top-right"&&{...u,right:20},...e==="bottom-left"&&{...c,left:20},...e==="bottom-center"&&{...c,left:0,right:0,margin:"auto"},...e==="bottom-right"&&{...c,right:20},...e==="left-top"&&{...l,top:20},...e==="left-center"&&{...l,top:0,bottom:0,margin:"auto"},...e==="left-bottom"&&{...l,bottom:20},...e==="right-top"&&{...f,top:20},...e==="right-center"&&{...f,top:0,bottom:0,margin:"auto"},...e==="right-bottom"&&{...f,bottom:20}}}),GUn=({open:e,children:t,arrow:n="top-right",disabledArrow:a,sx:r,...u})=>{const{style:c,anchorOrigin:l,transformOrigin:f}=Fo2(n);return d.jsxs(O.Popover,{open:!!e,anchorEl:e,anchorOrigin:l,transformOrigin:f,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...c,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...r}},...u,children:[!a&&d.jsx(No2,{arrow:n}),t]})},To2=O.styled(O.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[300]}`,button:{marginRight:24}})),Zo2=O.styled(O.DialogContent)({padding:"24px !important"}),Uo2=O.styled(O.DialogActions)(({theme:e})=>({borderTop:`1px solid ${e.palette.grey[300]}`,backgroundColor:e.palette.grey[50]})),Go2=({children:e,actionsProps:t})=>d.jsx(Uo2,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...t,children:e}),YUn=({actions:e,actionsProps:t,children:n,dialogContentProps:a,dialogTitle:r,dialogTitleProps:u,onClose:c,id:l,...f})=>{const s=l||"modal-actions";return d.jsxs(O.Dialog,{id:l,scroll:"body",...f,onClose:c,children:[d.jsxs(To2,{children:[r&&d.jsx(O.DialogTitle,{variant:"subtitle1",...u,children:r}),d.jsx(O.IconButton,{onClick:c,children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON"})})]}),d.jsx(Zo2,{...a,children:n}),e&&d.jsx(Go2,{actionsProps:{...t,id:s},children:e})]})},KUn=({children:e,container:t,waitBeforeShow:n=50})=>{const[a,r]=o.useState(!1);return o.useEffect(()=>{const u=setTimeout(()=>r(!0),n);return()=>clearTimeout(u)},[n]),n?a?Emt.createPortal(e,document.getElementById(t)||document.body):null:Emt.createPortal(e,document.getElementById(t)||document.body)},Yo2=({children:e,id:t="modal-actions"})=>d.jsx(KUn,{container:t,children:e}),Ko2=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 a=0;a<9;a++)t+=parseInt(e.charAt(a))*(10-a);let n=11-t%11;if((n===10||n===11)&&(n=0),n!==parseInt(e.charAt(9)))return!1;t=0;for(let a=0;a<10;a++)t+=parseInt(e.charAt(a))*(11-a);return n=11-t%11,(n===10||n===11)&&(n=0),n===parseInt(e.charAt(10))},Xo2=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,n=e.substring(0,t);const a=e.substring(t);let r=0,u=t-7;for(let l=t;l>=1;l--)r+=parseInt(n.charAt(t-l))*u--,u<2&&(u=9);let c=r%11<2?0:11-r%11;if(c!==parseInt(a.charAt(0)))return!1;t+=1,n=e.substring(0,t),r=0,u=t-7;for(let l=t;l>=1;l--)r+=parseInt(n.charAt(t-l))*u--,u<2&&(u=9);return c=r%11<2?0:11-r%11,c===parseInt(a.charAt(1))},Qo2=(e="")=>e?!!e.toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/):!1,RCt=(e="",t=[8,20],n=!1,a=!1,r=!1)=>{const u=e.length>=t[0]&&e.length<=t[1],c=!r||/[A-Z]/.test(e),l=!a||/[!@#$%^&*(),.?":{}|<>]/.test(e),f=!n||/\d/.test(e);return{isLengthValid:u,hasUpperCaseChar:c,hasSpecialCharacter:l,hasNumberChar:f}},Jo2=Object.freeze(Object.defineProperty({__proto__:null,cnpjIsValid:Xo2,cpfIsValid:Ko2,emailIsValid:Qo2,validatePassword:RCt},Symbol.toStringTag,{value:"Module"})),qo2=O.styled(O.Stack)(({theme:e})=>({width:"100%",border:`solid 1px ${O.alpha(e.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),e22=O.styled(O.Stack)(()=>({gap:4})),pmt=O.styled(O.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}})),Omt=({passed:e})=>e?d.jsx(Ce,{icon:"SIMPLE_CHECK",color:"success.main"}):d.jsx(Ce,{icon:"WARNING_TRIANGULE",color:"warning.main"}),t22=({password:e,passwordSize:t,numberChar:n=!1,specialCharacter:a=!1,upperCaseChar:r=!1,match:u})=>{const{hasSpecialCharacter:c,hasUpperCaseChar:l,isLengthValid:f,hasNumberChar:s}=RCt(e,t,n,a,r);return d.jsxs(qo2,{children:[d.jsx(O.Typography,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),d.jsxs(e22,{children:[d.jsxs(pmt,{children:[d.jsx(Omt,{passed:f}),d.jsxs(O.Typography,{component:"div",children:[d.jsxs("strong",{children:[t[0],"-",t[1]]})," ","caracteres"]})]}),r&&d.jsxs(pmt,{children:[d.jsx(Omt,{passed:l}),d.jsxs(O.Typography,{component:"div",children:["Pelo menos uma ",d.jsx("strong",{children:"letra maiúscula"})]})]}),n&&d.jsxs(pmt,{children:[d.jsx(Omt,{passed:s}),d.jsxs(O.Typography,{component:"div",children:["Pelo menos ",d.jsx("strong",{children:"um número"})]})]}),a&&d.jsxs(pmt,{children:[d.jsx(Omt,{passed:c}),d.jsxs(O.Typography,{component:"div",children:["Pelo menos um ",d.jsx("strong",{children:"caracter especial"})," ",d.jsx("span",{children:"(#,@,!,?)"})]})]}),u&&d.jsxs(pmt,{children:[d.jsx(Omt,{passed:u.passwordMatch}),d.jsx(O.Typography,{component:"div",children:"Senha e confirmação de senha devem ser iguais"})]})]})]})},VCt=({isFetching:e,fetching:t,isLoading:n,loading:a,anError:r,error:u,isEmpty:c,empty:l,children:f})=>n?a||"Carregando...":r?u||"Error":c?l||"Nenhum resultado":d.jsxs(d.Fragment,{children:[e&&d.jsx(d.Fragment,{children:t||"Carregando..."}),f]}),n22=Object.freeze(Object.defineProperty({__proto__:null,downloadFile:(e,t,n)=>{const a=`data:application/octet-stream;base64,${n}`,r=document.createElement("a"),u=`${e.replace(t,"")}.${t}`;r.href=a,r.download=u,r.click()}},Symbol.toStringTag,{value:"Module"}));function r22(e){return eBn({},e)}var XUn=1440,a22=2520,qBn=43200,i22=86400;function o22(e,t,n){var a,r;ae(2,arguments);var u=hi(),c=(a=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:u.locale)!==null&&a!==void 0?a:sCt;if(!c.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=zce(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var f=eBn(r22(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:l}),s,g;l>0?(s=ie(t),g=ie(e)):(s=ie(e),g=ie(t));var _=cTn(g,s),m=(Hce(g)-Hce(s))/1e3,v=Math.round((_-m)/60),C;if(v<2)return n!=null&&n.includeSeconds?_<5?c.formatDistance("lessThanXSeconds",5,f):_<10?c.formatDistance("lessThanXSeconds",10,f):_<20?c.formatDistance("lessThanXSeconds",20,f):_<40?c.formatDistance("halfAMinute",0,f):_<60?c.formatDistance("lessThanXMinutes",1,f):c.formatDistance("xMinutes",1,f):v===0?c.formatDistance("lessThanXMinutes",1,f):c.formatDistance("xMinutes",v,f);if(v<45)return c.formatDistance("xMinutes",v,f);if(v<90)return c.formatDistance("aboutXHours",1,f);if(v<XUn){var h=Math.round(v/60);return c.formatDistance("aboutXHours",h,f)}else{if(v<a22)return c.formatDistance("xDays",1,f);if(v<qBn){var b=Math.round(v/XUn);return c.formatDistance("xDays",b,f)}else if(v<i22)return C=Math.round(v/qBn),c.formatDistance("aboutXMonths",C,f)}if(C=UDn(g,s),C<12){var p=Math.round(v/qBn);return c.formatDistance("xMonths",p,f)}else{var y=C%12,M=Math.floor(C/12);return y<3?c.formatDistance("aboutXYears",M,f):y<9?c.formatDistance("overXYears",M,f):c.formatDistance("almostXYears",M+1,f)}}function u22(e,t){return ae(1,arguments),o22(e,Date.now(),t)}function c22(e){ae(1,arguments);var t=ie(e),n=t.getTime();return n}function eIn(e,t){const n=t||"dd/MM/yyyy";return e?dCt(new Date(e),n):null}function l22(e,t){const n=t||"HH:mm:ss";return e?dCt(new Date(e),n):null}function f22(e,t){const n=t||"dd/MM/yyyy HH:mm:ss";return e?dCt(new Date(e),n):null}function s22(e){return e?c22(new Date(e)):null}function d22(e){return e?u22(new Date(e),{addSuffix:!0}):null}function g22(e,t="dd/MM/yyyy hh:mm:ss"){if(!e)return null;const n=STn(e,t,new Date);return XDn(n)?n:null}const _22=Object.freeze(Object.defineProperty({__proto__:null,fDate:eIn,fDateTime:f22,fTime:l22,fTimestamp:s22,fToNow:d22,getDifferenceInDays:(e,t)=>!e||!t?null:GDn(t,e),stringToDate:g22},Symbol.toStringTag,{value:"Module"}));function m22(e){const t=e.match(/\/([^/]+)/);return t?t[0]:e}const v22=Object.freeze(Object.defineProperty({__proto__:null,getRoot:m22},Symbol.toStringTag,{value:"Module"}));function h22(e,t,n="asc"){return e.slice().sort((a,r)=>{const u=a[t],c=r[t];return u<c?n==="asc"?-1:1:u>c?n==="asc"?1:-1:0})}function C22(e,t,n){const a=[...n],r=a.splice(e,1)[0];return a.splice(t,0,r),a}const b22=Object.freeze(Object.defineProperty({__proto__:null,sort:h22,updatePosition:C22},Symbol.toStringTag,{value:"Module"})),jmt=(e="",t)=>{let n="",a=0;return[...t].forEach(r=>{n+=r==="#"?e[a++]||"_":r}),n},QUn=e=>jmt((e||"").replace(/\D/g,""),"###.###.###-##"),JUn=e=>jmt((e||"").replace(/\D/g,""),"##.###.###/####-##"),y22=Object.freeze(Object.defineProperty({__proto__:null,applyMask:jmt,cepMask:e=>jmt((e||"").replace(/\D/g,""),"#####-###"),cnpjMask:JUn,cpfMask:QUn,cpfMaskOrCnpjMask:e=>{const n=(e||""||"").replace(/\D/g,"");return n.length===11?QUn(n):n.length===14?JUn(n):null},phoneMask:e=>{const n=(e||"").replace(/\D/g,""),a=n.length===11?"(##) #####-####":"(##) ####-####";return jmt(n,a)}},Symbol.toStringTag,{value:"Module"}));function p22(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}const O22=e=>function(n){return d.jsx(o.Suspense,{fallback:d.jsx(yCt,{}),children:d.jsx(e,{...n})})},FCt=({children:e})=>d.jsx(O.Typography,{variant:"body2",component:"span",fontWeight:600,color:"text.primary",children:e}),j22=({updatedAt:e})=>{const t=new Date,n=new Date(e),a=n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear(),r=eIn(n,"HH:mm");return a?d.jsxs(O.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas ",d.jsx(FCt,{children:"Hoje"})," às"," ",d.jsx(FCt,{children:r})]}):d.jsxs(O.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas em"," ",d.jsx(FCt,{children:eIn(n)})," às"," ",d.jsx(FCt,{children:r})]})},NCt=({onSearch:e,onChange:t,trigger:n="click",iconPosition:a="end",tabIndex:r,...u})=>{const c=o.useRef(null),l=d.jsx(O.InputAdornment,{position:a,children:d.jsx(O.IconButton,{color:"inherit",onClick:()=>{var f;e((f=c.current)==null?void 0:f.value)},children:d.jsx(Ce,{icon:"SEARCH_MAGNIFYING_GLASS",width:20,height:20})})});return d.jsx(O.TextField,{inputRef:c,InputProps:{onKeyDown:f=>{var s;f.key==="Enter"&&e((s=c.current)==null?void 0:s.value)},...a==="start"?{startAdornment:l}:{endAdornment:l}},inputProps:{tabIndex:r,...u.inputProps},onChange:f=>{if(n==="change"){e(f.target.value);return}f.target.value===""&&e(""),t&&t(f)},...u})},w22=({children:e})=>d.jsx(O.Box,{sx:{right:0,width:1,bottom:0,height:1,zIndex:9998,display:"flex",position:"absolute",alignItems:"center",justifyContent:"center",bgcolor:"background.default"},children:d.jsxs(d.Fragment,{children:[d.jsx(rn.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}),d.jsx(O.Box,{component:rn.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 ${O.alpha(t.palette.primary.dark,.24)}`}}),d.jsx(O.Box,{component:rn.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 ${O.alpha(t.palette.primary.dark,.24)}`}})]})}),M22=O.styled(O.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}}})),L22=({active:e,completed:t})=>d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...e&&{color:"primary.main"}},children:t?d.jsx(Ce,{icon:"SIMPLE_CHECK",color:"primary.main"}):d.jsx(O.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),P22=({steps:e,activeStep:t,showLabels:n=!0,sx:a,...r})=>d.jsx(O.Stepper,{alternativeLabel:!0,activeStep:t,connector:d.jsx(M22,{}),sx:a,...r,children:e.map(u=>d.jsx(O.Step,{children:d.jsx(O.StepLabel,{StepIconComponent:L22,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&u})},u))}),E22=O.styled(({label:e,onClose:t,icon:n,hasChanges:a,...r})=>d.jsx(O.Tab,{disableRipple:!0,...r,label:d.jsxs(O.Stack,{position:"relative",direction:"row",alignItems:"center",gap:1.5,sx:u=>({"> span":{position:"absolute",top:-14,right:-10,span:{position:"fixed",width:10,height:10,backgroundColor:u.palette.warning.main,border:"1px solid #fff",borderRadius:"50%",zIndex:999}}}),children:[n,e,d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON",width:16,onClick:u=>{t(),u.stopPropagation()}}),a&&d.jsx("span",{children:d.jsx("span",{})})]})}))(({theme:e})=>({textTransform:"none",fontSize:e.typography.pxToRem(14),margin:"0 !important",color:`${e.palette.primary.lighter} !important`,minHeight:"initial",padding:"10px 16px",backgroundColor:e.palette.primary.dark,border:`1px solid ${O.alpha(e.palette.primary.darker,.25)}`,borderBottom:0,borderRadius:"8px 8px 0 0",fontWeight:600,overflow:"initial !important",lineHeight:1,"&.Mui-selected":{color:`${e.palette.text.primary} !important`,backgroundColor:e.palette.background.paper,borderColor:e.palette.primary.dark,svg:{color:e.palette.text.disabled}},"&.Mui-focusVisible":{backgroundColor:"rgba(100, 95, 228, 0.32)"},"svg:hover":{opacity:.85}})),k22=O.styled(e=>d.jsx(O.Tabs,{...e,variant:"scrollable",scrollButtons:"auto"}))({height:"100%",alignItems:"flex-end",gap:8,"& .MuiTabs-indicator":{display:"none",justifyContent:"center",backgroundColor:"transparent"},"& > .MuiButtonBase-root":{height:32,width:32,color:"#fff",marginBottom:2},"& .MuiTabs-flexContainer":{gap:4}}),S22=({children:e,value:t,index:n,sx:a})=>d.jsx(O.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...t.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"},...a},children:e});function D22(e){return Oi("MuiLink",e)}const B22=Ic("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),qUn={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},I22=e=>qUn[e]||e,W22=({theme:e,ownerState:t})=>{const n=I22(t.color),a=WT(e,`palette.${n}`,!1)||t.color,r=WT(e,`palette.${n}Channel`);return"vars"in e&&r?`rgba(${r} / 0.4)`:X(a,.4)},$22=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],x22=e=>{const{classes:t,component:n,focusVisible:a,underline:r}=e,u={root:["root",`underline${rt(r)}`,n==="button"&&"button",a&&"focusVisible"]};return A3(u,D22,t)},z22=at(Tkn,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${rt(n.underline)}`],n.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>ee({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&ee({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:W22({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${B22.focusVisible}`]:{outline:"auto"}})),eGn=P.forwardRef(function(t,n){const a=$c({props:t,name:"MuiLink"}),{className:r,color:u="primary",component:c="a",onBlur:l,onFocus:f,TypographyClasses:s,underline:g="always",variant:_="inherit",sx:m}=a,v=Ht(a,$22),{isFocusVisibleRef:C,onBlur:h,onFocus:b,ref:p}=aWn(),[y,M]=P.useState(!1),E=pbt(n,p),L=S=>{h(S),C.current===!1&&M(!1),l&&l(S)},w=S=>{b(S),C.current===!0&&M(!0),f&&f(S)},k=ee({},a,{color:u,component:c,focusVisible:y,underline:g,variant:_}),D=x22(k);return d.jsx(z22,ee({color:u,className:an(D.root,r),classes:s,component:c,onBlur:L,onFocus:w,ref:E,ownerState:k,variant:_,sx:[...Object.keys(qUn).includes(u)?[]:[{color:u}],...Array.isArray(m)?m:[m]]},v))});process.env.NODE_ENV!=="production"&&(eGn.propTypes={children:j.node,classes:j.object,className:j.string,color:j.any,component:GIn,onBlur:j.func,onFocus:j.func,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),TypographyClasses:j.object,underline:j.oneOf(["always","hover","none"]),variant:j.oneOfType([j.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),j.string])});const H22=eGn;function A22(e){return Math.round(parseFloat(e)*16)}function R22(e){const t=Wc(),n=unr(),a=t.breakpoints.up(n==="xl"?"lg":n),u=(e==="h1"||e==="h2"||e==="h3"||e==="h4"||e==="h5"||e==="h6")&&t.typography[e][a]?t.typography[e][a]:t.typography[e],c=A22(u.fontSize),l=Number(t.typography[e].lineHeight)*c,{fontWeight:f,letterSpacing:s}=t.typography[e];return{fontSize:c,lineHeight:l,fontWeight:f,letterSpacing:s}}const tj=o.forwardRef(({asLink:e,variant:t="body1",line:n=2,persistent:a=!1,children:r,sx:u,...c},l)=>{const{lineHeight:f}=R22(t),s={overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:n,WebkitBoxOrient:"vertical",...a&&{height:f*n},...u};return e?d.jsx(H22,{color:"inherit",ref:l,variant:t,sx:{...s},...c,children:r}):d.jsx(Tkn,{ref:l,variant:t,sx:{...s},...c,children:r})});tj.displayName="TextMaxLine";const V22=["pdf"],F22=["txt"],N22=["psd"],T22=["doc","docx"],Z22=["xls","xlsx"],U22=["zip","rar","iso"],G22=["ai","esp"],Y22=["ppt","pptx"],K22=["wav","aif","mp3","aac"],X22=["jpg","jpeg","gif","bmp","png","svg"],Q22=["m4v","avi","mpg","mp4","webm"];function tGn(e){let t;switch(e==null?void 0:e.includes(Hn(e))){case F22.includes(Hn(e)):t="txt";break;case U22.includes(Hn(e)):t="zip";break;case K22.includes(Hn(e)):t="audio";break;case X22.includes(Hn(e)):t="image";break;case Q22.includes(Hn(e)):t="video";break;case T22.includes(Hn(e)):t="word";break;case Z22.includes(Hn(e)):t="excel";break;case Y22.includes(Hn(e)):t="powerpoint";break;case V22.includes(Hn(e)):t="pdf";break;case N22.includes(Hn(e)):t="photoshop";break;case G22.includes(Hn(e)):t="illustrator";break;case(e==null?void 0:e.startsWith("http")):t="image";break;default:t=Hn(e)}return t}function J22(e){let t;switch(tGn(e)){case"folder":t="IC_FOLDER";break;case"txt":t="IC_TXT";break;case"zip":t="IC_ZIP";break;case"audio":t="IC_AUDIO";break;case"video":t="IC_VIDEO";break;case"word":t="IC_WORD";break;case"excel":t="IC_EXCEL";break;case"powerpoint":t="IC_POWER_POINT";break;case"pdf":t="IC_PDF";break;case"photoshop":t="IC_PTS";break;case"illustrator":t="IC_AI";break;case"image":t="IC_IMG";break;default:t="IC_FILE"}return t}function Hn(e=""){return e&&e.split(".").pop()||""}function q22(e){return e.split("/").pop()}function tIn(e){return typeof e=="string"?{key:e,preview:e,name:q22(e),type:Hn(e)}:{key:`key:${e.name}`,name:e.name,size:e.size,path:e.path,type:e.type,preview:e.preview,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate}}const nGn=({onDownload:e})=>{const t=Wc();return d.jsx(O.IconButton,{onClick:e,sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",borderRadius:"unset",justifyContent:"center",bgcolor:"grey.800",color:"common.white",transition:t.transitions.create("opacity"),"&:hover":{opacity:1,...Zkn({opacity:.64,color:t.palette.grey[900]})}},children:d.jsx(Ce,{icon:"ARROW_DOWN_CICLE",width:24})})},nIn=({file:e,tooltip:t,imageView:n,onDownload:a,sx:r,imgSx:u})=>{const{name:c="",path:l="",preview:f=""}=tIn(e),s=tGn(l||f),g=s==="image"&&n?d.jsx(O.Box,{component:"img",src:f,sx:{width:1,height:1,flexShrink:0,objectFit:"cover",...u}}):d.jsx(Ce,{icon:J22(s),sx:{width:32,height:32,flexShrink:0,...r}});return t?d.jsx(O.Tooltip,{title:c,children:d.jsxs(O.Stack,{flexShrink:0,component:"span",alignItems:"center",justifyContent:"center",sx:{width:"fit-content",height:"inherit"},children:[g,a&&d.jsx(nGn,{onDownload:a})]})}):d.jsxs(d.Fragment,{children:[g,a&&d.jsx(nGn,{onDownload:a})]})},rGn=({thumbnail:e,files:t,onRemove:n,onHandleMainImage:a,mainUrl:r,sx:u})=>t!=null&&t.length?d.jsx(ozn,{initial:!1,children:t.map((c,l)=>{const{key:f,name:s="",size:g=0}=tIn(c),_=typeof c=="string";return e?d.jsx(O.Badge,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:a&&d.jsx(O.IconButton,{size:"small",onClick:()=>a(c),sx:{color:m=>c===r?m.palette.secondary.main:m.palette.action.disabled,bgcolor:m=>m.palette.common.white,"&:hover":{bgcolor:m=>m.palette.common.white},border:m=>c===r?`1px solid ${m.palette.secondary.main}`:`1px solid ${m.palette.divider}`},children:c===r?d.jsx(Ce,{icon:"STAR_02",width:18}):d.jsx(Ce,{icon:"STAR",width:18})}),children:d.jsxs(O.Stack,{component:rn.div,...VT().inUp,alignItems:"center",display:"inline-flex",justifyContent:"center",sx:{m:.5,width:80,height:80,borderRadius:1.25,overflow:"hidden",position:"relative",border:m=>`solid 1px ${m.palette.divider}`,...u},children:[d.jsx(nIn,{tooltip:!0,imageView:!0,file:c,sx:{position:"absolute"},imgSx:{position:"absolute"}}),n&&d.jsx(O.IconButton,{size:"small",onClick:()=>n(c),sx:{top:4,right:4,p:"1px",position:"absolute",color:m=>X(m.palette.common.white,.72),bgcolor:m=>X(m.palette.grey[900],.48),"&:hover":{bgcolor:m=>X(m.palette.grey[900],.72)}},children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON",width:16})})]},f)},l):d.jsxs(O.Stack,{component:rn.div,...VT().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:m=>`solid 1px ${m.palette.divider}`,...u},children:[d.jsx(nIn,{file:c}),d.jsxs(O.Stack,{flexGrow:1,sx:{minWidth:0},children:[d.jsx(O.Typography,{variant:"subtitle2",noWrap:!0,children:_?c:s}),d.jsx(O.Typography,{variant:"caption",sx:{color:"text.secondary"},children:_?"":BCt(g)})]}),n&&d.jsx(O.IconButton,{edge:"end",size:"small",onClick:()=>n(c),children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON"})})]},f)})}):null;function nle(e,t,n,a){function r(u){return u instanceof n?u:new n(function(c){c(u)})}return new(n||(n=Promise))(function(u,c){function l(g){try{s(a.next(g))}catch(_){c(_)}}function f(g){try{s(a.throw(g))}catch(_){c(_)}}function s(g){g.done?u(g.value):r(g.value).then(l,f)}s((a=a.apply(e,t||[])).next())})}function rle(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,r,u,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(s){return function(g){return f([s,g])}}function f(s){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,s[0]&&(n=0)),n;)try{if(a=1,r&&(u=s[0]&2?r.return:s[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,s[1])).done)return u;switch(r=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,r=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){n.label=s[1];break}if(s[0]===6&&n.label<u[1]){n.label=u[1],u=s;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(s);break}u[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(g){s=[6,g],r=0}finally{a=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function aGn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var a=n.call(e),r,u=[],c;try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)u.push(r.value)}catch(l){c={error:l}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(c)throw c.error}}return u}function iGn(e,t,n){if(n||arguments.length===2)for(var a=0,r=t.length,u;a<r;a++)(u||!(a in t))&&(u||(u=Array.prototype.slice.call(t,0,a)),u[a]=t[a]);return e.concat(u||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var eu2=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 wmt(e,t){var n=tu2(e);if(typeof n.path!="string"){var a=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof a=="string"&&a.length>0?a:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function tu2(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var a=t.split(".").pop().toLowerCase(),r=eu2.get(a);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}var nu2=[".DS_Store","Thumbs.db"];function ru2(e){return nle(this,void 0,void 0,function(){return rle(this,function(t){return TCt(e)&&au2(e.dataTransfer)?[2,cu2(e.dataTransfer,e.type)]:iu2(e)?[2,ou2(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,uu2(e)]:[2,[]]})})}function au2(e){return TCt(e)}function iu2(e){return TCt(e)&&TCt(e.target)}function TCt(e){return typeof e=="object"&&e!==null}function ou2(e){return rIn(e.target.files).map(function(t){return wmt(t)})}function uu2(e){return nle(this,void 0,void 0,function(){var t;return rle(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(a){return a.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(a){return wmt(a)})]}})})}function cu2(e,t){return nle(this,void 0,void 0,function(){var n,a;return rle(this,function(r){switch(r.label){case 0:return e.items?(n=rIn(e.items).filter(function(u){return u.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(lu2))]):[3,2];case 1:return a=r.sent(),[2,oGn(uGn(a))];case 2:return[2,oGn(rIn(e.files).map(function(u){return wmt(u)}))]}})})}function oGn(e){return e.filter(function(t){return nu2.indexOf(t.name)===-1})}function rIn(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var a=e[n];t.push(a)}return t}function lu2(e){if(typeof e.webkitGetAsEntry!="function")return cGn(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?lGn(t):cGn(e)}function uGn(e){return e.reduce(function(t,n){return iGn(iGn([],aGn(t),!1),aGn(Array.isArray(n)?uGn(n):[n]),!1)},[])}function cGn(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=wmt(t);return Promise.resolve(n)}function fu2(e){return nle(this,void 0,void 0,function(){return rle(this,function(t){return[2,e.isDirectory?lGn(e):su2(e)]})})}function lGn(e){var t=e.createReader();return new Promise(function(n,a){var r=[];function u(){var c=this;t.readEntries(function(l){return nle(c,void 0,void 0,function(){var f,s,g;return rle(this,function(_){switch(_.label){case 0:if(l.length)return[3,5];_.label=1;case 1:return _.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return f=_.sent(),n(f),[3,4];case 3:return s=_.sent(),a(s),[3,4];case 4:return[3,6];case 5:g=Promise.all(l.map(fu2)),r.push(g),u(),_.label=6;case 6:return[2]}})})},function(l){a(l)})}u()})}function su2(e){return nle(this,void 0,void 0,function(){return rle(this,function(t){return[2,new Promise(function(n,a){e.file(function(r){var u=wmt(r,e.fullPath);n(u)},function(r){a(r)})})]})})}var du2=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),a=e.name||"",r=(e.type||"").toLowerCase(),u=r.replace(/\/.*$/,"");return n.some(function(c){var l=c.trim().toLowerCase();return l.charAt(0)==="."?a.toLowerCase().endsWith(l):l.endsWith("/*")?u===l.replace(/\/.*$/,""):r===l})}return!0};function fGn(e){return mu2(e)||_u2(e)||_Gn(e)||gu2()}function gu2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
35432
|
+
`),u=!1),Object.assign(Object.assign({},e),{allowNegative:u})}function jo2(e){e=Oo2(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,a=e.allowLeadingZeros,r=e.onKeyDown;r===void 0&&(r=qO);var u=e.onBlur;u===void 0&&(u=qO);var c=e.thousandSeparator,l=e.decimalScale,f=e.fixedDecimalScale,s=e.prefix;s===void 0&&(s="");var g=e.defaultValue,_=e.value,m=e.valueIsNumericString,v=e.onValueChange,C=LUn(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),h=WCt(e),b=h.decimalSeparator,p=h.allowedDecimalSeparators,y=function(H){return xUn(H,e)},M=function(H,Z){return yo2(H,Z,e)},E=tle(_)?g:_,L=m??bo2(E,s,t);tle(_)?tle(g)||(L=L||typeof g=="number"):L=L||typeof _=="number";var w=function(H){return PUn(H)?H:(typeof H=="number"&&(H=DUn(H)),L&&typeof l=="number"?BUn(H,l,!!f):H)},k=$Un(w(_),w(g),!!L,y,M,v),D=k[0],S=D.numAsString,I=D.formattedValue,A=k[1],F=function(H){var Z=H.target,Q=H.key,J=Z.selectionStart,V=Z.selectionEnd,N=Z.value;if(N===void 0&&(N=""),J!==V){r(H);return}Q==="Backspace"&&N[0]==="-"&&J===s.length+1&&n&&CT(Z,1),l&&f&&(Q==="Backspace"&&N[J-1]===b?(CT(Z,J-1),H.preventDefault()):Q==="Delete"&&N[J]===b&&H.preventDefault()),p!=null&&p.includes(Q)&&N[J]===b&&CT(Z,J+1);var Y=c===!0?",":c;Q==="Backspace"&&N[J-1]===Y&&CT(Z,J-1),Q==="Delete"&&N[J]===Y&&CT(Z,J+1),r(H)},W=function(H){var Z=S;if(Z.match(/\d/g)||(Z=""),a||(Z=uo2(Z)),f&&l&&(Z=BUn(Z,l,f)),Z!==S){var Q=xUn(Z,e);A({formattedValue:Q,value:Z,floatValue:parseFloat(Z)},{event:H,source:Cmt.event})}u(H)},z=function(H){return H===b?!0:bmt(H)},T=function(H){var Z=H.currentValue,Q=H.lastValue,J=H.formattedValue,V=H.currentValueIndex,N=H.formattedValueIndex,Y=Z[V],oe=J[N],te=IUn(Q,Z),se=te.to;return V>=se.start&&V<se.end&&p&&p.includes(Y)&&oe===b?!0:Y===oe};return Object.assign(Object.assign({},C),{value:I,valueIsNumericString:!1,isValidInputCharacter:z,isCharacterSame:T,onValueChange:A,format:y,removeFormatting:M,getCaretBoundary:function(H){return po2(H,e)},onKeyDown:F,onBlur:W})}function wo2(e){var t=jo2(e);return o.createElement(vo2,Object.assign({},t))}const $Ct=o.forwardRef(({decimalScale:e=0,fixedDecimalScale:t=!0,prefix:n,allowNegative:a,minValue:r,maxValue:u=1/0,maxLength:c,value:l,inputProps:f,InputProps:s,size:g,disabled:_,name:m,helperText:v,error:C,fullWidth:h,label:b,required:p,onChange:y,tabIndex:M},E)=>{const[L,w]=o.useState(Date.now()),k=o.useRef(null),D=()=>w(Date.now()),S=(I,A)=>{y&&(k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{const{floatValue:F}=I,W=F||0;if(r!==void 0&&r>W){y({target:{name:m,value:r},event:A}),D();return}if(F!==void 0&&u<W){y({target:{name:m,value:u},event:A}),D();return}y({target:{name:m,value:F},event:A})},600))};return o.useEffect(()=>()=>{k.current&&clearTimeout(k.current)},[]),d.jsx(wo2,{getInputRef:E,value:l,prefix:n,decimalSeparator:",",thousandSeparator:".",decimalScale:e,fixedDecimalScale:t,autoComplete:"off",allowNegative:a,maxLength:c,onValueChange:S,customInput:O.TextField,InputProps:{...s},inputProps:{...f,tabIndex:M},disabled:_,size:g,helperText:v,error:C,fullWidth:h,label:b,required:p},L)});$Ct.displayName="NumberInput";const YBn=o.forwardRef(({name:e,increment:t=1,updadteForMultiple:n,allowNegative:a=!1,value:r=0,onChange:u,minValue:c,maxValue:l,decimalScale:f,disabled:s,tabIndex:g,..._},m)=>{const v=wUn(r,t,f),C=()=>{if(!a&&r-t<0)return;const p=r-t,y=Math.floor(r/t)*t,M=!v&&n?y:p;c!==void 0&&p<c?u(c):u(ZBn(M))},h=()=>{const p=Number(r)+t,y=Math.ceil(r/t)*t,E=ZBn(!v&&n?y:p);l!==void 0&&p>=l?u(l):u(c!==void 0&&E<=c?c:E)},b=p=>{const y=Number(p.target.value),M=Math.ceil(y/t)*t,E=n?M:y;if(c!==void 0&&y<=c){u(c);return}if(l!==void 0&&y>=l){u(l);return}u(E)};return d.jsx($Ct,{ref:m,name:e,value:r,minValue:c,maxValue:l,allowNegative:a,decimalScale:f,InputProps:{startAdornment:d.jsx(O.InputAdornment,{position:"start",children:d.jsx(O.IconButton,{size:"medium",disabled:s||(a?!1:!r),onClick:C,children:d.jsx(Ce,{icon:"MINUS_SIGN",width:14,height:14,color:"primary.main"})})}),endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.IconButton,{size:"medium",onClick:h,disabled:s,children:d.jsx(Ce,{icon:"SIMPLE_ADD",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:g},onChange:b,disabled:s,..._})});YBn.displayName="Incrementer";const Mo2=at(O.Box)(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",a=t.variant==="filled",r=t.variant==="outlined",u=t.variant==="soft",c={...t.color==="default"&&{...r&&{backgroundColor:"transparent",color:e.palette.text.primary,border:`1px solid ${fj(e.palette.grey[500],.32)}`},...u&&{color:n?e.palette.text.primary:e.palette.common.white,backgroundColor:fj(e.palette.grey[500],.84)}}},l={...t.color!=="default"&&{...a&&{color:e.palette[t.color].contrastText,backgroundColor:e.palette[t.color].main},...r&&{backgroundColor:"transparent",color:e.palette[t.color].main,border:`1px solid ${e.palette[t.color].main}`},...u&&{color:e.palette[t.color][n?"dark":"light"],backgroundColor:fj(e.palette[t.color].main,.84)}}};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,...l,...c}}),zUn=o.forwardRef(({children:e,color:t="default",variant:n="soft",startIcon:a,endIcon:r,sx:u,...c},l)=>{const f=Wc(),s={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return d.jsxs(Mo2,{ref:l,component:"span",ownerState:{color:t,variant:n},sx:{...a&&{pl:.75},...r&&{pr:.75},...u},theme:f,...c,children:[a&&d.jsxs(O.Box,{sx:{mr:.75,...s},children:[" ",a," "]}),e,r&&d.jsxs(O.Box,{sx:{ml:.75,...s},children:[" ",r," "]})]})});zUn.displayName="Label";const Lo2=O.styled(O.Box)({padding:"0 40px",width:"100%",minHeight:"100%",flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center"}),Po2=()=>d.jsx(Lo2,{children:d.jsx(O.LinearProgress,{color:"inherit",sx:{width:1,maxWidth:360}})});function ej(e){return typeof e=="string"||e instanceof String}function HUn(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function AUn(e,t){return Array.isArray(t)?AUn(e,(n,a)=>t.includes(a)):Object.entries(e).reduce((n,a)=>{let[r,u]=a;return t(u,r)&&(n[r]=u),n},{})}const Le={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Eo2(e){switch(e){case Le.LEFT:return Le.FORCE_LEFT;case Le.RIGHT:return Le.FORCE_RIGHT;default:return e}}function KBn(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function xCt(e,t){if(t===e)return!0;const n=Array.isArray(t),a=Array.isArray(e);let r;if(n&&a){if(t.length!=e.length)return!1;for(r=0;r<t.length;r++)if(!xCt(t[r],e[r]))return!1;return!0}if(n!=a)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){const u=t instanceof Date,c=e instanceof Date;if(u&&c)return t.getTime()==e.getTime();if(u!=c)return!1;const l=t instanceof RegExp,f=e instanceof RegExp;if(l&&f)return t.toString()==e.toString();if(l!=f)return!1;const s=Object.keys(t);for(r=0;r<s.length;r++)if(!Object.prototype.hasOwnProperty.call(e,s[r]))return!1;for(r=0;r<s.length;r++)if(!xCt(e[s[r]],t[s[r]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}class ko2{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?Le.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Le.RIGHT:Le.LEFT}}function Ie(e,t){return new Ie.InputMask(e,t)}function RUn(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?Ie.MaskedRegExp:ej(e)?Ie.MaskedPattern:e===Date?Ie.MaskedDate:e===Number?Ie.MaskedNumber:Array.isArray(e)||e===Array?Ie.MaskedDynamic:Ie.Masked&&e.prototype instanceof Ie.Masked?e:Ie.Masked&&e instanceof Ie.Masked?e.constructor:e instanceof Function?Ie.MaskedFunction:(console.warn("Mask not found for mask",e),Ie.Masked)}function zCt(e){if(!e)throw new Error("Options in not defined");if(Ie.Masked){if(e.prototype instanceof Ie.Masked)return{mask:e};const{mask:t=void 0,...n}=e instanceof Ie.Masked?{mask:e}:HUn(e)&&e.mask instanceof Ie.Masked?e:{};if(t){const a=t.mask;return{...AUn(t,(r,u)=>!u.startsWith("_")),mask:t.constructor,_mask:a,...n}}}return HUn(e)?{...e}:{mask:e}}function bT(e){if(Ie.Masked&&e instanceof Ie.Masked)return e;const t=zCt(e),n=RUn(t.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}Ie.createMask=bT;class XBn{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,n){if(!(t==null||n==null||t===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(t,n)}catch{}}get isActive(){return!1}}Ie.MaskElement=XBn;class yT extends XBn{constructor(t){super(),this.input=t,this._handlers={}}get rootElement(){var t,n,a;return(t=(n=(a=this.input).getRootNode)==null?void 0:n.call(a))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){Object.keys(t).forEach(n=>this._toggleEventHandler(yT.EVENTS_MAP[n],t[n]))}unbindEvents(){Object.keys(this._handlers).forEach(t=>this._toggleEventHandler(t))}_toggleEventHandler(t,n){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),n&&(this.input.addEventListener(t,n),this._handlers[t]=n)}}yT.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},Ie.HTMLMaskElement=yT;class So2 extends yT{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,n){this.input.setSelectionRange(t,n)}get value(){return this.input.value}set value(t){this.input.value=t}}Ie.HTMLMaskElement=yT;class VUn extends yT{get _unsafeSelectionStart(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),a=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||a==null||a<r?a:r}get _unsafeSelectionEnd(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),a=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||a==null||a>r?a:r}_unsafeSelect(t,n){if(!this.rootElement.createRange)return;const a=this.rootElement.createRange();a.setStart(this.input.firstChild||this.input,t),a.setEnd(this.input.lastChild||this.input,n);const r=this.rootElement,u=r.getSelection&&r.getSelection();u&&(u.removeAllRanges(),u.addRange(a))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}Ie.HTMLContenteditableMaskElement=VUn;class Do2{constructor(t,n){this.el=t instanceof XBn?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new VUn(t):new So2(t),this.masked=bT(n),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 n;return t==null||((n=this.masked)==null?void 0:n.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof Ie.Masked)&&this.masked.constructor===RUn(t)){this.masked.updateOptions({mask:t});return}const n=t instanceof Ie.Masked?t:bT({mask:t});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}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,n){const a=this._listeners[t];a&&a.forEach(r=>r(n))}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,n=this.masked.value,a=this.displayValue,r=this.unmaskedValue!==t||this.value!==n;this._unmaskedValue=t,this._value=n,this.el.value!==a&&(this.el.value=a),r&&this._fireChangeEvents()}updateOptions(t){const{mask:n,...a}=t,r=!this.maskEquals(n),u=!xCt(this.masked,a);r&&(this.mask=n),u&&this.masked.updateOptions(a),(r||u)&&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,Le.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,n){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(n),this}off(t,n){if(!this._listeners[t])return this;if(!n)return delete this._listeners[t],this;const a=this._listeners[t].indexOf(n);return a>=0&&this._listeners[t].splice(a,1),this}_onInput(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new ko2({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),a=this.masked.rawInputValue,r=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,u=a===this.masked.rawInputValue?n.removeDirection:Le.NONE;let c=this.masked.nearestInputPos(n.startChangePos+r,u);u!==Le.NONE&&(c=this.masked.nearestInputPos(c,Le.NONE)),this.updateControl(),this.updateCursor(c),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}}Ie.InputMask=Do2;class mt{static normalize(t){return Array.isArray(t)?t:[t,new mt]}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}}Ie.ChangeDetails=mt;class z3{constructor(t,n,a){t===void 0&&(t=""),n===void 0&&(n=0),this.value=t,this.from=n,this.stop=a}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 n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class Pr{constructor(t){this._value="",this._update({...Pr.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,n){n===void 0&&(n={input:!0}),this.reset(),this.append(t,n,""),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,n){return t}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-t)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(t,n)}extractTail(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),new z3(this.extractInput(t,n),t)}appendTail(t){return ej(t)&&(t=new z3(String(t))),t.appendTo(this)}_appendCharRaw(t,n){return t?(this._value+=t,new mt({inserted:t,rawInserted:t})):new mt}_appendChar(t,n,a){n===void 0&&(n={});const r=this.state;let u;if([t,u]=this.doPrepareChar(t,n),u=u.aggregate(this._appendCharRaw(t,n)),u.inserted){let c,l=this.doValidate(n)!==!1;if(l&&a!=null){const f=this.state;this.overwrite===!0&&(c=a.state,a.unshift(this.displayValue.length-u.tailShift));let s=this.appendTail(a);l=s.rawInserted===a.toString(),!(l&&s.inserted)&&this.overwrite==="shift"&&(this.state=f,c=a.state,a.shift(),s=this.appendTail(a),l=s.rawInserted===a.toString()),l&&s.inserted&&(this.state=f)}l||(u=new mt,this.state=r,a&&c&&(a.state=c))}return u}_appendPlaceholder(){return new mt}_appendEager(){return new mt}append(t,n,a){if(!ej(t))throw new Error("value should be string");const r=ej(a)?new z3(String(a)):a;n!=null&&n.tail&&(n._beforeTailState=this.state);let u;[t,u]=this.doPrepare(t,n);for(let c=0;c<t.length;++c){const l=this._appendChar(t[c],n,r);if(!l.rawInserted&&!this.doSkipInvalid(t[c],n,r))break;u.aggregate(l)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&t&&u.aggregate(this._appendEager()),r!=null&&(u.tailShift+=this.appendTail(r).tailShift),u}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(n),new mt}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const n=this.rawInputValue,a=this.value,r=t();return this.rawInputValue=n,this.value&&this.value!==a&&a.indexOf(this.value)===0&&this.append(a.slice(this.displayValue.length),{},""),delete this._refreshing,r}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const n=this.state,a=t(this);return this.state=n,delete this._isolated,a}doSkipInvalid(t,n,a){return!!this.skipInvalid}doPrepare(t,n){return n===void 0&&(n={}),mt.normalize(this.prepare?this.prepare(t,this,n):t)}doPrepareChar(t,n){return n===void 0&&(n={}),mt.normalize(this.prepareChar?this.prepareChar(t,this,n):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,n,a,r,u){r===void 0&&(r=Le.NONE),u===void 0&&(u={input:!0});const c=t+n,l=this.extractTail(c),f=this.eager===!0||this.eager==="remove";let s;f&&(r=Eo2(r),s=this.extractInput(0,c,{raw:!0}));let g=t;const _=new mt;if(r!==Le.NONE&&(g=this.nearestInputPos(t,n>1&&t!==0&&!f?Le.NONE:r),_.tailShift=g-t),_.aggregate(this.remove(g)),f&&r!==Le.NONE&&s===this.rawInputValue)if(r===Le.FORCE_LEFT){let m;for(;s===this.rawInputValue&&(m=this.displayValue.length);)_.aggregate(new mt({tailShift:-1})).aggregate(this.remove(m-1))}else r===Le.FORCE_RIGHT&&l.unshift();return _.aggregate(this.append(a,u,l))}maskEquals(t){return this.mask===t}typedValueEquals(t){const n=this.typedValue;return t===n||Pr.EMPTY_VALUES.includes(t)&&Pr.EMPTY_VALUES.includes(n)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}}Pr.DEFAULTS={skipInvalid:!0},Pr.EMPTY_VALUES=[void 0,null,""],Ie.Masked=Pr;class pT{constructor(t,n){t===void 0&&(t=[]),n===void 0&&(n=0),this.chunks=t,this.from=n}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=ej(t)?new z3(String(t)):t;const n=this.chunks[this.chunks.length-1],a=n&&(n.stop===t.stop||t.stop==null)&&t.from===n.from+n.toString().length;if(t instanceof z3)a?n.extend(t.toString()):this.chunks.push(t);else if(t instanceof pT){if(t.stop==null){let r;for(;t.chunks.length&&t.chunks[0].stop==null;)r=t.chunks.shift(),r.from+=t.from,this.extend(r)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Ie.MaskedPattern))return new z3(this.toString()).appendTo(t);const n=new mt;for(let a=0;a<this.chunks.length&&!n.skip;++a){const r=this.chunks[a],u=t._mapPosToBlock(t.displayValue.length),c=r.stop;let l;if(c!=null&&(!u||u.index<=c)){if(r instanceof pT||t._stops.indexOf(c)>=0){const f=t._appendPlaceholder(c);n.aggregate(f)}l=r instanceof pT&&t._blocks[c]}if(l){const f=l.appendTail(r);f.skip=!1,n.aggregate(f),t._value+=f.inserted;const s=r.toString().slice(f.rawInserted.length);s&&n.aggregate(t.append(s,{tail:!0}))}else n.aggregate(t.append(r.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:n,...a}=t;Object.assign(this,a),this.chunks=n.map(r=>{const u="chunks"in r?new pT:new z3;return u.state=r,u})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const n=t!=null?t-this.from:t;let a=0;for(;a<this.chunks.length;){const r=this.chunks[a],u=r.unshift(n);if(r.toString()){if(!u)break;++a}else this.chunks.splice(a,1);if(u)return u}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const n=this.chunks[t],a=n.shift();if(n.toString()){if(!a)break;--t}else this.chunks.splice(t,1);if(a)return a}return""}}class Bo2{constructor(t,n){this.masked=t,this._log=[];const{offset:a,index:r}=t._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=a,this.index=r,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=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;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,Le.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Le.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,Le.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.NONE),!0})}}class FUn{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,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(n),this._value||(this._isRawInput=!1),new mt}nearestInputPos(t,n){n===void 0&&(n=Le.NONE);const a=0,r=this._value.length;switch(n){case Le.LEFT:case Le.FORCE_LEFT:return a;case Le.NONE:case Le.RIGHT:case Le.FORCE_RIGHT:default:return r}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._isRawInput?n-t:0}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),a===void 0&&(a={}),a.raw&&this._isRawInput&&this._value.slice(t,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,n){n===void 0&&(n={});const a=new mt;if(this.isFilled)return a;const r=this.eager===!0||this.eager==="append",c=this.char===t&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!r)&&!n.tail;return c&&(a.rawInserted=this.char),this._value=a.inserted=this.char,this._isRawInput=c&&(n.raw||n.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new mt;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new z3("")}appendTail(t){return ej(t)&&(t=new z3(String(t))),t.appendTo(this)}append(t,n,a){const r=this._appendChar(t[0],n);return a!=null&&(r.tailShift+=this.appendTail(a).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}}class HCt{constructor(t){const{parent:n,isOptional:a,placeholderChar:r,displayChar:u,lazy:c,eager:l,...f}=t;this.masked=bT(f),Object.assign(this,{parent:n,isOptional:a,placeholderChar:r,displayChar:u,lazy:c,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),t===0&&n>=1?(this.isFilled=!1,this.masked.remove(t,n)):new mt}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,n){if(n===void 0&&(n={}),this.isFilled)return new mt;const a=this.masked.state,r=this.masked._appendChar(t,this.currentMaskFlags(n));return r.inserted&&this.doValidate(n)===!1&&(r.inserted=r.rawInserted="",this.masked.state=a),!r.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=!!r.inserted,r}append(t,n,a){return this.masked.append(t,this.currentMaskFlags(n),a)}_appendPlaceholder(){const t=new mt;return this.isFilled||this.isOptional||(this.isFilled=!0,t.inserted=this.placeholderChar),t}_appendEager(){return new mt}extractTail(t,n){return this.masked.extractTail(t,n)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.masked.extractInput(t,n,a)}nearestInputPos(t,n){n===void 0&&(n=Le.NONE);const a=0,r=this.value.length,u=Math.min(Math.max(t,a),r);switch(n){case Le.LEFT:case Le.FORCE_LEFT:return this.isComplete?u:a;case Le.RIGHT:case Le.FORCE_RIGHT:return this.isComplete?u:r;case Le.NONE:default:return u}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.value.slice(t,n).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 n;return{...t,_beforeTailState:(t==null||(n=t._beforeTailState)==null?void 0:n.masked)||(t==null?void 0:t._beforeTailState)}}}HCt.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 Io2 extends Pr{updateOptions(t){super.updateOptions(t)}_update(t){const n=t.mask;n&&(t.validate=a=>a.search(n)>=0),super._update(t)}}Ie.MaskedRegExp=Io2;class Er extends Pr{constructor(t){super({...Er.DEFAULTS,...t,definitions:Object.assign({},HCt.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 n=this.mask;if(!n||!t)return;let a=!1,r=!1;for(let u=0;u<n.length;++u){if(this.blocks){const s=n.slice(u),g=Object.keys(this.blocks).filter(m=>s.indexOf(m)===0);g.sort((m,v)=>v.length-m.length);const _=g[0];if(_){const{expose:m,...v}=zCt(this.blocks[_]),C=bT({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...v,parent:this});C&&(this._blocks.push(C),m&&(this.exposeBlock=C),this._maskedBlocks[_]||(this._maskedBlocks[_]=[]),this._maskedBlocks[_].push(this._blocks.length-1)),u+=_.length-1;continue}}let c=n[u],l=c in t;if(c===Er.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(c==="{"||c==="}"){a=!a;continue}if(c==="["||c==="]"){r=!r;continue}if(c===Er.ESCAPE_CHAR){if(++u,c=n[u],!c)break;l=!1}const f=l?new HCt({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...zCt(t[c]),parent:this}):new FUn({char:c,eager:this.eager,isUnmasking:a});this._blocks.push(f)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){const{_blocks:n,...a}=t;this._blocks.forEach((r,u)=>r.state=n[u]),super.state=a}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,n)=>t+=n.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(n),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,n)=>t+=n.value,"")}set value(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(n),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(n),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,n)=>t+=n.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const n=new mt;let a=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(a==null)return n;this._blocks[a].isFilled&&++a;for(let r=a;r<this._blocks.length;++r){const u=this._blocks[r]._appendEager();if(!u.inserted)break;n.aggregate(u)}return n}_appendCharRaw(t,n){n===void 0&&(n={});const a=this._mapPosToBlock(this.displayValue.length),r=new mt;if(!a)return r;for(let c=a.index;;++c){var u;const l=this._blocks[c];if(!l)break;const f=l._appendChar(t,{...n,_beforeTailState:(u=n._beforeTailState)==null||(u=u._blocks)==null?void 0:u[c]}),s=f.skip;if(r.aggregate(f),s||f.rawInserted)break}return r}extractTail(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const a=new pT;return t===n||this._forEachBlocksInRange(t,n,(r,u,c,l)=>{const f=r.extractTail(c,l);f.stop=this._findStopBefore(u),f.from=this._blockStartPos(u),f instanceof pT&&(f.blockIndex=u),a.extend(f)}),a}extractInput(t,n,a){if(t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),a===void 0&&(a={}),t===n)return"";let r="";return this._forEachBlocksInRange(t,n,(u,c,l,f)=>{r+=u.extractInput(l,f,a)}),r}_findStopBefore(t){let n;for(let a=0;a<this._stops.length;++a){const r=this._stops[a];if(r<=t)n=r;else break}return n}_appendPlaceholder(t){const n=new mt;if(this.lazy&&t==null)return n;const a=this._mapPosToBlock(this.displayValue.length);if(!a)return n;const r=a.index,u=t??this._blocks.length;return this._blocks.slice(r,u).forEach(c=>{if(!c.lazy||t!=null){var l;const f=c._appendPlaceholder((l=c._blocks)==null?void 0:l.length);this._value+=f.inserted,n.aggregate(f)}}),n}_mapPosToBlock(t){let n="";for(let a=0;a<this._blocks.length;++a){const r=this._blocks[a],u=n.length;if(n+=r.displayValue,t<=n.length)return{index:a,offset:t-u}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((n,a)=>n+=a.displayValue.length,0)}_forEachBlocksInRange(t,n,a){n===void 0&&(n=this.displayValue.length);const r=this._mapPosToBlock(t);if(r){const u=this._mapPosToBlock(n),c=u&&r.index===u.index,l=r.offset,f=u&&c?u.offset:this._blocks[r.index].displayValue.length;if(a(this._blocks[r.index],r.index,l,f),u&&!c){for(let s=r.index+1;s<u.index;++s)a(this._blocks[s],s,0,this._blocks[s].displayValue.length);a(this._blocks[u.index],u.index,0,u.offset)}}}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const a=super.remove(t,n);return this._forEachBlocksInRange(t,n,(r,u,c,l)=>{a.aggregate(r.remove(c,l))}),a}nearestInputPos(t,n){if(n===void 0&&(n=Le.NONE),!this._blocks.length)return 0;const a=new Bo2(this,t);if(n===Le.NONE)return a.pushRightBeforeInput()||(a.popState(),a.pushLeftBeforeInput())?a.pos:this.displayValue.length;if(n===Le.LEFT||n===Le.FORCE_LEFT){if(n===Le.LEFT){if(a.pushRightBeforeFilled(),a.ok&&a.pos===t)return t;a.popState()}if(a.pushLeftBeforeInput(),a.pushLeftBeforeRequired(),a.pushLeftBeforeFilled(),n===Le.LEFT){if(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.ok&&a.pos<=t||(a.popState(),a.ok&&a.pos<=t))return a.pos;a.popState()}return a.ok?a.pos:n===Le.FORCE_LEFT?0:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:0)}return n===Le.RIGHT||n===Le.FORCE_RIGHT?(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.pushRightBeforeFilled()?a.pos:n===Le.FORCE_RIGHT?this.displayValue.length:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:this.nearestInputPos(t,Le.LEFT))):t}totalInputPositions(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);let a=0;return this._forEachBlocksInRange(t,n,(r,u,c,l)=>{a+=r.totalInputPositions(c,l)}),a}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const n=this._maskedBlocks[t];return n?n.map(a=>this._blocks[a]):[]}}Er.DEFAULTS={lazy:!0,placeholderChar:"_"},Er.STOP_CHAR="`",Er.ESCAPE_CHAR="\\",Er.InputDefinition=HCt,Er.FixedDefinition=FUn,Ie.MaskedPattern=Er;class ACt extends Er{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:n=this.to||0,from:a=this.from||0,maxLength:r=this.maxLength||0,autofix:u=this.autofix,...c}=t;this.to=n,this.from=a,this.maxLength=Math.max(String(n).length,r),this.autofix=u;const l=String(this.from).padStart(this.maxLength,"0"),f=String(this.to).padStart(this.maxLength,"0");let s=0;for(;s<f.length&&f[s]===l[s];)++s;c.mask=f.slice(0,s).replace(/0/g,"\\0")+"0".repeat(this.maxLength-s),super._update(c)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let n="",a="";const[,r,u]=t.match(/^(\D*)(\d*)(\D*)/)||[];return u&&(n="0".repeat(r.length)+u,a="9".repeat(r.length)+u),n=n.padEnd(this.maxLength,"0"),a=a.padEnd(this.maxLength,"9"),[n,a]}doPrepareChar(t,n){n===void 0&&(n={});let a;if([t,a]=super.doPrepareChar(t.replace(/\D/g,""),n),!this.autofix||!t)return[t,a];const r=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0"),c=this.value+t;if(c.length>this.maxLength)return["",a];const[l,f]=this.boundaries(c);return Number(f)<this.from?[r[c.length-1],a]:Number(l)>this.to?this.autofix==="pad"&&c.length<this.maxLength?["",a.aggregate(this.append(r[c.length-1]+t,n))]:[u[c.length-1],a]:[t,a]}doValidate(t){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[r,u]=this.boundaries(n);return this.from<=Number(u)&&Number(r)<=this.to&&super.doValidate(t)}}Ie.MaskedRange=ACt;class OT extends Er{constructor(t){const{mask:n,pattern:a,...r}={...OT.DEFAULTS,...t};super({...r,mask:ej(n)?n:a})}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:n,pattern:a,blocks:r,...u}={...OT.DEFAULTS,...t},c=Object.assign({},OT.GET_DEFAULT_BLOCKS());t.min&&(c.Y.from=t.min.getFullYear()),t.max&&(c.Y.to=t.max.getFullYear()),t.min&&t.max&&c.Y.from===c.Y.to&&(c.m.from=t.min.getMonth()+1,c.m.to=t.max.getMonth()+1,c.m.from===c.m.to&&(c.d.from=t.min.getDate(),c.d.to=t.max.getDate())),Object.assign(c,this.blocks,r),Object.keys(c).forEach(l=>{const f=c[l];!("autofix"in f)&&"autofix"in t&&(f.autofix=t.autofix)}),super._update({...u,mask:ej(n)?n:a,blocks:c})}doValidate(t){const n=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=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)}}OT.GET_DEFAULT_BLOCKS=()=>({d:{mask:ACt,from:1,to:31,maxLength:2},m:{mask:ACt,from:1,to:12,maxLength:2},Y:{mask:ACt,from:1900,to:9999}}),OT.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),r=e.getFullYear();return[n,a,r].join(".")},parse:(e,t)=>{const[n,a,r]=e.split(".").map(Number);return new Date(r,a-1,n)}},Ie.MaskedDate=OT;class ymt extends Pr{constructor(t){super({...ymt.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(n=>{const{expose:a,...r}=zCt(n),u=bT({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});return a&&(this.exposeMask=u),u}):[])}_appendCharRaw(t,n){n===void 0&&(n={});const a=this._applyDispatch(t,n);return this.currentMask&&a.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(n))),a}_applyDispatch(t,n,a){t===void 0&&(t=""),n===void 0&&(n={}),a===void 0&&(a="");const r=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,u=this.rawInputValue,c=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:u,l=u.slice(c.length),f=this.currentMask,s=new mt,g=f==null?void 0:f.state;if(this.currentMask=this.doDispatch(t,{...n},a),this.currentMask)if(this.currentMask!==f){if(this.currentMask.reset(),c){const _=this.currentMask.append(c,{raw:!0});s.tailShift=_.inserted.length-r.length}l&&(s.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)}else g&&(this.currentMask.state=g);return s}_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 n=new mt;return t&&n.aggregate(this._applyDispatch("",{},t)),n.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var n,a;return{...t,_beforeTailState:((n=t._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((a=t._beforeTailState)==null?void 0:a.currentMask)||t._beforeTailState}}doDispatch(t,n,a){return n===void 0&&(n={}),a===void 0&&(a=""),this.dispatch(t,this,n,a)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,n){n===void 0&&(n={});let[a,r]=super.doPrepare(t,n);if(this.currentMask){let u;[a,u]=super.doPrepare(a,this.currentMaskFlags(n)),r=r.aggregate(u)}return[a,r]}doPrepareChar(t,n){n===void 0&&(n={});let[a,r]=super.doPrepareChar(t,n);if(this.currentMask){let u;[a,u]=super.doPrepareChar(a,this.currentMaskFlags(n)),r=r.aggregate(u)}return[a,r]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(n=>n.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 n=String(t);this.currentMask&&(this.currentMask.typedValue=t,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}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,n){const a=new mt;return this.currentMask&&a.aggregate(this.currentMask.remove(t,n)).aggregate(this._applyDispatch()),a}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:n,currentMaskRef:a,currentMask:r,...u}=t;n&&this.compiledMasks.forEach((c,l)=>c.state=n[l]),a!=null&&(this.currentMask=a,this.currentMask.state=r),super.state=u}extractInput(t,n,a){return this.currentMask?this.currentMask.extractInput(t,n,a):""}extractTail(t,n){return this.currentMask?this.currentMask.extractTail(t,n):super.extractTail(t,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,n){return this.currentMask?this.currentMask.nearestInputPos(t,n):super.nearestInputPos(t,n)}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((n,a)=>{if(!t[a])return;const{mask:r,...u}=t[a];return xCt(n,u)&&n.maskEquals(r)}):super.maskEquals(t)}typedValueEquals(t){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(t))}}ymt.DEFAULTS=void 0,ymt.DEFAULTS={dispatch:(e,t,n,a)=>{if(!t.compiledMasks.length)return;const r=t.rawInputValue,u=t.compiledMasks.map((c,l)=>{const f=t.currentMask===c,s=f?c.displayValue.length:c.nearestInputPos(c.displayValue.length,Le.FORCE_LEFT);return c.rawInputValue!==r?(c.reset(),c.append(r,{raw:!0})):f||c.remove(s),c.append(e,t.currentMaskFlags(n)),c.appendTail(a),{index:l,weight:c.rawInputValue.length,totalInputPositions:c.totalInputPositions(0,Math.max(s,c.nearestInputPos(c.displayValue.length,Le.FORCE_LEFT)))}});return u.sort((c,l)=>l.weight-c.weight||l.totalInputPositions-c.totalInputPositions),t.compiledMasks[u[0].index]}},Ie.MaskedDynamic=ymt;class Wo2 extends Er{constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:n,...a}=t;if(n){const r=n.map(l=>l.length),u=Math.min(...r),c=Math.max(...r)-u;a.mask="*".repeat(u),c&&(a.mask+="["+"*".repeat(c)+"]"),this.enum=n}super._update(a)}doValidate(t){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(t)}}Ie.MaskedEnum=Wo2;class $o2 extends Pr{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}Ie.MaskedFunction=$o2;class L1 extends Pr{constructor(t){super({...L1.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",a=(this.scale?"("+KBn(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+n+a),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(KBn).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(KBn(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const n=t.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(t,n){n===void 0&&(n={});const[a,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),n);return t&&!a&&(r.skip=!0),a&&!this.allowPositive&&!this.value&&a!=="-"&&r.aggregate(this._appendChar("-")),[a,r]}_separatorsCount(t,n){n===void 0&&(n=!1);let a=0;for(let r=0;r<t;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++a,n&&(t+=this.thousandsSeparator.length));return a}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n),this._removeThousandsSeparators(super.extractInput(t,n,a))}_appendCharRaw(t,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(t,n);const a=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(a);this._value=this._removeThousandsSeparators(this.value);const u=super._appendCharRaw(t,n);this._value=this._insertThousandsSeparators(this._value);const c=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(c);return u.tailShift+=(l-r)*this.thousandsSeparator.length,u.skip=!u.rawInserted&&t===this.thousandsSeparator,u}_findSeparatorAround(t){if(this.thousandsSeparator){const n=t-this.thousandsSeparator.length+1,a=this.value.indexOf(this.thousandsSeparator,n);if(a<=t)return a}return-1}_adjustRangeWithSeparators(t,n){const a=this._findSeparatorAround(t);a>=0&&(t=a);const r=this._findSeparatorAround(n);return r>=0&&(n=r+this.thousandsSeparator.length),[t,n]}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n);const a=this.value.slice(0,t),r=this.value.slice(n),u=this._separatorsCount(a.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(a+r));const c=this._separatorsCountFromSlice(a);return new mt({tailShift:(c-u)*this.thousandsSeparator.length})}nearestInputPos(t,n){if(!this.thousandsSeparator)return t;switch(n){case Le.NONE:case Le.LEFT:case Le.FORCE_LEFT:{const a=this._findSeparatorAround(t-1);if(a>=0){const r=a+this.thousandsSeparator.length;if(t<r||this.value.length<=r||n===Le.FORCE_LEFT)return a}break}case Le.RIGHT:case Le.FORCE_RIGHT:{const a=this._findSeparatorAround(t);if(a>=0)return a+this.thousandsSeparator.length}}return t}doValidate(t){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const a=this.number;n=n&&!isNaN(a)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(t)}doCommit(){if(this.value){const t=this.number;let n=t;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==t&&(this.unmaskedValue=this.format(n,this));let a=this.value;this.normalizeZeros&&(a=this._normalizeZeros(a)),this.padFractionalZeros&&this.scale>0&&(a=this._padFractionalZeros(a)),this._value=a}super.doCommit()}_normalizeZeros(t){const n=this._removeThousandsSeparators(t).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(a,r,u,c)=>r+c),t.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const n=t.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(t,n,a){n===void 0&&(n={});const r=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===L1.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,n,a)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,L1.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(L1.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)||L1.EMPTY_VALUES.includes(t)&&L1.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}L1.UNMASKED_RADIX=".",L1.EMPTY_VALUES=[...Pr.EMPTY_VALUES,0],L1.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[L1.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})},Ie.MaskedNumber=L1;const QBn={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function NUn(e,t,n){t===void 0&&(t=QBn.MASKED),n===void 0&&(n=QBn.MASKED);const a=bT(e);return r=>a.runIsolated(u=>(u[t]=r,u[n]))}function xo2(e,t,n,a){return NUn(t,n,a)(e)}Ie.PIPE_TYPE=QBn,Ie.createPipe=NUn,Ie.pipe=xo2;try{globalThis.IMask=Ie}catch{}const TUn={mask:j.oneOfType([j.array,j.func,j.string,j.instanceOf(RegExp),j.oneOf([Date,Number,Ie.Masked]),j.instanceOf(Ie.Masked)]),value:j.any,unmask:j.oneOfType([j.bool,j.oneOf(["typed"])]),prepare:j.func,prepareChar:j.func,validate:j.func,commit:j.func,overwrite:j.oneOfType([j.bool,j.oneOf(["shift"])]),eager:j.oneOfType([j.bool,j.oneOf(["append","remove"])]),skipInvalid:j.bool,onAccept:j.func,onComplete:j.func,placeholderChar:j.string,displayChar:j.string,lazy:j.bool,definitions:j.object,blocks:j.object,enum:j.arrayOf(j.string),maxLength:j.number,from:j.number,to:j.number,pattern:j.string,format:j.func,parse:j.func,autofix:j.oneOfType([j.bool,j.oneOf(["pad"])]),radix:j.string,thousandsSeparator:j.string,mapToRadix:j.arrayOf(j.string),scale:j.number,normalizeZeros:j.bool,padFractionalZeros:j.bool,min:j.oneOfType([j.number,j.instanceOf(Date)]),max:j.oneOfType([j.number,j.instanceOf(Date)]),dispatch:j.func,inputRef:j.oneOfType([j.func,j.shape({current:j.object})])},ZUn=Object.keys(TUn).filter(e=>e!=="value"),zo2=["value","unmask","onAccept","onComplete","inputRef"],Ho2=ZUn.filter(e=>zo2.indexOf(e)<0);function UUn(e){var t;const n=(t=class extends o.Component{constructor(u){super(u),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const u=this.props,c=this._extractMaskOptionsFromProps(u);if(c.mask)this.maskRef?(this.maskRef.updateOptions(c),"value"in u&&u.value!==void 0&&(this.maskValue=u.value)):this.initMask(c);else if(this.destroyMask(),"value"in u&&u.value!==void 0){var l;(l=this.element)!=null&&l.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=u.value:this.element.value=u.value}}componentWillUnmount(){this.destroyMask()}_inputRef(u){this.element=u,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=u:this.props.inputRef(u))}initMask(u){u===void 0&&(u=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Ie(this.element,u).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(u){const{...c}=u;return Object.keys(c).filter(l=>Ho2.indexOf(l)<0).forEach(l=>{delete c[l]}),c}_extractNonMaskProps(u){const{...c}=u;return ZUn.forEach(l=>{delete c[l]}),"defaultValue"in c||(c.defaultValue=u.mask?"":c.value),delete c.value,c}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(u){this.maskRef&&(u=u==null&&this.props.unmask!=="typed"?"":u,this.props.unmask==="typed"?this.maskRef.typedValue=u:this.props.unmask?this.maskRef.unmaskedValue=u:this.maskRef.value=u)}_onAccept(u){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,u)}_onComplete(u){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,u)}render(){return o.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},t.displayName=void 0,t.propTypes=void 0,t),a=e.displayName||e.name||"Component";return n.displayName="IMask("+a+")",n.propTypes=TUn,o.forwardRef((r,u)=>o.createElement(n,{...r,ref:u}))}const Ao2=UUn(e=>{let{inputRef:t,...n}=e;return o.createElement("input",{...n,ref:t})}),Ro2=(e,t)=>o.createElement(Ao2,{...e,ref:t});o.forwardRef(Ro2);const Vo2=UUn(e=>{const{inputRef:t,"data-value":n,defaultValue:a,tabIndex:r,...u}=e;return d.jsx(O.TextField,{inputRef:t,fullWidth:!0,...u,inputProps:{...u.inputProps,tabIndex:r},value:n})}),JBn=o.forwardRef(({onChange:e,name:t,...n},a)=>{const[r,u]=o.useState("");return d.jsx(Vo2,{inputRef:a,name:t,"data-value":r,...n,onAccept:(c,l)=>{u(c),e({target:{name:t,value:l._unmaskedValue}})}})});JBn.displayName="MaskedInput";function Fo2(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 No2=at("span")(({arrow:e,theme:t})=>{const r=`solid 1px ${X(t.palette.grey[500],.12)}`,u={borderRadius:"0 0 3px 0",top:-6,borderBottom:r,borderRight:r},c={borderRadius:"3px 0 0 0",bottom:-6,borderTop:r,borderLeft:r},l={borderRadius:"0 3px 0 0",left:-6,borderTop:r,borderRight:r},f={borderRadius:"0 0 0 3px",right:-6,borderBottom:r,borderLeft:r};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"&&{...u,left:20},...e==="top-center"&&{...u,left:0,right:0,margin:"auto"},...e==="top-right"&&{...u,right:20},...e==="bottom-left"&&{...c,left:20},...e==="bottom-center"&&{...c,left:0,right:0,margin:"auto"},...e==="bottom-right"&&{...c,right:20},...e==="left-top"&&{...l,top:20},...e==="left-center"&&{...l,top:0,bottom:0,margin:"auto"},...e==="left-bottom"&&{...l,bottom:20},...e==="right-top"&&{...f,top:20},...e==="right-center"&&{...f,top:0,bottom:0,margin:"auto"},...e==="right-bottom"&&{...f,bottom:20}}}),GUn=({open:e,children:t,arrow:n="top-right",disabledArrow:a,sx:r,...u})=>{const{style:c,anchorOrigin:l,transformOrigin:f}=Fo2(n);return d.jsxs(O.Popover,{open:!!e,anchorEl:e,anchorOrigin:l,transformOrigin:f,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...c,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...r}},...u,children:[!a&&d.jsx(No2,{arrow:n}),t]})},To2=O.styled(O.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[300]}`,button:{marginRight:24}})),Zo2=O.styled(O.DialogContent)({padding:"24px !important"}),Uo2=O.styled(O.DialogActions)(({theme:e})=>({borderTop:`1px solid ${e.palette.grey[300]}`,backgroundColor:e.palette.grey[50]})),Go2=({children:e,actionsProps:t})=>d.jsx(Uo2,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...t,children:e}),YUn=({actions:e,actionsProps:t,children:n,dialogContentProps:a,dialogTitle:r,dialogTitleProps:u,onClose:c,id:l,...f})=>{const s=l||"modal-actions";return d.jsxs(O.Dialog,{id:l,scroll:"body",...f,onClose:c,children:[d.jsxs(To2,{children:[r&&d.jsx(O.DialogTitle,{variant:"subtitle1",...u,children:r}),d.jsx(O.IconButton,{onClick:c,children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON"})})]}),d.jsx(Zo2,{...a,children:n}),e&&d.jsx(Go2,{actionsProps:{...t,id:s},children:e})]})},KUn=({children:e,container:t,waitBeforeShow:n=50})=>{const[a,r]=o.useState(!1);return o.useEffect(()=>{const u=setTimeout(()=>r(!0),n);return()=>clearTimeout(u)},[n]),n?a?Emt.createPortal(e,document.getElementById(t)||document.body):null:Emt.createPortal(e,document.getElementById(t)||document.body)},Yo2=({children:e,id:t="modal-actions"})=>d.jsx(KUn,{container:t,children:e}),Ko2=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 a=0;a<9;a++)t+=parseInt(e.charAt(a))*(10-a);let n=11-t%11;if((n===10||n===11)&&(n=0),n!==parseInt(e.charAt(9)))return!1;t=0;for(let a=0;a<10;a++)t+=parseInt(e.charAt(a))*(11-a);return n=11-t%11,(n===10||n===11)&&(n=0),n===parseInt(e.charAt(10))},Xo2=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,n=e.substring(0,t);const a=e.substring(t);let r=0,u=t-7;for(let l=t;l>=1;l--)r+=parseInt(n.charAt(t-l))*u--,u<2&&(u=9);let c=r%11<2?0:11-r%11;if(c!==parseInt(a.charAt(0)))return!1;t+=1,n=e.substring(0,t),r=0,u=t-7;for(let l=t;l>=1;l--)r+=parseInt(n.charAt(t-l))*u--,u<2&&(u=9);return c=r%11<2?0:11-r%11,c===parseInt(a.charAt(1))},Qo2=(e="")=>e?!!e.toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/):!1,RCt=(e="",t=[8,20],n=!1,a=!1,r=!1)=>{const u=e.length>=t[0]&&e.length<=t[1],c=!r||/[A-Z]/.test(e),l=!a||/[!@#$%^&*(),.?":{}|<>]/.test(e),f=!n||/\d/.test(e);return{isLengthValid:u,hasUpperCaseChar:c,hasSpecialCharacter:l,hasNumberChar:f}},Jo2=Object.freeze(Object.defineProperty({__proto__:null,cnpjIsValid:Xo2,cpfIsValid:Ko2,emailIsValid:Qo2,validatePassword:RCt},Symbol.toStringTag,{value:"Module"})),qo2=O.styled(O.Stack)(({theme:e})=>({width:"100%",border:`solid 1px ${O.alpha(e.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),e22=O.styled(O.Stack)(()=>({gap:4})),pmt=O.styled(O.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}})),Omt=({passed:e})=>e?d.jsx(Ce,{icon:"SIMPLE_CHECK",color:"success.main"}):d.jsx(Ce,{icon:"WARNING_TRIANGULE",color:"warning.main"}),t22=({password:e,passwordSize:t,numberChar:n=!1,specialCharacter:a=!1,upperCaseChar:r=!1,match:u})=>{const{hasSpecialCharacter:c,hasUpperCaseChar:l,isLengthValid:f,hasNumberChar:s}=RCt(e,t,n,a,r);return d.jsxs(qo2,{children:[d.jsx(O.Typography,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),d.jsxs(e22,{children:[d.jsxs(pmt,{children:[d.jsx(Omt,{passed:f}),d.jsxs(O.Typography,{component:"div",children:[d.jsxs("strong",{children:[t[0],"-",t[1]]})," ","caracteres"]})]}),r&&d.jsxs(pmt,{children:[d.jsx(Omt,{passed:l}),d.jsxs(O.Typography,{component:"div",children:["Pelo menos uma ",d.jsx("strong",{children:"letra maiúscula"})]})]}),n&&d.jsxs(pmt,{children:[d.jsx(Omt,{passed:s}),d.jsxs(O.Typography,{component:"div",children:["Pelo menos ",d.jsx("strong",{children:"um número"})]})]}),a&&d.jsxs(pmt,{children:[d.jsx(Omt,{passed:c}),d.jsxs(O.Typography,{component:"div",children:["Pelo menos um ",d.jsx("strong",{children:"caracter especial"})," ",d.jsx("span",{children:"(#,@,!,?)"})]})]}),u&&d.jsxs(pmt,{children:[d.jsx(Omt,{passed:u.passwordMatch}),d.jsx(O.Typography,{component:"div",children:"Senha e confirmação de senha devem ser iguais"})]})]})]})},VCt=({isFetching:e,fetching:t,isLoading:n,loading:a,anError:r,error:u,isEmpty:c,empty:l,children:f})=>n?a||"Carregando...":r?u||"Error":c?l||"Nenhum resultado":d.jsxs(d.Fragment,{children:[e&&d.jsx(d.Fragment,{children:t||"Carregando..."}),f]}),n22=Object.freeze(Object.defineProperty({__proto__:null,downloadFile:(e,t,n)=>{const a=`data:application/octet-stream;base64,${n}`,r=document.createElement("a"),u=`${e.replace(t,"")}.${t}`;r.href=a,r.download=u,r.click()}},Symbol.toStringTag,{value:"Module"}));function r22(e){return eBn({},e)}var XUn=1440,a22=2520,qBn=43200,i22=86400;function o22(e,t,n){var a,r;ae(2,arguments);var u=hi(),c=(a=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:u.locale)!==null&&a!==void 0?a:sCt;if(!c.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=zce(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var f=eBn(r22(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:l}),s,g;l>0?(s=ie(t),g=ie(e)):(s=ie(e),g=ie(t));var _=cTn(g,s),m=(Hce(g)-Hce(s))/1e3,v=Math.round((_-m)/60),C;if(v<2)return n!=null&&n.includeSeconds?_<5?c.formatDistance("lessThanXSeconds",5,f):_<10?c.formatDistance("lessThanXSeconds",10,f):_<20?c.formatDistance("lessThanXSeconds",20,f):_<40?c.formatDistance("halfAMinute",0,f):_<60?c.formatDistance("lessThanXMinutes",1,f):c.formatDistance("xMinutes",1,f):v===0?c.formatDistance("lessThanXMinutes",1,f):c.formatDistance("xMinutes",v,f);if(v<45)return c.formatDistance("xMinutes",v,f);if(v<90)return c.formatDistance("aboutXHours",1,f);if(v<XUn){var h=Math.round(v/60);return c.formatDistance("aboutXHours",h,f)}else{if(v<a22)return c.formatDistance("xDays",1,f);if(v<qBn){var b=Math.round(v/XUn);return c.formatDistance("xDays",b,f)}else if(v<i22)return C=Math.round(v/qBn),c.formatDistance("aboutXMonths",C,f)}if(C=UDn(g,s),C<12){var p=Math.round(v/qBn);return c.formatDistance("xMonths",p,f)}else{var y=C%12,M=Math.floor(C/12);return y<3?c.formatDistance("aboutXYears",M,f):y<9?c.formatDistance("overXYears",M,f):c.formatDistance("almostXYears",M+1,f)}}function u22(e,t){return ae(1,arguments),o22(e,Date.now(),t)}function c22(e){ae(1,arguments);var t=ie(e),n=t.getTime();return n}function eIn(e,t){const n=t||"dd/MM/yyyy";return e?dCt(new Date(e),n):null}function l22(e,t){const n=t||"HH:mm:ss";return e?dCt(new Date(e),n):null}function f22(e,t){const n=t||"dd/MM/yyyy HH:mm:ss";return e?dCt(new Date(e),n):null}function s22(e){return e?c22(new Date(e)):null}function d22(e){return e?u22(new Date(e),{addSuffix:!0}):null}function g22(e,t="dd/MM/yyyy hh:mm:ss"){if(!e)return null;const n=STn(e,t,new Date);return XDn(n)?n:null}const _22=Object.freeze(Object.defineProperty({__proto__:null,fDate:eIn,fDateTime:f22,fTime:l22,fTimestamp:s22,fToNow:d22,getDifferenceInDays:(e,t)=>!e||!t?null:GDn(t,e),stringToDate:g22},Symbol.toStringTag,{value:"Module"}));function m22(e){const t=e.match(/\/([^/]+)/);return t?t[0]:e}const v22=Object.freeze(Object.defineProperty({__proto__:null,getRoot:m22},Symbol.toStringTag,{value:"Module"}));function h22(e,t,n="asc"){return e.slice().sort((a,r)=>{const u=a[t],c=r[t];return u<c?n==="asc"?-1:1:u>c?n==="asc"?1:-1:0})}function C22(e,t,n){const a=[...n],r=a.splice(e,1)[0];return a.splice(t,0,r),a}const b22=Object.freeze(Object.defineProperty({__proto__:null,sort:h22,updatePosition:C22},Symbol.toStringTag,{value:"Module"})),jmt=(e="",t)=>{let n="",a=0;return[...t].forEach(r=>{n+=r==="#"?e[a++]||"_":r}),n},QUn=e=>jmt((e||"").replace(/\D/g,""),"###.###.###-##"),JUn=e=>jmt((e||"").replace(/\D/g,""),"##.###.###/####-##"),y22=Object.freeze(Object.defineProperty({__proto__:null,applyMask:jmt,cepMask:e=>jmt((e||"").replace(/\D/g,""),"#####-###"),cnpjMask:JUn,cpfMask:QUn,cpfMaskOrCnpjMask:e=>{const n=(e||""||"").replace(/\D/g,"");return n.length===11?QUn(n):n.length===14?JUn(n):null},phoneMask:e=>{const n=(e||"").replace(/\D/g,""),a=n.length===11?"(##) #####-####":"(##) ####-####";return jmt(n,a)}},Symbol.toStringTag,{value:"Module"}));function p22(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}const O22=e=>function(n){return d.jsx(o.Suspense,{fallback:d.jsx(yCt,{}),children:d.jsx(e,{...n})})},FCt=({children:e})=>d.jsx(O.Typography,{variant:"body2",component:"span",fontWeight:600,color:"text.primary",children:e}),j22=({updatedAt:e})=>{const t=new Date,n=new Date(e),a=n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear(),r=eIn(n,"HH:mm");return a?d.jsxs(O.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas ",d.jsx(FCt,{children:"Hoje"})," às"," ",d.jsx(FCt,{children:r})]}):d.jsxs(O.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas em"," ",d.jsx(FCt,{children:eIn(n)})," às"," ",d.jsx(FCt,{children:r})]})},NCt=({onSearch:e,onChange:t,trigger:n="click",iconPosition:a="end",tabIndex:r,...u})=>{const c=o.useRef(null),l=d.jsx(O.InputAdornment,{position:a,children:d.jsx(O.IconButton,{color:"inherit",onClick:()=>{var f;e((f=c.current)==null?void 0:f.value)},children:d.jsx(Ce,{icon:"SEARCH_MAGNIFYING_GLASS",width:20,height:20})})});return d.jsx(O.TextField,{inputRef:c,InputProps:{onKeyDown:f=>{var s;f.key==="Enter"&&e((s=c.current)==null?void 0:s.value)},...a==="start"?{startAdornment:l}:{endAdornment:l}},inputProps:{tabIndex:r,...u.inputProps},onChange:f=>{if(n==="change"){e(f.target.value);return}f.target.value===""&&e(""),t&&t(f)},...u})},w22=({children:e})=>d.jsx(O.Box,{sx:{right:0,width:1,bottom:0,height:1,zIndex:9998,display:"flex",position:"absolute",alignItems:"center",justifyContent:"center",bgcolor:"background.default"},children:d.jsxs(d.Fragment,{children:[d.jsx(rn.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}),d.jsx(O.Box,{component:rn.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 ${O.alpha(t.palette.primary.dark,.24)}`}}),d.jsx(O.Box,{component:rn.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 ${O.alpha(t.palette.primary.dark,.24)}`}})]})}),M22=O.styled(O.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}}})),L22=({active:e,completed:t})=>d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...e&&{color:"primary.main"}},children:t?d.jsx(Ce,{icon:"SIMPLE_CHECK",color:"primary.main"}):d.jsx(O.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),P22=({steps:e,activeStep:t,showLabels:n=!0,sx:a,...r})=>d.jsx(O.Stepper,{alternativeLabel:!0,activeStep:t,connector:d.jsx(M22,{}),sx:a,...r,children:e.map(u=>d.jsx(O.Step,{children:d.jsx(O.StepLabel,{StepIconComponent:L22,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&u})},u))}),E22=O.styled(({label:e,onClose:t,icon:n,hasChanges:a,...r})=>d.jsx(O.Tab,{disableRipple:!0,...r,label:d.jsxs(O.Stack,{position:"relative",direction:"row",alignItems:"center",gap:1.5,sx:u=>({"> span":{position:"absolute",top:-14,right:-10,span:{position:"fixed",width:10,height:10,backgroundColor:u.palette.warning.main,border:"1px solid #fff",borderRadius:"50%",zIndex:999}}}),children:[n,e,d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON",width:16,onClick:u=>{t(),u.stopPropagation()}}),a&&d.jsx("span",{children:d.jsx("span",{})})]})}))(({theme:e})=>({textTransform:"none",fontSize:e.typography.pxToRem(14),margin:"0 !important",color:`${e.palette.primary.lighter} !important`,minHeight:"initial",padding:"10px 16px",backgroundColor:e.palette.primary.dark,border:`1px solid ${O.alpha(e.palette.primary.darker,.25)}`,borderBottom:0,borderRadius:"8px 8px 0 0",fontWeight:600,overflow:"initial !important",lineHeight:1,"&.Mui-selected":{color:`${e.palette.text.primary} !important`,backgroundColor:e.palette.background.paper,borderColor:e.palette.primary.dark,svg:{color:e.palette.text.disabled}},"&.Mui-focusVisible":{backgroundColor:"rgba(100, 95, 228, 0.32)"},"svg:hover":{opacity:.85}})),k22=O.styled(e=>d.jsx(O.Tabs,{...e,variant:"scrollable",scrollButtons:"auto"}))({height:"100%",alignItems:"flex-end",gap:8,"& .MuiTabs-indicator":{display:"none",justifyContent:"center",backgroundColor:"transparent"},"& > .MuiButtonBase-root":{height:32,width:32,color:"#fff",marginBottom:2},"& .MuiTabs-flexContainer":{gap:4}}),S22=({children:e,value:t,index:n,sx:a})=>d.jsx(O.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...t.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"},...a},children:e});function D22(e){return Oi("MuiLink",e)}const B22=Ic("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),qUn={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},I22=e=>qUn[e]||e,W22=({theme:e,ownerState:t})=>{const n=I22(t.color),a=WT(e,`palette.${n}`,!1)||t.color,r=WT(e,`palette.${n}Channel`);return"vars"in e&&r?`rgba(${r} / 0.4)`:X(a,.4)},$22=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],x22=e=>{const{classes:t,component:n,focusVisible:a,underline:r}=e,u={root:["root",`underline${rt(r)}`,n==="button"&&"button",a&&"focusVisible"]};return A3(u,D22,t)},z22=at(Tkn,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${rt(n.underline)}`],n.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>ee({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&ee({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:W22({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${B22.focusVisible}`]:{outline:"auto"}})),eGn=P.forwardRef(function(t,n){const a=$c({props:t,name:"MuiLink"}),{className:r,color:u="primary",component:c="a",onBlur:l,onFocus:f,TypographyClasses:s,underline:g="always",variant:_="inherit",sx:m}=a,v=Ht(a,$22),{isFocusVisibleRef:C,onBlur:h,onFocus:b,ref:p}=aWn(),[y,M]=P.useState(!1),E=pbt(n,p),L=S=>{h(S),C.current===!1&&M(!1),l&&l(S)},w=S=>{b(S),C.current===!0&&M(!0),f&&f(S)},k=ee({},a,{color:u,component:c,focusVisible:y,underline:g,variant:_}),D=x22(k);return d.jsx(z22,ee({color:u,className:an(D.root,r),classes:s,component:c,onBlur:L,onFocus:w,ref:E,ownerState:k,variant:_,sx:[...Object.keys(qUn).includes(u)?[]:[{color:u}],...Array.isArray(m)?m:[m]]},v))});process.env.NODE_ENV!=="production"&&(eGn.propTypes={children:j.node,classes:j.object,className:j.string,color:j.any,component:GIn,onBlur:j.func,onFocus:j.func,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),TypographyClasses:j.object,underline:j.oneOf(["always","hover","none"]),variant:j.oneOfType([j.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),j.string])});const H22=eGn;function A22(e){return Math.round(parseFloat(e)*16)}function R22(e){const t=Wc(),n=unr(),a=t.breakpoints.up(n==="xl"?"lg":n),u=(e==="h1"||e==="h2"||e==="h3"||e==="h4"||e==="h5"||e==="h6")&&t.typography[e][a]?t.typography[e][a]:t.typography[e],c=A22(u.fontSize),l=Number(t.typography[e].lineHeight)*c,{fontWeight:f,letterSpacing:s}=t.typography[e];return{fontSize:c,lineHeight:l,fontWeight:f,letterSpacing:s}}const tj=o.forwardRef(({asLink:e,variant:t="body1",line:n=2,persistent:a=!1,children:r,sx:u,...c},l)=>{const{lineHeight:f}=R22(t),s={overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:n,WebkitBoxOrient:"vertical",...a&&{height:f*n},...u};return e?d.jsx(H22,{color:"inherit",ref:l,variant:t,sx:{...s},...c,children:r}):d.jsx(Tkn,{ref:l,variant:t,sx:{...s},...c,children:r})});tj.displayName="TextMaxLine";const V22=["pdf"],F22=["txt"],N22=["psd"],T22=["doc","docx"],Z22=["xls","xlsx"],U22=["zip","rar","iso"],G22=["ai","esp"],Y22=["ppt","pptx"],K22=["wav","aif","mp3","aac"],X22=["jpg","jpeg","gif","bmp","png","svg"],Q22=["m4v","avi","mpg","mp4","webm"];function tGn(e){let t;switch(e==null?void 0:e.includes(Hn(e))){case F22.includes(Hn(e)):t="txt";break;case U22.includes(Hn(e)):t="zip";break;case K22.includes(Hn(e)):t="audio";break;case X22.includes(Hn(e)):t="image";break;case Q22.includes(Hn(e)):t="video";break;case T22.includes(Hn(e)):t="word";break;case Z22.includes(Hn(e)):t="excel";break;case Y22.includes(Hn(e)):t="powerpoint";break;case V22.includes(Hn(e)):t="pdf";break;case N22.includes(Hn(e)):t="photoshop";break;case G22.includes(Hn(e)):t="illustrator";break;case(e==null?void 0:e.startsWith("http")):t="image";break;default:t=Hn(e)}return t}function J22(e){let t;switch(tGn(e)){case"folder":t="IC_FOLDER";break;case"txt":t="IC_TXT";break;case"zip":t="IC_ZIP";break;case"audio":t="IC_AUDIO";break;case"video":t="IC_VIDEO";break;case"word":t="IC_WORD";break;case"excel":t="IC_EXCEL";break;case"powerpoint":t="IC_POWER_POINT";break;case"pdf":t="IC_PDF";break;case"photoshop":t="IC_PTS";break;case"illustrator":t="IC_AI";break;case"image":t="IC_IMG";break;default:t="IC_FILE"}return t}function Hn(e=""){return e&&e.split(".").pop()||""}function q22(e){return e.split("/").pop()}function tIn(e){return typeof e=="string"?{key:e,preview:e,name:q22(e),type:Hn(e)}:{key:`key:${e.name}`,name:e.name,size:e.size,path:e.path,type:e.type,preview:e.preview,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate}}const nGn=({onDownload:e})=>{const t=Wc();return d.jsx(O.IconButton,{onClick:e,sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",borderRadius:"unset",justifyContent:"center",bgcolor:"grey.800",color:"common.white",transition:t.transitions.create("opacity"),"&:hover":{opacity:1,...Zkn({opacity:.64,color:t.palette.grey[900]})}},children:d.jsx(Ce,{icon:"ARROW_DOWN_CICLE",width:24})})},nIn=({file:e,tooltip:t,imageView:n,onDownload:a,sx:r,imgSx:u})=>{const{name:c="",path:l="",preview:f=""}=tIn(e),s=tGn(l||f),g=s==="image"&&n?d.jsx(O.Box,{component:"img",src:f,sx:{width:1,height:1,flexShrink:0,objectFit:"cover",...u}}):d.jsx(Ce,{icon:J22(s),sx:{width:32,height:32,flexShrink:0,...r}});return t?d.jsx(O.Tooltip,{title:c,children:d.jsxs(O.Stack,{flexShrink:0,component:"span",alignItems:"center",justifyContent:"center",sx:{width:"fit-content",height:"inherit"},children:[g,a&&d.jsx(nGn,{onDownload:a})]})}):d.jsxs(d.Fragment,{children:[g,a&&d.jsx(nGn,{onDownload:a})]})},rGn=({thumbnail:e,files:t,onRemove:n,onHandleMainImage:a,mainUrl:r,sx:u})=>t!=null&&t.length?d.jsx(ozn,{initial:!1,children:t.map((c,l)=>{const{key:f,name:s="",size:g=0}=tIn(c),_=typeof c=="string";return e?d.jsx(O.Badge,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:a&&d.jsx(O.IconButton,{size:"small",onClick:()=>a(c),sx:{color:m=>c===r?m.palette.secondary.main:m.palette.action.disabled,bgcolor:m=>m.palette.common.white,"&:hover":{bgcolor:m=>m.palette.common.white},border:m=>c===r?`1px solid ${m.palette.secondary.main}`:`1px solid ${m.palette.divider}`},children:c===r?d.jsx(Ce,{icon:"STAR_02",width:18}):d.jsx(Ce,{icon:"STAR",width:18})}),children:d.jsxs(O.Stack,{component:rn.div,...VT().inUp,alignItems:"center",display:"inline-flex",justifyContent:"center",sx:{m:.5,width:80,height:80,borderRadius:1.25,overflow:"hidden",position:"relative",border:m=>`solid 1px ${m.palette.divider}`,...u},children:[d.jsx(nIn,{tooltip:!0,imageView:!0,file:c,sx:{position:"absolute"},imgSx:{position:"absolute"}}),n&&d.jsx(O.IconButton,{size:"small",onClick:()=>n(c),sx:{top:4,right:4,p:"1px",position:"absolute",color:m=>X(m.palette.common.white,.72),bgcolor:m=>X(m.palette.grey[900],.48),"&:hover":{bgcolor:m=>X(m.palette.grey[900],.72)}},children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON",width:16})})]},f)},l):d.jsxs(O.Stack,{component:rn.div,...VT().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:m=>`solid 1px ${m.palette.divider}`,...u},children:[d.jsx(nIn,{file:c}),d.jsxs(O.Stack,{flexGrow:1,sx:{minWidth:0},children:[d.jsx(O.Typography,{variant:"subtitle2",noWrap:!0,children:_?c:s}),d.jsx(O.Typography,{variant:"caption",sx:{color:"text.secondary"},children:_?"":BCt(g)})]}),n&&d.jsx(O.IconButton,{edge:"end",size:"small",onClick:()=>n(c),children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON"})})]},f)})}):null;function nle(e,t,n,a){function r(u){return u instanceof n?u:new n(function(c){c(u)})}return new(n||(n=Promise))(function(u,c){function l(g){try{s(a.next(g))}catch(_){c(_)}}function f(g){try{s(a.throw(g))}catch(_){c(_)}}function s(g){g.done?u(g.value):r(g.value).then(l,f)}s((a=a.apply(e,t||[])).next())})}function rle(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,r,u,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(s){return function(g){return f([s,g])}}function f(s){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,s[0]&&(n=0)),n;)try{if(a=1,r&&(u=s[0]&2?r.return:s[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,s[1])).done)return u;switch(r=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,r=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){n.label=s[1];break}if(s[0]===6&&n.label<u[1]){n.label=u[1],u=s;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(s);break}u[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(g){s=[6,g],r=0}finally{a=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function aGn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var a=n.call(e),r,u=[],c;try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)u.push(r.value)}catch(l){c={error:l}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(c)throw c.error}}return u}function iGn(e,t,n){if(n||arguments.length===2)for(var a=0,r=t.length,u;a<r;a++)(u||!(a in t))&&(u||(u=Array.prototype.slice.call(t,0,a)),u[a]=t[a]);return e.concat(u||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var eu2=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 wmt(e,t){var n=tu2(e);if(typeof n.path!="string"){var a=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof a=="string"&&a.length>0?a:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function tu2(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var a=t.split(".").pop().toLowerCase(),r=eu2.get(a);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}var nu2=[".DS_Store","Thumbs.db"];function ru2(e){return nle(this,void 0,void 0,function(){return rle(this,function(t){return TCt(e)&&au2(e.dataTransfer)?[2,cu2(e.dataTransfer,e.type)]:iu2(e)?[2,ou2(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,uu2(e)]:[2,[]]})})}function au2(e){return TCt(e)}function iu2(e){return TCt(e)&&TCt(e.target)}function TCt(e){return typeof e=="object"&&e!==null}function ou2(e){return rIn(e.target.files).map(function(t){return wmt(t)})}function uu2(e){return nle(this,void 0,void 0,function(){var t;return rle(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(a){return a.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(a){return wmt(a)})]}})})}function cu2(e,t){return nle(this,void 0,void 0,function(){var n,a;return rle(this,function(r){switch(r.label){case 0:return e.items?(n=rIn(e.items).filter(function(u){return u.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(lu2))]):[3,2];case 1:return a=r.sent(),[2,oGn(uGn(a))];case 2:return[2,oGn(rIn(e.files).map(function(u){return wmt(u)}))]}})})}function oGn(e){return e.filter(function(t){return nu2.indexOf(t.name)===-1})}function rIn(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var a=e[n];t.push(a)}return t}function lu2(e){if(typeof e.webkitGetAsEntry!="function")return cGn(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?lGn(t):cGn(e)}function uGn(e){return e.reduce(function(t,n){return iGn(iGn([],aGn(t),!1),aGn(Array.isArray(n)?uGn(n):[n]),!1)},[])}function cGn(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=wmt(t);return Promise.resolve(n)}function fu2(e){return nle(this,void 0,void 0,function(){return rle(this,function(t){return[2,e.isDirectory?lGn(e):su2(e)]})})}function lGn(e){var t=e.createReader();return new Promise(function(n,a){var r=[];function u(){var c=this;t.readEntries(function(l){return nle(c,void 0,void 0,function(){var f,s,g;return rle(this,function(_){switch(_.label){case 0:if(l.length)return[3,5];_.label=1;case 1:return _.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return f=_.sent(),n(f),[3,4];case 3:return s=_.sent(),a(s),[3,4];case 4:return[3,6];case 5:g=Promise.all(l.map(fu2)),r.push(g),u(),_.label=6;case 6:return[2]}})})},function(l){a(l)})}u()})}function su2(e){return nle(this,void 0,void 0,function(){return rle(this,function(t){return[2,new Promise(function(n,a){e.file(function(r){var u=wmt(r,e.fullPath);n(u)},function(r){a(r)})})]})})}var du2=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),a=e.name||"",r=(e.type||"").toLowerCase(),u=r.replace(/\/.*$/,"");return n.some(function(c){var l=c.trim().toLowerCase();return l.charAt(0)==="."?a.toLowerCase().endsWith(l):l.endsWith("/*")?u===l.replace(/\/.*$/,""):r===l})}return!0};function fGn(e){return mu2(e)||_u2(e)||_Gn(e)||gu2()}function gu2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
35433
35433
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _u2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mu2(e){if(Array.isArray(e))return aIn(e)}function sGn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function dGn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sGn(Object(n),!0).forEach(function(a){gGn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sGn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function gGn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mmt(e,t){return Cu2(e)||hu2(e,t)||_Gn(e,t)||vu2()}function vu2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
35434
35434
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _Gn(e,t){if(e){if(typeof e=="string")return aIn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aIn(e,t)}}function aIn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function hu2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function Cu2(e){if(Array.isArray(e))return e}var bu2="file-invalid-type",yu2="file-too-large",pu2="file-too-small",Ou2="too-many-files",ju2=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:bu2,message:"File type must be ".concat(n)}},mGn=function(t){return{code:yu2,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},vGn=function(t){return{code:pu2,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},wu2={code:Ou2,message:"Too many files"};function hGn(e,t){var n=e.type==="application/x-moz-file"||du2(e,t);return[n,n?null:ju2(t)]}function CGn(e,t,n){if(jT(e.size))if(jT(t)&&jT(n)){if(e.size>n)return[!1,mGn(n)];if(e.size<t)return[!1,vGn(t)]}else{if(jT(t)&&e.size<t)return[!1,vGn(t)];if(jT(n)&&e.size>n)return[!1,mGn(n)]}return[!0,null]}function jT(e){return e!=null}function Mu2(e){var t=e.files,n=e.accept,a=e.minSize,r=e.maxSize,u=e.multiple,c=e.maxFiles,l=e.validator;return!u&&t.length>1||u&&c>=1&&t.length>c?!1:t.every(function(f){var s=hGn(f,n),g=Mmt(s,1),_=g[0],m=CGn(f,a,r),v=Mmt(m,1),C=v[0],h=l?l(f):null;return _&&C&&!h})}function ZCt(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function UCt(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 bGn(e){e.preventDefault()}function Lu2(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Pu2(e){return e.indexOf("Edge/")!==-1}function Eu2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Lu2(e)||Pu2(e)}function Dc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(a){for(var r=arguments.length,u=new Array(r>1?r-1:0),c=1;c<r;c++)u[c-1]=arguments[c];return t.some(function(l){return!ZCt(a)&&l&&l.apply(void 0,[a].concat(u)),ZCt(a)})}}function ku2(){return"showOpenFilePicker"in window}function Su2(e){if(jT(e)){var t=Object.entries(e).filter(function(n){var a=Mmt(n,2),r=a[0],u=a[1],c=!0;return yGn(r)||(console.warn('Skipped "'.concat(r,'" 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.')),c=!1),(!Array.isArray(u)||!u.every(pGn))&&(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),c=!1),c}).reduce(function(n,a){var r=Mmt(a,2),u=r[0],c=r[1];return dGn(dGn({},n),{},gGn({},u,c))},{});return[{description:"Files",accept:t}]}return e}function Du2(e){if(jT(e))return Object.entries(e).reduce(function(t,n){var a=Mmt(n,2),r=a[0],u=a[1];return[].concat(fGn(t),[r],fGn(u))},[]).filter(function(t){return yGn(t)||pGn(t)}).join(",")}function Bu2(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Iu2(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function yGn(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function pGn(e){return/^.*\.[\w]+$/.test(e)}var Wu2=["children"],$u2=["open"],xu2=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],zu2=["refKey","onChange","onClick"];function Hu2(e){return Vu2(e)||Ru2(e)||OGn(e)||Au2()}function Au2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
35435
35435
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ru2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vu2(e){if(Array.isArray(e))return oIn(e)}function iIn(e,t){return Tu2(e)||Nu2(e,t)||OGn(e,t)||Fu2()}function Fu2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
35436
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OGn(e,t){if(e){if(typeof e=="string")return oIn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oIn(e,t)}}function oIn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Nu2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function Tu2(e){if(Array.isArray(e))return e}function jGn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jGn(Object(n),!0).forEach(function(a){uIn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jGn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function uIn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GCt(e,t){if(e==null)return{};var n=Zu2(e,t),a,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)a=u[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function Zu2(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var cIn=o.forwardRef(function(e,t){var n=e.children,a=GCt(e,Wu2),r=YCt(a),u=r.open,c=GCt(r,$u2);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(kt(kt({},c),{},{open:u})))});cIn.displayName="Dropzone";var wGn={disabled:!1,getFilesFromEvent:ru2,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};cIn.defaultProps=wGn,cIn.propTypes={children:j.func,accept:j.objectOf(j.arrayOf(j.string)),multiple:j.bool,preventDropOnDocument:j.bool,noClick:j.bool,noKeyboard:j.bool,noDrag:j.bool,noDragEventsBubbling:j.bool,minSize:j.number,maxSize:j.number,maxFiles:j.number,disabled:j.bool,getFilesFromEvent:j.func,onFileDialogCancel:j.func,onFileDialogOpen:j.func,useFsAccessApi:j.bool,autoFocus:j.bool,onDragEnter:j.func,onDragLeave:j.func,onDragOver:j.func,onDrop:j.func,onDropAccepted:j.func,onDropRejected:j.func,onError:j.func,validator:j.func};var lIn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function YCt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=kt(kt({},wGn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,l=t.multiple,f=t.maxFiles,s=t.onDragEnter,g=t.onDragLeave,_=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,C=t.onDropRejected,h=t.onFileDialogCancel,b=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,M=t.preventDropOnDocument,E=t.noClick,L=t.noKeyboard,w=t.noDrag,k=t.noDragEventsBubbling,D=t.onError,S=t.validator,I=o.useMemo(function(){return Du2(n)},[n]),A=o.useMemo(function(){return Su2(n)},[n]),F=o.useMemo(function(){return typeof b=="function"?b:MGn},[b]),W=o.useMemo(function(){return typeof h=="function"?h:MGn},[h]),z=o.useRef(null),T=o.useRef(null),H=o.useReducer(Uu2,lIn),Z=iIn(H,2),Q=Z[0],J=Z[1],V=Q.isFocused,N=Q.isFileDialogActive,Y=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&ku2()),oe=function(){!Y.current&&N&&setTimeout(function(){if(T.current){var he=T.current.files;he.length||(J({type:"closeDialog"}),W())}},300)};o.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[T,N,W,Y]);var te=o.useRef([]),se=function(he){z.current&&z.current.contains(he.target)||(he.preventDefault(),te.current=[])};o.useEffect(function(){return M&&(document.addEventListener("dragover",bGn,!1),document.addEventListener("drop",se,!1)),function(){M&&(document.removeEventListener("dragover",bGn),document.removeEventListener("drop",se))}},[z,M]),o.useEffect(function(){return!a&&y&&z.current&&z.current.focus(),function(){}},[z,y,a]);var le=o.useCallback(function(q){D?D(q):console.error(q)},[D]),be=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),te.current=[].concat(Hu2(te.current),[q.target]),UCt(q)&&Promise.resolve(r(q)).then(function(he){if(!(ZCt(q)&&!k)){var ot=he.length,He=ot>0&&Mu2({files:he,accept:I,minSize:c,maxSize:u,multiple:l,maxFiles:f,validator:S}),St=ot>0&&!He;J({isDragAccept:He,isDragReject:St,isDragActive:!0,type:"setDraggedFiles"}),s&&s(q)}}).catch(function(he){return le(he)})},[r,s,le,k,I,c,u,l,f,S]),fe=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=UCt(q);if(he&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return he&&_&&_(q),!1},[_,k]),ne=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=te.current.filter(function(He){return z.current&&z.current.contains(He)}),ot=he.indexOf(q.target);ot!==-1&&he.splice(ot,1),te.current=he,!(he.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),UCt(q)&&g&&g(q))},[z,g,k]),_e=o.useCallback(function(q,he){var ot=[],He=[];q.forEach(function(St){var we=hGn(St,I),en=iIn(we,2),hn=en[0],Bc=en[1],nj=CGn(St,c,u),rj=iIn(nj,2),wT=rj[0],MT=rj[1],LT=S?S(St):null;if(hn&&wT&&!LT)ot.push(St);else{var PT=[Bc,MT];LT&&(PT=PT.concat(LT)),He.push({file:St,errors:PT.filter(function(ET){return ET})})}}),(!l&&ot.length>1||l&&f>=1&&ot.length>f)&&(ot.forEach(function(St){He.push({file:St,errors:[wu2]})}),ot.splice(0)),J({acceptedFiles:ot,fileRejections:He,type:"setFiles"}),m&&m(ot,He,he),He.length>0&&C&&C(He,he),ot.length>0&&v&&v(ot,he)},[J,l,I,c,u,f,m,v,C,S]),We=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),te.current=[],UCt(q)&&Promise.resolve(r(q)).then(function(he){ZCt(q)&&!k||_e(he,q)}).catch(function(he){return le(he)}),J({type:"reset"})},[r,_e,le,k]),U=o.useCallback(function(){if(Y.current){J({type:"openDialog"}),F();var q={multiple:l,types:A};window.showOpenFilePicker(q).then(function(he){return r(he)}).then(function(he){_e(he,null),J({type:"closeDialog"})}).catch(function(he){Bu2(he)?(W(he),J({type:"closeDialog"})):Iu2(he)?(Y.current=!1,T.current?(T.current.value=null,T.current.click()):le(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):le(he)});return}T.current&&(J({type:"openDialog"}),F(),T.current.value=null,T.current.click())},[J,F,W,p,_e,le,A,l]),qe=o.useCallback(function(q){!z.current||!z.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),U())},[z,U]),de=o.useCallback(function(){J({type:"focus"})},[]),re=o.useCallback(function(){J({type:"blur"})},[]),me=o.useCallback(function(){E||(Eu2()?setTimeout(U,0):U())},[E,U]),je=function(he){return a?null:he},K=function(he){return L?null:je(he)},Oe=function(he){return w?null:je(he)},Pe=function(he){k&&he.stopPropagation()},xe=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,ot=he===void 0?"ref":he,He=q.role,St=q.onKeyDown,we=q.onFocus,en=q.onBlur,hn=q.onClick,Bc=q.onDragEnter,nj=q.onDragOver,rj=q.onDragLeave,wT=q.onDrop,MT=GCt(q,xu2);return kt(kt(uIn({onKeyDown:K(Dc(St,qe)),onFocus:K(Dc(we,de)),onBlur:K(Dc(en,re)),onClick:je(Dc(hn,me)),onDragEnter:Oe(Dc(Bc,be)),onDragOver:Oe(Dc(nj,fe)),onDragLeave:Oe(Dc(rj,ne)),onDrop:Oe(Dc(wT,We)),role:typeof He=="string"&&He!==""?He:"presentation"},ot,z),!a&&!L?{tabIndex:0}:{}),MT)}},[z,qe,de,re,me,be,fe,ne,We,L,w,a]),ze=o.useCallback(function(q){q.stopPropagation()},[]),Gt=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,ot=he===void 0?"ref":he,He=q.onChange,St=q.onClick,we=GCt(q,zu2),en=uIn({accept:I,multiple:l,type:"file",style:{display:"none"},onChange:je(Dc(He,We)),onClick:je(Dc(St,ze)),tabIndex:-1},ot,T);return kt(kt({},en),we)}},[T,n,l,We,a]);return kt(kt({},Q),{},{isFocused:V&&!a,getRootProps:xe,getInputProps:Gt,rootRef:z,inputRef:T,open:je(U)})}function Uu2(e,t){switch(t.type){case"focus":return kt(kt({},e),{},{isFocused:!0});case"blur":return kt(kt({},e),{},{isFocused:!1});case"openDialog":return kt(kt({},lIn),{},{isFileDialogActive:!0});case"closeDialog":return kt(kt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return kt(kt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return kt(kt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return kt({},lIn);default:return e}}function MGn(){}const fIn=({fileRejections:e})=>e.length?d.jsx(O.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>X(t.palette.error.main,.08),borderColor:t=>X(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=tIn(t);return d.jsxs(O.Box,{sx:{my:1},children:[d.jsxs(O.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?BCt(r):""]}),n.map(u=>d.jsxs(O.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,Gu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx(O.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:d.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},LGn=at("div")(({theme:e})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`1px dashed ${X(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),PGn=({header:e,description:t,sx:n,...a})=>d.jsxs(O.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[d.jsx(IWn,{sx:{width:220}}),d.jsxs("div",{children:[d.jsx(O.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),d.jsx(O.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||d.jsxs(d.Fragment,{children:["Solte os arquivos aqui ou clique",d.jsx(O.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),EGn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_,sx:m,dropZoneProps:v,placeholderProps:C,placeholderAlt:h,image:b,tabIndex:p,preview:y="image",onRemoveAll:M,onUpload:E,...L})=>{const{getRootProps:w,getInputProps:k,isDragActive:D,isDragReject:S,fileRejections:I}=YCt({multiple:n,disabled:t,...L}),A=!!u&&!n,F=A||b,W=l&&n&&l.length>0,z=typeof u=="string",T=S||!!a;return y==="file"?d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(LGn,{...w(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"}},children:[d.jsx("input",{...k()}),d.jsx(PGn,{sx:{...A&&{display:"none"}}}),A&&d.jsxs(O.Stack,{component:rn.div,...VT().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:H=>`solid 1px ${H.palette.divider}`,...m},children:[d.jsx(nIn,{file:u}),d.jsxs(O.Stack,{flexGrow:1,sx:{minWidth:0},children:[d.jsx(O.Typography,{variant:"subtitle2",noWrap:!0,children:z?u:u.name}),d.jsx(O.Typography,{variant:"caption",sx:{color:"text.secondary"},children:z?"":BCt(u.size)})]}),c&&d.jsx(O.IconButton,{edge:"end",size:"small",onClick:c,children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON"})})]})]}),r&&r,d.jsx(fIn,{fileRejections:I}),W&&d.jsxs(d.Fragment,{children:[d.jsx(O.Box,{sx:{my:3},children:d.jsx(rGn,{files:l,thumbnail:f,onRemove:s})}),d.jsxs(O.Stack,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[M&&d.jsx(O.Button,{color:"inherit",variant:"outlined",size:"small",onClick:M,children:"Remover todos"}),E&&d.jsx(O.Button,{size:"small",variant:"contained",onClick:E,children:"Enviar arquivos"})]})]})]}):d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(LGn,{...w(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...v},children:[d.jsx("input",{...k(),id:e,tabIndex:p}),h?d.jsx(O.Stack,{sx:{...F&&{opacity:0}},children:h}):d.jsx(PGn,{sx:{...F&&{opacity:0}},header:C==null?void 0:C.title,description:C==null?void 0:C.description}),F&&d.jsx(Gu2,{file:u||b||""})]}),r&&d.jsx(O.FormHelperText,{error:!!a,sx:H=>({mx:"14px",color:t?H.palette.grey[500]:void 0}),children:r}),d.jsx(fIn,{fileRejections:I}),F&&c&&d.jsx(O.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:H=>X(H.palette.common.white,.8),bgcolor:H=>X(H.palette.grey[900],.72),"&:hover":{bgcolor:H=>X(H.palette.grey[900],.48)}},children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON",width:18})}),W&&d.jsx(d.Fragment,{children:d.jsx(O.Box,{sx:{my:3},children:d.jsx(rGn,{files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_})})})]})},Yu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},Ku2=at("div")(({theme:e})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${X(e.palette.grey[500],.32)}`})),Xu2=at("div")(({theme:e})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:e.palette.text.disabled,backgroundColor:e.palette.background.neutral,transition:e.transitions.create("opacity",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.shorter})})),kGn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...l})=>{const{getRootProps:f,getInputProps:s,isDragActive:g,isDragReject:_,fileRejections:m}=YCt({multiple:!1,disabled:a,...l}),v=!!t||n,C=_||!!e;return d.jsxs(d.Fragment,{children:[d.jsxs(Ku2,{...f(),sx:{...g&&{opacity:.72},...C&&{borderColor:"error.light",...v&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...v&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[d.jsx("input",{...s(),tabIndex:c}),v&&d.jsx(Yu2,{file:t||n||""}),d.jsxs(Xu2,{className:"placeholder",sx:{"&:hover":{opacity:.72},...v&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>X(h.palette.grey[900],.64)},...C&&{color:"error.main",bgcolor:"error.lighter"}},children:[d.jsx(Ce,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),d.jsx(O.Typography,{variant:"caption",children:t?"Atualizar foto":"Carregar foto"})]})]}),r&&r,d.jsx(fIn,{fileRejections:m})]})},Qu2=at("div")(({theme:e})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:e.spacing(.5),color:e.palette.text.disabled,borderRadius:e.shape.borderRadius,border:`dashed 1px ${e.palette.divider}`,backgroundColor:X(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),Ju2=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:l,isDragActive:f,isDragReject:s}=YCt({disabled:n,...u}),g=s||t;return d.jsxs(Qu2,{...c(),sx:{...f&&{opacity:.72},...g&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[d.jsx("input",{...l(),tabIndex:r}),e||d.jsx(Ce,{icon:"CLOUD_UPLOAD",width:28})]})},SGn=({onFileCropped:e,onImageUploaded:t,onCancel:n})=>{const a=o.useId(),[r,u]=o.useState(),[c,l,f]=xht(),[s,g]=o.useState();return{id:a,setCropModalOpen:f,handleRemove:()=>{e(void 0),t(void 0),f(!1)},toggleCropModalOpen:l,cropModalOpen:c,cancelChanges:()=>{n&&n(),f(!1)},saveChanges:()=>{r!==void 0&&r.getCroppedCanvas().toBlob(b=>{if(!b)return;const p=new File([b],"imagem");e(p),l()},"image/png",1)},previewImage:()=>{r!==void 0&&g(r.getCroppedCanvas().toDataURL())},setCropper:u,preview:s,closePreviewImage:()=>g(void 0)}},DGn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,onPreview:c,imageSrc:l,aspectRatio:f,onInitialized:s})=>{const[g,_]=o.useState(.5);return d.jsx(YUn,{open:t,onClose:n,dialogTitle:a,actions:d.jsxs(d.Fragment,{children:[d.jsx(O.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),d.jsx(O.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",keepMounted:!0,children:d.jsxs(O.Stack,{gap:2,children:[d.jsx(jUn,{imageSrc:l,aspectRatio:f,onInitialized:s,zoom:g,onZoomChange:_}),d.jsxs(O.Stack,{gap:1.5,children:[d.jsxs(O.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[d.jsx(O.Typography,{variant:"body1",children:"Zoom"}),d.jsx(O.Slider,{value:g,onChange:(m,v)=>_(Array.isArray(v)?v[0]:v),min:.1,max:2,size:"medium",step:.0125})]}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"}),onClick:u,children:"Remover"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"PLAY_SIMPLE"}),onClick:c,children:"Pré-visualizar"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE"}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})})},qu2=O.styled(O.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),ec2=O.styled(O.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:O.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),tc2=O.styled(O.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),BGn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,toggleCropModalOpen:v,cropModalOpen:C,cancelChanges:h,saveChanges:b,previewImage:p,setCropper:y,preview:M,closePreviewImage:E}=SGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(qu2,{children:[c&&d.jsx(yCt,{}),d.jsx(EGn,{...s,id:g,file:l,onDrop:L=>{if(L.length>0){_(!0);const w=new FileReader;w.addEventListener("load",()=>{var D;const k=((D=w.result)==null?void 0:D.toString())||"";t(k),e(void 0)}),w.readAsDataURL(L[0])}},image:u,tabIndex:f}),(l||u)&&d.jsxs(ec2,{className:"actions",children:[d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:m,children:"Remover"}),d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:v,children:"Editar"})]})]}),d.jsx(DGn,{id:g,open:C,onClose:h,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:b,onPreview:p,onInitialized:y}),d.jsx(O.Dialog,{open:!!M,onClose:E,scroll:"body",PaperProps:{sx:{p:2}},children:M&&d.jsx("img",{src:M,alt:"Preview"})})]})},nc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",border:`1px solid ${e.palette.grey[300]}`})),IGn=({children:e,...t})=>d.jsx(nc2,{borderRadius:1,gap:3,padding:3,...t,children:e}),rc2=O.styled(O.Box)(()=>({marginLeft:"4px",fontWeight:"fontWeightBold"})),ac2=O.styled(O.Button)(()=>({fontWeight:"fontWeightSemiBold"})),ic2=O.styled(Ce)(({theme:e})=>({color:e.palette.primary.main})),oc2=({selectedTitle:e,onSelect:t,options:n})=>{const a=USn();return d.jsxs(d.Fragment,{children:[d.jsx(ac2,{disableRipple:!0,color:"inherit",onClick:a.onOpen,endIcon:d.jsx(ic2,{icon:a.open?"CHEVRON_UP":"ARROW_DOWN_SIMPLE"}),children:d.jsx(rc2,{component:"span",children:e.label})}),d.jsx(GUn,{open:a.open,onClose:a.onClose,children:n.map(r=>d.jsx(O.MenuItem,{selected:r.value===e.value,onClick:()=>{a.onClose(),t(r.value)},children:r.label},r.value))})]})},uc2=O.styled(O.Stack)({display:"grid",gridTemplateColumns:"auto auto"}),cc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[600],display:"flex",gap:"8px",alignItems:"center"})),lc2=O.styled(O.Typography)(({theme:e})=>({textAlign:"right",color:e.palette.grey[800]})),fc2=({data:e,...t})=>e.length===0?null:d.jsx(uc2,{gap:1,...t,children:e.map(n=>[d.jsx(cc2,{variant:"body2",children:n.label},`label:${n.id}`),d.jsx(lc2,{variant:"body2",children:n.value},`value:${n.id}`)])}),sc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",minWidth:"250px",padding:24,minHeight:"100vh",borderRight:`1px solid ${e.palette.grey[300]}`})),dc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",position:"sticky",top:0,zIndex:999,width:"100%",padding:24,gap:24,borderBottom:`1px solid ${e.palette.grey[300]}`})),gc2=O.styled(O.Stack)({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:24}),_c2=O.styled(O.Stack)(({theme:e})=>({height:"100%",width:"50%",flex:1,[e.breakpoints.down(1680)]:{width:"70%"}})),mc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[800],fontSize:18,fontWeight:700})),vc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24})),hc2=O.styled(O.Button)(({theme:e})=>({paddingTop:6,paddingBottom:6,paddingLeft:0,margin:0,marginBottom:4,marginTop:4,width:"100%",display:"block",cursor:"pointer",color:e.palette.grey[600],textAlign:"left",fontWeight:400,fontSize:14,"> span":{color:e.palette.error.main}})),Cc2=O.styled(Kce)(()=>({height:1,"& .simplebar-content":{height:1}})),bc2=O.styled(O.Stack)(()=>({position:"fixed",width:"202px"})),yc2=({title:e,sections:t,headerLeftContent:n,headerRightContent:a,onClickBack:r})=>d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",children:[d.jsx(sc2,{children:d.jsx(Cc2,{children:d.jsxs(bc2,{children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",fontWeight:700,children:"ACESSO RÁPIDO"}),t.map((u,c)=>d.jsxs(O.Stack,{children:[d.jsxs(hc2,{onClick:()=>{u.ref.current&&u.ref.current.scrollIntoView({block:"start",behavior:"smooth"})},children:[u.title,u.isRequired&&d.jsx("span",{children:"*"})]}),c<t.length-1&&d.jsx(O.Divider,{})]},c))]})})}),d.jsxs(O.Stack,{width:"100%",alignItems:"center",mb:8,children:[d.jsx(dc2,{children:d.jsxs(gc2,{children:[d.jsxs(O.Stack,{flexDirection:"row",gap:2,alignItems:"center",children:[d.jsx(O.IconButton,{color:"primary",onClick:()=>r(),children:d.jsx(Ce,{icon:"CHEVRON_LEFT"})}),d.jsx(O.Typography,{variant:"h4",children:e}),n]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",minWidth:"max-content",children:[d.jsx(LSn,{disabled:!0}),a]})]})}),d.jsx(_c2,{children:t.map(u=>d.jsxs(O.Stack,{paddingTop:3,paddingBottom:2,alignItems:"start",width:"100%",children:[d.jsx(mc2,{ref:u.ref,children:u.title}),d.jsx(vc2,{children:u.subTitle}),d.jsx(IGn,{width:"100%",borderRadius:1,gap:1.5,padding:3,children:u.child})]},u.title))})]})]})}),pc2=O.styled(O.Box)(({theme:e})=>({padding:24,borderRadius:8,height:"auto",maxWidth:800,backgroundColor:e.palette.background.default,border:`1px solid ${e.palette.grey[300]}`})),Oc2=O.styled(O.Stack)(({theme:e})=>({minHeight:180,maxWidth:700,border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff",padding:24})),jc2=O.styled(O.Box)(()=>({maxWidth:70,maxHeight:40,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),wc2=O.styled(O.Box)(({theme:e})=>({backgroundColor:e.palette.background.default,maxWidth:90,maxHeight:80,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),WGn=O.styled(O.Stack)(({theme:e})=>({border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff"})),Mc2=O.styled(O.Box)(({theme:e})=>({width:"auto",height:120,overflow:"hidden",padding:2,borderBottom:`4px dotted ${e.palette.grey[300]}`})),Lc2=({titlePreview:e,logoImage:t,brandingName:n,url:a,title:r,description:u,keyWords:c,customTitles:l,productImage:f,child:s,previewLinkImage:g,hasPreviewLink:_})=>d.jsx(pc2,{children:d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e??"PRÉ-VISUALIZAÇÃO"}),d.jsxs(Oc2,{children:[d.jsxs(O.Stack,{direction:"row",pb:3,gap:.5,children:[d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"error.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"warning.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"success.main"})})]}),d.jsxs(O.Stack,{flexDirection:"row",gap:2,justifyContent:"space-between",children:[d.jsxs(O.Stack,{gap:1,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",gap:1.5,pb:.5,children:[t&&d.jsx(jc2,{children:d.jsx("img",{alt:"Logo",src:t})}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"overline",color:"grey.600",pb:.5,children:n??"SUAEMPRESA"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:a??"https://www.exemplo.com"}),d.jsx(Ce,{icon:"MORE_OPTIONS_VERTICAL",width:15,color:"grey.500"})]})]})]}),d.jsx(tj,{variant:"subtitle1",color:"#4E5BEC",overflow:"hidden",textOverflow:"ellipsis",line:5,children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(tj,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:5,children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),c&&d.jsx(O.Stack,{direction:"row",gap:1,alignItems:"center",children:c.map((m,v)=>d.jsxs(d.Fragment,{children:[d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:m}),v<c.length-1&&d.jsx(O.Box,{width:4,height:16,children:d.jsx(Ce,{icon:"CIRCLE",color:"text.disabled",width:10})})]}))}),l&&d.jsx(O.Stack,{pt:2,children:l.map((m,v)=>d.jsxs(O.Stack,{gap:1,children:[d.jsx(O.Typography,{variant:"subtitle1",color:"#4E5BEC",children:m.title}),d.jsx(tj,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:1,children:m.description??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys stansince the 1500"})]},v))}),s]}),f&&d.jsx(wc2,{children:d.jsx("img",{alt:"ProductImage",src:f})})]})]}),_&&d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,width:"100%",children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:"pré-visualização link de compartilhamento".toUpperCase()}),d.jsxs(WGn,{children:[g&&d.jsx(Mc2,{children:d.jsx("img",{alt:"PreviewLinkImage",src:g,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:8}})}),d.jsxs(O.Stack,{gap:.2,p:2,width:"100%",children:[d.jsx(O.Typography,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.500",children:a??"https://www.exemplo.com"})]})]}),d.jsx(WGn,{children:d.jsxs(O.Stack,{direction:"row",gap:1,alignItems:"center",children:[d.jsx(O.Box,{width:100,height:95,bgcolor:"grey.100",p:.5,alignItems:"center",children:d.jsx("img",{alt:"Logo",src:t,style:{width:"100%",height:"100%",objectFit:"contain",borderRadius:8}})}),d.jsxs(O.Stack,{padding:1,gap:.2,width:"80%",children:[d.jsx(tj,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(tj,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(tj,{variant:"caption",color:"grey.500",line:1,children:a??"https://www.exemplo.com"})]})]})})]})]})}),Pc2=O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center",overflow:"hidden"})),Ec2=O.styled(O.Stack)(()=>({backgroundColor:"#F5F5F5",padding:8,width:"100%",justifyContent:"space-between",alignItems:"center",gap:12,"& .MuiInputBase-root":{backgroundColor:"#fff"}}));O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center"}));const kc2=O.styled(O.Collapse)(()=>({width:"100%",padding:"12px 16px"})),Sc2=({description:e,name:t,children:n,header:a,onDelete:r})=>{const[u,c]=xht(!0);return d.jsxs(Pc2,{children:[d.jsxs(Ec2,{direction:"row",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:1.5,flex:1,children:[d.jsx(O.IconButton,{edge:"end",onClick:c,children:d.jsx(Ce,{icon:u?"CHEVRON_UP":"CHEVRON_RIGHT"})}),d.jsx(O.Typography,{variant:"overline",color:"text.primary",children:t}),d.jsx(O.Typography,{variant:"overline",color:"text.secondary",children:e}),d.jsx(O.Stack,{flex:1,children:a})]}),d.jsx(O.IconButton,{color:"error",onClick:r,children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]}),d.jsx(kc2,{in:u,timeout:"auto",unmountOnExit:!0,children:n})]})},Dc2=O.styled(O.ToggleButtonGroup)(({theme:e})=>({button:{textTransform:"none"},"& .MuiToggleButton-primary:hover":{backgroundColor:`${e.palette.primary.dark}`,color:e.palette.primary.contrastText},"& button:not(.Mui-selected):hover":{backgroundColor:e.palette.primary.lighter,color:e.palette.primary.main},"& .Mui-selected":{backgroundColor:`${e.palette.primary.main} !important`,color:`${e.palette.primary.contrastText} !important`}})),Bc2=e=>d.jsx(Dc2,{...e}),Ic2=O.styled(O.Card,{shouldForwardProp:e=>e!=="active"})(({theme:e,active:t})=>({boxShadow:"none",cursor:"pointer",borderRadius:8,borderStyle:"solid",borderWidth:1.5,borderColor:t?e.palette.primary.main:e.palette.grey[300],color:e.palette.primary.main,backgroundColor:t?O.alpha(e.palette.primary.main,.04):"white","&:hover":{borderColor:e.palette.primary.main}})),$Gn=({title:e,action:t,loading:n,items:a,values:r,onChange:u})=>{const[c,l]=o.useState(),f=h=>r.includes(h),s=c?a.filter(h=>h.title.toLowerCase().includes(c.toLowerCase())):a,g=h=>{const b=f(h.value);let p;b?p=r.filter(y=>y!==h.value):p=[...r,h.value],u(p)},_=()=>{r.length===a.length?u([]):u(a.map(h=>h.value))},m=new Intl.PluralRules("pt-BR"),v=new Map([["one","selecionado"],["other","selecionados"]]),C=h=>{const b=m.select(h),p=v.get(b);return`${h} ${p}`};return d.jsxs(O.Stack,{gap:1.5,height:450,children:[d.jsxs(O.Stack,{direction:"row",justifyContent:"space-between",children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e}),d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:r.length===0?"nenhum selecionado":C(r.length)})]}),d.jsxs(O.Stack,{direction:"row",alignItems:"center",spacing:1.5,children:[d.jsx(NCt,{fullWidth:!0,size:"small",iconPosition:"start",placeholder:"Buscar",trigger:"change",onSearch:h=>l(h),onKeyDown:h=>{h.key==="Enter"&&h.preventDefault()}}),t?d.jsx(d.Fragment,{children:t}):d.jsx(O.Button,{onClick:_,size:"small",children:d.jsx(O.Typography,{variant:"overline",children:"TODOS"})})]}),d.jsx(Kce,{children:d.jsx(O.Stack,{flex:1,mb:2,children:d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",mt:3,children:d.jsx(O.CircularProgress,{})}),isEmpty:a.length===0,empty:d.jsx(amt,{sx:{svg:{height:140}},text:c?`Não foi possivel encontrar o item "${c}"`:"Nenhum item disponível"}),children:d.jsx(O.Grid,{container:!0,spacing:1.5,children:s.map(h=>d.jsx(O.Grid,{item:!0,xs:4,children:d.jsx(Ic2,{active:f(h.value),onClick:()=>g(h),children:d.jsxs(O.Stack,{padding:1.5,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[d.jsx(O.Typography,{color:f(h.value)?"primary.main":"text.primary",variant:"subtitle2",textAlign:"left",noWrap:!0,children:h.title}),f(h.value)&&d.jsx(Ce,{icon:"CHECK_CIRCLE",width:24})]}),h.options.map(b=>d.jsx(O.Typography,{mt:1,variant:"body2",color:"text.disabled",fontSize:12,textAlign:"left",noWrap:!0,children:`${b.label}: ${b.value}`},b.label))]})})},h.title))})})})})]})},fn=({name:e,helperText:t,rules:n,onChange:a,tabIndex:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{ref:l,...f},fieldState:{error:s}})=>d.jsx(O.TextField,{...f,onChange:g=>{f.onChange(g),a&&a(g)},inputRef:l,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||t,...u,inputProps:{...u.inputProps,tabIndex:r}})})},Wc2=O.styled(O.IconButton)(({theme:e})=>({svg:{color:`${e.palette.primary.main} !important`}}));O.styled(O.IconButton)(()=>({height:"38px",alignSelf:"center"}));const $c2=O.styled(O.Typography)(()=>({textDecoration:"underline",fontWeight:"600",cursor:"pointer"})),xc2=O.styled(O.Alert)(({theme:e})=>({backgroundColor:`${O.alpha(e.palette.primary.main,.03)}`,border:`1px solid ${O.alpha(e.palette.primary.main,.4)}`,flexDirection:"row",alignItems:"center",padding:"2px 12px",gap:8,borderRadius:8,marginBottom:16,"& svg":{color:e.palette.primary.main}})),zc2=()=>{const e=()=>{const t="https://ajuda.zydon.com.br/pt-BR/articles/9180603-sobre-webhooks";window.open(t,"_blank")};return d.jsx(xc2,{severity:"info",children:d.jsxs(O.Typography,{color:"grey",variant:"caption",children:["Webhooks permitem que serviços externos sejam notificados quando determinados eventos acontecem. Saiba mais"," ",d.jsx($c2,{variant:"caption",color:"primary",onClick:()=>e(),children:"acessando a documentação do Webhook"})]})})},Hc2=[{label:"XML",value:"XML"},{label:"JSON",value:"JSON"},{label:"BYTEA",value:"BYTEA"}],Ac2=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"}],Rc2=({webhookData:e,isEditing:t=!1,haveTip:n=!1})=>{const{control:a}=Be.useFormContext(),{fields:r,append:u,remove:c}=Be.useFieldArray({name:"headers",control:a}),l=()=>{u({value:"",name:""})};return d.jsxs(d.Fragment,{children:[n&&d.jsx(zc2,{}),t&&d.jsx(fn,{name:"name",label:"Nome do webhook"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(fn,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url é obrigatório"}}}),d.jsx(fn,{name:"filter",label:"Filtro"})]}),t&&e&&d.jsxs(d.Fragment,{children:[d.jsx(fn,{variant:"filled",name:"solution",label:"Solução",disabled:!0}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(fn,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),d.jsx(fn,{variant:"filled",name:"resourceID",label:"ID origem",disabled:!0,InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(Wc2,{onClick:()=>navigator.clipboard.writeText(e.resource_id),children:d.jsx(Ce,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),d.jsx(fn,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(KCt,{fullWidth:!0,options:Hc2,name:"content_type",label:"Tipo de conteúdo",required:!0,rules:{required:{value:!0,message:"Campo Tipo de conteúdo é obrigatório"}}}),d.jsx(KCt,{fullWidth:!0,options:Ac2,name:"http_method",label:"Método HTTP",required:!0,rules:{required:{value:!0,message:"Campo Método HTTP é obrigatório"}}})]}),d.jsx(O.Typography,{variant:"overline",color:"grey",children:"Cabeçalho"}),r==null?void 0:r.map((f,s)=>d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(fn,{name:`headers.${s}.name`,label:"Chave",required:!0,rules:{required:{value:!0,message:""}}}),d.jsx(fn,{name:`headers.${s}.value`,label:"Valor"}),d.jsx(O.IconButton,{color:"error",onClick:()=>c(s),children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]},f.id)),d.jsx(FRn,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>l(),children:"Adicionar novo cabeçalho"}),d.jsx(O.Divider,{})]})},KCt=({name:e,helperText:t,rules:n,onSelectOption:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx(jSn,{...c,...r,onChange:f=>{a&&a(f,c.value),c.onChange(f)},error:!!l,helperText:(l==null?void 0:l.message)||t})})},xGn=({name:e,helperText:t,rules:n,onChange:a,error:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{name:l,onChange:f,value:s,ref:g},fieldState:{error:_}})=>d.jsx(JBn,{ref:g,...u,name:l,value:s,error:r||!!_,helperText:(_==null?void 0:_.message)||t,onChange:({target:{value:m}})=>{a&&a(m),f(m)}})})},Vc2=({name:e,containerProps:t,required:n,rules:a,tabIndex:r})=>{const u=`${e}.zipCode`,c=`${e}.publicPlace`,l=`${e}.number`,f=`${e}.district`,s=`${e}.complement`,g=`${e}.state`,_=`${e}.city`,m=v=>{v.key==="Enter"&&v.preventDefault()};return d.jsxs(O.Stack,{gap:1.5,...t,children:[d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(xGn,{name:u,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.CircularProgress,{size:24})})},rules:a,onKeyDown:m,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:r}),d.jsxs(O.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[d.jsx(fn,{name:c,label:"Logradouro",onKeyDown:m,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:r}),d.jsx(fn,{name:l,label:"Número",onKeyDown:m,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:r})]})]}),d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(fn,{name:f,label:"Bairro",onKeyDown:m,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:r}),d.jsx(fn,{name:s,label:"Complemento",onKeyDown:m,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:r})]}),d.jsxs(O.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[d.jsx(KCt,{name:g,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:r}),d.jsx(fn,{name:_,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:r})]})]})},Fc2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:t,render:({field:u,fieldState:{error:c}})=>d.jsx(MSn,{...u,...a,onChange:l=>{u.onChange(l)},error:!!c,helperText:(c==null?void 0:c.message)||n})})},Nc2=({name:e,rules:t,helperText:n,tabIndex:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:t,render:({field:c,fieldState:{error:l}})=>d.jsxs("div",{children:[d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{...c,checked:c.value,tabIndex:a}),...r}),(!!l||n)&&d.jsx(O.FormHelperText,{error:!!l,children:l?l==null?void 0:l.message:n})]})})},Tc2=({row:e,name:t,rules:n,label:a,options:r,spacing:u,helperText:c,required:l,...f})=>{const{control:s}=Be.useFormContext(),g=(_,m)=>_.includes(m)?_.filter(v=>v!==m):[..._,m];return d.jsx(Be.Controller,{name:t,control:s,rules:n,render:({field:{value:_=[],...m},fieldState:{error:v}})=>d.jsxs(O.FormControl,{component:"fieldset",children:[a&&d.jsx(O.FormLabel,{component:"legend",sx:{typography:"body2"},required:l,children:a}),d.jsx(O.FormGroup,{sx:{...e&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:u||0},...e&&{mr:0,"&:not(:last-of-type)":{mr:u||2}}}},children:r.map(C=>d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{checked:_.includes(C.value),onChange:()=>m.onChange(g(_,C.value))}),label:C.label,...f},C.value))}),(!!v||c)&&d.jsx(O.FormHelperText,{error:!!v,sx:C=>({color:f.disabled?C.palette.grey[500]:void 0}),children:v?v==null?void 0:v.message:c})]})})},Zc2=({keyName:e,inputs:t=[],rules:n,tabIndex:a,...r})=>{const u=o.useRef(null),{control:c,setValue:l,formState:{errors:f}}=Be.useFormContext(),s=m=>{const v=m.clipboardData.getData("text").split("");t.map((C,h)=>l(C,v[h])),m.preventDefault()},g=(m,v)=>{const{maxLength:C,value:h,name:b}=m.target,p=b.replace(e,""),y=Number(p),M=document.querySelector(`input[name=${e}${y+1}]`);h.length>C&&(m.target.value=h[0]),h.length>=C&&y<6&&M!==null&&M.focus(),v(m)};W_t("paste",s,u);const _=t.some(m=>f[m]);return d.jsxs(O.Stack,{children:[d.jsx(O.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:u,children:t.map((m,v)=>d.jsx(Be.Controller,{name:`${e}${v+1}`,control:c,rules:n,render:({field:C,fieldState:{error:h}})=>d.jsx(O.TextField,{...r,...C,autoComplete:"none",error:!!h,autoFocus:v===0,placeholder:"-",onChange:b=>{g(b,C.onChange)},onFocus:b=>b.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:a}})},m))}),_&&d.jsx(O.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},Uc2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:{...t,validate:{...t==null?void 0:t.validate,validation:u=>{const c="#"+u.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(c)?!0:"Cor inválida"}}},render:({field:{ref:u,onChange:c,...l},fieldState:{error:f}})=>d.jsx(aTn,{...l,onChangeColor:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||n,...a})})},Gc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.DatePicker,{inputRef:l,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Yc2=({name:e,label:t,rules:n,tabIndex:a,helperText:r,required:u,...c})=>{const{control:l,setError:f}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:l,rules:n,render:({field:{value:s,onChange:g},fieldState:{error:_}})=>d.jsx(kT.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...c.localeText},value:[(s==null?void 0:s.startDate)||null,(s==null?void 0:s.endDate)||null],onChange:m=>g({startDate:m[0],endDate:m[1]}),onError:m=>{f(e,{message:m[0]||m[1]||void 0})},...c,slotProps:{textField:({position:m})=>{var v;return{...(v=c.slotProps)==null?void 0:v.textField,required:u,error:!!_,helperText:(_==null?void 0:_.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:m==="start"?`${t} (Dt. Início)`:`${t} (Dt. Fim)`,inputProps:{tabIndex:a}}}},sx:{width:1}})})},Kc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:l,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Xc2=({id:e,children:t,onSubmit:n,methods:a,...r})=>d.jsx(Be.FormProvider,{...a,children:d.jsx(O.Stack,{component:"form",id:e,onSubmit:n,flex:1,width:1,noValidate:!0,...r,children:t})}),Qc2=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:n,render:({field:{ref:u,value:c,...l},fieldState:{error:f}})=>d.jsx(YBn,{value:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||t,...a,...l,name:e})})},Jc2=({name:e,label:t="",rules:n,helperText:a,changed:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:l,fieldState:{error:f}})=>d.jsx(O.Autocomplete,{...l,onChange:(s,g)=>{r&&r(g),l.onChange(g)},renderInput:s=>d.jsx(O.TextField,{label:t,error:!!f,helperText:f?f==null?void 0:f.message:a,...s}),...u})})},qc2=({name:e,helperText:t,rules:n,onChange:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx($Ct,{...c,onChange:f=>{c.onChange(f),a&&a(f)},fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||t,...r})})},el2=({name:e,sx:t,rules:n,passwordSize:a,specialCharacter:r,upperCaseChar:u,numberChar:c,showErrorMessage:l,match:f,...s})=>{const{watch:g}=Be.useFormContext(),_=g(e),[m,v]=o.useState(!1),{hasNumberChar:C,hasSpecialCharacter:h,hasUpperCaseChar:b,isLengthValid:p}=RCt(_,a,c,r,u);return d.jsx(fn,{...s,name:e,type:m?"text":"password",InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.IconButton,{onClick:()=>v(!m),edge:"end","aria-label":"Mostrar/Ocultar senha",tabIndex:-1,children:d.jsx(Ce,{icon:m?"VIEW_ON":"VIEW_OFF"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:y=>{const M=RCt(y,a,c,r,u);return!M.hasNumberChar||!M.hasSpecialCharacter||!M.hasUpperCaseChar||!M.isLengthValid?"Senha inválida":f&&f.fieldPassword&&g(f.fieldPassword)!==y?"As senhas devem ser iguais":!0}}},sx:{...t,"& .MuiFormHelperText-root":{display:(!h||!b||!p||!C)&&!l?"none":void 0}}})},tl2=({name:e,rules:t,row:n,label:a,options:r,spacing:u,helperText:c,decorated:l,onChange:f,tabIndex:s,required:g,disabled:_,...m})=>{const{control:v}=Be.useFormContext(),C=a?`${e}-${a}`:"";return d.jsx(Be.Controller,{name:e,control:v,rules:t,render:({field:h,fieldState:{error:b}})=>d.jsxs(O.FormControl,{component:"fieldset",sx:{...l&&{paddingLeft:1.5}},children:[a&&d.jsx(O.FormLabel,{component:"legend",id:C,sx:{typography:"body2"},required:g,children:a}),d.jsx(O.RadioGroup,{...m,...h,onChange:(p,y)=>{h.onChange(p),f&&f(p,y)},"aria-labelledby":C,row:n,children:r.map(p=>d.jsx(O.FormControlLabel,{value:p.value,control:d.jsx(O.Radio,{inputProps:{tabIndex:s},disabled:_,checked:p.value===h.value,icon:p.icon,checkedIcon:p.icon}),label:p.label,sx:({palette:y})=>({"&:not(:last-of-type)":{mb:u||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:u||2}},...l&&{border:`1px solid ${O.alpha(y.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(u||0)/2||1,...h.value===p.value&&{borderColor:"primary.main",backgroundColor:O.alpha(y.primary.main,.05)}}})},p.value))}),(!!b||c)&&d.jsx(O.FormHelperText,{error:!!b,sx:p=>({color:_?p.palette.grey[500]:void 0}),children:b?b==null?void 0:b.message:c})]})})},nl2=({name:e,helperText:t,onChange:n,tabIndex:a,size:r,label:u,...c})=>{const{control:l}=Be.useFormContext(),f=s=>d.jsx(O.Switch,{...s,checked:s.value,onChange:(g,_)=>{s.onChange(g),n&&n(g,_)},inputProps:{tabIndex:a},size:r});return d.jsx(Be.Controller,{name:e,control:l,render:({field:s,fieldState:{error:g}})=>d.jsxs("div",{children:[u?d.jsx(O.FormControlLabel,{label:u,control:f(s),...c}):f(s),(!!g||t)&&d.jsx(O.FormHelperText,{error:!!g,sx:_=>({mx:"14px",color:c.disabled?_.palette.grey[500]:void 0}),children:g?g==null?void 0:g.message:t})]})})},rl2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.TimePicker,{ampm:!1,format:"HH:mm",inputRef:l,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,error:!!s,required:r,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},al2=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,cropModalOpen:v,cancelChanges:C,saveChanges:h,previewImage:b,setCropper:p,preview:y,closePreviewImage:M}=SGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(O.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[c&&d.jsx(tc2,{}),d.jsx(kGn,{...s,id:g,file:l,onDrop:E=>{if(E.length>0){_(!0);const L=new FileReader;L.addEventListener("load",()=>{var k;const w=((k=L.result)==null?void 0:k.toString())||"";t(w),e(void 0)}),L.readAsDataURL(E[0])}},image:u,tabIndex:f})]}),d.jsx(DGn,{id:g,open:v,onClose:C,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:h,onPreview:b,onInitialized:p}),d.jsx(O.Dialog,{open:!!y,onClose:M,scroll:"body",PaperProps:{sx:{p:2}},children:y&&d.jsx("img",{src:y,alt:"Preview"})})]})};function zGn(e,t){const{watch:n,setValue:a}=Be.useFormContext(),[r,u]=o.useState(t),c=n(e)||[];return{uploadFile:async m=>{if(!m){a(e,void 0),u(void 0);return}a(e,m),u(Object.assign(m,{preview:URL.createObjectURL(m)}))},uploadFiles:async m=>{a(e,[...c,...m.map(v=>Object.assign(v,{preview:URL.createObjectURL(v)}))])},handleDeleteFile:()=>{a(e,void 0),u(void 0)},handleRemoveAll:()=>{a(e,void 0)},handleRemove:m=>{const v=c.filter(C=>C!==m);a(e,v)},file:r,setFileValue:u}}const il2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=zGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(al2,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},ol2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=zGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(BGn,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},HGn=O.styled(O.Button)(({theme:e})=>({borderColor:e.palette.grey[300]})),AGn=O.styled(O.Box)(({theme:e})=>({display:"flex",border:`1.5px solid ${e.palette.grey[300]}`,height:450,borderRadius:8,flex:1,overflow:"hidden"})),ul2=({selectedItems:e,items:t,loading:n,searchText:a,onAdd:r,onRemove:u,search:c,itemsTitle:l,selectedItemsTitle:f,additionalContent:s,enableSearchInSelectedItems:g,onSearch:_})=>{const[m,v]=o.useState(""),C=O.debounce(_,400),h=t.filter(W=>!e.some(z=>z.id===W.id)),b=e.filter(W=>{var z;return(z=W.name)==null?void 0:z.toLowerCase().includes(m.toLowerCase())}),p=g?b:t.filter(W=>e.some(z=>z.id===W.id)),[y,M]=o.useState([]),[E,L]=o.useState([]),w=()=>{r(y),M([])},k=()=>{u(E),L([])},D=W=>{L(W?p:[])},S=W=>{M(W?h:[])},I=(W,z)=>{L(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},A=(W,z)=>{M(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},F=W=>{W.key==="Enter"&&W.preventDefault()};return d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:3,children:[d.jsx(AGn,{flex:1,children:d.jsxs(O.Stack,{flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:y.length>0&&y.length!==h.length,checked:y.length>0&&y.length===h.length,onChange:W=>S(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${l} cadastrados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${y.length}/${h.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,children:[d.jsx(NCt,{iconPosition:"start",placeholder:"Buscar",onKeyDown:F,size:"small",fullWidth:!0,trigger:"change",onSearch:W=>C(W)}),s]}),d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:h.length===0,empty:d.jsx(amt,{text:c?`Nenhum ${a} encontrado`:`Nenhum ${a} disponível`,sx:{svg:{height:140}}}),children:d.jsx(Kce,{sx:{maxHeight:280},children:h.map(W=>d.jsxs(O.Stack,{gap:1,marginTop:"8px",children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:y.includes(W),onChange:z=>A(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})}),d.jsxs(O.Stack,{gap:3,children:[d.jsx(HGn,{variant:"outlined",onClick:w,children:d.jsx(Ce,{icon:"ARROW_RIGHT_SIMPLE"})}),d.jsx(HGn,{variant:"outlined",onClick:k,children:d.jsx(Ce,{icon:"ARROW_LEFT_SIMPLE"})})]}),d.jsx(AGn,{flex:1,children:d.jsxs(O.Stack,{flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:E.length>0&&E.length!==p.length,checked:E.length>0&&E.length===p.length,onChange:W=>D(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${f} selecionados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${E.length}/${p.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,gap:1,overflow:"hidden",children:[g&&d.jsx(NCt,{iconPosition:"start",placeholder:"Buscar",size:"small",fullWidth:!0,trigger:"change",onSearch:W=>v(W??""),onKeyDown:F}),d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:p.length===0,empty:d.jsx(amt,{text:m?`Nenhum ${a} encontrado`:`Nenhum ${a} selecionado`,sx:{svg:{height:140},marginTop:"56px",backgroundColor:"transparent"}}),children:d.jsx(Kce,{sx:{maxHeight:280},children:p.map(W=>d.jsxs(O.Stack,{gap:1,children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:E.includes(W),onChange:z=>I(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})})]})})},cl2=({name:e,rules:t,...n})=>{const{control:a}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:a,rules:t,render:({field:r})=>d.jsx($Gn,{...r,...n})})},ll2=Object.freeze(Object.defineProperty({__proto__:null,default:jtr},Symbol.toStringTag,{value:"Module"}));R.ActionButton=FRn,R.Address=Vc2,R.Autocomplete=jSn,R.AutocompleteDetailed=MSn,R.AutocompleteDetailedField=Fc2,R.AutocompleteField=KCt,R.BuilderLayout=VBo,R.BuilderSidebar=hAo,R.Carousel=jko,R.CarouselArrowIndex=Rko,R.CarouselArrows=Eko,R.CarouselDots=Pko,R.Checkbox=Nc2,R.Codes=Zc2,R.ColorPickerField=Uc2,R.ColorPickerInput=aTn,R.ColoredLabel=bAo,R.Common=B12,R.CommonSSR=W12,R.Confirm=$12,R.CustomAvatar=wSn,R.CustomAvatarGroup=tVn,R.DataGrid=A12,R.DatePicker=Gc2,R.DateRangePicker=Yc2,R.DateTimePicker=Kc2,R.Delayed=R12,R.DialogAnimate=Ktr,R.Drawer=Q12,R.EmptyContent=fAn,R.EmptyView=amt,R.Error=q12,R.ExpandableGroup=Sc2,R.FabButtonAnimate=gzn,R.Field=fn,R.FixedProgressBar=yCt,R.Form=Xc2,R.FrameSkeleton=yc2,R.HelpButton=LSn,R.Icon=Ce,R.IconButtonAnimate=_zn,R.Iconify=TZn,R.IllustrationEmptyContent=WWn,R.ImageCrop=jUn,R.Incrementer=YBn,R.IncrementerField=Qc2,R.Label=zUn,R.Lightbox=FDo,R.LoadingScreen=Po2,R.MaskedInput=JBn,R.MaskedInputField=xGn,R.MaterialDesignContent=Tyt,R.MenuPopover=GUn,R.Modal=YUn,R.ModalActions=Yo2,R.MotionContainer=lnr,R.MotionLazyContainer=$yt,R.MotionViewport=cnr,R.MultiCheckbox=Tc2,R.MultipleChipField=Jc2,R.NoData=$Wn,R.NumberInput=$Ct,R.NumberInputField=qc2,R.PasswordField=el2,R.PasswordRules=t22,R.PopoverSelect=oc2,R.Portal=KUn,R.RadioGroupField=tl2,R.Result=VCt,R.SavedChanges=j22,R.Scrollbar=Kce,R.SearchInput=NCt,R.SelectableCards=$Gn,R.SelectableCardsField=cl2,R.SeoPreview=Lc2,R.SnackbarContent=Nyt,R.SnackbarProvider=Vzn,R.SplashScreen=w22,R.Steps=P22,R.StyledTab=E22,R.StyledTabs=k22,R.Summary=fc2,R.SwapList=ul2,R.Switch=nl2,R.TRANSITION=xWn,R.TabPanel=S22,R.TableEmptyRows=Gko,R.TableHeadCustom=Kko,R.TableNoData=Zko,R.TablePaginationCustom=Qko,R.TableSelectedAction=Xko,R.TableSkeleton=Uko,R.TextAnimate=Xtr,R.TextMaxLine=tj,R.ThemeProvider=nZn,R.TimePicker=rl2,R.ToggleButtonGroup=Bc2,R.Transition=Hvt,R.Upload=EGn,R.UploadAvatar=kGn,R.UploadAvatarWithCropField=il2,R.UploadBox=Ju2,R.UploadIllustration=IWn,R.UploadWithCrop=BGn,R.UploadWithCropField=ol2,R.Webhook=Rc2,R.WhiteBox=IGn,R.color=sr2,R.compare=tAo,R.cssStyles=Hko,R.emptyRows=Vko,R.file=n22,R.formatNumber=to2,R.formatTime=_22,R.getComparator=Fko,R.loadable=O22,R.m=rn,R.mask=y22,R.number=Ki2,R.routes=v22,R.sort=b22,R.useActiveElement=FBo,R.useApiMessage=fAo,R.useCarousel=wko,R.useCopyToClipboard=NBo,R.useDatagrid=TBo,R.useDeepCompareEffect=rAo,R.useEventCallback=GSn,R.useEventListener=W_t,R.useIsMounting=iAo,R.useIsomorphicLayoutEffect=qVn,R.useLightBox=ZDo,R.useLocalStorage=gAo,R.useOffSetTop=lAo,R.useOnClickOutside=cAo,R.usePagination=uAo,R.usePopover=USn,R.useResponsive=Wyt,R.useSnackbar=Fzn,R.useTable=Nko,R.useTabs=oAo,R.useToggle=xht,R.uuidv4=p22,R.validators=Jo2,R.varBgColor=dQn,R.varBgKenburns=gQn,R.varBgPan=_Qn,R.varBounce=lQn,R.varContainer=lvt,R.varFade=VT,R.varFlip=oQn,R.varHover=sQn,R.varPath=rQn,R.varRotate=fQn,R.varScale=cQn,R.varSlide=uQn,R.varTranEnter=$e,R.varTranExit=Ne,R.varTranHover=aQn,R.varZoom=iQn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
35436
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OGn(e,t){if(e){if(typeof e=="string")return oIn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oIn(e,t)}}function oIn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Nu2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function Tu2(e){if(Array.isArray(e))return e}function jGn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jGn(Object(n),!0).forEach(function(a){uIn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jGn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function uIn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GCt(e,t){if(e==null)return{};var n=Zu2(e,t),a,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)a=u[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function Zu2(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var cIn=o.forwardRef(function(e,t){var n=e.children,a=GCt(e,Wu2),r=YCt(a),u=r.open,c=GCt(r,$u2);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(kt(kt({},c),{},{open:u})))});cIn.displayName="Dropzone";var wGn={disabled:!1,getFilesFromEvent:ru2,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};cIn.defaultProps=wGn,cIn.propTypes={children:j.func,accept:j.objectOf(j.arrayOf(j.string)),multiple:j.bool,preventDropOnDocument:j.bool,noClick:j.bool,noKeyboard:j.bool,noDrag:j.bool,noDragEventsBubbling:j.bool,minSize:j.number,maxSize:j.number,maxFiles:j.number,disabled:j.bool,getFilesFromEvent:j.func,onFileDialogCancel:j.func,onFileDialogOpen:j.func,useFsAccessApi:j.bool,autoFocus:j.bool,onDragEnter:j.func,onDragLeave:j.func,onDragOver:j.func,onDrop:j.func,onDropAccepted:j.func,onDropRejected:j.func,onError:j.func,validator:j.func};var lIn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function YCt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=kt(kt({},wGn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,l=t.multiple,f=t.maxFiles,s=t.onDragEnter,g=t.onDragLeave,_=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,C=t.onDropRejected,h=t.onFileDialogCancel,b=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,M=t.preventDropOnDocument,E=t.noClick,L=t.noKeyboard,w=t.noDrag,k=t.noDragEventsBubbling,D=t.onError,S=t.validator,I=o.useMemo(function(){return Du2(n)},[n]),A=o.useMemo(function(){return Su2(n)},[n]),F=o.useMemo(function(){return typeof b=="function"?b:MGn},[b]),W=o.useMemo(function(){return typeof h=="function"?h:MGn},[h]),z=o.useRef(null),T=o.useRef(null),H=o.useReducer(Uu2,lIn),Z=iIn(H,2),Q=Z[0],J=Z[1],V=Q.isFocused,N=Q.isFileDialogActive,Y=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&ku2()),oe=function(){!Y.current&&N&&setTimeout(function(){if(T.current){var he=T.current.files;he.length||(J({type:"closeDialog"}),W())}},300)};o.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[T,N,W,Y]);var te=o.useRef([]),se=function(he){z.current&&z.current.contains(he.target)||(he.preventDefault(),te.current=[])};o.useEffect(function(){return M&&(document.addEventListener("dragover",bGn,!1),document.addEventListener("drop",se,!1)),function(){M&&(document.removeEventListener("dragover",bGn),document.removeEventListener("drop",se))}},[z,M]),o.useEffect(function(){return!a&&y&&z.current&&z.current.focus(),function(){}},[z,y,a]);var le=o.useCallback(function(q){D?D(q):console.error(q)},[D]),be=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),te.current=[].concat(Hu2(te.current),[q.target]),UCt(q)&&Promise.resolve(r(q)).then(function(he){if(!(ZCt(q)&&!k)){var ot=he.length,He=ot>0&&Mu2({files:he,accept:I,minSize:c,maxSize:u,multiple:l,maxFiles:f,validator:S}),St=ot>0&&!He;J({isDragAccept:He,isDragReject:St,isDragActive:!0,type:"setDraggedFiles"}),s&&s(q)}}).catch(function(he){return le(he)})},[r,s,le,k,I,c,u,l,f,S]),fe=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=UCt(q);if(he&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return he&&_&&_(q),!1},[_,k]),ne=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=te.current.filter(function(He){return z.current&&z.current.contains(He)}),ot=he.indexOf(q.target);ot!==-1&&he.splice(ot,1),te.current=he,!(he.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),UCt(q)&&g&&g(q))},[z,g,k]),_e=o.useCallback(function(q,he){var ot=[],He=[];q.forEach(function(St){var we=hGn(St,I),en=iIn(we,2),hn=en[0],Bc=en[1],nj=CGn(St,c,u),rj=iIn(nj,2),wT=rj[0],MT=rj[1],LT=S?S(St):null;if(hn&&wT&&!LT)ot.push(St);else{var PT=[Bc,MT];LT&&(PT=PT.concat(LT)),He.push({file:St,errors:PT.filter(function(ET){return ET})})}}),(!l&&ot.length>1||l&&f>=1&&ot.length>f)&&(ot.forEach(function(St){He.push({file:St,errors:[wu2]})}),ot.splice(0)),J({acceptedFiles:ot,fileRejections:He,type:"setFiles"}),m&&m(ot,He,he),He.length>0&&C&&C(He,he),ot.length>0&&v&&v(ot,he)},[J,l,I,c,u,f,m,v,C,S]),We=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),te.current=[],UCt(q)&&Promise.resolve(r(q)).then(function(he){ZCt(q)&&!k||_e(he,q)}).catch(function(he){return le(he)}),J({type:"reset"})},[r,_e,le,k]),U=o.useCallback(function(){if(Y.current){J({type:"openDialog"}),F();var q={multiple:l,types:A};window.showOpenFilePicker(q).then(function(he){return r(he)}).then(function(he){_e(he,null),J({type:"closeDialog"})}).catch(function(he){Bu2(he)?(W(he),J({type:"closeDialog"})):Iu2(he)?(Y.current=!1,T.current?(T.current.value=null,T.current.click()):le(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):le(he)});return}T.current&&(J({type:"openDialog"}),F(),T.current.value=null,T.current.click())},[J,F,W,p,_e,le,A,l]),qe=o.useCallback(function(q){!z.current||!z.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),U())},[z,U]),de=o.useCallback(function(){J({type:"focus"})},[]),re=o.useCallback(function(){J({type:"blur"})},[]),me=o.useCallback(function(){E||(Eu2()?setTimeout(U,0):U())},[E,U]),je=function(he){return a?null:he},K=function(he){return L?null:je(he)},Oe=function(he){return w?null:je(he)},Pe=function(he){k&&he.stopPropagation()},xe=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,ot=he===void 0?"ref":he,He=q.role,St=q.onKeyDown,we=q.onFocus,en=q.onBlur,hn=q.onClick,Bc=q.onDragEnter,nj=q.onDragOver,rj=q.onDragLeave,wT=q.onDrop,MT=GCt(q,xu2);return kt(kt(uIn({onKeyDown:K(Dc(St,qe)),onFocus:K(Dc(we,de)),onBlur:K(Dc(en,re)),onClick:je(Dc(hn,me)),onDragEnter:Oe(Dc(Bc,be)),onDragOver:Oe(Dc(nj,fe)),onDragLeave:Oe(Dc(rj,ne)),onDrop:Oe(Dc(wT,We)),role:typeof He=="string"&&He!==""?He:"presentation"},ot,z),!a&&!L?{tabIndex:0}:{}),MT)}},[z,qe,de,re,me,be,fe,ne,We,L,w,a]),ze=o.useCallback(function(q){q.stopPropagation()},[]),Gt=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,ot=he===void 0?"ref":he,He=q.onChange,St=q.onClick,we=GCt(q,zu2),en=uIn({accept:I,multiple:l,type:"file",style:{display:"none"},onChange:je(Dc(He,We)),onClick:je(Dc(St,ze)),tabIndex:-1},ot,T);return kt(kt({},en),we)}},[T,n,l,We,a]);return kt(kt({},Q),{},{isFocused:V&&!a,getRootProps:xe,getInputProps:Gt,rootRef:z,inputRef:T,open:je(U)})}function Uu2(e,t){switch(t.type){case"focus":return kt(kt({},e),{},{isFocused:!0});case"blur":return kt(kt({},e),{},{isFocused:!1});case"openDialog":return kt(kt({},lIn),{},{isFileDialogActive:!0});case"closeDialog":return kt(kt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return kt(kt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return kt(kt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return kt({},lIn);default:return e}}function MGn(){}const fIn=({fileRejections:e})=>e.length?d.jsx(O.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>X(t.palette.error.main,.08),borderColor:t=>X(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=tIn(t);return d.jsxs(O.Box,{sx:{my:1},children:[d.jsxs(O.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?BCt(r):""]}),n.map(u=>d.jsxs(O.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,Gu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx(O.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:d.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},LGn=at("div")(({theme:e})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`1px dashed ${X(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),PGn=({header:e,description:t,sx:n,...a})=>d.jsxs(O.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[d.jsx(IWn,{sx:{width:220}}),d.jsxs("div",{children:[d.jsx(O.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),d.jsx(O.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||d.jsxs(d.Fragment,{children:["Solte os arquivos aqui ou clique",d.jsx(O.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),EGn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_,sx:m,dropZoneProps:v,placeholderProps:C,placeholderAlt:h,image:b,tabIndex:p,preview:y="image",onRemoveAll:M,onUpload:E,...L})=>{const{getRootProps:w,getInputProps:k,isDragActive:D,isDragReject:S,fileRejections:I}=YCt({multiple:n,disabled:t,...L}),A=!!u&&!n,F=A||b,W=l&&n&&l.length>0,z=typeof u=="string",T=S||!!a;return y==="file"?d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(LGn,{...w(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"}},children:[d.jsx("input",{...k()}),d.jsx(PGn,{sx:{...A&&{display:"none"}}}),A&&d.jsxs(O.Stack,{component:rn.div,...VT().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:H=>`solid 1px ${H.palette.divider}`,...m},children:[d.jsx(nIn,{file:u}),d.jsxs(O.Stack,{flexGrow:1,sx:{minWidth:0},children:[d.jsx(O.Typography,{variant:"subtitle2",noWrap:!0,children:z?u:u.name}),d.jsx(O.Typography,{variant:"caption",sx:{color:"text.secondary"},children:z?"":BCt(u.size)})]}),c&&d.jsx(O.IconButton,{edge:"end",size:"small",onClick:c,children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON"})})]})]}),r&&r,d.jsx(fIn,{fileRejections:I}),W&&d.jsxs(d.Fragment,{children:[d.jsx(O.Box,{sx:{my:3},children:d.jsx(rGn,{files:l,thumbnail:f,onRemove:s})}),d.jsxs(O.Stack,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[M&&d.jsx(O.Button,{color:"inherit",variant:"outlined",size:"small",onClick:M,children:"Remover todos"}),E&&d.jsx(O.Button,{size:"small",variant:"contained",onClick:E,children:"Enviar arquivos"})]})]})]}):d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(LGn,{...w(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...v},children:[d.jsx("input",{...k(),id:e,tabIndex:p}),h?d.jsx(O.Stack,{sx:{...F&&{opacity:0}},children:h}):d.jsx(PGn,{sx:{...F&&{opacity:0}},header:C==null?void 0:C.title,description:C==null?void 0:C.description}),F&&d.jsx(Gu2,{file:u||b||""})]}),r&&d.jsx(O.FormHelperText,{error:!!a,sx:H=>({mx:"14px",color:t?H.palette.grey[500]:void 0}),children:r}),d.jsx(fIn,{fileRejections:I}),F&&c&&d.jsx(O.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:H=>X(H.palette.common.white,.8),bgcolor:H=>X(H.palette.grey[900],.72),"&:hover":{bgcolor:H=>X(H.palette.grey[900],.48)}},children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON",width:18})}),W&&d.jsx(d.Fragment,{children:d.jsx(O.Box,{sx:{my:3},children:d.jsx(rGn,{files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_})})})]})},Yu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},Ku2=at("div")(({theme:e})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${X(e.palette.grey[500],.32)}`})),Xu2=at("div")(({theme:e})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:e.palette.text.disabled,backgroundColor:e.palette.background.neutral,transition:e.transitions.create("opacity",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.shorter})})),kGn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...l})=>{const{getRootProps:f,getInputProps:s,isDragActive:g,isDragReject:_,fileRejections:m}=YCt({multiple:!1,disabled:a,...l}),v=!!t||n,C=_||!!e;return d.jsxs(d.Fragment,{children:[d.jsxs(Ku2,{...f(),sx:{...g&&{opacity:.72},...C&&{borderColor:"error.light",...v&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...v&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[d.jsx("input",{...s(),tabIndex:c}),v&&d.jsx(Yu2,{file:t||n||""}),d.jsxs(Xu2,{className:"placeholder",sx:{"&:hover":{opacity:.72},...v&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>X(h.palette.grey[900],.64)},...C&&{color:"error.main",bgcolor:"error.lighter"}},children:[d.jsx(Ce,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),d.jsx(O.Typography,{variant:"caption",children:t?"Atualizar foto":"Carregar foto"})]})]}),r&&r,d.jsx(fIn,{fileRejections:m})]})},Qu2=at("div")(({theme:e})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:e.spacing(.5),color:e.palette.text.disabled,borderRadius:e.shape.borderRadius,border:`dashed 1px ${e.palette.divider}`,backgroundColor:X(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),Ju2=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:l,isDragActive:f,isDragReject:s}=YCt({disabled:n,...u}),g=s||t;return d.jsxs(Qu2,{...c(),sx:{...f&&{opacity:.72},...g&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[d.jsx("input",{...l(),tabIndex:r}),e||d.jsx(Ce,{icon:"CLOUD_UPLOAD",width:28})]})},SGn=({onFileCropped:e,onImageUploaded:t,onCancel:n})=>{const a=o.useId(),[r,u]=o.useState(),[c,l,f]=xht(),[s,g]=o.useState();return{id:a,setCropModalOpen:f,handleRemove:()=>{e(void 0),t(void 0),f(!1)},toggleCropModalOpen:l,cropModalOpen:c,cancelChanges:()=>{n&&n(),f(!1)},saveChanges:()=>{r!==void 0&&r.getCroppedCanvas().toBlob(b=>{if(!b)return;const p=new File([b],"imagem");e(p),l()},"image/png",1)},previewImage:()=>{r!==void 0&&g(r.getCroppedCanvas().toDataURL())},setCropper:u,preview:s,closePreviewImage:()=>g(void 0)}},DGn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,onPreview:c,imageSrc:l,aspectRatio:f,onInitialized:s})=>{const[g,_]=o.useState(.5);return d.jsx(YUn,{open:t,onClose:n,dialogTitle:a,actions:d.jsxs(d.Fragment,{children:[d.jsx(O.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),d.jsx(O.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",keepMounted:!0,children:d.jsxs(O.Stack,{gap:2,children:[d.jsx(jUn,{imageSrc:l,aspectRatio:f,onInitialized:s,zoom:g,onZoomChange:_}),d.jsxs(O.Stack,{gap:1.5,children:[d.jsxs(O.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[d.jsx(O.Typography,{variant:"body1",children:"Zoom"}),d.jsx(O.Slider,{value:g,onChange:(m,v)=>_(Array.isArray(v)?v[0]:v),min:.1,max:2,size:"medium",step:.0125})]}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"}),onClick:u,children:"Remover"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"PLAY_SIMPLE"}),onClick:c,children:"Pré-visualizar"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE"}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})})},qu2=O.styled(O.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),ec2=O.styled(O.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:O.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),tc2=O.styled(O.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),BGn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,toggleCropModalOpen:v,cropModalOpen:C,cancelChanges:h,saveChanges:b,previewImage:p,setCropper:y,preview:M,closePreviewImage:E}=SGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(qu2,{children:[c&&d.jsx(yCt,{}),d.jsx(EGn,{...s,id:g,file:l,onDrop:L=>{if(L.length>0){_(!0);const w=new FileReader;w.addEventListener("load",()=>{var D;const k=((D=w.result)==null?void 0:D.toString())||"";t(k),e(void 0)}),w.readAsDataURL(L[0])}},image:u,tabIndex:f}),(l||u)&&d.jsxs(ec2,{className:"actions",children:[d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:m,children:"Remover"}),d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:v,children:"Editar"})]})]}),d.jsx(DGn,{id:g,open:C,onClose:h,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:b,onPreview:p,onInitialized:y}),d.jsx(O.Dialog,{open:!!M,onClose:E,scroll:"body",PaperProps:{sx:{p:2}},children:M&&d.jsx("img",{src:M,alt:"Preview"})})]})},nc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",border:`1px solid ${e.palette.grey[300]}`})),IGn=({children:e,...t})=>d.jsx(nc2,{borderRadius:1,gap:3,padding:3,...t,children:e}),rc2=O.styled(O.Box)(()=>({marginLeft:"4px",fontWeight:"fontWeightBold"})),ac2=O.styled(O.Button)(()=>({fontWeight:"fontWeightSemiBold"})),ic2=O.styled(Ce)(({theme:e})=>({color:e.palette.primary.main})),oc2=({selectedTitle:e,onSelect:t,options:n})=>{const a=USn();return d.jsxs(d.Fragment,{children:[d.jsx(ac2,{disableRipple:!0,color:"inherit",onClick:a.onOpen,endIcon:d.jsx(ic2,{icon:a.open?"CHEVRON_UP":"ARROW_DOWN_SIMPLE"}),children:d.jsx(rc2,{component:"span",children:e.label})}),d.jsx(GUn,{open:a.open,onClose:a.onClose,children:n.map(r=>d.jsx(O.MenuItem,{selected:r.value===e.value,onClick:()=>{a.onClose(),t(r.value)},children:r.label},r.value))})]})},uc2=O.styled(O.Stack)({display:"grid",gridTemplateColumns:"auto auto"}),cc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[600],display:"flex",gap:"8px",alignItems:"center"})),lc2=O.styled(O.Typography)(({theme:e})=>({textAlign:"right",color:e.palette.grey[800]})),fc2=({data:e,...t})=>e.length===0?null:d.jsx(uc2,{gap:1,...t,children:e.map(n=>[d.jsx(cc2,{variant:"body2",children:n.label},`label:${n.id}`),d.jsx(lc2,{variant:"body2",children:n.value},`value:${n.id}`)])}),sc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",minWidth:"250px",padding:24,minHeight:"100vh",borderRight:`1px solid ${e.palette.grey[300]}`})),dc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",position:"sticky",top:0,zIndex:999,width:"100%",padding:24,gap:24,borderBottom:`1px solid ${e.palette.grey[300]}`})),gc2=O.styled(O.Stack)({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:24}),_c2=O.styled(O.Stack)(({theme:e})=>({height:"100%",width:"50%",flex:1,[e.breakpoints.down(1680)]:{width:"70%"}})),mc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[800],fontSize:18,fontWeight:700})),vc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24})),hc2=O.styled(O.Button)(({theme:e})=>({paddingTop:6,paddingBottom:6,paddingLeft:0,margin:0,marginBottom:4,marginTop:4,width:"100%",display:"block",cursor:"pointer",color:e.palette.grey[600],textAlign:"left",fontWeight:400,fontSize:14,"> span":{color:e.palette.error.main}})),Cc2=O.styled(Kce)(()=>({height:1,"& .simplebar-content":{height:1}})),bc2=O.styled(O.Stack)(()=>({position:"fixed",width:"202px"})),yc2=({title:e,sections:t,headerLeftContent:n,headerRightContent:a,onClickBack:r})=>d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",children:[d.jsx(sc2,{children:d.jsx(Cc2,{children:d.jsxs(bc2,{children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",fontWeight:700,children:"ACESSO RÁPIDO"}),t.map((u,c)=>d.jsxs(O.Stack,{children:[d.jsxs(hc2,{onClick:()=>{u.ref.current&&u.ref.current.scrollIntoView({block:"start",behavior:"smooth"})},children:[u.title,u.isRequired&&d.jsx("span",{children:"*"})]}),c<t.length-1&&d.jsx(O.Divider,{})]},c))]})})}),d.jsxs(O.Stack,{width:"100%",alignItems:"center",mb:8,children:[d.jsx(dc2,{children:d.jsxs(gc2,{children:[d.jsxs(O.Stack,{flexDirection:"row",gap:2,alignItems:"center",children:[d.jsx(O.IconButton,{color:"primary",onClick:()=>r(),children:d.jsx(Ce,{icon:"CHEVRON_LEFT"})}),d.jsx(O.Typography,{variant:"h4",children:e}),n]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",minWidth:"max-content",children:[d.jsx(LSn,{disabled:!0}),a]})]})}),d.jsx(_c2,{children:t.map(u=>d.jsxs(O.Stack,{paddingTop:3,paddingBottom:2,alignItems:"start",width:"100%",children:[d.jsx(mc2,{ref:u.ref,children:u.title}),d.jsx(vc2,{children:u.subTitle}),d.jsx(IGn,{width:"100%",borderRadius:1,gap:1.5,padding:3,children:u.child})]},u.title))})]})]})}),pc2=O.styled(O.Box)(({theme:e})=>({padding:24,borderRadius:8,height:"auto",maxWidth:800,backgroundColor:e.palette.background.default,border:`1px solid ${e.palette.grey[300]}`})),Oc2=O.styled(O.Stack)(({theme:e})=>({minHeight:180,maxWidth:700,border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff",padding:24})),jc2=O.styled(O.Box)(()=>({maxWidth:70,maxHeight:40,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),wc2=O.styled(O.Box)(({theme:e})=>({backgroundColor:e.palette.background.default,maxWidth:90,maxHeight:80,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),WGn=O.styled(O.Stack)(({theme:e})=>({border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff"})),Mc2=O.styled(O.Box)(({theme:e})=>({width:"auto",height:120,overflow:"hidden",padding:2,borderBottom:`4px dotted ${e.palette.grey[300]}`})),Lc2=({titlePreview:e,logoImage:t,brandingName:n,url:a,title:r,description:u,keyWords:c,customTitles:l,productImage:f,child:s,previewLinkImage:g,hasPreviewLink:_})=>d.jsx(pc2,{children:d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e??"PRÉ-VISUALIZAÇÃO"}),d.jsxs(Oc2,{children:[d.jsxs(O.Stack,{direction:"row",pb:3,gap:.5,children:[d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"error.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"warning.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"success.main"})})]}),d.jsxs(O.Stack,{flexDirection:"row",gap:2,justifyContent:"space-between",children:[d.jsxs(O.Stack,{gap:1,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",gap:1.5,pb:.5,children:[t&&d.jsx(jc2,{children:d.jsx("img",{alt:"Logo",src:t})}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"overline",color:"grey.600",pb:.5,children:n??"SUAEMPRESA"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:a??"https://www.exemplo.com"}),d.jsx(Ce,{icon:"MORE_OPTIONS_VERTICAL",width:15,color:"grey.500"})]})]})]}),d.jsx(tj,{variant:"subtitle1",color:"#4E5BEC",overflow:"hidden",textOverflow:"ellipsis",line:5,children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(tj,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:5,children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),c&&d.jsx(O.Stack,{direction:"row",gap:1,alignItems:"center",children:c.map((m,v)=>d.jsxs(d.Fragment,{children:[d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:m}),v<c.length-1&&d.jsx(O.Box,{width:4,height:16,children:d.jsx(Ce,{icon:"CIRCLE",color:"text.disabled",width:10})})]}))}),l&&d.jsx(O.Stack,{pt:2,children:l.map((m,v)=>d.jsxs(O.Stack,{gap:1,children:[d.jsx(O.Typography,{variant:"subtitle1",color:"#4E5BEC",children:m.title}),d.jsx(tj,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:1,children:m.description??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys stansince the 1500"})]},v))}),s]}),f&&d.jsx(wc2,{children:d.jsx("img",{alt:"ProductImage",src:f})})]})]}),_&&d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,width:"100%",children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:"pré-visualização link de compartilhamento".toUpperCase()}),d.jsxs(WGn,{children:[g&&d.jsx(Mc2,{children:d.jsx("img",{alt:"PreviewLinkImage",src:g,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:8}})}),d.jsxs(O.Stack,{gap:.2,p:2,width:"100%",children:[d.jsx(O.Typography,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.500",children:a??"https://www.exemplo.com"})]})]}),d.jsx(WGn,{children:d.jsxs(O.Stack,{direction:"row",gap:1,alignItems:"center",children:[d.jsx(O.Box,{width:100,height:95,bgcolor:"grey.100",p:.5,alignItems:"center",children:d.jsx("img",{alt:"Logo",src:t,style:{width:"100%",height:"100%",objectFit:"contain",borderRadius:8}})}),d.jsxs(O.Stack,{padding:1,gap:.2,width:"80%",children:[d.jsx(tj,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(tj,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(tj,{variant:"caption",color:"grey.500",line:1,children:a??"https://www.exemplo.com"})]})]})})]})]})}),Pc2=O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center",overflow:"hidden"})),Ec2=O.styled(O.Stack)(()=>({backgroundColor:"#F5F5F5",padding:8,width:"100%",justifyContent:"space-between",alignItems:"center",gap:12,"& .MuiInputBase-root":{backgroundColor:"#fff"}}));O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center"}));const kc2=O.styled(O.Collapse)(()=>({width:"100%",padding:"12px 16px"})),Sc2=({description:e,name:t,children:n,header:a,onDelete:r})=>{const[u,c]=xht(!0);return d.jsxs(Pc2,{children:[d.jsxs(Ec2,{direction:"row",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:1.5,flex:1,children:[d.jsx(O.IconButton,{edge:"end",onClick:c,children:d.jsx(Ce,{icon:u?"CHEVRON_UP":"CHEVRON_RIGHT"})}),d.jsx(O.Typography,{variant:"overline",color:"text.primary",children:t}),d.jsx(O.Typography,{variant:"overline",color:"text.secondary",children:e}),d.jsx(O.Stack,{flex:1,children:a})]}),d.jsx(O.IconButton,{color:"error",onClick:r,children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]}),d.jsx(kc2,{in:u,timeout:"auto",unmountOnExit:!0,children:n})]})},Dc2=O.styled(O.ToggleButtonGroup)(({theme:e})=>({button:{textTransform:"none"},"& .MuiToggleButton-primary:hover":{backgroundColor:`${e.palette.primary.dark}`,color:e.palette.primary.contrastText},"& button:not(.Mui-selected):hover":{backgroundColor:e.palette.primary.lighter,color:e.palette.primary.main},"& .Mui-selected":{backgroundColor:`${e.palette.primary.main} !important`,color:`${e.palette.primary.contrastText} !important`}})),Bc2=e=>d.jsx(Dc2,{...e}),Ic2=O.styled(O.Card,{shouldForwardProp:e=>e!=="active"})(({theme:e,active:t})=>({boxShadow:"none",cursor:"pointer",borderRadius:8,borderStyle:"solid",borderWidth:1.5,borderColor:t?e.palette.primary.main:e.palette.grey[300],color:e.palette.primary.main,backgroundColor:t?O.alpha(e.palette.primary.main,.04):"white","&:hover":{borderColor:e.palette.primary.main}})),$Gn=({title:e,action:t,loading:n,items:a,values:r,onChange:u})=>{const[c,l]=o.useState(),f=h=>r.includes(h),s=c?a.filter(h=>h.title.toLowerCase().includes(c.toLowerCase())):a,g=h=>{const b=f(h.value);let p;b?p=r.filter(y=>y!==h.value):p=[...r,h.value],u(p)},_=()=>{r.length===a.length?u([]):u(a.map(h=>h.value))},m=new Intl.PluralRules("pt-BR"),v=new Map([["one","selecionado"],["other","selecionados"]]),C=h=>{const b=m.select(h),p=v.get(b);return`${h} ${p}`};return d.jsxs(O.Stack,{gap:1.5,height:450,children:[d.jsxs(O.Stack,{direction:"row",justifyContent:"space-between",children:[typeof e=="string"?d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e}):e,d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:r.length===0?"nenhum selecionado":C(r.length)})]}),d.jsxs(O.Stack,{direction:"row",alignItems:"center",spacing:1.5,children:[d.jsx(NCt,{fullWidth:!0,size:"small",iconPosition:"start",placeholder:"Buscar",trigger:"change",onSearch:h=>l(h),onKeyDown:h=>{h.key==="Enter"&&h.preventDefault()}}),t?d.jsx(d.Fragment,{children:t}):d.jsx(O.Button,{onClick:_,size:"small",children:d.jsx(O.Typography,{variant:"overline",children:"TODOS"})})]}),d.jsx(Kce,{children:d.jsx(O.Stack,{flex:1,mb:2,children:d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",mt:3,children:d.jsx(O.CircularProgress,{})}),isEmpty:a.length===0,empty:d.jsx(amt,{sx:{svg:{height:140}},text:c?`Não foi possivel encontrar o item "${c}"`:"Nenhum item disponível"}),children:d.jsx(O.Grid,{container:!0,spacing:1.5,children:s.map(h=>d.jsx(O.Grid,{item:!0,xs:4,children:d.jsx(Ic2,{active:f(h.value),onClick:()=>g(h),children:d.jsxs(O.Stack,{padding:1.5,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[d.jsx(O.Typography,{color:f(h.value)?"primary.main":"text.primary",variant:"subtitle2",textAlign:"left",noWrap:!0,children:h.title}),f(h.value)&&d.jsx(Ce,{icon:"CHECK_CIRCLE",width:24})]}),h.options.map(b=>d.jsx(O.Typography,{mt:1,variant:"body2",color:"text.disabled",fontSize:12,textAlign:"left",noWrap:!0,children:`${b.label}: ${b.value}`},b.label))]})})},h.title))})})})})]})},fn=({name:e,helperText:t,rules:n,onChange:a,tabIndex:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{ref:l,...f},fieldState:{error:s}})=>d.jsx(O.TextField,{...f,onChange:g=>{f.onChange(g),a&&a(g)},inputRef:l,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||t,...u,inputProps:{...u.inputProps,tabIndex:r}})})},Wc2=O.styled(O.IconButton)(({theme:e})=>({svg:{color:`${e.palette.primary.main} !important`}}));O.styled(O.IconButton)(()=>({height:"38px",alignSelf:"center"}));const $c2=O.styled(O.Typography)(()=>({textDecoration:"underline",fontWeight:"600",cursor:"pointer"})),xc2=O.styled(O.Alert)(({theme:e})=>({backgroundColor:`${O.alpha(e.palette.primary.main,.03)}`,border:`1px solid ${O.alpha(e.palette.primary.main,.4)}`,flexDirection:"row",alignItems:"center",padding:"2px 12px",gap:8,borderRadius:8,marginBottom:16,"& svg":{color:e.palette.primary.main}})),zc2=()=>{const e=()=>{const t="https://ajuda.zydon.com.br/pt-BR/articles/9180603-sobre-webhooks";window.open(t,"_blank")};return d.jsx(xc2,{severity:"info",children:d.jsxs(O.Typography,{color:"grey",variant:"caption",children:["Webhooks permitem que serviços externos sejam notificados quando determinados eventos acontecem. Saiba mais"," ",d.jsx($c2,{variant:"caption",color:"primary",onClick:()=>e(),children:"acessando a documentação do Webhook"})]})})},Hc2=[{label:"XML",value:"XML"},{label:"JSON",value:"JSON"},{label:"BYTEA",value:"BYTEA"}],Ac2=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"}],Rc2=({webhookData:e,isEditing:t=!1,haveTip:n=!1})=>{const{control:a}=Be.useFormContext(),{fields:r,append:u,remove:c}=Be.useFieldArray({name:"headers",control:a}),l=()=>{u({value:"",name:""})};return d.jsxs(d.Fragment,{children:[n&&d.jsx(zc2,{}),t&&d.jsx(fn,{name:"name",label:"Nome do webhook"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(fn,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url é obrigatório"}}}),d.jsx(fn,{name:"filter",label:"Filtro"})]}),t&&e&&d.jsxs(d.Fragment,{children:[d.jsx(fn,{variant:"filled",name:"solution",label:"Solução",disabled:!0}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(fn,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),d.jsx(fn,{variant:"filled",name:"resourceID",label:"ID origem",disabled:!0,InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(Wc2,{onClick:()=>navigator.clipboard.writeText(e.resource_id),children:d.jsx(Ce,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),d.jsx(fn,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(KCt,{fullWidth:!0,options:Hc2,name:"content_type",label:"Tipo de conteúdo",required:!0,rules:{required:{value:!0,message:"Campo Tipo de conteúdo é obrigatório"}}}),d.jsx(KCt,{fullWidth:!0,options:Ac2,name:"http_method",label:"Método HTTP",required:!0,rules:{required:{value:!0,message:"Campo Método HTTP é obrigatório"}}})]}),d.jsx(O.Typography,{variant:"overline",color:"grey",children:"Cabeçalho"}),r==null?void 0:r.map((f,s)=>d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(fn,{name:`headers.${s}.name`,label:"Chave",required:!0,rules:{required:{value:!0,message:""}}}),d.jsx(fn,{name:`headers.${s}.value`,label:"Valor"}),d.jsx(O.IconButton,{color:"error",onClick:()=>c(s),children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]},f.id)),d.jsx(FRn,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>l(),children:"Adicionar novo cabeçalho"}),d.jsx(O.Divider,{})]})},KCt=({name:e,helperText:t,rules:n,onSelectOption:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx(jSn,{...c,...r,onChange:f=>{a&&a(f,c.value),c.onChange(f)},error:!!l,helperText:(l==null?void 0:l.message)||t})})},xGn=({name:e,helperText:t,rules:n,onChange:a,error:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{name:l,onChange:f,value:s,ref:g},fieldState:{error:_}})=>d.jsx(JBn,{ref:g,...u,name:l,value:s,error:r||!!_,helperText:(_==null?void 0:_.message)||t,onChange:({target:{value:m}})=>{a&&a(m),f(m)}})})},Vc2=({name:e,containerProps:t,required:n,rules:a,tabIndex:r})=>{const u=`${e}.zipCode`,c=`${e}.publicPlace`,l=`${e}.number`,f=`${e}.district`,s=`${e}.complement`,g=`${e}.state`,_=`${e}.city`,m=v=>{v.key==="Enter"&&v.preventDefault()};return d.jsxs(O.Stack,{gap:1.5,...t,children:[d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(xGn,{name:u,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.CircularProgress,{size:24})})},rules:a,onKeyDown:m,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:r}),d.jsxs(O.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[d.jsx(fn,{name:c,label:"Logradouro",onKeyDown:m,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:r}),d.jsx(fn,{name:l,label:"Número",onKeyDown:m,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:r})]})]}),d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(fn,{name:f,label:"Bairro",onKeyDown:m,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:r}),d.jsx(fn,{name:s,label:"Complemento",onKeyDown:m,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:r})]}),d.jsxs(O.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[d.jsx(KCt,{name:g,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:r}),d.jsx(fn,{name:_,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:r})]})]})},Fc2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:t,render:({field:u,fieldState:{error:c}})=>d.jsx(MSn,{...u,...a,onChange:l=>{u.onChange(l)},error:!!c,helperText:(c==null?void 0:c.message)||n})})},Nc2=({name:e,rules:t,helperText:n,tabIndex:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:t,render:({field:c,fieldState:{error:l}})=>d.jsxs("div",{children:[d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{...c,checked:c.value,tabIndex:a}),...r}),(!!l||n)&&d.jsx(O.FormHelperText,{error:!!l,children:l?l==null?void 0:l.message:n})]})})},Tc2=({row:e,name:t,rules:n,label:a,options:r,spacing:u,helperText:c,required:l,...f})=>{const{control:s}=Be.useFormContext(),g=(_,m)=>_.includes(m)?_.filter(v=>v!==m):[..._,m];return d.jsx(Be.Controller,{name:t,control:s,rules:n,render:({field:{value:_=[],...m},fieldState:{error:v}})=>d.jsxs(O.FormControl,{component:"fieldset",children:[a&&d.jsx(O.FormLabel,{component:"legend",sx:{typography:"body2"},required:l,children:a}),d.jsx(O.FormGroup,{sx:{...e&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:u||0},...e&&{mr:0,"&:not(:last-of-type)":{mr:u||2}}}},children:r.map(C=>d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{checked:_.includes(C.value),onChange:()=>m.onChange(g(_,C.value))}),label:C.label,...f},C.value))}),(!!v||c)&&d.jsx(O.FormHelperText,{error:!!v,sx:C=>({color:f.disabled?C.palette.grey[500]:void 0}),children:v?v==null?void 0:v.message:c})]})})},Zc2=({keyName:e,inputs:t=[],rules:n,tabIndex:a,...r})=>{const u=o.useRef(null),{control:c,setValue:l,formState:{errors:f}}=Be.useFormContext(),s=m=>{const v=m.clipboardData.getData("text").split("");t.map((C,h)=>l(C,v[h])),m.preventDefault()},g=(m,v)=>{const{maxLength:C,value:h,name:b}=m.target,p=b.replace(e,""),y=Number(p),M=document.querySelector(`input[name=${e}${y+1}]`);h.length>C&&(m.target.value=h[0]),h.length>=C&&y<6&&M!==null&&M.focus(),v(m)};W_t("paste",s,u);const _=t.some(m=>f[m]);return d.jsxs(O.Stack,{children:[d.jsx(O.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:u,children:t.map((m,v)=>d.jsx(Be.Controller,{name:`${e}${v+1}`,control:c,rules:n,render:({field:C,fieldState:{error:h}})=>d.jsx(O.TextField,{...r,...C,autoComplete:"none",error:!!h,autoFocus:v===0,placeholder:"-",onChange:b=>{g(b,C.onChange)},onFocus:b=>b.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:a}})},m))}),_&&d.jsx(O.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},Uc2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:{...t,validate:{...t==null?void 0:t.validate,validation:u=>{const c="#"+u.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(c)?!0:"Cor inválida"}}},render:({field:{ref:u,onChange:c,...l},fieldState:{error:f}})=>d.jsx(aTn,{...l,onChangeColor:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||n,...a})})},Gc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.DatePicker,{inputRef:l,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Yc2=({name:e,label:t,rules:n,tabIndex:a,helperText:r,required:u,...c})=>{const{control:l,setError:f}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:l,rules:n,render:({field:{value:s,onChange:g},fieldState:{error:_}})=>d.jsx(kT.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...c.localeText},value:[(s==null?void 0:s.startDate)||null,(s==null?void 0:s.endDate)||null],onChange:m=>g({startDate:m[0],endDate:m[1]}),onError:m=>{f(e,{message:m[0]||m[1]||void 0})},...c,slotProps:{textField:({position:m})=>{var v;return{...(v=c.slotProps)==null?void 0:v.textField,required:u,error:!!_,helperText:(_==null?void 0:_.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:m==="start"?`${t} (Dt. Início)`:`${t} (Dt. Fim)`,inputProps:{tabIndex:a}}}},sx:{width:1}})})},Kc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:l,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Xc2=({id:e,children:t,onSubmit:n,methods:a,...r})=>d.jsx(Be.FormProvider,{...a,children:d.jsx(O.Stack,{component:"form",id:e,onSubmit:n,flex:1,width:1,noValidate:!0,...r,children:t})}),Qc2=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:n,render:({field:{ref:u,value:c,...l},fieldState:{error:f}})=>d.jsx(YBn,{value:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||t,...a,...l,name:e})})},Jc2=({name:e,label:t="",rules:n,helperText:a,changed:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:l,fieldState:{error:f}})=>d.jsx(O.Autocomplete,{...l,onChange:(s,g)=>{r&&r(g),l.onChange(g)},renderInput:s=>d.jsx(O.TextField,{label:t,error:!!f,helperText:f?f==null?void 0:f.message:a,...s}),...u})})},qc2=({name:e,helperText:t,rules:n,onChange:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx($Ct,{...c,onChange:f=>{c.onChange(f),a&&a(f)},fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||t,...r})})},el2=({name:e,sx:t,rules:n,passwordSize:a,specialCharacter:r,upperCaseChar:u,numberChar:c,showErrorMessage:l,match:f,...s})=>{const{watch:g}=Be.useFormContext(),_=g(e),[m,v]=o.useState(!1),{hasNumberChar:C,hasSpecialCharacter:h,hasUpperCaseChar:b,isLengthValid:p}=RCt(_,a,c,r,u);return d.jsx(fn,{...s,name:e,type:m?"text":"password",InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.IconButton,{onClick:()=>v(!m),edge:"end","aria-label":"Mostrar/Ocultar senha",tabIndex:-1,children:d.jsx(Ce,{icon:m?"VIEW_ON":"VIEW_OFF"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:y=>{const M=RCt(y,a,c,r,u);return!M.hasNumberChar||!M.hasSpecialCharacter||!M.hasUpperCaseChar||!M.isLengthValid?"Senha inválida":f&&f.fieldPassword&&g(f.fieldPassword)!==y?"As senhas devem ser iguais":!0}}},sx:{...t,"& .MuiFormHelperText-root":{display:(!h||!b||!p||!C)&&!l?"none":void 0}}})},tl2=({name:e,rules:t,row:n,label:a,options:r,spacing:u,helperText:c,decorated:l,onChange:f,tabIndex:s,required:g,disabled:_,...m})=>{const{control:v}=Be.useFormContext(),C=a?`${e}-${a}`:"";return d.jsx(Be.Controller,{name:e,control:v,rules:t,render:({field:h,fieldState:{error:b}})=>d.jsxs(O.FormControl,{component:"fieldset",sx:{...l&&{paddingLeft:1.5}},children:[a&&d.jsx(O.FormLabel,{component:"legend",id:C,sx:{typography:"body2"},required:g,children:a}),d.jsx(O.RadioGroup,{...m,...h,onChange:(p,y)=>{h.onChange(p),f&&f(p,y)},"aria-labelledby":C,row:n,children:r.map(p=>d.jsx(O.FormControlLabel,{value:p.value,control:d.jsx(O.Radio,{inputProps:{tabIndex:s},disabled:_,checked:p.value===h.value,icon:p.icon,checkedIcon:p.icon}),label:p.label,sx:({palette:y})=>({"&:not(:last-of-type)":{mb:u||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:u||2}},...l&&{border:`1px solid ${O.alpha(y.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(u||0)/2||1,...h.value===p.value&&{borderColor:"primary.main",backgroundColor:O.alpha(y.primary.main,.05)}}})},p.value))}),(!!b||c)&&d.jsx(O.FormHelperText,{error:!!b,sx:p=>({color:_?p.palette.grey[500]:void 0}),children:b?b==null?void 0:b.message:c})]})})},nl2=({name:e,helperText:t,onChange:n,tabIndex:a,size:r,label:u,...c})=>{const{control:l}=Be.useFormContext(),f=s=>d.jsx(O.Switch,{...s,checked:s.value,onChange:(g,_)=>{s.onChange(g),n&&n(g,_)},inputProps:{tabIndex:a},size:r});return d.jsx(Be.Controller,{name:e,control:l,render:({field:s,fieldState:{error:g}})=>d.jsxs("div",{children:[u?d.jsx(O.FormControlLabel,{label:u,control:f(s),...c}):f(s),(!!g||t)&&d.jsx(O.FormHelperText,{error:!!g,sx:_=>({mx:"14px",color:c.disabled?_.palette.grey[500]:void 0}),children:g?g==null?void 0:g.message:t})]})})},rl2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.TimePicker,{ampm:!1,format:"HH:mm",inputRef:l,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,error:!!s,required:r,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},al2=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,cropModalOpen:v,cancelChanges:C,saveChanges:h,previewImage:b,setCropper:p,preview:y,closePreviewImage:M}=SGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(O.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[c&&d.jsx(tc2,{}),d.jsx(kGn,{...s,id:g,file:l,onDrop:E=>{if(E.length>0){_(!0);const L=new FileReader;L.addEventListener("load",()=>{var k;const w=((k=L.result)==null?void 0:k.toString())||"";t(w),e(void 0)}),L.readAsDataURL(E[0])}},image:u,tabIndex:f})]}),d.jsx(DGn,{id:g,open:v,onClose:C,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:h,onPreview:b,onInitialized:p}),d.jsx(O.Dialog,{open:!!y,onClose:M,scroll:"body",PaperProps:{sx:{p:2}},children:y&&d.jsx("img",{src:y,alt:"Preview"})})]})};function zGn(e,t){const{watch:n,setValue:a}=Be.useFormContext(),[r,u]=o.useState(t),c=n(e)||[];return{uploadFile:async m=>{if(!m){a(e,void 0),u(void 0);return}a(e,m),u(Object.assign(m,{preview:URL.createObjectURL(m)}))},uploadFiles:async m=>{a(e,[...c,...m.map(v=>Object.assign(v,{preview:URL.createObjectURL(v)}))])},handleDeleteFile:()=>{a(e,void 0),u(void 0)},handleRemoveAll:()=>{a(e,void 0)},handleRemove:m=>{const v=c.filter(C=>C!==m);a(e,v)},file:r,setFileValue:u}}const il2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=zGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(al2,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},ol2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=zGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(BGn,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},HGn=O.styled(O.Button)(({theme:e})=>({borderColor:e.palette.grey[300]})),AGn=O.styled(O.Box)(({theme:e})=>({display:"flex",border:`1.5px solid ${e.palette.grey[300]}`,height:450,borderRadius:8,flex:1,overflow:"hidden"})),ul2=({selectedItems:e,items:t,loading:n,searchText:a,onAdd:r,onRemove:u,search:c,itemsTitle:l,selectedItemsTitle:f,additionalContent:s,enableSearchInSelectedItems:g,onSearch:_})=>{const[m,v]=o.useState(""),C=O.debounce(_,400),h=t.filter(W=>!e.some(z=>z.id===W.id)),b=e.filter(W=>{var z;return(z=W.name)==null?void 0:z.toLowerCase().includes(m.toLowerCase())}),p=g?b:t.filter(W=>e.some(z=>z.id===W.id)),[y,M]=o.useState([]),[E,L]=o.useState([]),w=()=>{r(y),M([])},k=()=>{u(E),L([])},D=W=>{L(W?p:[])},S=W=>{M(W?h:[])},I=(W,z)=>{L(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},A=(W,z)=>{M(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},F=W=>{W.key==="Enter"&&W.preventDefault()};return d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:3,children:[d.jsx(AGn,{flex:1,children:d.jsxs(O.Stack,{flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:y.length>0&&y.length!==h.length,checked:y.length>0&&y.length===h.length,onChange:W=>S(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${l} cadastrados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${y.length}/${h.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,children:[d.jsx(NCt,{iconPosition:"start",placeholder:"Buscar",onKeyDown:F,size:"small",fullWidth:!0,trigger:"change",onSearch:W=>C(W)}),s]}),d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:h.length===0,empty:d.jsx(amt,{text:c?`Nenhum ${a} encontrado`:`Nenhum ${a} disponível`,sx:{svg:{height:140}}}),children:d.jsx(Kce,{sx:{maxHeight:280},children:h.map(W=>d.jsxs(O.Stack,{gap:1,marginTop:"8px",children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:y.includes(W),onChange:z=>A(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})}),d.jsxs(O.Stack,{gap:3,children:[d.jsx(HGn,{variant:"outlined",onClick:w,children:d.jsx(Ce,{icon:"ARROW_RIGHT_SIMPLE"})}),d.jsx(HGn,{variant:"outlined",onClick:k,children:d.jsx(Ce,{icon:"ARROW_LEFT_SIMPLE"})})]}),d.jsx(AGn,{flex:1,children:d.jsxs(O.Stack,{flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:E.length>0&&E.length!==p.length,checked:E.length>0&&E.length===p.length,onChange:W=>D(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${f} selecionados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${E.length}/${p.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,gap:1,overflow:"hidden",children:[g&&d.jsx(NCt,{iconPosition:"start",placeholder:"Buscar",size:"small",fullWidth:!0,trigger:"change",onSearch:W=>v(W??""),onKeyDown:F}),d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:p.length===0,empty:d.jsx(amt,{text:m?`Nenhum ${a} encontrado`:`Nenhum ${a} selecionado`,sx:{svg:{height:140},marginTop:"56px",backgroundColor:"transparent"}}),children:d.jsx(Kce,{sx:{maxHeight:280},children:p.map(W=>d.jsxs(O.Stack,{gap:1,children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:E.includes(W),onChange:z=>I(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})})]})})},cl2=({name:e,rules:t,...n})=>{const{control:a}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:a,rules:t,render:({field:r})=>d.jsx($Gn,{...r,...n})})},ll2=Object.freeze(Object.defineProperty({__proto__:null,default:jtr},Symbol.toStringTag,{value:"Module"}));R.ActionButton=FRn,R.Address=Vc2,R.Autocomplete=jSn,R.AutocompleteDetailed=MSn,R.AutocompleteDetailedField=Fc2,R.AutocompleteField=KCt,R.BuilderLayout=VBo,R.BuilderSidebar=hAo,R.Carousel=jko,R.CarouselArrowIndex=Rko,R.CarouselArrows=Eko,R.CarouselDots=Pko,R.Checkbox=Nc2,R.Codes=Zc2,R.ColorPickerField=Uc2,R.ColorPickerInput=aTn,R.ColoredLabel=bAo,R.Common=B12,R.CommonSSR=W12,R.Confirm=$12,R.CustomAvatar=wSn,R.CustomAvatarGroup=tVn,R.DataGrid=A12,R.DatePicker=Gc2,R.DateRangePicker=Yc2,R.DateTimePicker=Kc2,R.Delayed=R12,R.DialogAnimate=Ktr,R.Drawer=Q12,R.EmptyContent=fAn,R.EmptyView=amt,R.Error=q12,R.ExpandableGroup=Sc2,R.FabButtonAnimate=gzn,R.Field=fn,R.FixedProgressBar=yCt,R.Form=Xc2,R.FrameSkeleton=yc2,R.HelpButton=LSn,R.Icon=Ce,R.IconButtonAnimate=_zn,R.Iconify=TZn,R.IllustrationEmptyContent=WWn,R.ImageCrop=jUn,R.Incrementer=YBn,R.IncrementerField=Qc2,R.Label=zUn,R.Lightbox=FDo,R.LoadingScreen=Po2,R.MaskedInput=JBn,R.MaskedInputField=xGn,R.MaterialDesignContent=Tyt,R.MenuPopover=GUn,R.Modal=YUn,R.ModalActions=Yo2,R.MotionContainer=lnr,R.MotionLazyContainer=$yt,R.MotionViewport=cnr,R.MultiCheckbox=Tc2,R.MultipleChipField=Jc2,R.NoData=$Wn,R.NumberInput=$Ct,R.NumberInputField=qc2,R.PasswordField=el2,R.PasswordRules=t22,R.PopoverSelect=oc2,R.Portal=KUn,R.RadioGroupField=tl2,R.Result=VCt,R.SavedChanges=j22,R.Scrollbar=Kce,R.SearchInput=NCt,R.SelectableCards=$Gn,R.SelectableCardsField=cl2,R.SeoPreview=Lc2,R.SnackbarContent=Nyt,R.SnackbarProvider=Vzn,R.SplashScreen=w22,R.Steps=P22,R.StyledTab=E22,R.StyledTabs=k22,R.Summary=fc2,R.SwapList=ul2,R.Switch=nl2,R.TRANSITION=xWn,R.TabPanel=S22,R.TableEmptyRows=Gko,R.TableHeadCustom=Kko,R.TableNoData=Zko,R.TablePaginationCustom=Qko,R.TableSelectedAction=Xko,R.TableSkeleton=Uko,R.TextAnimate=Xtr,R.TextMaxLine=tj,R.ThemeProvider=nZn,R.TimePicker=rl2,R.ToggleButtonGroup=Bc2,R.Transition=Hvt,R.Upload=EGn,R.UploadAvatar=kGn,R.UploadAvatarWithCropField=il2,R.UploadBox=Ju2,R.UploadIllustration=IWn,R.UploadWithCrop=BGn,R.UploadWithCropField=ol2,R.Webhook=Rc2,R.WhiteBox=IGn,R.color=sr2,R.compare=tAo,R.cssStyles=Hko,R.emptyRows=Vko,R.file=n22,R.formatNumber=to2,R.formatTime=_22,R.getComparator=Fko,R.loadable=O22,R.m=rn,R.mask=y22,R.number=Ki2,R.routes=v22,R.sort=b22,R.useActiveElement=FBo,R.useApiMessage=fAo,R.useCarousel=wko,R.useCopyToClipboard=NBo,R.useDatagrid=TBo,R.useDeepCompareEffect=rAo,R.useEventCallback=GSn,R.useEventListener=W_t,R.useIsMounting=iAo,R.useIsomorphicLayoutEffect=qVn,R.useLightBox=ZDo,R.useLocalStorage=gAo,R.useOffSetTop=lAo,R.useOnClickOutside=cAo,R.usePagination=uAo,R.usePopover=USn,R.useResponsive=Wyt,R.useSnackbar=Fzn,R.useTable=Nko,R.useTabs=oAo,R.useToggle=xht,R.uuidv4=p22,R.validators=Jo2,R.varBgColor=dQn,R.varBgKenburns=gQn,R.varBgPan=_Qn,R.varBounce=lQn,R.varContainer=lvt,R.varFade=VT,R.varFlip=oQn,R.varHover=sQn,R.varPath=rQn,R.varRotate=fQn,R.varScale=cQn,R.varSlide=uQn,R.varTranEnter=$e,R.varTranExit=Ne,R.varTranHover=aQn,R.varZoom=iQn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|