adpro-react 0.0.43 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),y=require("react"),p=require("@mui/material"),ke=require("axios"),W=require("@mui/icons-material"),Ze=require("@mui/icons-material/ArrowDropDown"),Ge=require("@mui/icons-material/ArrowDropUp"),pe=require("@mui/material/colors"),D=require("@sinco/react"),K=require("@mui/x-date-pickers-pro"),R=require("dayjs"),Ye=require("dayjs/plugin/customParseFormat"),Ke=require("@mui/icons-material/TodayOutlined"),Qe=require("@mui/icons-material/EventOutlined"),Xe=require("@mui/icons-material/CheckCircleRounded"),fe=require("@mui/material/Snackbar"),Me=require("zustand"),Je=require("@mui/icons-material/WarningRounded"),et=require("@mui/icons-material/ErrorRounded"),tt=require("@mui/icons-material/InfoRounded"),me=require("@mui/material/IconButton"),ge=require("@mui/icons-material/Close"),nt=require("zustand/middleware"),it=require("@mui/x-data-grid-pro"),rt=require("@mui/x-data-grid-pro/locales");let U=`${window.location.href.split("#")[0].toLowerCase().split("v3")[0]}v3/adpro/api`;const Pe={async Send(e){const{serviceUrl:t,body:n,method:i="get",defaultToken:s=!0,srm:c,core:a}=e;let{headers:l}=e;window.parent.location.href.includes("localhost")&&(a?U="http://localhost:3500/core/api":U="http://localhost:3500");const f=ke.create({baseURL:c?`${U.toLowerCase().replace("/adpro/","/srm/")}`:a?`${U.toLowerCase().replace("/adpro/api","/adpro/core/api")}`:U});return l=l||{},s&&(l.Authorization=await se(window),l["X-SincoERP-Authorization"]=Q(window)),await f[i](t,ot(n,i,l),{headers:l,validateStatus:function(d){return d<400}}).then(function(d){const{data:x,status:S}=d;return x||{data:null,httpCode:S,message:"Transacción exitosa",success:!0}}).catch(d=>{throw{data:d,httpCode:500,message:"Ha ocurrido un error en la petición",success:!1}})}},ot=(e,t,n)=>{const i=e;for(const s in e)e[s]===""&&(e[s]=null);return t==="get"||t==="delete"?{params:i,headers:n,data:i}:i},se=async e=>window.parent.location.href.includes("localhost")?(U="http://localhost:3500",`Bearer ${(await ke.get(`${U}/token`)).data}`):typeof e.getToken=="function"?e.getToken():e.parent&&e.parent!==e?typeof e.parent.getToken=="function"?e.parent.getToken():await se(e.parent):"",Q=e=>{try{if(!e)return"";if(typeof e.getTokenAuth=="function")return e.getTokenAuth()||"";if(e.opener&&e.opener.parent&&e.opener.parent!==e)return Q(e.opener.parent);if(e.parent&&e.parent!==e)return Q(e.parent)}catch{}return""},st=800,xe=20,at=(e,t,n)=>e[t]!=="-1"&&e[t]!=="0"&&e[t]!==-1?e:n&&(n[t]==="-1"||n[t]===-1)?n:e;function Re(e){const{type:t,action:n="search",value:i,inputValue:s,handleValue:c,labelKey:a,labelText:l,optionAll:f}=e,g=t==="request"?e.request:null,d=t==="list"?e.list:null,[x,S]=y.useState(()=>at(i,a,f)),[v,u]=y.useState(s||""),[r,h]=y.useState(d||[]),[m,b]=y.useState("input"),[T,w]=y.useState(!1),[C,j]=y.useState(!1);y.useEffect(()=>{t==="list"?_(r):n==="all"&&M(I=>_(I))},[]),y.useEffect(()=>{t==="list"||n==="all"?P(r):f?v!==""&&(m==="input"||m==="reset"||m==="selectOption")&&S(i):S(i)},[i]),y.useEffect(()=>{let I=null;return t==="request"&&n==="search"&&v&&m==="input"&&w(!0),n==="search"&&v&&m==="input"&&(I=setTimeout(()=>{M()},st)),()=>{w(!1),I&&clearTimeout(I)}},[v]),y.useEffect(()=>{d&&d.length>0?h(d):h([])},[d]);const _=y.useCallback(I=>{if(i){const A=i?i[a]:"",k=I.find(L=>L[a]==A);k&&(S(k),u(k[l]))}},[i,a,l]),P=y.useCallback(I=>{if(i){const A=i[a]||"",k=I.find(L=>L[a]==A);k&&(S(k),u(k[l]))}else S(null),u("")},[i,a,l]),M=y.useCallback((I,A)=>{if(g){if(t==="request"&&n==="search"&&w(!0),t==="request"&&n==="all"&&r.length>0)return;let k=A!==void 0?A.trim():v.trim();if((k===""||k==="-1")&&(k="_"),x&&x[l]===k&&n==="search"){h([x]),w(!1);return}g.body={[g.filterName||"filter"]:k},Pe.Send(g).then(L=>{if(L){let E=L;E.length===void 0?E=[]:E.length>xe&&(E=E.slice(0,xe)),h(E),I&&I(E)}w(!1)})}},[v,r,g,n,t]),N=I=>{I&&(S(I),c&&c(I))},q=y.useCallback(I=>{I?u(I):H()},[n,t]),V=y.useCallback(I=>{b(I)},[]);y.useEffect(()=>{if(t==="list"&&n==="search"&&m==="input"&&d)if(v.trim()==="")h(d);else{const I=d.filter(A=>String(A[l]).toLowerCase().includes(v.toLowerCase())||String(A[a]).toLowerCase().includes(v.toLowerCase()));h(I)}},[v]);const H=()=>{if(t==="request")f?c&&c(f):(S(null),c&&c(null)),u(""),h([]),M(void 0,"");else if(d)if(f){const I=d.find(A=>A[a]=="-1");I?(S(I),u(I[l]),c&&c(I)):(u(""),S(x||i),c&&c(x||i))}else{const I=i?i[a]:"",A=d.find(k=>k[a]==I);A?(S(A),u(A[l]),c&&c(A)):(u(""),S(x),c&&c(x))}};return y.useEffect(()=>{C?t==="request"&&M():(t==="list"&&n==="search"&&(S(x),u(x?x[l]:""),v===""&&h(d||[])),t==="request"&&(f?((m==="clear"||m==="blur")&&(i[a]==="-1"||i[a]===-1)&&(S(f),u(f[l]),c&&c(f)),m==="input"&&v===""&&(i[a]==="-1"||i[a]===-1)&&(S(f),u(f[l]),c&&c(f))):(S(x),u(x?x[l]:""))))},[C]),{dataList:r,loading:T,isFocused:C,autocompleteValue:x,textFieldValue:v,handleAutocompleteValue:N,handleTextFieldValue:q,handleReasonChangeTextField:V,setIsFocused:j,clearValues:H}}const X={...D.SincoTheme,components:{...D.SincoTheme.components,MuiTableHead:{styleOverrides:{root:{th:{padding:"0.2rem 0.5rem !important",borderBottom:"1px solid rgba(226, 227, 232, 1) !important",color:"text-primary",background:pe.grey[50]},"th .MuiButtonBase-root":{color:"text-primary",cursor:"pointer"},td:{borderLeft:"none"}}}},MuiTableBody:{styleOverrides:{root:{".MuiTableCell-root":{padding:"0.1rem 0.5rem !important"},".MuiTableRow-root:hover":{backgroundColor:pe.grey[100]}}}},MuiTableFooter:{styleOverrides:{root:{".MuiTableCell-footer":{padding:"2px 4px !important"}}}}}},Ee=e=>{const{label:t,helperText:n,inputRef:i,name:s,customTheme:c,required:a,error:l,placeholder:f,size:g,type:d,labelText:x,optionAll:S,showId:v,action:u}=e,{dataList:r,loading:h,isFocused:m,autocompleteValue:b,textFieldValue:T,handleAutocompleteValue:w,handleTextFieldValue:C,handleReasonChangeTextField:j,setIsFocused:_,clearValues:P}=Re(e),M=c||X,N=S?[S,...r]:r,{action:q,type:V,labelText:H,labelKey:I,handleValue:A,label:k,value:L,inputValue:E,required:le,error:J,helperText:ce,inputRef:de,name:ee,placeholder:B,customTheme:te,size:Ht,optionAll:Vt,showId:Zt,...$e}=e,{request:Gt,list:Yt,...He}=$e;return o.jsx(p.ThemeProvider,{theme:M,children:o.jsx(p.Autocomplete,{...He,filterOptions:z=>z,noOptionsText:"No se encontraron resultados.",options:N,onChange:(z,F)=>w(F),onInputChange:(z,F,ue)=>{C(F),j(ue)},getOptionLabel:e.getOptionLabel?e.getOptionLabel:z=>z?z[x]:"",renderOption:(z,F)=>{const{key:ue,...Ve}=z,Z=F[e.labelKey],he=Z==="-1"||Z===-1;return y.createElement(p.Box,{component:"li",...Ve,key:`${Z}-${F[e.labelText]}`,sx:{borderBottom:he?`${D.SincoTheme.palette.divider} 1px solid`:"inherit"}},v&&!he?`${Z} - ${F[e.labelText]}`:`${F[e.labelText]}`)},value:b,inputValue:T,loading:h,loadingText:"Consultando...",size:g,onBlur:()=>{_(!1)},renderInput:z=>o.jsx(p.TextField,{...z,label:t,value:T,error:l,helperText:n,placeholder:f,required:a,ref:i,name:s??"",size:g,onFocus:()=>{_(!0)},InputProps:{...z.InputProps,endAdornment:o.jsxs(o.Fragment,{children:[T&&d!=="list"?o.jsx(p.IconButton,{size:"small",onClick:P,sx:{height:"22px",width:"22px"},children:o.jsx(W.ClearRounded,{fontSize:"small",color:"action",sx:{height:"16px",width:"16px"}})}):null,h?o.jsx(p.CircularProgress,{color:"primary",size:20}):d==="list"||u==="all"&&d==="request"?m?o.jsx(Ge,{color:"action",fontSize:"small",sx:{height:"16px",width:"16px"}}):o.jsx(Ze,{color:"action",fontSize:"small",sx:{height:"16px",width:"16px"}}):o.jsx(W.SearchOutlined,{color:"action",fontSize:"small",sx:{height:"16px",width:"16px"}})]})}})})})};function ze(e){const{options:t,value:n,onSelected:i,labelKey:s,labelText:c,todos:a,disableAutoSelectTodos:l}=e,f=y.useMemo(()=>a?{[s]:"-1",[c]:"Todos"}:null,[a,s,c]),g=y.useMemo(()=>a&&f?[f,...t]:t,[a,f,t]),d=y.useMemo(()=>g.filter(v=>v[s]!=="-1"),[g,s]),x=n.length===d.length;return y.useEffect(()=>{a&&!l&&n.length===0&&d.length>0&&i(d)},[]),{updatedOptions:g,handleChange:(v,u)=>{if(!a||!f){i(u);return}const r=u.some(h=>h[s]===f[s]);i(r?x?[]:d:u)},isAllSelected:x}}const Le=({text:e,variant:t="body3",align:n,placement:i,color:s})=>{const c=y.useRef(null),[a,l]=y.useState(!1);y.useEffect(()=>{const g=c.current;g&&l(g.offsetWidth<g.scrollWidth)},[e]);const f=o.jsx(p.Typography,{variant:t,noWrap:!0,ref:c,textAlign:n,color:s,children:e});return a?o.jsx(p.ThemeProvider,{theme:D.SincoTheme,children:o.jsx(p.Tooltip,{title:e,arrow:!0,placement:i,children:f})}):f};function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},re.apply(null,arguments)}function Se(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},oe(e,t)}function lt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,oe(e,t)}var ve=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function ct(e,t){return!!(e===t||ve(e)&&ve(t))}function dt(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ct(e[n],t[n]))return!1;return!0}function ne(e,t){t===void 0&&(t=dt);var n,i=[],s,c=!1;function a(){for(var l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return c&&n===this&&t(l,i)||(s=e.apply(this,l),c=!0,n=this,i=l),s}return a}var ut=typeof performance=="object"&&typeof performance.now=="function",ye=ut?function(){return performance.now()}:function(){return Date.now()};function be(e){cancelAnimationFrame(e.id)}function ht(e,t){var n=ye();function i(){ye()-n>=t?e.call(null):s.id=requestAnimationFrame(i)}var s={id:requestAnimationFrame(i)};return s}var ie=-1;function Ce(e){if(e===void 0&&(e=!1),ie===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),ie=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ie}var $=null;function Te(e){if(e===void 0&&(e=!1),$===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var i=document.createElement("div"),s=i.style;return s.width="100px",s.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?$="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?$="negative":$="positive-ascending"),document.body.removeChild(t),$}return $}process.env.NODE_ENV;var pt=150,ft=function(t,n){return t},G=null,Y=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(G=new WeakSet,Y=new WeakSet);function mt(e){var t,n=e.getItemOffset,i=e.getEstimatedTotalSize,s=e.getItemSize,c=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,f=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=(function(x){lt(S,x);function S(u){var r;return r=x.call(this,u)||this,r._instanceProps=f(r.props,Se(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Se(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof r.props.initialScrollOffset=="number"?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=ne(function(h,m,b,T){return r.props.onItemsRendered({overscanStartIndex:h,overscanStopIndex:m,visibleStartIndex:b,visibleStopIndex:T})}),r._callOnScroll=void 0,r._callOnScroll=ne(function(h,m,b){return r.props.onScroll({scrollDirection:h,scrollOffset:m,scrollUpdateWasRequested:b})}),r._getItemStyle=void 0,r._getItemStyle=function(h){var m=r.props,b=m.direction,T=m.itemSize,w=m.layout,C=r._getItemStyleCache(g&&T,g&&w,g&&b),j;if(C.hasOwnProperty(h))j=C[h];else{var _=n(r.props,h,r._instanceProps),P=s(r.props,h,r._instanceProps),M=b==="horizontal"||w==="horizontal",N=b==="rtl",q=M?_:0;C[h]=j={position:"absolute",left:N?void 0:q,right:N?q:void 0,top:M?0:_,height:M?"100%":P,width:M?P:"100%"}}return j},r._getItemStyleCache=void 0,r._getItemStyleCache=ne(function(h,m,b){return{}}),r._onScrollHorizontal=function(h){var m=h.currentTarget,b=m.clientWidth,T=m.scrollLeft,w=m.scrollWidth;r.setState(function(C){if(C.scrollOffset===T)return null;var j=r.props.direction,_=T;if(j==="rtl")switch(Te()){case"negative":_=-T;break;case"positive-descending":_=w-b-T;break}return _=Math.max(0,Math.min(_,w-b)),{isScrolling:!0,scrollDirection:C.scrollOffset<_?"forward":"backward",scrollOffset:_,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(h){var m=h.currentTarget,b=m.clientHeight,T=m.scrollHeight,w=m.scrollTop;r.setState(function(C){if(C.scrollOffset===w)return null;var j=Math.max(0,Math.min(w,T-b));return{isScrolling:!0,scrollDirection:C.scrollOffset<j?"forward":"backward",scrollOffset:j,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(h){var m=r.props.outerRef;r._outerRef=h,typeof m=="function"?m(h):m!=null&&typeof m=="object"&&m.hasOwnProperty("current")&&(m.current=h)},r._resetIsScrollingDebounced=function(){r._resetIsScrollingTimeoutId!==null&&be(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ht(r._resetIsScrolling,pt)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}S.getDerivedStateFromProps=function(r,h){return gt(r,h),d(r),null};var v=S.prototype;return v.scrollTo=function(r){r=Math.max(0,r),this.setState(function(h){return h.scrollOffset===r?null:{scrollDirection:h.scrollOffset<r?"forward":"backward",scrollOffset:r,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},v.scrollToItem=function(r,h){h===void 0&&(h="auto");var m=this.props,b=m.itemCount,T=m.layout,w=this.state.scrollOffset;r=Math.max(0,Math.min(r,b-1));var C=0;if(this._outerRef){var j=this._outerRef;T==="vertical"?C=j.scrollWidth>j.clientWidth?Ce():0:C=j.scrollHeight>j.clientHeight?Ce():0}this.scrollTo(c(this.props,r,h,w,this._instanceProps,C))},v.componentDidMount=function(){var r=this.props,h=r.direction,m=r.initialScrollOffset,b=r.layout;if(typeof m=="number"&&this._outerRef!=null){var T=this._outerRef;h==="horizontal"||b==="horizontal"?T.scrollLeft=m:T.scrollTop=m}this._callPropsCallbacks()},v.componentDidUpdate=function(){var r=this.props,h=r.direction,m=r.layout,b=this.state,T=b.scrollOffset,w=b.scrollUpdateWasRequested;if(w&&this._outerRef!=null){var C=this._outerRef;if(h==="horizontal"||m==="horizontal")if(h==="rtl")switch(Te()){case"negative":C.scrollLeft=-T;break;case"positive-ascending":C.scrollLeft=T;break;default:var j=C.clientWidth,_=C.scrollWidth;C.scrollLeft=_-j-T;break}else C.scrollLeft=T;else C.scrollTop=T}this._callPropsCallbacks()},v.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&be(this._resetIsScrollingTimeoutId)},v.render=function(){var r=this.props,h=r.children,m=r.className,b=r.direction,T=r.height,w=r.innerRef,C=r.innerElementType,j=r.innerTagName,_=r.itemCount,P=r.itemData,M=r.itemKey,N=M===void 0?ft:M,q=r.layout,V=r.outerElementType,H=r.outerTagName,I=r.style,A=r.useIsScrolling,k=r.width,L=this.state.isScrolling,E=b==="horizontal"||q==="horizontal",le=E?this._onScrollHorizontal:this._onScrollVertical,J=this._getRangeToRender(),ce=J[0],de=J[1],ee=[];if(_>0)for(var B=ce;B<=de;B++)ee.push(y.createElement(h,{data:P,key:N(B,P),index:B,isScrolling:A?L:void 0,style:this._getItemStyle(B)}));var te=i(this.props,this._instanceProps);return y.createElement(V||H||"div",{className:m,onScroll:le,ref:this._outerRefSetter,style:re({position:"relative",height:T,width:k,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:b},I)},y.createElement(C||j||"div",{children:ee,ref:w,style:{height:E?"100%":te,pointerEvents:L?"none":void 0,width:E?te:"100%"}}))},v._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var r=this.props.itemCount;if(r>0){var h=this._getRangeToRender(),m=h[0],b=h[1],T=h[2],w=h[3];this._callOnItemsRendered(m,b,T,w)}}if(typeof this.props.onScroll=="function"){var C=this.state,j=C.scrollDirection,_=C.scrollOffset,P=C.scrollUpdateWasRequested;this._callOnScroll(j,_,P)}},v._getRangeToRender=function(){var r=this.props,h=r.itemCount,m=r.overscanCount,b=this.state,T=b.isScrolling,w=b.scrollDirection,C=b.scrollOffset;if(h===0)return[0,0,0,0];var j=a(this.props,C,this._instanceProps),_=l(this.props,j,C,this._instanceProps),P=!T||w==="backward"?Math.max(1,m):1,M=!T||w==="forward"?Math.max(1,m):1;return[Math.max(0,j-P),Math.max(0,Math.min(h-1,_+M)),j,_]},S})(y.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var gt=function(t,n){var i=t.children,s=t.direction,c=t.height,a=t.layout,l=t.innerTagName,f=t.outerTagName,g=t.width,d=n.instance;if(process.env.NODE_ENV!=="production"){(l!=null||f!=null)&&Y&&!Y.has(d)&&(Y.add(d),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var x=s==="horizontal"||a==="horizontal";switch(s){case"horizontal":case"vertical":G&&!G.has(d)&&(G.add(d),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+s+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(i==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(i===null?"null":typeof i)+'" was specified.'));if(x&&typeof g!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(g===null?"null":typeof g)+'" was specified.'));if(!x&&typeof c!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(c===null?"null":typeof c)+'" was specified.'))}},xt=mt({getItemOffset:function(t,n){var i=t.itemSize;return n*i},getItemSize:function(t,n){var i=t.itemSize;return i},getEstimatedTotalSize:function(t){var n=t.itemCount,i=t.itemSize;return i*n},getOffsetForIndexAndAlignment:function(t,n,i,s,c,a){var l=t.direction,f=t.height,g=t.itemCount,d=t.itemSize,x=t.layout,S=t.width,v=l==="horizontal"||x==="horizontal",u=v?S:f,r=Math.max(0,g*d-u),h=Math.min(r,n*d),m=Math.max(0,n*d-u+d+a);switch(i==="smart"&&(s>=m-u&&s<=h+u?i="auto":i="center"),i){case"start":return h;case"end":return m;case"center":{var b=Math.round(m+(h-m)/2);return b<Math.ceil(u/2)?0:b>r+Math.floor(u/2)?r:b}case"auto":default:return s>=m&&s<=h?s:s<m?m:h}},getStartIndexForOffset:function(t,n){var i=t.itemCount,s=t.itemSize;return Math.max(0,Math.min(i-1,Math.floor(n/s)))},getStopIndexForStartIndex:function(t,n,i){var s=t.direction,c=t.height,a=t.itemCount,l=t.itemSize,f=t.layout,g=t.width,d=s==="horizontal"||f==="horizontal",x=n*l,S=d?g:c,v=Math.ceil((S+i-x)/l);return Math.max(0,Math.min(a-1,n+v-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){var n=t.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="number")throw Error('An invalid "itemSize" prop has been specified. Value should be a number. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});const St=0,Ie=35,vt=20;function yt(e){const{data:t,index:n,style:i}=e,s=t[n],c={...i,top:i.top+St};return y.cloneElement(s,{style:c})}const Ne=y.createContext({}),bt=y.forwardRef(function(t,n){const i=y.useContext(Ne);return o.jsx("div",{ref:n,...t,...i})}),Ct=y.forwardRef(function(t,n){const{children:i,...s}=t,c=y.Children.toArray(i),a=c.length,l=Math.min(a,vt)*Ie;return o.jsx("div",{ref:n,children:o.jsx(Ne.Provider,{value:s,children:o.jsx(xt,{height:l,width:"100%",outerElementType:bt,itemSize:Ie,overscanCount:5,itemCount:a,itemData:c,children:yt})})})}),Tt=e=>{const{value:t,placeholder:n,labelKey:i,labelText:s,label:c,todos:a,showSelectedCount:l,customTheme:f,showId:g}=e,d=(r,h)=>h?"Todos":g?`${r[i]} - ${r[s]}`:String(r[s]),{isAllSelected:x,updatedOptions:S,handleChange:v}=ze(e),u=f||X;return o.jsx(p.ThemeProvider,{theme:u,children:o.jsx(p.Autocomplete,{multiple:!0,fullWidth:!0,limitTags:1,id:"checkboxes-multiselect",options:S,value:t,onChange:v,disableCloseOnSelect:!0,disableListWrap:!0,ListboxComponent:Ct,isOptionEqualToValue:(r,h)=>r[i]===h[i],getOptionLabel:r=>d(r,r[i]==="-1"),renderTags:r=>l?x?a?"Todos":`${r.length} seleccionados`:`${r.length} seleccionados`:o.jsx(o.Fragment,{}),renderOption:(r,h,{selected:m})=>{const{key:b,...T}=r,w=h[i]==="-1",C=w?x:m;return o.jsxs(p.MenuItem,{...T,sx:{borderBottom:a&&h[s]==="Todos"?"1px #0000001F solid":"",gap:1,padding:"7px 16px !important"},children:[o.jsx(p.Checkbox,{checked:C}),o.jsx(p.ListItemText,{children:o.jsx(Le,{text:d(h,w),variant:"body1",placement:"bottom"})})]},String(h[i]))},renderInput:r=>o.jsx(p.TextField,{...r,label:c,placeholder:l?"":n,fullWidth:!0}),onOpen:e.onOpen})})};R.extend(Ye);const we="DD/MM/YYYY",je=(e,t)=>{const n=e!==""?R(e,we):R().subtract(2,"month"),i=t!==""?R(t,we):R();return{defaultI:n,defaultF:i}},Fe=({defaultValue:e,onchange:t,onInvalidDate:n,clear:i})=>{const s=je((e==null?void 0:e.inicial)||"",(e==null?void 0:e.final)||""),[c,a]=y.useState([s.defaultI,s.defaultF]),[l,f]=y.useState(null);y.useEffect(()=>{if(i===!0){const{defaultI:S,defaultF:v}=je((e==null?void 0:e.inicial)||"",(e==null?void 0:e.final)||"");a([S,v])}},[i]);const g=S=>{const v=R(S[0]),u=R(S[1]),r=d([v,u]);a(S),r==""?f(""):(f(r),n&&n())},d=S=>{const v=R(S[0]),u=R(S[1]);return v.isValid()&&u.isValid()?v.year()<2010?"Fecha inicial mínima es del año 2010":u.year()<2010?"Fecha final mínima es del año 2010":v.isBefore(u)?"":"La fecha inicial debe ser menor que la fecha final":"Fecha no válida"};return{selectedDateRange:c,handleDateChange:g,warningMessage:l,handleClose:()=>{const S=R(c[0]),v=R(c[1]),u=d([S,v]);u==""?(f(""),t({fechai:S.format("DD/MM/YYYY"),fechaf:v.format("DD/MM/YYYY")})):(n&&n(),f(u))}}},It=e=>{const{selectedDateRange:t,handleDateChange:n,warningMessage:i,handleClose:s}=Fe(e),c=p.useTheme(),a=p.useMediaQuery(c.breakpoints.up("sm")),l=e.localeText??{start:"Fecha inicial",end:"Fecha final"};return o.jsx(p.Box,{display:"flex",gap:"0.75rem",width:"100%",justifyContent:"center",p:0,m:0,children:o.jsxs(p.Stack,{width:"100%",sx:{color:"text.secondary"},children:[o.jsx(p.Typography,{paddingY:1,children:e.label}),o.jsx(K.DateRangePicker,{sx:{"& .MuiMultiInputDateRangeField-separator":{display:"none"}},value:t,onClose:s,onChange:n,desktopModeMediaQuery:e.isInputIndividual&&a==!1?"sm":"",slots:e.isInputIndividual?{}:{field:K.SingleInputDateRangeField},slotProps:{textField:f=>{const g=f.position;return{size:"small",label:g==="start"?l.start:l.end,helperText:i,error:i!=""&&i!=null,fullWidth:!0,InputProps:{endAdornment:g==="start"?o.jsx(Ke,{sx:{color:"rgba(16, 24, 64, 0.54)"}}):o.jsx(Qe,{sx:{color:"rgba(16, 24, 64, 0.54)"}})}}}},localeText:l})]})})},wt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='RE'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20453.5433%20453.5433'%3e%3cdefs%3e%3cstyle%3e%20.cls-1%20{%20fill:%20url(%23Degradado_sin_nombre_34-4);%20}%20.cls-1,%20.cls-2,%20.cls-3,%20.cls-4,%20.cls-5,%20.cls-6,%20.cls-7%20{%20stroke-width:%200px;%20}%20.cls-2%20{%20fill:%20url(%23Degradado_sin_nombre_34-2);%20}%20.cls-3%20{%20fill:%20url(%23Degradado_sin_nombre_38-2);%20}%20.cls-4%20{%20fill:%20url(%23Degradado_sin_nombre_38);%20}%20.cls-5%20{%20fill:%20url(%23Degradado_sin_nombre_34-3);%20}%20.cls-6%20{%20fill:%20%23fff;%20}%20.cls-7%20{%20fill:%20url(%23Degradado_sin_nombre_34);%20}%20%3c/style%3e%3clinearGradient%20id='Degradado_sin_nombre_34'%20data-name='Degradado%20sin%20nombre%2034'%20x1='56.7178'%20y1='226.7717'%20x2='396.8255'%20y2='226.7717'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%230f666b'/%3e%3cstop%20offset='1'%20stop-color='%231d8d97'/%3e%3c/linearGradient%3e%3clinearGradient%20id='Degradado_sin_nombre_34-2'%20data-name='Degradado%20sin%20nombre%2034'%20x1='14.4541'%20y1='175.1242'%20x2='234.3511'%20y2='175.1242'%20xlink:href='%23Degradado_sin_nombre_34'/%3e%3clinearGradient%20id='Degradado_sin_nombre_38'%20data-name='Degradado%20sin%20nombre%2038'%20x1='293.0693'%20y1='107.0773'%20x2='515.5374'%20y2='107.0773'%20gradientTransform='translate(68.1195%20732.5845)%20rotate(-90)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%230f666b'/%3e%3cstop%20offset='1'%20stop-color='%231d8d97'/%3e%3c/linearGradient%3e%3clinearGradient%20id='Degradado_sin_nombre_38-2'%20data-name='Degradado%20sin%20nombre%2038'%20x1='314.2624'%20y1='364.163'%20x2='535.4932'%20y2='364.163'%20gradientTransform='translate(753.3515%20642.5821)%20rotate(-180)'%20xlink:href='%23Degradado_sin_nombre_38'/%3e%3clinearGradient%20id='Degradado_sin_nombre_34-3'%20data-name='Degradado%20sin%20nombre%2034'%20x1='117.6042'%20y1='14.1612'%20x2='122.7773'%20y2='14.1612'%20xlink:href='%23Degradado_sin_nombre_34'/%3e%3clinearGradient%20id='Degradado_sin_nombre_34-4'%20data-name='Degradado%20sin%20nombre%2034'%20x1='134.9218'%20y1='124.6425'%20x2='439.0892'%20y2='124.6425'%20xlink:href='%23Degradado_sin_nombre_34'/%3e%3c/defs%3e%3cg%3e%3crect%20class='cls-7'%20x='56.7178'%20y='60.1189'%20width='340.1077'%20height='333.3056'/%3e%3cpath%20class='cls-2'%20d='M124.4026,14.0281C63.6799,14.0281,14.4541,62.6329,14.4541,122.5894v213.6309c60.7232,0,109.9485-48.6043,109.9485-108.5614v-105.0695c0-59.9566,49.2258-108.5614,109.9485-108.5614h-109.9485Z'/%3e%3cpath%20class='cls-4'%20d='M14.4541,328.2812c0,61.4329,48.4982,111.234,108.3232,111.234h213.1623c0-61.4329-48.4977-111.234-108.3227-111.234h-104.8396c-59.825,0-108.3232-49.8009-108.3232-111.234v111.234Z'/%3e%3cpath%20class='cls-3'%20d='M328.4739,439.5152c61.0911,0,110.6151-48.6045,110.6151-108.5614V117.323c-61.0911,0-110.6151,48.6048-110.6151,108.5614v105.0695c0,59.9568-49.5245,108.5614-110.6156,108.5614h110.6156Z'/%3e%3cg%3e%3cpath%20class='cls-5'%20d='M122.7773,14.0281h-5.1731c0,.0903.0123.1765.0128.2663,1.7221-.083,3.4187-.2663,5.1603-.2663Z'/%3e%3cpath%20class='cls-1'%20d='M330.7665,14.0281h-99.666c-41.8918,0-78.1576,24.3255-96.1787,59.8592,19.2851,30.5087,52.7999,50.7552,91.0051,50.7552h104.8396c59.825,0,108.3227,49.5235,108.3227,110.6144v-110.6144c0-61.0904-48.4977-110.6144-108.3227-110.6144Z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cpath%20class='cls-6'%20d='M107.9407,179.8078c-2.6359-.9974-4.9904-2.2596-7.0614-3.785s-3.7469-3.3514-5.0268-5.4797c-1.281-2.1272-1.9209-4.6412-1.9209-7.5413,0-2.9376.6399-5.5829,1.9209-7.9369,1.2799-2.3534,2.9658-4.3499,5.0555-5.9884,2.0897-1.6379,4.4531-2.8996,7.0901-3.785,2.6348-.8843,5.3093-1.3273,8.0213-1.3273,2.1835,0,4.3119.2262,6.3839.678,2.0699.4518,4.0106,1.121,5.8179,2.0053,1.8084.8854,3.4457,1.9772,4.9154,3.2764,1.4685,1.2992,2.6922,2.8157,3.6719,4.5474.4138.678.5075,1.3659.2825,2.0621-.2262.6973-.5473,1.2523-.961,1.6666-.5274.4899-1.2148.7817-2.0621.8755-.8474.0943-1.666-.16-2.4571-.7624-2.1846-2.6739-4.5193-4.548-7.0051-5.621-2.4847-1.0736-5.3093-1.6103-8.4737-1.6103-1.7698,0-3.5395.2543-5.3093.763-1.7709.5081-3.3806,1.2523-4.8304,2.2315-1.4498.9798-2.637,2.2127-3.5594,3.7001-.9224,1.4879-1.3836,3.2113-1.3836,5.1686,0,2.0721.5451,3.7949,1.6385,5.1692,1.0912,1.3753,2.4759,2.5333,4.1519,3.4744,1.6749.9417,3.5108,1.7041,5.5079,2.2878,1.9959.5842,3.8981,1.1017,5.7054,1.5535,2.787.8667,5.5079,1.8453,8.1636,2.9376,2.6546,1.0923,5.0081,2.429,7.0614,4.0106,2.0522,1.5816,3.6995,3.4656,4.943,5.6491,1.2424,2.1846,1.8635,4.8017,1.8635,7.8525,0,3.2764-.6499,6.2422-1.9485,8.8973-1.2997,2.6546-3.0507,4.9341-5.2541,6.8352-2.2034,1.9022-4.7642,3.3707-7.6826,4.4062-2.9194,1.0355-5.979,1.5535-9.1798,1.5535-2.6745,0-5.2541-.358-7.7388-1.073-2.4858-.715-4.7742-1.6854-6.8639-2.9095-2.0908-1.2236-3.918-2.6734-5.4803-4.3499-1.5623-1.6754-2.7584-3.4739-3.587-5.3948-.5649-1.2048-.6499-2.2122-.2538-3.0221.395-.8099.9687-1.4211,1.7223-1.836.8661-.4893,1.6859-.5936,2.4582-.3111.7712.2825,1.5712.9516,2.4009,2.0059.715,1.5066,1.6848,2.8621,2.9084,4.0669,1.2236,1.206,2.6083,2.2315,4.153,3.0789,1.5436.8474,3.2195,1.4972,5.0268,1.9491,1.8084.4518,3.6719.678,5.5928.678,1.9959,0,3.9831-.3012,5.9602-.9042,1.9772-.6019,3.7569-1.5055,5.338-2.7115,1.5822-1.2048,2.8621-2.7015,3.8418-4.4911.9787-1.788,1.4685-3.8501,1.4685-6.1853,0-2.1471-.4899-3.945-1.4685-5.3953-.9798-1.4492-2.2795-2.6922-3.8981-3.7282-1.6197-1.0355-3.4457-1.9209-5.4792-2.6552-2.0346-.7343-4.0868-1.4404-6.1577-2.1184-2.712-.6399-5.3865-1.4592-8.0224-2.4571Z'/%3e%3cpath%20class='cls-6'%20d='M158.3292,213.335c0,.9798-.3487,1.8078-1.0449,2.4858-.6973.678-1.5347,1.0167-2.5134,1.0167-.9798,0-1.8183-.3387-2.5145-1.0167-.6973-.678-1.0449-1.5061-1.0449-2.4858v-65.3034c0-1.0167.3476-1.8547,1.0449-2.514.6962-.6587,1.5347-.9886,2.5145-.9886.9787,0,1.8161.3299,2.5134.9886.6962.6592,1.0449,1.4972,1.0449,2.514v65.3034Z'/%3e%3cpath%20class='cls-6'%20d='M180.1334,158.8212l-5.9316-8.4737c-.3762-.4888-.5925-1.0636-.6499-1.7229-.0563-.6587.0287-1.2799.2549-1.8641.2262-.5837.5737-1.0824,1.0449-1.4972.47-.4138,1.0449-.6212,1.7234-.6212h.2825c.3751.0756.7525.1887,1.1298.3387h.1125c.075.0761.1501.123.2262.1412.075.0193.1501.0662.2262.1412l.2251.1131c.1136.0761.2163.1694.3111.2825.0938.1131.1975.2262.3111.3387l.1688.2825,39.5443,56.3217v-54.5139c0-.9787.3476-1.8167,1.0449-2.514.6973-.6962,1.5535-1.0449,2.5708-1.0449s1.8547.3487,2.5134,1.0449c.6587.6973.9886,1.5353.9886,2.514v65.2472c0,.8667-.2736,1.6197-.8187,2.2596-.5462.641-1.2335,1.0366-2.0621,1.1866-.1512.0375-.3762.0563-.6775.0563-1.0548,0-1.9408-.3575-2.6557-1.0736l-.2251-.3387-.1699-.1694-39.488-56.4348v54.5139c0,.9798-.3487,1.8078-1.0449,2.4858-.6973.678-1.5347,1.0167-2.5134,1.0167-.9798,0-1.8183-.3387-2.5145-1.0167-.6973-.678-1.0449-1.5061-1.0449-2.4858v-65.1903c0-.9792.3476-1.8078,1.0449-2.4858.6962-.678,1.5347-1.0167,2.5145-1.0167h.2825c.4138.0756.79.1887,1.1298.3387h.1125c.075.0761.1501.123.2262.1412.075.0193.1501.0662.2262.1412.075,0,.1501.0381.2251.1131.4149.3018.7437.6973.9886,1.1861.2449.4899.3674,1.0173.3674,1.5822v10.6765Z'/%3e%3cpath%20class='cls-6'%20d='M297.6354,157.4089c0,.9417-.3398,1.7709-1.0173,2.4858-.7161.678-1.5734,1.0267-2.5708,1.0449-.9974.0193-1.8172-.3106-2.4571-.9886-2.9757-2.9376-6.2703-5.1405-9.8859-6.6096-3.6156-1.4685-7.3626-2.2028-11.2419-2.2028-4.0669,0-7.8999.7723-11.4957,2.3159-3.5969,1.5447-6.7315,3.6537-9.406,6.3271-2.6745,2.6745-4.783,5.8185-6.3266,9.4341-1.5447,3.6151-2.3159,7.4762-2.3159,11.5807,0,3.9544.7425,7.7206,2.231,11.2982,1.4873,3.5781,3.5395,6.7221,6.1577,9.4341,2.6171,2.7115,5.7241,4.8679,9.321,6.4678,3.5958,1.6015,7.5038,2.4009,11.7219,2.4009,3.8782.0381,7.6064-.6212,11.1857-1.9772,3.577-1.3555,6.8716-3.5395,9.8859-6.5527.715-.678,1.5623-1.0256,2.5421-1.0449.9787-.0188,1.8073.2918,2.4847.9318.715.678,1.0636,1.5254,1.046,2.5421-.0199,1.0167-.3487,1.8459-.9886,2.4858-3.6918,3.6912-7.7774,6.4115-12.2592,8.1631-4.4818,1.751-9.1147,2.6265-13.8966,2.6265-3.3519,0-6.5914-.443-9.716-1.3273-3.1269-.8843-6.0452-2.1184-8.7561-3.7001-2.712-1.5822-5.1791-3.4932-7.4012-5.7341-2.2221-2.2403-4.1232-4.7256-5.7054-7.4569-1.5811-2.7302-2.8058-5.6579-3.6719-8.7842-.8661-3.1258-1.2986-6.3834-1.2986-9.7728,0-3.2008.4138-6.3459,1.2424-9.4341.8275-3.0877,2.0059-5.9878,3.5307-8.6998,1.5248-2.7115,3.3795-5.2155,5.5641-7.5132,2.1835-2.2966,4.6418-4.2738,7.3725-5.9316,2.7297-1.6567,5.6855-2.9465,8.8687-3.8694,3.182-.9224,6.5616-1.3841,10.1408-1.3841,4.7444,0,9.3674.9235,13.8679,2.7683,4.5005,1.8453,8.5586,4.5756,12.1743,8.1912.715.7155,1.0736,1.5447,1.0736,2.4853Z'/%3e%3cpath%20class='cls-6'%20d='M353.4754,146.9018c4.4619,1.9204,8.36,4.5474,11.6932,7.8806,3.3332,3.3326,5.9691,7.2219,7.9087,11.6651,1.9397,4.4443,2.9095,9.2079,2.9095,14.2921,0,3.3895-.4435,6.6576-1.3273,9.8015-.886,3.1451-2.1184,6.0728-3.7006,8.7842-1.5822,2.7115-3.502,5.1973-5.7616,7.4569-2.2596,2.2596-4.7455,4.18-7.4575,5.7622-2.7109,1.5816-5.6403,2.8157-8.7837,3.7001-3.1456.8843-6.4126,1.3273-9.8021,1.3273s-6.6565-.443-9.801-1.3273c-3.1445-.8843-6.0728-2.1184-8.7837-3.7001-2.712-1.5822-5.1791-3.5026-7.4012-5.7622s-4.1232-4.7455-5.7054-7.4569c-1.5811-2.7115-2.8058-5.6392-3.6719-8.7842-.8661-3.144-1.2986-6.4121-1.2986-9.8015s.4325-6.6465,1.2986-9.7728c.8661-3.1252,2.0908-6.0447,3.6719-8.7561,1.5822-2.7115,3.4832-5.1874,5.7054-7.4282,2.2221-2.2403,4.6892-4.1612,7.4012-5.7622,2.7109-1.6004,5.6392-2.8334,8.7837-3.7001,3.1445-.8661,6.4115-1.2997,9.801-1.2997,5.0842,0,9.8583.9605,14.3214,2.8814ZM327.6021,153.5113c-3.5969,1.5447-6.7227,3.6532-9.3773,6.3266-2.6557,2.6745-4.7554,5.8003-6.299,9.3778-1.5447,3.5781-2.3159,7.4194-2.3159,11.5238,0,4.1436.7712,8.013,2.3159,11.6094,1.5436,3.5969,3.6432,6.732,6.299,9.4054,2.6546,2.6745,5.7804,4.7835,9.3773,6.3271,3.5958,1.5447,7.4652,2.3159,11.6094,2.3159,4.1044,0,7.9551-.7712,11.552-2.3159,3.5958-1.5436,6.7315-3.6526,9.406-6.3271,2.6734-2.6734,4.7819-5.8085,6.3266-9.4054,1.5436-3.5963,2.3159-7.4658,2.3159-11.6094,0-4.1044-.7723-7.9457-2.3159-11.5238-1.5447-3.5776-3.6532-6.7033-6.3266-9.3778-2.6745-2.6734-5.8102-4.7819-9.406-6.3266-3.5969-1.5441-7.4476-2.3165-11.552-2.3165-4.1441,0-8.0136.7723-11.6094,2.3165Z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='cls-6'%20d='M136.348,294.1054h-29.4172l-7.827,18.52c-.376.8531-.9724,1.4414-1.7911,1.7652-.8181.3235-1.6712.2979-2.558-.0768-.8525-.375-1.4064-.9721-1.6625-1.7908-.2561-.8184-.1967-1.6369.1792-2.4556l25.5289-59.0388c.5796-1.2959,1.5682-1.9441,2.9671-1.9441.6476,0,1.2278.1711,1.7393.5115.5121.3413.9037.8187,1.1772,1.4326l25.3753,59.0388c.3747.8531.4347,1.6803.1792,2.4812-.2561.8019-.7931,1.3902-1.6119,1.7652-.8187.3747-1.6543.4003-2.5068.0768-.8531-.3238-1.467-.8956-1.8417-1.714l-7.9301-18.5712ZM109.6425,287.6591h23.9945l-12.0232-28.2915-11.9713,28.2915Z'/%3e%3cpath%20class='cls-6'%20d='M172.3644,249.0844c3.0701,0,6.0284.3838,8.8762,1.151,2.8478.7675,5.5001,1.8595,7.9557,3.2743,2.4556,1.4158,4.707,3.1129,6.7529,5.0904,2.0465,1.9785,3.7864,4.1783,5.2184,6.5996,1.4326,2.4222,2.5493,5.0395,3.3511,7.8533.8013,2.8138,1.2022,5.7555,1.2022,8.825,0,4.6046-.8787,8.894-2.6348,12.8669-1.7568,3.9738-4.1437,7.4358-7.1619,10.3857-3.0189,2.9502-6.5487,5.2612-10.5905,6.9321-4.0419,1.6715-8.3648,2.5068-12.9693,2.5068h-10.999c-.8874,0-1.6462-.3069-2.277-.9208-.6314-.6139-.9461-1.3636-.9461-2.2511v-59.1413c0-.9208.3148-1.6796.9461-2.2767.6308-.5964,1.3895-.8952,2.277-.8952h10.999ZM172.5181,255.5816h-7.9295v52.5417h7.827c3.7171,0,7.205-.6651,10.4625-1.9953,3.2568-1.3299,6.0959-3.1719,8.5184-5.5251,2.4212-2.3535,4.331-5.1241,5.7299-8.3135,1.3977-3.1888,2.0971-6.6589,2.0971-10.4113,0-3.6834-.6995-7.1279-2.0971-10.3342-1.3989-3.2056-3.2999-5.986-5.7043-8.3392-2.405-2.3535-5.2359-4.212-8.4928-5.5766-3.2575-1.3636-6.7279-2.0465-10.4113-2.0465Z'/%3e%3cpath%20class='cls-6'%20d='M221.8878,286.3801v25.0175c0,.8874-.316,1.6372-.9468,2.2511-.6314.6139-1.3902.9208-2.2764.9208-.8874,0-1.6462-.3069-2.277-.9208-.6314-.6139-.9461-1.3636-.9461-2.2511v-59.1413c0-.9208.3148-1.6796.9461-2.2767.6308-.5964,1.3895-.8952,2.277-.8952h17.1898c2.6935,0,5.2184.4781,7.5716,1.4323,2.3532.9555,4.3997,2.2689,6.139,3.9394,1.7399,1.6715,3.112,3.65,4.1187,5.9345,1.0055,2.2854,1.5088,4.7582,1.5088,7.4183s-.5034,5.1248-1.5088,7.3927c-1.0067,2.2686-2.3788,4.2295-4.1187,5.8836-1.7393,1.6547-3.7858,2.9505-6.139,3.8882-2.3532.9383-4.8781,1.4067-7.5716,1.4067h-13.9667ZM221.8878,255.4282v24.5057h14.0179c1.8417,0,3.5466-.3326,5.116-.9977,1.5682-.6648,2.924-1.5604,4.0668-2.6857,1.1422-1.1257,2.0378-2.4303,2.686-3.9138.6476-1.4835.9724-3.0439.9724-4.6811,0-1.7396-.3329-3.3511-.998-4.8347-.6651-1.4838-1.5694-2.7707-2.7116-3.8626-1.1429-1.091-2.5068-1.9522-4.0924-2.5836-1.5863-.6308-3.2999-.9465-5.1416-.9465h-13.9154Z'/%3e%3cpath%20class='cls-6'%20d='M303.8973,267.8089c0,2.3198-.3835,4.4943-1.151,6.5231-.7675,2.0297-1.8336,3.837-3.1975,5.423-1.3646,1.586-2.9846,2.9249-4.86,4.0159-1.876,1.092-3.9226,1.842-6.1396,2.2511l14.8366,23.7384c.4771.8874.5627,1.7571.2561,2.6092-.3073.8528-.8699,1.4667-1.6887,1.8417-.7844.4094-1.5775.4862-2.3788.2301-.8019-.2557-1.4245-.7585-1.8673-1.5091l-16.3198-26.5522h-10.7947v25.0175c0,.8874-.316,1.6372-.9468,2.2511-.6314.6139-1.3902.9208-2.2764.9208-.8874,0-1.6462-.3069-2.277-.9208-.6314-.6139-.9461-1.3636-.9461-2.2511v-59.1413c0-.9208.3148-1.6796.9461-2.2767.6308-.5964,1.3895-.8952,2.277-.8952h17.1898c2.6935,0,5.2184.4781,7.5716,1.4323,2.3532.9555,4.3997,2.2689,6.139,3.9394,1.7399,1.6715,3.112,3.65,4.1187,5.9345,1.0055,2.2854,1.5088,4.7582,1.5088,7.4183ZM270.5925,255.4282v24.5057h14.0179c1.8417,0,3.5466-.3326,5.116-.9977,1.5682-.6648,2.924-1.5604,4.0668-2.6857,1.1422-1.1257,2.0378-2.4303,2.686-3.9138.6476-1.4835.9724-3.0439.9724-4.6811,0-1.7396-.3329-3.3511-.998-4.8347-.6651-1.4838-1.5694-2.7707-2.7116-3.8626-1.1429-1.091-2.5068-1.9522-4.0924-2.5836-1.5863-.6308-3.2999-.9465-5.1416-.9465h-13.9154Z'/%3e%3cpath%20class='cls-6'%20d='M356.464,251.2331c4.0419,1.7396,7.5722,4.1184,10.5905,7.137,3.0183,3.0183,5.4052,6.5405,7.1626,10.5646,1.7561,4.0247,2.6342,8.3392,2.6342,12.9434,0,3.0698-.4009,6.0291-1.2022,8.8762-.8013,2.8484-1.9185,5.4998-3.3505,7.9557-1.4326,2.4556-3.1719,4.7067-5.2184,6.7529-2.0465,2.0465-4.2979,3.7861-6.7535,5.2184-2.4556,1.4326-5.1079,2.5502-7.9551,3.3511-2.8484.8009-5.8067,1.2022-8.8762,1.2022s-6.0291-.4013-8.8762-1.2022c-2.8484-.8009-5.5001-1.9185-7.9557-3.3511-2.4556-1.4323-4.6901-3.1719-6.7023-5.2184-2.0128-2.0462-3.7346-4.2973-5.1666-6.7529-1.4326-2.4559-2.5418-5.1073-3.3255-7.9557-.785-2.8472-1.1766-5.8064-1.1766-8.8762s.3916-6.0194,1.1766-8.8506c.7838-2.8306,1.8929-5.4742,3.3255-7.9298,1.432-2.4559,3.1538-4.6979,5.1666-6.7276,2.0122-2.029,4.2467-3.7683,6.7023-5.2184,2.4556-1.4492,5.1073-2.5661,7.9557-3.3508,2.8472-.7844,5.8061-1.1769,8.8762-1.1769,4.6039,0,8.9274.8699,12.9687,2.6092ZM333.0328,257.2187c-3.2575,1.3989-6.0878,3.3087-8.4928,5.7299-2.4044,2.4222-4.306,5.2528-5.7043,8.4928-1.3989,3.2406-2.0977,6.7195-2.0977,10.4366,0,3.7524.6988,7.2569,2.0977,10.5134,1.3983,3.2575,3.2999,6.0968,5.7043,8.5184,2.405,2.4222,5.2353,4.3316,8.4928,5.7299,3.2568,1.3989,6.761,2.0974,10.5137,2.0974,3.7171,0,7.2044-.6985,10.4619-2.0974,3.2568-1.3983,6.0959-3.3077,8.5184-5.7299,2.4212-2.4216,4.331-5.2609,5.7299-8.5184,1.3983-3.2565,2.0977-6.761,2.0977-10.5134,0-3.7171-.6995-7.196-2.0977-10.4366-1.3989-3.24-3.3087-6.0706-5.7299-8.4928-2.4225-2.4212-5.2615-4.331-8.5184-5.7299-3.2575-1.398-6.7448-2.0974-10.4619-2.0974-3.7527,0-7.2569.6995-10.5137,2.0974Z'/%3e%3c/g%3e%3c/svg%3e",jt=({title:e,isLoading:t,zIndex:n=9999,sx:i,logo:s=wt,logoAlt:c="Logo ADPRO",logoWidth:a="120px"})=>t?o.jsx(p.ThemeProvider,{theme:D.SincoTheme,children:o.jsxs(p.Box,{className:"HttpRequestSpinnerCount",sx:{position:"fixed",height:"100%",width:"100%",background:"rgba(255, 255, 255, 0.5)",backdropFilter:"blur(5px)",top:0,left:0,display:"flex",justifyContent:"center",alignItems:"center",zIndex:n,...i},children:[o.jsxs(p.Box,{sx:{width:"auto",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",fontFamily:"Nunito, Segoe UI, sans-serif"},children:[o.jsx("img",{src:s,alt:c,className:"imagenLogoADPRO",width:a,style:{zIndex:10}}),o.jsxs(p.Box,{sx:{display:"flex",gap:"5px"},children:[o.jsx("div",{className:"pointLoading",style:{animationDelay:"0s"},children:"•"}),o.jsx("div",{className:"pointLoading",style:{animationDelay:"0.2s"},children:"•"}),o.jsx("div",{className:"pointLoading",style:{animationDelay:"0.4s"},children:"•"})]}),o.jsx(p.Box,{display:"flex",justifyContent:"center",alignItems:"center",children:o.jsx(p.Typography,{variant:"h5",sx:{color:"#10184099"},mt:1,children:e})})]}),o.jsx("style",{type:"text/css",children:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),y=require("react"),f=require("@mui/material"),ke=require("axios"),W=require("@mui/icons-material"),Ze=require("@mui/icons-material/ArrowDropDown"),Ge=require("@mui/icons-material/ArrowDropUp"),fe=require("@mui/material/colors"),D=require("@sinco/react"),K=require("@mui/x-date-pickers-pro"),R=require("dayjs"),Ye=require("dayjs/plugin/customParseFormat"),Ke=require("@mui/icons-material/TodayOutlined"),Qe=require("@mui/icons-material/EventOutlined"),Xe=require("@mui/icons-material/CheckCircleRounded"),pe=require("@mui/material/Snackbar"),Me=require("zustand"),Je=require("@mui/icons-material/WarningRounded"),et=require("@mui/icons-material/ErrorRounded"),tt=require("@mui/icons-material/InfoRounded"),me=require("@mui/material/IconButton"),ge=require("@mui/icons-material/Close"),nt=require("zustand/middleware"),it=require("@mui/x-data-grid-pro"),rt=require("@mui/x-data-grid-pro/locales");let U=`${window.location.href.split("#")[0].toLowerCase().split("v3")[0]}v3/adpro/api`;const Pe={async Send(e){const{serviceUrl:t,body:n,method:i="get",defaultToken:s=!0,srm:c,core:a}=e;let{headers:l}=e;window.parent.location.href.includes("localhost")&&(a?U="http://localhost:3500/core/api":U="http://localhost:3500");const p=ke.create({baseURL:c?`${U.toLowerCase().replace("/adpro/","/srm/")}`:a?`${U.toLowerCase().replace("/adpro/api","/adpro/core/api")}`:U});return l=l||{},s&&(l.Authorization=await se(window),l["X-SincoERP-Authorization"]=Q(window)),await p[i](t,ot(n,i,l),{headers:l,validateStatus:function(d){return d<400}}).then(function(d){const{data:x,status:S}=d;return x||{data:null,httpCode:S,message:"Transacción exitosa",success:!0}}).catch(d=>{throw{data:d,httpCode:500,message:"Ha ocurrido un error en la petición",success:!1}})}},ot=(e,t,n)=>{const i=e;for(const s in e)e[s]===""&&(e[s]=null);return t==="get"||t==="delete"?{params:i,headers:n,data:i}:i},se=async e=>window.parent.location.href.includes("localhost")?(U="http://localhost:3500",`Bearer ${(await ke.get(`${U}/token`)).data}`):typeof e.getToken=="function"?e.getToken():e.parent&&e.parent!==e?typeof e.parent.getToken=="function"?e.parent.getToken():await se(e.parent):"",Q=e=>{try{if(!e)return"";if(typeof e.getTokenAuth=="function")return e.getTokenAuth()||"";if(e.opener&&e.opener.parent&&e.opener.parent!==e)return Q(e.opener.parent);if(e.parent&&e.parent!==e)return Q(e.parent)}catch{}return""},st=800,xe=20,at=(e,t,n)=>e[t]!=="-1"&&e[t]!=="0"&&e[t]!==-1?e:n&&(n[t]==="-1"||n[t]===-1)?n:e;function Re(e){const{type:t,action:n="search",value:i,inputValue:s,handleValue:c,labelKey:a,labelText:l,optionAll:p}=e,g=t==="request"?e.request:null,d=t==="list"?e.list:null,[x,S]=y.useState(()=>at(i,a,p)),[v,u]=y.useState(s||""),[r,h]=y.useState(d||[]),[m,b]=y.useState("input"),[T,w]=y.useState(!1),[C,_]=y.useState(!1);y.useEffect(()=>{t==="list"?j(r):n==="all"&&M(I=>j(I))},[]),y.useEffect(()=>{t==="list"||n==="all"?P(r):p?v!==""&&(m==="input"||m==="reset"||m==="selectOption")&&S(i):S(i)},[i]),y.useEffect(()=>{let I=null;return t==="request"&&n==="search"&&v&&m==="input"&&w(!0),n==="search"&&v&&m==="input"&&(I=setTimeout(()=>{M()},st)),()=>{w(!1),I&&clearTimeout(I)}},[v]),y.useEffect(()=>{d&&d.length>0?h(d):h([])},[d]);const j=y.useCallback(I=>{if(i){const k=i?i[a]:"",A=I.find(L=>L[a]==k);A&&(S(A),u(A[l]))}},[i,a,l]),P=y.useCallback(I=>{if(i){const k=i[a]||"",A=I.find(L=>L[a]==k);A&&(S(A),u(A[l]))}else S(null),u("")},[i,a,l]),M=y.useCallback((I,k)=>{if(g){if(t==="request"&&n==="search"&&w(!0),t==="request"&&n==="all"&&r.length>0)return;let A=k!==void 0?k.trim():v.trim();if((A===""||A==="-1"||p&&A===String(p[l]).trim())&&(A="_"),x&&x[l]===A&&n==="search"){h([x]),w(!1);return}g.body={[g.filterName||"filter"]:A},Pe.Send(g).then(L=>{if(L){let E=L;E.length===void 0?E=[]:E.length>xe&&(E=E.slice(0,xe)),h(E),I&&I(E)}w(!1)})}},[v,r,g,n,t]),N=I=>{I&&(S(I),c&&c(I))},q=y.useCallback(I=>{I?u(I):H()},[n,t]),V=y.useCallback(I=>{b(I)},[]);y.useEffect(()=>{if(t==="list"&&n==="search"&&m==="input"&&d)if(v.trim()==="")h(d);else{const I=d.filter(k=>String(k[l]).toLowerCase().includes(v.toLowerCase())||String(k[a]).toLowerCase().includes(v.toLowerCase()));h(I)}},[v]);const H=()=>{if(t==="request")p?c&&c(p):(S(null),c&&c(null)),u(""),h([]),M(void 0,"");else if(d)if(p){const I=d.find(k=>k[a]=="-1");I?(S(I),u(I[l]),c&&c(I)):(u(""),S(x||i),c&&c(x||i))}else{const I=i?i[a]:"",k=d.find(A=>A[a]==I);k?(S(k),u(k[l]),c&&c(k)):(u(""),S(x),c&&c(x))}};return y.useEffect(()=>{C?t==="request"&&M():(t==="list"&&n==="search"&&(S(x),u(x?x[l]:""),v===""&&h(d||[])),t==="request"&&(p?((m==="clear"||m==="blur")&&(i[a]==="-1"||i[a]===-1)&&(S(p),u(p[l]),c&&c(p)),m==="input"&&v===""&&(i[a]==="-1"||i[a]===-1)&&(S(p),u(p[l]),c&&c(p))):(S(x),u(x?x[l]:""))))},[C]),{dataList:r,loading:T,isFocused:C,autocompleteValue:x,textFieldValue:v,handleAutocompleteValue:N,handleTextFieldValue:q,handleReasonChangeTextField:V,setIsFocused:_,clearValues:H}}const X={...D.SincoTheme,components:{...D.SincoTheme.components,MuiTableHead:{styleOverrides:{root:{th:{padding:"0.2rem 0.5rem !important",borderBottom:"1px solid rgba(226, 227, 232, 1) !important",color:"text-primary",background:fe.grey[50]},"th .MuiButtonBase-root":{color:"text-primary",cursor:"pointer"},td:{borderLeft:"none"}}}},MuiTableBody:{styleOverrides:{root:{".MuiTableCell-root":{padding:"0.1rem 0.5rem !important"},".MuiTableRow-root:hover":{backgroundColor:fe.grey[100]}}}},MuiTableFooter:{styleOverrides:{root:{".MuiTableCell-footer":{padding:"2px 4px !important"}}}}}},Ee=e=>{const{label:t,helperText:n,inputRef:i,name:s,customTheme:c,required:a,error:l,placeholder:p,size:g,type:d,labelText:x,optionAll:S,showId:v,action:u}=e,{dataList:r,loading:h,isFocused:m,autocompleteValue:b,textFieldValue:T,handleAutocompleteValue:w,handleTextFieldValue:C,handleReasonChangeTextField:_,setIsFocused:j,clearValues:P}=Re(e),M=c||X,N=S?[S,...r]:r,{action:q,type:V,labelText:H,labelKey:I,handleValue:k,label:A,value:L,inputValue:E,required:le,error:J,helperText:ce,inputRef:de,name:ee,placeholder:B,customTheme:te,size:Ht,optionAll:Vt,showId:Zt,...$e}=e,{request:Gt,list:Yt,...He}=$e;return o.jsx(f.ThemeProvider,{theme:M,children:o.jsx(f.Autocomplete,{...He,filterOptions:z=>z,noOptionsText:"No se encontraron resultados.",options:N,onChange:(z,F)=>w(F),onInputChange:(z,F,ue)=>{C(F),_(ue)},getOptionLabel:e.getOptionLabel?e.getOptionLabel:z=>z?z[x]:"",renderOption:(z,F)=>{const{key:ue,...Ve}=z,Z=F[e.labelKey],he=Z==="-1"||Z===-1;return y.createElement(f.Box,{component:"li",...Ve,key:`${Z}-${F[e.labelText]}`,sx:{borderBottom:he?`${D.SincoTheme.palette.divider} 1px solid`:"inherit"}},v&&!he?`${Z} - ${F[e.labelText]}`:`${F[e.labelText]}`)},value:b,inputValue:T,loading:h,loadingText:"Consultando...",size:g,onBlur:()=>{j(!1)},renderInput:z=>o.jsx(f.TextField,{...z,label:t,value:T,error:l,helperText:n,placeholder:p,required:a,ref:i,name:s??"",size:g,onFocus:()=>{j(!0)},InputProps:{...z.InputProps,endAdornment:o.jsxs(o.Fragment,{children:[T&&d!=="list"?o.jsx(f.IconButton,{size:"small",onClick:P,sx:{height:"22px",width:"22px"},children:o.jsx(W.ClearRounded,{fontSize:"small",color:"action",sx:{height:"16px",width:"16px"}})}):null,h?o.jsx(f.CircularProgress,{color:"primary",size:20}):d==="list"||u==="all"&&d==="request"?m?o.jsx(Ge,{color:"action",fontSize:"small",sx:{height:"16px",width:"16px"}}):o.jsx(Ze,{color:"action",fontSize:"small",sx:{height:"16px",width:"16px"}}):o.jsx(W.SearchOutlined,{color:"action",fontSize:"small",sx:{height:"16px",width:"16px"}})]})}})})})};function ze(e){const{options:t,value:n,onSelected:i,labelKey:s,labelText:c,todos:a,disableAutoSelectTodos:l}=e,p=y.useMemo(()=>a?{[s]:"-1",[c]:"Todos"}:null,[a,s,c]),g=y.useMemo(()=>a&&p?[p,...t]:t,[a,p,t]),d=y.useMemo(()=>g.filter(v=>v[s]!=="-1"),[g,s]),x=n.length===d.length;return y.useEffect(()=>{a&&!l&&n.length===0&&d.length>0&&i(d)},[]),{updatedOptions:g,handleChange:(v,u)=>{if(!a||!p){i(u);return}const r=u.some(h=>h[s]===p[s]);i(r?x?[]:d:u)},isAllSelected:x}}const Le=({text:e,variant:t="body3",align:n,placement:i,color:s})=>{const c=y.useRef(null),[a,l]=y.useState(!1);y.useEffect(()=>{const g=c.current;g&&l(g.offsetWidth<g.scrollWidth)},[e]);const p=o.jsx(f.Typography,{variant:t,noWrap:!0,ref:c,textAlign:n,color:s,children:e});return a?o.jsx(f.ThemeProvider,{theme:D.SincoTheme,children:o.jsx(f.Tooltip,{title:e,arrow:!0,placement:i,children:p})}):p};function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},re.apply(null,arguments)}function Se(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},oe(e,t)}function lt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,oe(e,t)}var ve=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function ct(e,t){return!!(e===t||ve(e)&&ve(t))}function dt(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ct(e[n],t[n]))return!1;return!0}function ne(e,t){t===void 0&&(t=dt);var n,i=[],s,c=!1;function a(){for(var l=[],p=0;p<arguments.length;p++)l[p]=arguments[p];return c&&n===this&&t(l,i)||(s=e.apply(this,l),c=!0,n=this,i=l),s}return a}var ut=typeof performance=="object"&&typeof performance.now=="function",ye=ut?function(){return performance.now()}:function(){return Date.now()};function be(e){cancelAnimationFrame(e.id)}function ht(e,t){var n=ye();function i(){ye()-n>=t?e.call(null):s.id=requestAnimationFrame(i)}var s={id:requestAnimationFrame(i)};return s}var ie=-1;function Ce(e){if(e===void 0&&(e=!1),ie===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),ie=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ie}var $=null;function Te(e){if(e===void 0&&(e=!1),$===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var i=document.createElement("div"),s=i.style;return s.width="100px",s.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?$="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?$="negative":$="positive-ascending"),document.body.removeChild(t),$}return $}process.env.NODE_ENV;var ft=150,pt=function(t,n){return t},G=null,Y=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(G=new WeakSet,Y=new WeakSet);function mt(e){var t,n=e.getItemOffset,i=e.getEstimatedTotalSize,s=e.getItemSize,c=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,p=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=(function(x){lt(S,x);function S(u){var r;return r=x.call(this,u)||this,r._instanceProps=p(r.props,Se(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Se(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof r.props.initialScrollOffset=="number"?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=ne(function(h,m,b,T){return r.props.onItemsRendered({overscanStartIndex:h,overscanStopIndex:m,visibleStartIndex:b,visibleStopIndex:T})}),r._callOnScroll=void 0,r._callOnScroll=ne(function(h,m,b){return r.props.onScroll({scrollDirection:h,scrollOffset:m,scrollUpdateWasRequested:b})}),r._getItemStyle=void 0,r._getItemStyle=function(h){var m=r.props,b=m.direction,T=m.itemSize,w=m.layout,C=r._getItemStyleCache(g&&T,g&&w,g&&b),_;if(C.hasOwnProperty(h))_=C[h];else{var j=n(r.props,h,r._instanceProps),P=s(r.props,h,r._instanceProps),M=b==="horizontal"||w==="horizontal",N=b==="rtl",q=M?j:0;C[h]=_={position:"absolute",left:N?void 0:q,right:N?q:void 0,top:M?0:j,height:M?"100%":P,width:M?P:"100%"}}return _},r._getItemStyleCache=void 0,r._getItemStyleCache=ne(function(h,m,b){return{}}),r._onScrollHorizontal=function(h){var m=h.currentTarget,b=m.clientWidth,T=m.scrollLeft,w=m.scrollWidth;r.setState(function(C){if(C.scrollOffset===T)return null;var _=r.props.direction,j=T;if(_==="rtl")switch(Te()){case"negative":j=-T;break;case"positive-descending":j=w-b-T;break}return j=Math.max(0,Math.min(j,w-b)),{isScrolling:!0,scrollDirection:C.scrollOffset<j?"forward":"backward",scrollOffset:j,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(h){var m=h.currentTarget,b=m.clientHeight,T=m.scrollHeight,w=m.scrollTop;r.setState(function(C){if(C.scrollOffset===w)return null;var _=Math.max(0,Math.min(w,T-b));return{isScrolling:!0,scrollDirection:C.scrollOffset<_?"forward":"backward",scrollOffset:_,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(h){var m=r.props.outerRef;r._outerRef=h,typeof m=="function"?m(h):m!=null&&typeof m=="object"&&m.hasOwnProperty("current")&&(m.current=h)},r._resetIsScrollingDebounced=function(){r._resetIsScrollingTimeoutId!==null&&be(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ht(r._resetIsScrolling,ft)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}S.getDerivedStateFromProps=function(r,h){return gt(r,h),d(r),null};var v=S.prototype;return v.scrollTo=function(r){r=Math.max(0,r),this.setState(function(h){return h.scrollOffset===r?null:{scrollDirection:h.scrollOffset<r?"forward":"backward",scrollOffset:r,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},v.scrollToItem=function(r,h){h===void 0&&(h="auto");var m=this.props,b=m.itemCount,T=m.layout,w=this.state.scrollOffset;r=Math.max(0,Math.min(r,b-1));var C=0;if(this._outerRef){var _=this._outerRef;T==="vertical"?C=_.scrollWidth>_.clientWidth?Ce():0:C=_.scrollHeight>_.clientHeight?Ce():0}this.scrollTo(c(this.props,r,h,w,this._instanceProps,C))},v.componentDidMount=function(){var r=this.props,h=r.direction,m=r.initialScrollOffset,b=r.layout;if(typeof m=="number"&&this._outerRef!=null){var T=this._outerRef;h==="horizontal"||b==="horizontal"?T.scrollLeft=m:T.scrollTop=m}this._callPropsCallbacks()},v.componentDidUpdate=function(){var r=this.props,h=r.direction,m=r.layout,b=this.state,T=b.scrollOffset,w=b.scrollUpdateWasRequested;if(w&&this._outerRef!=null){var C=this._outerRef;if(h==="horizontal"||m==="horizontal")if(h==="rtl")switch(Te()){case"negative":C.scrollLeft=-T;break;case"positive-ascending":C.scrollLeft=T;break;default:var _=C.clientWidth,j=C.scrollWidth;C.scrollLeft=j-_-T;break}else C.scrollLeft=T;else C.scrollTop=T}this._callPropsCallbacks()},v.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&be(this._resetIsScrollingTimeoutId)},v.render=function(){var r=this.props,h=r.children,m=r.className,b=r.direction,T=r.height,w=r.innerRef,C=r.innerElementType,_=r.innerTagName,j=r.itemCount,P=r.itemData,M=r.itemKey,N=M===void 0?pt:M,q=r.layout,V=r.outerElementType,H=r.outerTagName,I=r.style,k=r.useIsScrolling,A=r.width,L=this.state.isScrolling,E=b==="horizontal"||q==="horizontal",le=E?this._onScrollHorizontal:this._onScrollVertical,J=this._getRangeToRender(),ce=J[0],de=J[1],ee=[];if(j>0)for(var B=ce;B<=de;B++)ee.push(y.createElement(h,{data:P,key:N(B,P),index:B,isScrolling:k?L:void 0,style:this._getItemStyle(B)}));var te=i(this.props,this._instanceProps);return y.createElement(V||H||"div",{className:m,onScroll:le,ref:this._outerRefSetter,style:re({position:"relative",height:T,width:A,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:b},I)},y.createElement(C||_||"div",{children:ee,ref:w,style:{height:E?"100%":te,pointerEvents:L?"none":void 0,width:E?te:"100%"}}))},v._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var r=this.props.itemCount;if(r>0){var h=this._getRangeToRender(),m=h[0],b=h[1],T=h[2],w=h[3];this._callOnItemsRendered(m,b,T,w)}}if(typeof this.props.onScroll=="function"){var C=this.state,_=C.scrollDirection,j=C.scrollOffset,P=C.scrollUpdateWasRequested;this._callOnScroll(_,j,P)}},v._getRangeToRender=function(){var r=this.props,h=r.itemCount,m=r.overscanCount,b=this.state,T=b.isScrolling,w=b.scrollDirection,C=b.scrollOffset;if(h===0)return[0,0,0,0];var _=a(this.props,C,this._instanceProps),j=l(this.props,_,C,this._instanceProps),P=!T||w==="backward"?Math.max(1,m):1,M=!T||w==="forward"?Math.max(1,m):1;return[Math.max(0,_-P),Math.max(0,Math.min(h-1,j+M)),_,j]},S})(y.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var gt=function(t,n){var i=t.children,s=t.direction,c=t.height,a=t.layout,l=t.innerTagName,p=t.outerTagName,g=t.width,d=n.instance;if(process.env.NODE_ENV!=="production"){(l!=null||p!=null)&&Y&&!Y.has(d)&&(Y.add(d),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var x=s==="horizontal"||a==="horizontal";switch(s){case"horizontal":case"vertical":G&&!G.has(d)&&(G.add(d),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+s+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(i==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(i===null?"null":typeof i)+'" was specified.'));if(x&&typeof g!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(g===null?"null":typeof g)+'" was specified.'));if(!x&&typeof c!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(c===null?"null":typeof c)+'" was specified.'))}},xt=mt({getItemOffset:function(t,n){var i=t.itemSize;return n*i},getItemSize:function(t,n){var i=t.itemSize;return i},getEstimatedTotalSize:function(t){var n=t.itemCount,i=t.itemSize;return i*n},getOffsetForIndexAndAlignment:function(t,n,i,s,c,a){var l=t.direction,p=t.height,g=t.itemCount,d=t.itemSize,x=t.layout,S=t.width,v=l==="horizontal"||x==="horizontal",u=v?S:p,r=Math.max(0,g*d-u),h=Math.min(r,n*d),m=Math.max(0,n*d-u+d+a);switch(i==="smart"&&(s>=m-u&&s<=h+u?i="auto":i="center"),i){case"start":return h;case"end":return m;case"center":{var b=Math.round(m+(h-m)/2);return b<Math.ceil(u/2)?0:b>r+Math.floor(u/2)?r:b}case"auto":default:return s>=m&&s<=h?s:s<m?m:h}},getStartIndexForOffset:function(t,n){var i=t.itemCount,s=t.itemSize;return Math.max(0,Math.min(i-1,Math.floor(n/s)))},getStopIndexForStartIndex:function(t,n,i){var s=t.direction,c=t.height,a=t.itemCount,l=t.itemSize,p=t.layout,g=t.width,d=s==="horizontal"||p==="horizontal",x=n*l,S=d?g:c,v=Math.ceil((S+i-x)/l);return Math.max(0,Math.min(a-1,n+v-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){var n=t.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="number")throw Error('An invalid "itemSize" prop has been specified. Value should be a number. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});const St=0,Ie=35,vt=20;function yt(e){const{data:t,index:n,style:i}=e,s=t[n],c={...i,top:i.top+St};return y.cloneElement(s,{style:c})}const Ne=y.createContext({}),bt=y.forwardRef(function(t,n){const i=y.useContext(Ne);return o.jsx("div",{ref:n,...t,...i})}),Ct=y.forwardRef(function(t,n){const{children:i,...s}=t,c=y.Children.toArray(i),a=c.length,l=Math.min(a,vt)*Ie;return o.jsx("div",{ref:n,children:o.jsx(Ne.Provider,{value:s,children:o.jsx(xt,{height:l,width:"100%",outerElementType:bt,itemSize:Ie,overscanCount:5,itemCount:a,itemData:c,children:yt})})})}),Tt=e=>{const{value:t,placeholder:n,labelKey:i,labelText:s,label:c,todos:a,showSelectedCount:l,customTheme:p,showId:g}=e,d=(r,h)=>h?"Todos":g?`${r[i]} - ${r[s]}`:String(r[s]),{isAllSelected:x,updatedOptions:S,handleChange:v}=ze(e),u=p||X;return o.jsx(f.ThemeProvider,{theme:u,children:o.jsx(f.Autocomplete,{multiple:!0,fullWidth:!0,limitTags:1,id:"checkboxes-multiselect",options:S,value:t,onChange:v,disableCloseOnSelect:!0,disableListWrap:!0,ListboxComponent:Ct,isOptionEqualToValue:(r,h)=>r[i]===h[i],getOptionLabel:r=>d(r,r[i]==="-1"),renderTags:r=>l?x?a?"Todos":`${r.length} seleccionados`:`${r.length} seleccionados`:o.jsx(o.Fragment,{}),renderOption:(r,h,{selected:m})=>{const{key:b,...T}=r,w=h[i]==="-1",C=w?x:m;return o.jsxs(f.MenuItem,{...T,sx:{borderBottom:a&&h[s]==="Todos"?"1px #0000001F solid":"",gap:1,padding:"7px 16px !important"},children:[o.jsx(f.Checkbox,{checked:C}),o.jsx(f.ListItemText,{children:o.jsx(Le,{text:d(h,w),variant:"body1",placement:"bottom"})})]},String(h[i]))},renderInput:r=>o.jsx(f.TextField,{...r,label:c,placeholder:l?"":n,fullWidth:!0}),onOpen:e.onOpen})})};R.extend(Ye);const we="DD/MM/YYYY",_e=(e,t)=>{const n=e!==""?R(e,we):R().subtract(2,"month"),i=t!==""?R(t,we):R();return{defaultI:n,defaultF:i}},Fe=({defaultValue:e,onchange:t,onInvalidDate:n,clear:i})=>{const s=_e((e==null?void 0:e.inicial)||"",(e==null?void 0:e.final)||""),[c,a]=y.useState([s.defaultI,s.defaultF]),[l,p]=y.useState(null);y.useEffect(()=>{if(i===!0){const{defaultI:S,defaultF:v}=_e((e==null?void 0:e.inicial)||"",(e==null?void 0:e.final)||"");a([S,v])}},[i]);const g=S=>{const v=R(S[0]),u=R(S[1]),r=d([v,u]);a(S),r==""?p(""):(p(r),n&&n())},d=S=>{const v=R(S[0]),u=R(S[1]);return v.isValid()&&u.isValid()?v.year()<2010?"Fecha inicial mínima es del año 2010":u.year()<2010?"Fecha final mínima es del año 2010":v.isBefore(u)?"":"La fecha inicial debe ser menor que la fecha final":"Fecha no válida"};return{selectedDateRange:c,handleDateChange:g,warningMessage:l,handleClose:()=>{const S=R(c[0]),v=R(c[1]),u=d([S,v]);u==""?(p(""),t({fechai:S.format("DD/MM/YYYY"),fechaf:v.format("DD/MM/YYYY")})):(n&&n(),p(u))}}},It=e=>{const{selectedDateRange:t,handleDateChange:n,warningMessage:i,handleClose:s}=Fe(e),c=f.useTheme(),a=f.useMediaQuery(c.breakpoints.up("sm")),l=e.localeText??{start:"Fecha inicial",end:"Fecha final"};return o.jsx(f.Box,{display:"flex",gap:"0.75rem",width:"100%",justifyContent:"center",p:0,m:0,children:o.jsxs(f.Stack,{width:"100%",sx:{color:"text.secondary"},children:[o.jsx(f.Typography,{paddingY:1,children:e.label}),o.jsx(K.DateRangePicker,{sx:{"& .MuiMultiInputDateRangeField-separator":{display:"none"}},value:t,onClose:s,onChange:n,desktopModeMediaQuery:e.isInputIndividual&&a==!1?"sm":"",slots:e.isInputIndividual?{}:{field:K.SingleInputDateRangeField},slotProps:{textField:p=>{const g=p.position;return{size:"small",label:g==="start"?l.start:l.end,helperText:i,error:i!=""&&i!=null,fullWidth:!0,InputProps:{endAdornment:g==="start"?o.jsx(Ke,{sx:{color:"rgba(16, 24, 64, 0.54)"}}):o.jsx(Qe,{sx:{color:"rgba(16, 24, 64, 0.54)"}})}}}},localeText:l})]})})},wt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='RE'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20453.5433%20453.5433'%3e%3cdefs%3e%3cstyle%3e%20.cls-1%20{%20fill:%20url(%23Degradado_sin_nombre_34-4);%20}%20.cls-1,%20.cls-2,%20.cls-3,%20.cls-4,%20.cls-5,%20.cls-6,%20.cls-7%20{%20stroke-width:%200px;%20}%20.cls-2%20{%20fill:%20url(%23Degradado_sin_nombre_34-2);%20}%20.cls-3%20{%20fill:%20url(%23Degradado_sin_nombre_38-2);%20}%20.cls-4%20{%20fill:%20url(%23Degradado_sin_nombre_38);%20}%20.cls-5%20{%20fill:%20url(%23Degradado_sin_nombre_34-3);%20}%20.cls-6%20{%20fill:%20%23fff;%20}%20.cls-7%20{%20fill:%20url(%23Degradado_sin_nombre_34);%20}%20%3c/style%3e%3clinearGradient%20id='Degradado_sin_nombre_34'%20data-name='Degradado%20sin%20nombre%2034'%20x1='56.7178'%20y1='226.7717'%20x2='396.8255'%20y2='226.7717'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%230f666b'/%3e%3cstop%20offset='1'%20stop-color='%231d8d97'/%3e%3c/linearGradient%3e%3clinearGradient%20id='Degradado_sin_nombre_34-2'%20data-name='Degradado%20sin%20nombre%2034'%20x1='14.4541'%20y1='175.1242'%20x2='234.3511'%20y2='175.1242'%20xlink:href='%23Degradado_sin_nombre_34'/%3e%3clinearGradient%20id='Degradado_sin_nombre_38'%20data-name='Degradado%20sin%20nombre%2038'%20x1='293.0693'%20y1='107.0773'%20x2='515.5374'%20y2='107.0773'%20gradientTransform='translate(68.1195%20732.5845)%20rotate(-90)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%230f666b'/%3e%3cstop%20offset='1'%20stop-color='%231d8d97'/%3e%3c/linearGradient%3e%3clinearGradient%20id='Degradado_sin_nombre_38-2'%20data-name='Degradado%20sin%20nombre%2038'%20x1='314.2624'%20y1='364.163'%20x2='535.4932'%20y2='364.163'%20gradientTransform='translate(753.3515%20642.5821)%20rotate(-180)'%20xlink:href='%23Degradado_sin_nombre_38'/%3e%3clinearGradient%20id='Degradado_sin_nombre_34-3'%20data-name='Degradado%20sin%20nombre%2034'%20x1='117.6042'%20y1='14.1612'%20x2='122.7773'%20y2='14.1612'%20xlink:href='%23Degradado_sin_nombre_34'/%3e%3clinearGradient%20id='Degradado_sin_nombre_34-4'%20data-name='Degradado%20sin%20nombre%2034'%20x1='134.9218'%20y1='124.6425'%20x2='439.0892'%20y2='124.6425'%20xlink:href='%23Degradado_sin_nombre_34'/%3e%3c/defs%3e%3cg%3e%3crect%20class='cls-7'%20x='56.7178'%20y='60.1189'%20width='340.1077'%20height='333.3056'/%3e%3cpath%20class='cls-2'%20d='M124.4026,14.0281C63.6799,14.0281,14.4541,62.6329,14.4541,122.5894v213.6309c60.7232,0,109.9485-48.6043,109.9485-108.5614v-105.0695c0-59.9566,49.2258-108.5614,109.9485-108.5614h-109.9485Z'/%3e%3cpath%20class='cls-4'%20d='M14.4541,328.2812c0,61.4329,48.4982,111.234,108.3232,111.234h213.1623c0-61.4329-48.4977-111.234-108.3227-111.234h-104.8396c-59.825,0-108.3232-49.8009-108.3232-111.234v111.234Z'/%3e%3cpath%20class='cls-3'%20d='M328.4739,439.5152c61.0911,0,110.6151-48.6045,110.6151-108.5614V117.323c-61.0911,0-110.6151,48.6048-110.6151,108.5614v105.0695c0,59.9568-49.5245,108.5614-110.6156,108.5614h110.6156Z'/%3e%3cg%3e%3cpath%20class='cls-5'%20d='M122.7773,14.0281h-5.1731c0,.0903.0123.1765.0128.2663,1.7221-.083,3.4187-.2663,5.1603-.2663Z'/%3e%3cpath%20class='cls-1'%20d='M330.7665,14.0281h-99.666c-41.8918,0-78.1576,24.3255-96.1787,59.8592,19.2851,30.5087,52.7999,50.7552,91.0051,50.7552h104.8396c59.825,0,108.3227,49.5235,108.3227,110.6144v-110.6144c0-61.0904-48.4977-110.6144-108.3227-110.6144Z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cpath%20class='cls-6'%20d='M107.9407,179.8078c-2.6359-.9974-4.9904-2.2596-7.0614-3.785s-3.7469-3.3514-5.0268-5.4797c-1.281-2.1272-1.9209-4.6412-1.9209-7.5413,0-2.9376.6399-5.5829,1.9209-7.9369,1.2799-2.3534,2.9658-4.3499,5.0555-5.9884,2.0897-1.6379,4.4531-2.8996,7.0901-3.785,2.6348-.8843,5.3093-1.3273,8.0213-1.3273,2.1835,0,4.3119.2262,6.3839.678,2.0699.4518,4.0106,1.121,5.8179,2.0053,1.8084.8854,3.4457,1.9772,4.9154,3.2764,1.4685,1.2992,2.6922,2.8157,3.6719,4.5474.4138.678.5075,1.3659.2825,2.0621-.2262.6973-.5473,1.2523-.961,1.6666-.5274.4899-1.2148.7817-2.0621.8755-.8474.0943-1.666-.16-2.4571-.7624-2.1846-2.6739-4.5193-4.548-7.0051-5.621-2.4847-1.0736-5.3093-1.6103-8.4737-1.6103-1.7698,0-3.5395.2543-5.3093.763-1.7709.5081-3.3806,1.2523-4.8304,2.2315-1.4498.9798-2.637,2.2127-3.5594,3.7001-.9224,1.4879-1.3836,3.2113-1.3836,5.1686,0,2.0721.5451,3.7949,1.6385,5.1692,1.0912,1.3753,2.4759,2.5333,4.1519,3.4744,1.6749.9417,3.5108,1.7041,5.5079,2.2878,1.9959.5842,3.8981,1.1017,5.7054,1.5535,2.787.8667,5.5079,1.8453,8.1636,2.9376,2.6546,1.0923,5.0081,2.429,7.0614,4.0106,2.0522,1.5816,3.6995,3.4656,4.943,5.6491,1.2424,2.1846,1.8635,4.8017,1.8635,7.8525,0,3.2764-.6499,6.2422-1.9485,8.8973-1.2997,2.6546-3.0507,4.9341-5.2541,6.8352-2.2034,1.9022-4.7642,3.3707-7.6826,4.4062-2.9194,1.0355-5.979,1.5535-9.1798,1.5535-2.6745,0-5.2541-.358-7.7388-1.073-2.4858-.715-4.7742-1.6854-6.8639-2.9095-2.0908-1.2236-3.918-2.6734-5.4803-4.3499-1.5623-1.6754-2.7584-3.4739-3.587-5.3948-.5649-1.2048-.6499-2.2122-.2538-3.0221.395-.8099.9687-1.4211,1.7223-1.836.8661-.4893,1.6859-.5936,2.4582-.3111.7712.2825,1.5712.9516,2.4009,2.0059.715,1.5066,1.6848,2.8621,2.9084,4.0669,1.2236,1.206,2.6083,2.2315,4.153,3.0789,1.5436.8474,3.2195,1.4972,5.0268,1.9491,1.8084.4518,3.6719.678,5.5928.678,1.9959,0,3.9831-.3012,5.9602-.9042,1.9772-.6019,3.7569-1.5055,5.338-2.7115,1.5822-1.2048,2.8621-2.7015,3.8418-4.4911.9787-1.788,1.4685-3.8501,1.4685-6.1853,0-2.1471-.4899-3.945-1.4685-5.3953-.9798-1.4492-2.2795-2.6922-3.8981-3.7282-1.6197-1.0355-3.4457-1.9209-5.4792-2.6552-2.0346-.7343-4.0868-1.4404-6.1577-2.1184-2.712-.6399-5.3865-1.4592-8.0224-2.4571Z'/%3e%3cpath%20class='cls-6'%20d='M158.3292,213.335c0,.9798-.3487,1.8078-1.0449,2.4858-.6973.678-1.5347,1.0167-2.5134,1.0167-.9798,0-1.8183-.3387-2.5145-1.0167-.6973-.678-1.0449-1.5061-1.0449-2.4858v-65.3034c0-1.0167.3476-1.8547,1.0449-2.514.6962-.6587,1.5347-.9886,2.5145-.9886.9787,0,1.8161.3299,2.5134.9886.6962.6592,1.0449,1.4972,1.0449,2.514v65.3034Z'/%3e%3cpath%20class='cls-6'%20d='M180.1334,158.8212l-5.9316-8.4737c-.3762-.4888-.5925-1.0636-.6499-1.7229-.0563-.6587.0287-1.2799.2549-1.8641.2262-.5837.5737-1.0824,1.0449-1.4972.47-.4138,1.0449-.6212,1.7234-.6212h.2825c.3751.0756.7525.1887,1.1298.3387h.1125c.075.0761.1501.123.2262.1412.075.0193.1501.0662.2262.1412l.2251.1131c.1136.0761.2163.1694.3111.2825.0938.1131.1975.2262.3111.3387l.1688.2825,39.5443,56.3217v-54.5139c0-.9787.3476-1.8167,1.0449-2.514.6973-.6962,1.5535-1.0449,2.5708-1.0449s1.8547.3487,2.5134,1.0449c.6587.6973.9886,1.5353.9886,2.514v65.2472c0,.8667-.2736,1.6197-.8187,2.2596-.5462.641-1.2335,1.0366-2.0621,1.1866-.1512.0375-.3762.0563-.6775.0563-1.0548,0-1.9408-.3575-2.6557-1.0736l-.2251-.3387-.1699-.1694-39.488-56.4348v54.5139c0,.9798-.3487,1.8078-1.0449,2.4858-.6973.678-1.5347,1.0167-2.5134,1.0167-.9798,0-1.8183-.3387-2.5145-1.0167-.6973-.678-1.0449-1.5061-1.0449-2.4858v-65.1903c0-.9792.3476-1.8078,1.0449-2.4858.6962-.678,1.5347-1.0167,2.5145-1.0167h.2825c.4138.0756.79.1887,1.1298.3387h.1125c.075.0761.1501.123.2262.1412.075.0193.1501.0662.2262.1412.075,0,.1501.0381.2251.1131.4149.3018.7437.6973.9886,1.1861.2449.4899.3674,1.0173.3674,1.5822v10.6765Z'/%3e%3cpath%20class='cls-6'%20d='M297.6354,157.4089c0,.9417-.3398,1.7709-1.0173,2.4858-.7161.678-1.5734,1.0267-2.5708,1.0449-.9974.0193-1.8172-.3106-2.4571-.9886-2.9757-2.9376-6.2703-5.1405-9.8859-6.6096-3.6156-1.4685-7.3626-2.2028-11.2419-2.2028-4.0669,0-7.8999.7723-11.4957,2.3159-3.5969,1.5447-6.7315,3.6537-9.406,6.3271-2.6745,2.6745-4.783,5.8185-6.3266,9.4341-1.5447,3.6151-2.3159,7.4762-2.3159,11.5807,0,3.9544.7425,7.7206,2.231,11.2982,1.4873,3.5781,3.5395,6.7221,6.1577,9.4341,2.6171,2.7115,5.7241,4.8679,9.321,6.4678,3.5958,1.6015,7.5038,2.4009,11.7219,2.4009,3.8782.0381,7.6064-.6212,11.1857-1.9772,3.577-1.3555,6.8716-3.5395,9.8859-6.5527.715-.678,1.5623-1.0256,2.5421-1.0449.9787-.0188,1.8073.2918,2.4847.9318.715.678,1.0636,1.5254,1.046,2.5421-.0199,1.0167-.3487,1.8459-.9886,2.4858-3.6918,3.6912-7.7774,6.4115-12.2592,8.1631-4.4818,1.751-9.1147,2.6265-13.8966,2.6265-3.3519,0-6.5914-.443-9.716-1.3273-3.1269-.8843-6.0452-2.1184-8.7561-3.7001-2.712-1.5822-5.1791-3.4932-7.4012-5.7341-2.2221-2.2403-4.1232-4.7256-5.7054-7.4569-1.5811-2.7302-2.8058-5.6579-3.6719-8.7842-.8661-3.1258-1.2986-6.3834-1.2986-9.7728,0-3.2008.4138-6.3459,1.2424-9.4341.8275-3.0877,2.0059-5.9878,3.5307-8.6998,1.5248-2.7115,3.3795-5.2155,5.5641-7.5132,2.1835-2.2966,4.6418-4.2738,7.3725-5.9316,2.7297-1.6567,5.6855-2.9465,8.8687-3.8694,3.182-.9224,6.5616-1.3841,10.1408-1.3841,4.7444,0,9.3674.9235,13.8679,2.7683,4.5005,1.8453,8.5586,4.5756,12.1743,8.1912.715.7155,1.0736,1.5447,1.0736,2.4853Z'/%3e%3cpath%20class='cls-6'%20d='M353.4754,146.9018c4.4619,1.9204,8.36,4.5474,11.6932,7.8806,3.3332,3.3326,5.9691,7.2219,7.9087,11.6651,1.9397,4.4443,2.9095,9.2079,2.9095,14.2921,0,3.3895-.4435,6.6576-1.3273,9.8015-.886,3.1451-2.1184,6.0728-3.7006,8.7842-1.5822,2.7115-3.502,5.1973-5.7616,7.4569-2.2596,2.2596-4.7455,4.18-7.4575,5.7622-2.7109,1.5816-5.6403,2.8157-8.7837,3.7001-3.1456.8843-6.4126,1.3273-9.8021,1.3273s-6.6565-.443-9.801-1.3273c-3.1445-.8843-6.0728-2.1184-8.7837-3.7001-2.712-1.5822-5.1791-3.5026-7.4012-5.7622s-4.1232-4.7455-5.7054-7.4569c-1.5811-2.7115-2.8058-5.6392-3.6719-8.7842-.8661-3.144-1.2986-6.4121-1.2986-9.8015s.4325-6.6465,1.2986-9.7728c.8661-3.1252,2.0908-6.0447,3.6719-8.7561,1.5822-2.7115,3.4832-5.1874,5.7054-7.4282,2.2221-2.2403,4.6892-4.1612,7.4012-5.7622,2.7109-1.6004,5.6392-2.8334,8.7837-3.7001,3.1445-.8661,6.4115-1.2997,9.801-1.2997,5.0842,0,9.8583.9605,14.3214,2.8814ZM327.6021,153.5113c-3.5969,1.5447-6.7227,3.6532-9.3773,6.3266-2.6557,2.6745-4.7554,5.8003-6.299,9.3778-1.5447,3.5781-2.3159,7.4194-2.3159,11.5238,0,4.1436.7712,8.013,2.3159,11.6094,1.5436,3.5969,3.6432,6.732,6.299,9.4054,2.6546,2.6745,5.7804,4.7835,9.3773,6.3271,3.5958,1.5447,7.4652,2.3159,11.6094,2.3159,4.1044,0,7.9551-.7712,11.552-2.3159,3.5958-1.5436,6.7315-3.6526,9.406-6.3271,2.6734-2.6734,4.7819-5.8085,6.3266-9.4054,1.5436-3.5963,2.3159-7.4658,2.3159-11.6094,0-4.1044-.7723-7.9457-2.3159-11.5238-1.5447-3.5776-3.6532-6.7033-6.3266-9.3778-2.6745-2.6734-5.8102-4.7819-9.406-6.3266-3.5969-1.5441-7.4476-2.3165-11.552-2.3165-4.1441,0-8.0136.7723-11.6094,2.3165Z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='cls-6'%20d='M136.348,294.1054h-29.4172l-7.827,18.52c-.376.8531-.9724,1.4414-1.7911,1.7652-.8181.3235-1.6712.2979-2.558-.0768-.8525-.375-1.4064-.9721-1.6625-1.7908-.2561-.8184-.1967-1.6369.1792-2.4556l25.5289-59.0388c.5796-1.2959,1.5682-1.9441,2.9671-1.9441.6476,0,1.2278.1711,1.7393.5115.5121.3413.9037.8187,1.1772,1.4326l25.3753,59.0388c.3747.8531.4347,1.6803.1792,2.4812-.2561.8019-.7931,1.3902-1.6119,1.7652-.8187.3747-1.6543.4003-2.5068.0768-.8531-.3238-1.467-.8956-1.8417-1.714l-7.9301-18.5712ZM109.6425,287.6591h23.9945l-12.0232-28.2915-11.9713,28.2915Z'/%3e%3cpath%20class='cls-6'%20d='M172.3644,249.0844c3.0701,0,6.0284.3838,8.8762,1.151,2.8478.7675,5.5001,1.8595,7.9557,3.2743,2.4556,1.4158,4.707,3.1129,6.7529,5.0904,2.0465,1.9785,3.7864,4.1783,5.2184,6.5996,1.4326,2.4222,2.5493,5.0395,3.3511,7.8533.8013,2.8138,1.2022,5.7555,1.2022,8.825,0,4.6046-.8787,8.894-2.6348,12.8669-1.7568,3.9738-4.1437,7.4358-7.1619,10.3857-3.0189,2.9502-6.5487,5.2612-10.5905,6.9321-4.0419,1.6715-8.3648,2.5068-12.9693,2.5068h-10.999c-.8874,0-1.6462-.3069-2.277-.9208-.6314-.6139-.9461-1.3636-.9461-2.2511v-59.1413c0-.9208.3148-1.6796.9461-2.2767.6308-.5964,1.3895-.8952,2.277-.8952h10.999ZM172.5181,255.5816h-7.9295v52.5417h7.827c3.7171,0,7.205-.6651,10.4625-1.9953,3.2568-1.3299,6.0959-3.1719,8.5184-5.5251,2.4212-2.3535,4.331-5.1241,5.7299-8.3135,1.3977-3.1888,2.0971-6.6589,2.0971-10.4113,0-3.6834-.6995-7.1279-2.0971-10.3342-1.3989-3.2056-3.2999-5.986-5.7043-8.3392-2.405-2.3535-5.2359-4.212-8.4928-5.5766-3.2575-1.3636-6.7279-2.0465-10.4113-2.0465Z'/%3e%3cpath%20class='cls-6'%20d='M221.8878,286.3801v25.0175c0,.8874-.316,1.6372-.9468,2.2511-.6314.6139-1.3902.9208-2.2764.9208-.8874,0-1.6462-.3069-2.277-.9208-.6314-.6139-.9461-1.3636-.9461-2.2511v-59.1413c0-.9208.3148-1.6796.9461-2.2767.6308-.5964,1.3895-.8952,2.277-.8952h17.1898c2.6935,0,5.2184.4781,7.5716,1.4323,2.3532.9555,4.3997,2.2689,6.139,3.9394,1.7399,1.6715,3.112,3.65,4.1187,5.9345,1.0055,2.2854,1.5088,4.7582,1.5088,7.4183s-.5034,5.1248-1.5088,7.3927c-1.0067,2.2686-2.3788,4.2295-4.1187,5.8836-1.7393,1.6547-3.7858,2.9505-6.139,3.8882-2.3532.9383-4.8781,1.4067-7.5716,1.4067h-13.9667ZM221.8878,255.4282v24.5057h14.0179c1.8417,0,3.5466-.3326,5.116-.9977,1.5682-.6648,2.924-1.5604,4.0668-2.6857,1.1422-1.1257,2.0378-2.4303,2.686-3.9138.6476-1.4835.9724-3.0439.9724-4.6811,0-1.7396-.3329-3.3511-.998-4.8347-.6651-1.4838-1.5694-2.7707-2.7116-3.8626-1.1429-1.091-2.5068-1.9522-4.0924-2.5836-1.5863-.6308-3.2999-.9465-5.1416-.9465h-13.9154Z'/%3e%3cpath%20class='cls-6'%20d='M303.8973,267.8089c0,2.3198-.3835,4.4943-1.151,6.5231-.7675,2.0297-1.8336,3.837-3.1975,5.423-1.3646,1.586-2.9846,2.9249-4.86,4.0159-1.876,1.092-3.9226,1.842-6.1396,2.2511l14.8366,23.7384c.4771.8874.5627,1.7571.2561,2.6092-.3073.8528-.8699,1.4667-1.6887,1.8417-.7844.4094-1.5775.4862-2.3788.2301-.8019-.2557-1.4245-.7585-1.8673-1.5091l-16.3198-26.5522h-10.7947v25.0175c0,.8874-.316,1.6372-.9468,2.2511-.6314.6139-1.3902.9208-2.2764.9208-.8874,0-1.6462-.3069-2.277-.9208-.6314-.6139-.9461-1.3636-.9461-2.2511v-59.1413c0-.9208.3148-1.6796.9461-2.2767.6308-.5964,1.3895-.8952,2.277-.8952h17.1898c2.6935,0,5.2184.4781,7.5716,1.4323,2.3532.9555,4.3997,2.2689,6.139,3.9394,1.7399,1.6715,3.112,3.65,4.1187,5.9345,1.0055,2.2854,1.5088,4.7582,1.5088,7.4183ZM270.5925,255.4282v24.5057h14.0179c1.8417,0,3.5466-.3326,5.116-.9977,1.5682-.6648,2.924-1.5604,4.0668-2.6857,1.1422-1.1257,2.0378-2.4303,2.686-3.9138.6476-1.4835.9724-3.0439.9724-4.6811,0-1.7396-.3329-3.3511-.998-4.8347-.6651-1.4838-1.5694-2.7707-2.7116-3.8626-1.1429-1.091-2.5068-1.9522-4.0924-2.5836-1.5863-.6308-3.2999-.9465-5.1416-.9465h-13.9154Z'/%3e%3cpath%20class='cls-6'%20d='M356.464,251.2331c4.0419,1.7396,7.5722,4.1184,10.5905,7.137,3.0183,3.0183,5.4052,6.5405,7.1626,10.5646,1.7561,4.0247,2.6342,8.3392,2.6342,12.9434,0,3.0698-.4009,6.0291-1.2022,8.8762-.8013,2.8484-1.9185,5.4998-3.3505,7.9557-1.4326,2.4556-3.1719,4.7067-5.2184,6.7529-2.0465,2.0465-4.2979,3.7861-6.7535,5.2184-2.4556,1.4326-5.1079,2.5502-7.9551,3.3511-2.8484.8009-5.8067,1.2022-8.8762,1.2022s-6.0291-.4013-8.8762-1.2022c-2.8484-.8009-5.5001-1.9185-7.9557-3.3511-2.4556-1.4323-4.6901-3.1719-6.7023-5.2184-2.0128-2.0462-3.7346-4.2973-5.1666-6.7529-1.4326-2.4559-2.5418-5.1073-3.3255-7.9557-.785-2.8472-1.1766-5.8064-1.1766-8.8762s.3916-6.0194,1.1766-8.8506c.7838-2.8306,1.8929-5.4742,3.3255-7.9298,1.432-2.4559,3.1538-4.6979,5.1666-6.7276,2.0122-2.029,4.2467-3.7683,6.7023-5.2184,2.4556-1.4492,5.1073-2.5661,7.9557-3.3508,2.8472-.7844,5.8061-1.1769,8.8762-1.1769,4.6039,0,8.9274.8699,12.9687,2.6092ZM333.0328,257.2187c-3.2575,1.3989-6.0878,3.3087-8.4928,5.7299-2.4044,2.4222-4.306,5.2528-5.7043,8.4928-1.3989,3.2406-2.0977,6.7195-2.0977,10.4366,0,3.7524.6988,7.2569,2.0977,10.5134,1.3983,3.2575,3.2999,6.0968,5.7043,8.5184,2.405,2.4222,5.2353,4.3316,8.4928,5.7299,3.2568,1.3989,6.761,2.0974,10.5137,2.0974,3.7171,0,7.2044-.6985,10.4619-2.0974,3.2568-1.3983,6.0959-3.3077,8.5184-5.7299,2.4212-2.4216,4.331-5.2609,5.7299-8.5184,1.3983-3.2565,2.0977-6.761,2.0977-10.5134,0-3.7171-.6995-7.196-2.0977-10.4366-1.3989-3.24-3.3087-6.0706-5.7299-8.4928-2.4225-2.4212-5.2615-4.331-8.5184-5.7299-3.2575-1.398-6.7448-2.0974-10.4619-2.0974-3.7527,0-7.2569.6995-10.5137,2.0974Z'/%3e%3c/g%3e%3c/svg%3e",_t=({title:e,isLoading:t,zIndex:n=9999,sx:i,logo:s=wt,logoAlt:c="Logo ADPRO",logoWidth:a="120px"})=>t?o.jsx(f.ThemeProvider,{theme:D.SincoTheme,children:o.jsxs(f.Box,{className:"HttpRequestSpinnerCount",sx:{position:"fixed",height:"100%",width:"100%",background:"rgba(255, 255, 255, 0.5)",backdropFilter:"blur(5px)",top:0,left:0,display:"flex",justifyContent:"center",alignItems:"center",zIndex:n,...i},children:[o.jsxs(f.Box,{sx:{width:"auto",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",fontFamily:"Nunito, Segoe UI, sans-serif"},children:[o.jsx("img",{src:s,alt:c,className:"imagenLogoADPRO",width:a,style:{zIndex:10}}),o.jsxs(f.Box,{sx:{display:"flex",gap:"5px"},children:[o.jsx("div",{className:"pointLoading",style:{animationDelay:"0s"},children:"•"}),o.jsx("div",{className:"pointLoading",style:{animationDelay:"0.2s"},children:"•"}),o.jsx("div",{className:"pointLoading",style:{animationDelay:"0.4s"},children:"•"})]}),o.jsx(f.Box,{display:"flex",justifyContent:"center",alignItems:"center",children:o.jsx(f.Typography,{variant:"h5",sx:{color:"#10184099"},mt:1,children:e})})]}),o.jsx("style",{type:"text/css",children:`
2
2
 
3
3
  .pointLoading {
4
4
  color: rgb(10, 91, 94);
@@ -11,4 +11,4 @@
11
11
  0%, 100% { opacity: 1; }
12
12
  50% { opacity: 0; }
13
13
  }
14
- `})]})}):null;let _t=0;const ae=Me.create((e,t)=>({snackPack:[],open:!1,messageInfo:void 0,setNotification:n=>{const i={title:n.title,subtitle:n.subtitle,severity:n.severity,type:n.type,snackTransitionDirection:n.snackTransitionDirection,snackAnchorOrigin:n.snackAnchorOrigin,key:++_t};e(s=>({snackPack:[...s.snackPack,i]}))},close:()=>{e({open:!1})},processQueue:()=>{const{snackPack:n,messageInfo:i}=t();if(n.length>0&&!i){const s=n[0];e(c=>({messageInfo:s,snackPack:c.snackPack.slice(1),open:!0}))}},onExited:()=>{e({messageInfo:void 0}),t().processQueue()}}));function Ot(e){const{messageInfo:t}=ae();return o.jsx(p.Slide,{...e,direction:(t==null?void 0:t.snackTransitionDirection)??"up",mountOnEnter:!0,unmountOnExit:!0})}function _e(e,t){const n=t?{sx:{height:"1.25rem",width:"1.25rem"},fontSize:"medium"}:{fontSize:"medium"};switch(e){case"success":return o.jsx(Xe,{sx:{color:D.SincoTheme.palette.success.main,...n.sx},fontSize:n.fontSize});case"warning":return o.jsx(Je,{sx:{color:D.SincoTheme.palette.warning.main,...n.sx},fontSize:n.fontSize});case"error":return o.jsx(et,{sx:{color:D.SincoTheme.palette.error.main,...n.sx},fontSize:n.fontSize});default:return o.jsx(tt,{sx:{color:D.SincoTheme.palette.info.main,...n.sx},fontSize:n.fontSize})}}function Oe(e){switch(e){case"success":return D.SincoTheme.palette.success[50];case"warning":return D.SincoTheme.palette.warning[50];case"error":return D.SincoTheme.palette.error[50];default:return D.SincoTheme.palette.info[50]}}function Dt(e){switch(e){case"warning":return"warning";case"error":return"error";case"success":return"success";default:return"info"}}function De(e,t,n,i){return o.jsxs(o.Fragment,{children:[typeof e=="string"?o.jsx(p.Typography,{variant:n,color:D.SincoTheme.palette.text.primary,children:e}):e,t!==""&&(typeof t=="string"?o.jsx(p.Typography,{variant:i,color:D.SincoTheme.palette.text.primary,children:t}):t)]})}const Ae=5e3,At=3e3,kt=100,Mt=()=>{const{open:e,messageInfo:t,snackPack:n,close:i,processQueue:s,onExited:c}=ae();y.useEffect(()=>{s()},[n,t,e,s]);const a=(g,d)=>{i()},[l,f]=y.useState(100);return y.useEffect(()=>{let g;if(e&&t&&t.type!=="snack"){const d=Date.now();g=setInterval(()=>{const x=Date.now()-d,S=Math.max(100-x/Ae*100,0);f(S),S<=0&&clearInterval(g)},kt)}else f(100);return()=>clearInterval(g)},[e,t]),o.jsx(o.Fragment,{children:t&&(t.type==="snack"?o.jsx(fe,{anchorOrigin:t.snackAnchorOrigin??{horizontal:"center",vertical:"bottom"},open:e,autoHideDuration:At,onClose:a,slotProps:{transition:{onExited:c}},slots:{transition:Ot},message:t&&o.jsxs(p.Stack,{direction:"row",alignItems:"flex-start",gap:2,children:[_e(t.severity,!0),o.jsx(p.Stack,{direction:"column",spacing:.5,mt:.2,justifyContent:"center",alignItems:"flex-start",alignSelf:"stretch",children:De(t.title,t.subtitle,"body2","body2")})]}),action:o.jsx(me,{onClick:a,size:"small",sx:{height:"1.375rem",width:"1.375rem"},children:o.jsx(ge,{sx:{color:D.SincoTheme.palette.action.active,height:"1rem",width:"1rem"},fontSize:"small"})}),sx:{zIndex:"99999 !important","& .MuiPaper-root":{backgroundColor:Oe(t.severity),padding:"0.38rem 1rem",display:"flex",alignItems:"center",alignSelf:"stretch"},"& .MuiSnackbar-root":{zIndex:"999999 !important"},"& .MuiSnackbarContent-message":{padding:"0"}}},t?t.key:void 0):o.jsx(fe,{anchorOrigin:{horizontal:"right",vertical:"top"},open:e,autoHideDuration:Ae,onClose:a,slotProps:{transition:{onExited:c}},message:t&&o.jsxs(p.Box,{alignSelf:"stretch",sx:{minWidth:"288px !important",flex:1},children:[o.jsxs(p.Stack,{direction:"row",alignItems:"center",gap:"0.75rem",padding:"0.75rem",alignSelf:"stretch",sx:{minWidth:"288px !important",flex:1},children:[o.jsx(p.Box,{display:"flex",alignItems:"center",justifyContent:"center",width:"2.25rem",height:"2.25rem",borderRadius:"50%",bgcolor:t.severity==="warning"?D.SincoTheme.palette.warning[100]:t.severity==="error"?D.SincoTheme.palette.error[100]:t.severity==="success"?D.SincoTheme.palette.success[100]:D.SincoTheme.palette.info[100],children:_e(t.severity,!1)}),o.jsx(p.Divider,{orientation:"vertical",flexItem:!0}),o.jsx(p.Stack,{direction:"column",spacing:.5,justifyContent:"center",alignItems:"flex-start",alignSelf:"stretch",flex:1,children:De(t.title,t.subtitle,"subtitle2","body2")}),o.jsx(p.Box,{display:"flex",alignItems:"flex-start",justifyContent:"center",alignSelf:"stretch",pt:t.subtitle===""?1:0,children:o.jsx(me,{onClick:a,size:"small",sx:{height:"1.375rem",width:"1.375rem"},children:o.jsx(ge,{sx:{color:D.SincoTheme.palette.action.active,height:"1rem",width:"1rem"},fontSize:"small"})})})]}),o.jsx(p.LinearProgress,{variant:"determinate",value:l,color:Dt(t.severity),sx:{flex:1}})]}),sx:{zIndex:"99999 !important","& .MuiSnackbar-root":{zIndex:"999999 !important"},"& .MuiPaper-root":{backgroundColor:Oe(t.severity),padding:0,display:"flex",alignItems:"center",alignSelf:"stretch"},"& .MuiSnackbarContent-message":{minWidth:"288px !important",padding:"0",alignSelf:"stretch",display:"flex",alignItems:"flex-start",justifyContent:"flex-start",flex:1}}},t?t.key:void 0))})},qe={id:"ID",Usuario:"Usuario",FechaHora:"Fecha y hora",Antes:"Anterior",Despues:"Actual",Origen:"Origen Cambio",Comentario:"Comentario",TipoAfectacion:"Tipo de afectación"},Pt=(e,t)=>({id:-1,open:!1,title:"",subtitle:"",serviceUsuario:{request:"",type:{key:"",label:""}},fullScreen:!1,fullWidth:!1,filterName:"",onClose:()=>e(n=>({...n,open:!1})),show:({id:n,open:i,serviceUsuario:s,title:c,subtitle:a,fullScreen:l,fullWidth:f,filterName:g})=>e({id:n,open:i,serviceUsuario:s,title:c,subtitle:a,fullScreen:l||!1,fullWidth:f||!1,filterName:g||""}),data:{},expanded:!1,date:[R().subtract(1,"month"),R()],usuario:null,isLoading:!1,apiFetch:null,setApiFetch:n=>e(i=>({...i,apiFetch:n})),setDate:n=>e(i=>({...i,date:n})),setUsuario:n=>e(i=>({...i,usuario:n})),setExpanded:n=>e(i=>({...i,expanded:n})),fetchAuditoria:async()=>{try{e({data:{},isLoading:!0});const{date:n,usuario:i,id:s,apiFetch:c,serviceUsuario:a}=t();if(!c){console.error("No existe función apiFetch en el store. Usa setApiFetch para configurarla."),e({isLoading:!1});return}const l=i&&i[a.type.key]!==void 0?Number(i[a.type.key]):-1,f=await c(s,n,l);e({data:f,isLoading:!1})}catch(n){console.error(n),e({data:{},isLoading:!1})}}}),O=Me.create()(nt.devtools((e,t,n)=>({...Pt(e,t)}))),Rt=({handleConsultarAuditoria:e})=>{const t=O(u=>u.date),n=O(u=>u.isLoading),i=O(u=>u.expanded),s=O(u=>u.usuario),c=O(u=>u.setUsuario),a=O(u=>u.setDate),l=O(u=>u.setExpanded),f=O(u=>u.serviceUsuario),g=O(u=>u.filterName),d=f.type.key,x=f.type.label,S=u=>{c(u)},v=()=>{l(!i)};return y.useEffect(()=>{c({[d]:"-1",[x]:""})},[]),o.jsxs(p.Stack,{direction:"row",alignItems:"center",gap:1,justifyContent:"space-between",width:"100%",children:[o.jsxs(p.Stack,{direction:"row",alignItems:"center",gap:.5,children:[o.jsx(K.DateRangePicker,{value:t,onChange:a,disabled:!1,slotProps:{textField:u=>{const r=u.position;return{disabled:n,sx:{width:"150px",margin:"0px !important"},label:r==="start"?"Fecha inicial":"Fecha final",size:"small",InputProps:{endAdornment:o.jsx(p.IconButton,{"aria-label":"Close",size:"small",children:o.jsx(K.CalendarIcon,{})})}}}}}),o.jsx(p.FormControl,{sx:{m:1,minWidth:280},children:o.jsx(Ee,{fullWidth:!0,freeSolo:!0,labelKey:d,labelText:x,type:"request",action:"search",disabled:n,getOptionLabel:u=>{const r=u;return r?r[d]===""||r[d]==="-1"?"":`${r[d]} - ${r[x]}`:""},request:{serviceUrl:f.request,method:"get",filterName:g===""?void 0:g},value:{[d]:`${s==null?void 0:s[d]}`,[x]:`${s==null?void 0:s[x]}`},handleValue:u=>{u==null?S({[d]:"-1",[x]:""}):S(u)},label:"Nombre o código del usuario",showId:!0})}),o.jsx(p.Button,{variant:"contained",onClick:e,disabled:n,children:"Filtrar"})]}),o.jsxs(p.Button,{sx:{marginRight:1},disabled:n,variant:"text",startIcon:i?o.jsx(W.UnfoldLess,{}):o.jsx(W.UnfoldMore,{}),onClick:v,children:[i?"Contraer":"Expandir"," todo"]})]})},Et=()=>o.jsx(p.Stack,{gap:.5,children:Array.from({length:5}).map((e,t)=>o.jsx(p.Skeleton,{variant:"rounded",height:40},t))}),zt=({cantidad:e,isExpanded:t,titulo:n,ultimaMod:i,data:s,onHandlerExpanded:c})=>{var l;const a=y.useMemo(()=>{if(!s||s.length===0)return[];const f=new Set;return s.forEach(g=>{Object.keys(g).forEach(d=>{d.startsWith("$")&&f.add(d)})}),[...f].map(g=>{const d=g.replace(/^\$/,""),x=qe[d]||d;return d==="Antes"||d==="Despues"?{field:g,headerName:x,headerAlign:"left",align:"left",editable:!1,flex:1,renderCell:S=>o.jsxs(p.Stack,{direction:"row",gap:1,alignItems:"center",justifyContent:"flex-start",children:[o.jsx(W.FiberManualRecord,{sx:{width:"13px",height:"13px",color:d==="Antes"?"rgba(232, 161, 161, 1)":"rgba(221, 239, 196, 1)"}}),o.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:S.value})]})}:{field:g,headerName:x,headerAlign:"left",align:"left",editable:!1,flex:1}})},[s]);return o.jsxs(p.Accordion,{expanded:t,onChange:c(n),sx:{margin:"0rem !important","& .MuiPaper-root":{margin:"0rem !important"}},children:[o.jsx(p.AccordionSummary,{expandIcon:o.jsx(W.ExpandMore,{}),"aria-controls":`panel-content-${n}`,id:`panel-content-${n}`,children:o.jsxs(p.Stack,{direction:"row",alignItems:"center",gap:1,justifyContent:"space-between",width:"100%",children:[o.jsx(p.Typography,{variant:"subtitle1",children:n}),o.jsxs(p.Stack,{direction:"row",alignItems:"center",gap:1,padding:"0px 16px",children:[o.jsx(p.Typography,{variant:"caption",children:`Última modificación: ${i}`}),o.jsx(p.Chip,{label:`${e} ${e===1?"cambio":"cambios"}`,size:"medium",variant:"outlined",color:"primary"})]})]})}),o.jsx(p.AccordionDetails,{children:s.length>0&&o.jsx(it.DataGridPro,{columns:a,rows:s,pagination:!0,localeText:(l=rt.esES.components)==null?void 0:l.MuiDataGrid.defaultProps.localeText,pageSizeOptions:[10],getRowHeight:()=>22,autoHeight:!0,initialState:{pagination:{paginationModel:{pageSize:10}}},sx:{"& .MuiDataGrid-footerContainer":{minHeight:"2rem !important",height:"2rem !important"},"& .MuiTablePagination-root":{minHeight:"2rem !important",height:"2rem !important"},"& .MuiToolbar-root":{minHeight:"2rem !important",height:"2rem !important"},"& .MuiTablePagination-displayedRows":{minHeight:"2rem !important",height:"2rem !important",margin:"0px !important",display:"flex",alignItems:"center",justifyContent:"center"},"& .MuiTablePagination-actions .MuiButtonBase-root":{minHeight:"2rem !important",height:"2rem !important"}}})})]})},Lt=()=>{const e=O(l=>l.data),t=O(l=>l.expanded),n=O(l=>l.isLoading),[i,s]=y.useState([]),c=Object.keys(e).sort(),a=l=>(f,g)=>{s(d=>g?[...d,l]:d.filter(x=>x!==l))};return o.jsx(o.Fragment,{children:n?o.jsx(Et,{}):c.length==0?o.jsx(p.Alert,{severity:"warning",children:"No existen datos con estos criterios de búsqueda"}):c.map(l=>{const f=e[l].length,g=f>0&&e[l][f-1].$FechaHora||"",d=t||i.includes(l);return o.jsx(zt,{cantidad:f,isExpanded:d,titulo:l,ultimaMod:g,data:e[l],onHandlerExpanded:a},l)})})},Nt=({handleConsultarAuditoria:e})=>o.jsxs(p.Stack,{direction:"column",gap:1,width:"100%",children:[o.jsx(Rt,{handleConsultarAuditoria:e}),o.jsx(Lt,{})]}),Ft=e=>o.jsxs(p.SvgIcon,{...e,viewBox:"0 0 40 40",width:"40",height:"40",children:[o.jsx("circle",{cx:"20",cy:"20",r:"20",fill:"#E6F3F8"}),o.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.1107 13.3153H21.0552L21.0514 13.3191C19.1828 13.3334 17.4273 14.0677 16.1043 15.3906C13.7958 17.6991 13.3931 21.2576 15.0227 23.9986L8.06708 30.9507C7.7347 31.2831 7.55273 31.7244 7.55273 32.1921C7.55273 32.6598 7.7347 33.1011 8.06708 33.4335C8.39947 33.7659 8.84081 33.9479 9.30851 33.9479C9.77622 33.9479 10.2176 33.7659 10.5499 33.4335L17.5057 26.4777C18.5919 27.12 19.8427 27.4645 21.1143 27.4645C23.0002 27.4645 24.7775 26.7288 26.1136 25.3927C27.4497 24.0566 28.1854 22.2793 28.1854 20.3899C28.1854 18.5005 27.4497 16.7232 26.1136 15.3871C24.7775 14.0509 23.0002 13.3153 21.1107 13.3153ZM16.9261 16.2125C18.0824 15.0562 19.5945 14.48 21.1072 14.48C22.6199 14.48 24.1355 15.0563 25.288 16.2123C27.5968 18.5211 27.597 22.2657 25.2881 24.5781C24.1355 25.7307 22.6234 26.307 21.1107 26.307C19.8181 26.307 18.5294 25.8878 17.4608 25.0462L17.3673 24.9725L9.72811 32.6117C9.61107 32.7287 9.45972 32.7868 9.30851 32.7868C9.15731 32.7868 9.00596 32.7287 8.88892 32.6117C8.65517 32.378 8.65603 32.0025 8.88832 31.7731L16.528 24.1334L16.4545 24.0399C14.6312 21.7206 14.7852 18.3499 16.9261 16.2125Z",fill:"#6392BD"}),o.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M25.1686 17.1759C25.5221 17.5291 25.5223 18.102 25.1691 18.4554L19.621 24.0078L16.7476 21.1343C16.3942 20.781 16.3942 20.2081 16.7476 19.8548C17.1009 19.5014 17.6738 19.5014 18.0271 19.8548L19.6205 21.4482L23.8891 17.1764C24.2423 16.8229 24.8152 16.8227 25.1686 17.1759Z",fill:"#00BCD4"}),o.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.9343 7.06944C10.8113 7.06944 10.6987 7.17305 10.6987 7.31574V26.7684C10.6987 27.0644 10.4589 27.3042 10.1629 27.3042C9.867 27.3042 9.6271 27.0644 9.6271 26.7684V7.31574C9.6271 6.59737 10.2034 5.99779 10.9343 5.99779H26.0099C26.5207 5.99779 26.9332 6.41669 26.9332 6.92467V11.3792L31.4131 11.3722C31.9239 11.3722 32.3364 11.7911 32.3364 12.2991V32.333C32.3364 33.0514 31.7601 33.6509 31.0292 33.6509H12.9291C12.6331 33.6509 12.3932 33.411 12.3932 33.1151C12.3932 32.8192 12.6331 32.5793 12.9291 32.5793H31.0292C31.1522 32.5793 31.2647 32.4757 31.2647 32.333V12.4441L26.7849 12.451C26.2673 12.451 25.8616 12.0289 25.8616 11.5241V7.06944H10.9343Z",fill:"#6392BD"}),o.jsx("path",{d:"M27.9938 9.89453V6.16329C27.9938 5.98749 28.2055 5.90139 28.3275 6.02337L32.2525 9.95194C32.3745 10.0739 32.2883 10.2856 32.1126 10.2856H28.3813C28.166 10.2856 27.9902 10.1098 27.9902 9.89453H27.9938Z",fill:"#00BCD4"})]}),qt=()=>{const e=O(s=>s.title),t=O(s=>s.subtitle),n=O(s=>s.onClose),i=p.useTheme();return o.jsxs(p.Stack,{direction:"row",alignItems:"flex-start",alignSelf:"stretch",children:[o.jsxs(p.Stack,{direction:"row",alignItems:"center",gap:2,flex:"1 0 0",children:[o.jsx(Ft,{sx:{height:"2.5rem",width:"2.5rem"}}),o.jsxs(p.Stack,{children:[o.jsx(p.Typography,{variant:"h6",color:i.palette.text.primary,children:e}),o.jsx(p.Typography,{variant:"body2",color:i.palette.text.secondary,children:`${t}`})]})]}),o.jsx(p.IconButton,{"aria-label":"Close",size:"small",onClick:n,sx:{height:"22px",width:"22px"},children:o.jsx(W.Close,{sx:{height:"16px",width:"16px"},color:"action"})})]})},Ut=()=>{const e=O(a=>a.open),t=O(a=>a.fullScreen),n=O(a=>a.fullWidth),i=O(a=>a.fetchAuditoria),s=O(a=>a.onClose),c=y.useCallback(()=>{i()},[i]);return y.useEffect(()=>{e&&c()},[e,c]),o.jsx(p.ThemeProvider,{theme:X,children:o.jsxs(p.Dialog,{fullWidth:n,fullScreen:t,maxWidth:"lg",open:e,onClose:s,sx:{"& .MuiDialog-container":{alignItems:"flex-start"},"& .MuiDialog-paper":{height:"100vh",display:"flex",flexDirection:"column"}},children:[o.jsx(p.DialogTitle,{sx:{display:"flex",padding:"8px 16px",flexDirection:"column",alignItems:"flex-start",alignSelf:"stretch"},children:o.jsx(qt,{})}),o.jsx(p.DialogContent,{sx:{display:"flex",padding:"12px 16px 8px 16px",flexDirection:"column",alignItems:"flex-start",gap:1.5,alignSelf:"stretch",flex:"1 0 0"},children:o.jsx(Nt,{handleConsultarAuditoria:c})})]})})},Wt={stateSession:{idEmpresa:-1,IdObra:0,IdSucursal:0,idUsuario:0,NitEmpresa:"",NombreEmpresa:"",NombreSucursal:"",NomEmpresa:"",NomObra:"",NomUsuario:"",UsuDominio:"",idOrigen:0,URL_Entorno:""}},Ue=y.createContext(Wt),Bt={idEmpresa:-1,IdObra:0,IdSucursal:0,idUsuario:0,NitEmpresa:"",NombreEmpresa:"",NombreSucursal:"",NomEmpresa:"",NomObra:"",NomUsuario:"",UsuDominio:"",idOrigen:0,URL_Entorno:""},We=e=>e.getDatosSesion?e.getDatosSesion():e.parent&&e.parent.getDatosSesion?e.parent.getDatosSesion():e.parent&&e.parent!==e?We(e.parent):Bt,Be=()=>window.location.href.includes("localhost")?{idEmpresa:1,IdObra:392,IdSucursal:392,idUsuario:50,NitEmpresa:"",NombreEmpresa:"",NombreSucursal:"",NomEmpresa:"",NomObra:"",NomUsuario:"jhonnatan",UsuDominio:"SINCO\\jhonnatan",idOrigen:0,URL_Entorno:window.location.href}:We(window);function $t({children:e}){return o.jsx(Ue.Provider,{value:{stateSession:Be()},children:e})}exports.ADPROTheme=X;exports.AuditoriaADPRO=Ut;exports.AutocompleteADPRO=Ee;exports.EllipsisWithTooltip=Le;exports.LoadingADPRO=jt;exports.MultiSelectADPRO=Tt;exports.NotificationADPRO=Mt;exports.RangoFechasADPRO=It;exports.RequestADPRO=Pe;exports.SessionContext=Ue;exports.SessionProvider=$t;exports.columnsAudit=qe;exports.getAuthorization=se;exports.getSession=Be;exports.getSincoERPAuthorization=Q;exports.useAuditoriaStore=O;exports.useAutocompleteADPRO=Re;exports.useMultiSelectADPRO=ze;exports.useNotificationStore=ae;exports.useRangoFechasADPRO=Fe;
14
+ `})]})}):null;let jt=0;const ae=Me.create((e,t)=>({snackPack:[],open:!1,messageInfo:void 0,setNotification:n=>{const i={title:n.title,subtitle:n.subtitle,severity:n.severity,type:n.type,snackTransitionDirection:n.snackTransitionDirection,snackAnchorOrigin:n.snackAnchorOrigin,key:++jt};e(s=>({snackPack:[...s.snackPack,i]}))},close:()=>{e({open:!1})},processQueue:()=>{const{snackPack:n,messageInfo:i}=t();if(n.length>0&&!i){const s=n[0];e(c=>({messageInfo:s,snackPack:c.snackPack.slice(1),open:!0}))}},onExited:()=>{e({messageInfo:void 0}),t().processQueue()}}));function Ot(e){const{messageInfo:t}=ae();return o.jsx(f.Slide,{...e,direction:(t==null?void 0:t.snackTransitionDirection)??"up",mountOnEnter:!0,unmountOnExit:!0})}function je(e,t){const n=t?{sx:{height:"1.25rem",width:"1.25rem"},fontSize:"medium"}:{fontSize:"medium"};switch(e){case"success":return o.jsx(Xe,{sx:{color:D.SincoTheme.palette.success.main,...n.sx},fontSize:n.fontSize});case"warning":return o.jsx(Je,{sx:{color:D.SincoTheme.palette.warning.main,...n.sx},fontSize:n.fontSize});case"error":return o.jsx(et,{sx:{color:D.SincoTheme.palette.error.main,...n.sx},fontSize:n.fontSize});default:return o.jsx(tt,{sx:{color:D.SincoTheme.palette.info.main,...n.sx},fontSize:n.fontSize})}}function Oe(e){switch(e){case"success":return D.SincoTheme.palette.success[50];case"warning":return D.SincoTheme.palette.warning[50];case"error":return D.SincoTheme.palette.error[50];default:return D.SincoTheme.palette.info[50]}}function Dt(e){switch(e){case"warning":return"warning";case"error":return"error";case"success":return"success";default:return"info"}}function De(e,t,n,i){return o.jsxs(o.Fragment,{children:[typeof e=="string"?o.jsx(f.Typography,{variant:n,color:D.SincoTheme.palette.text.primary,children:e}):e,t!==""&&(typeof t=="string"?o.jsx(f.Typography,{variant:i,color:D.SincoTheme.palette.text.primary,children:t}):t)]})}const Ae=5e3,At=3e3,kt=100,Mt=()=>{const{open:e,messageInfo:t,snackPack:n,close:i,processQueue:s,onExited:c}=ae();y.useEffect(()=>{s()},[n,t,e,s]);const a=(g,d)=>{i()},[l,p]=y.useState(100);return y.useEffect(()=>{let g;if(e&&t&&t.type!=="snack"){const d=Date.now();g=setInterval(()=>{const x=Date.now()-d,S=Math.max(100-x/Ae*100,0);p(S),S<=0&&clearInterval(g)},kt)}else p(100);return()=>clearInterval(g)},[e,t]),o.jsx(o.Fragment,{children:t&&(t.type==="snack"?o.jsx(pe,{anchorOrigin:t.snackAnchorOrigin??{horizontal:"center",vertical:"bottom"},open:e,autoHideDuration:At,onClose:a,slotProps:{transition:{onExited:c}},slots:{transition:Ot},message:t&&o.jsxs(f.Stack,{direction:"row",alignItems:"flex-start",gap:2,children:[je(t.severity,!0),o.jsx(f.Stack,{direction:"column",spacing:.5,mt:.2,justifyContent:"center",alignItems:"flex-start",alignSelf:"stretch",children:De(t.title,t.subtitle,"body2","body2")})]}),action:o.jsx(me,{onClick:a,size:"small",sx:{height:"1.375rem",width:"1.375rem"},children:o.jsx(ge,{sx:{color:D.SincoTheme.palette.action.active,height:"1rem",width:"1rem"},fontSize:"small"})}),sx:{zIndex:"99999 !important","& .MuiPaper-root":{backgroundColor:Oe(t.severity),padding:"0.38rem 1rem",display:"flex",alignItems:"center",alignSelf:"stretch"},"& .MuiSnackbar-root":{zIndex:"999999 !important"},"& .MuiSnackbarContent-message":{padding:"0"}}},t?t.key:void 0):o.jsx(pe,{anchorOrigin:{horizontal:"right",vertical:"top"},open:e,autoHideDuration:Ae,onClose:a,slotProps:{transition:{onExited:c}},message:t&&o.jsxs(f.Box,{alignSelf:"stretch",sx:{minWidth:"288px !important",flex:1},children:[o.jsxs(f.Stack,{direction:"row",alignItems:"center",gap:"0.75rem",padding:"0.75rem",alignSelf:"stretch",sx:{minWidth:"288px !important",flex:1},children:[o.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",width:"2.25rem",height:"2.25rem",borderRadius:"50%",bgcolor:t.severity==="warning"?D.SincoTheme.palette.warning[100]:t.severity==="error"?D.SincoTheme.palette.error[100]:t.severity==="success"?D.SincoTheme.palette.success[100]:D.SincoTheme.palette.info[100],children:je(t.severity,!1)}),o.jsx(f.Divider,{orientation:"vertical",flexItem:!0}),o.jsx(f.Stack,{direction:"column",spacing:.5,justifyContent:"center",alignItems:"flex-start",alignSelf:"stretch",flex:1,children:De(t.title,t.subtitle,"subtitle2","body2")}),o.jsx(f.Box,{display:"flex",alignItems:"flex-start",justifyContent:"center",alignSelf:"stretch",pt:t.subtitle===""?1:0,children:o.jsx(me,{onClick:a,size:"small",sx:{height:"1.375rem",width:"1.375rem"},children:o.jsx(ge,{sx:{color:D.SincoTheme.palette.action.active,height:"1rem",width:"1rem"},fontSize:"small"})})})]}),o.jsx(f.LinearProgress,{variant:"determinate",value:l,color:Dt(t.severity),sx:{flex:1}})]}),sx:{zIndex:"99999 !important","& .MuiSnackbar-root":{zIndex:"999999 !important"},"& .MuiPaper-root":{backgroundColor:Oe(t.severity),padding:0,display:"flex",alignItems:"center",alignSelf:"stretch"},"& .MuiSnackbarContent-message":{minWidth:"288px !important",padding:"0",alignSelf:"stretch",display:"flex",alignItems:"flex-start",justifyContent:"flex-start",flex:1}}},t?t.key:void 0))})},qe={id:"ID",Usuario:"Usuario",FechaHora:"Fecha y hora",Antes:"Anterior",Despues:"Actual",Origen:"Origen Cambio",Comentario:"Comentario",TipoAfectacion:"Tipo de afectación"},Pt=(e,t)=>({id:-1,open:!1,title:"",subtitle:"",serviceUsuario:{request:"",type:{key:"",label:""}},fullScreen:!1,fullWidth:!1,filterName:"",onClose:()=>e(n=>({...n,open:!1})),show:({id:n,open:i,serviceUsuario:s,title:c,subtitle:a,fullScreen:l,fullWidth:p,filterName:g})=>e({id:n,open:i,serviceUsuario:s,title:c,subtitle:a,fullScreen:l||!1,fullWidth:p||!1,filterName:g||""}),data:{},expanded:!1,date:[R().subtract(1,"month"),R()],usuario:null,isLoading:!1,apiFetch:null,setApiFetch:n=>e(i=>({...i,apiFetch:n})),setDate:n=>e(i=>({...i,date:n})),setUsuario:n=>e(i=>({...i,usuario:n})),setExpanded:n=>e(i=>({...i,expanded:n})),fetchAuditoria:async()=>{try{e({data:{},isLoading:!0});const{date:n,usuario:i,id:s,apiFetch:c,serviceUsuario:a}=t();if(!c){console.error("No existe función apiFetch en el store. Usa setApiFetch para configurarla."),e({isLoading:!1});return}const l=i&&i[a.type.key]!==void 0?Number(i[a.type.key]):-1,p=await c(s,n,l);e({data:p,isLoading:!1})}catch(n){console.error(n),e({data:{},isLoading:!1})}}}),O=Me.create()(nt.devtools((e,t,n)=>({...Pt(e,t)}))),Rt=({handleConsultarAuditoria:e})=>{const t=O(u=>u.date),n=O(u=>u.isLoading),i=O(u=>u.expanded),s=O(u=>u.usuario),c=O(u=>u.setUsuario),a=O(u=>u.setDate),l=O(u=>u.setExpanded),p=O(u=>u.serviceUsuario),g=O(u=>u.filterName),d=p.type.key,x=p.type.label,S=u=>{c(u)},v=()=>{l(!i)};return y.useEffect(()=>{c({[d]:"-1",[x]:""})},[]),o.jsxs(f.Stack,{direction:"row",alignItems:"center",gap:1,justifyContent:"space-between",width:"100%",children:[o.jsxs(f.Stack,{direction:"row",alignItems:"center",gap:.5,children:[o.jsx(K.DateRangePicker,{value:t,onChange:a,disabled:!1,slotProps:{textField:u=>{const r=u.position;return{disabled:n,sx:{width:"150px",margin:"0px !important"},label:r==="start"?"Fecha inicial":"Fecha final",size:"small",InputProps:{endAdornment:o.jsx(f.IconButton,{"aria-label":"Close",size:"small",children:o.jsx(K.CalendarIcon,{})})}}}}}),o.jsx(f.FormControl,{sx:{m:1,minWidth:280},children:o.jsx(Ee,{fullWidth:!0,freeSolo:!0,labelKey:d,labelText:x,type:"request",action:"search",disabled:n,getOptionLabel:u=>{const r=u;return r?r[d]===""||r[d]==="-1"?"":`${r[d]} - ${r[x]}`:""},request:{serviceUrl:p.request,method:"get",filterName:g===""?void 0:g},value:{[d]:`${s==null?void 0:s[d]}`,[x]:`${s==null?void 0:s[x]}`},handleValue:u=>{u==null?S({[d]:"-1",[x]:""}):S(u)},label:"Nombre o código del usuario",showId:!0})}),o.jsx(f.Button,{variant:"contained",onClick:e,disabled:n,children:"Filtrar"})]}),o.jsxs(f.Button,{sx:{marginRight:1},disabled:n,variant:"text",startIcon:i?o.jsx(W.UnfoldLess,{}):o.jsx(W.UnfoldMore,{}),onClick:v,children:[i?"Contraer":"Expandir"," todo"]})]})},Et=()=>o.jsx(f.Stack,{gap:.5,children:Array.from({length:5}).map((e,t)=>o.jsx(f.Skeleton,{variant:"rounded",height:40},t))}),zt=({cantidad:e,isExpanded:t,titulo:n,ultimaMod:i,data:s,onHandlerExpanded:c})=>{var l;const a=y.useMemo(()=>{if(!s||s.length===0)return[];const p=new Set;return s.forEach(g=>{Object.keys(g).forEach(d=>{d.startsWith("$")&&p.add(d)})}),[...p].map(g=>{const d=g.replace(/^\$/,""),x=qe[d]||d;return d==="Antes"||d==="Despues"?{field:g,headerName:x,headerAlign:"left",align:"left",editable:!1,flex:1,renderCell:S=>o.jsxs(f.Stack,{direction:"row",gap:1,alignItems:"center",justifyContent:"flex-start",children:[o.jsx(W.FiberManualRecord,{sx:{width:"13px",height:"13px",color:d==="Antes"?"rgba(232, 161, 161, 1)":"rgba(221, 239, 196, 1)"}}),o.jsx(f.Typography,{variant:"body2",color:"text.secondary",children:S.value})]})}:{field:g,headerName:x,headerAlign:"left",align:"left",editable:!1,flex:1}})},[s]);return o.jsxs(f.Accordion,{expanded:t,onChange:c(n),sx:{margin:"0rem !important","& .MuiPaper-root":{margin:"0rem !important"}},children:[o.jsx(f.AccordionSummary,{expandIcon:o.jsx(W.ExpandMore,{}),"aria-controls":`panel-content-${n}`,id:`panel-content-${n}`,children:o.jsxs(f.Stack,{direction:"row",alignItems:"center",gap:1,justifyContent:"space-between",width:"100%",children:[o.jsx(f.Typography,{variant:"subtitle1",children:n}),o.jsxs(f.Stack,{direction:"row",alignItems:"center",gap:1,padding:"0px 16px",children:[o.jsx(f.Typography,{variant:"caption",children:`Última modificación: ${i}`}),o.jsx(f.Chip,{label:`${e} ${e===1?"cambio":"cambios"}`,size:"medium",variant:"outlined",color:"primary"})]})]})}),o.jsx(f.AccordionDetails,{children:s.length>0&&o.jsx(it.DataGridPro,{columns:a,rows:s,pagination:!0,localeText:(l=rt.esES.components)==null?void 0:l.MuiDataGrid.defaultProps.localeText,pageSizeOptions:[10],getRowHeight:()=>22,autoHeight:!0,initialState:{pagination:{paginationModel:{pageSize:10}}},sx:{"& .MuiDataGrid-footerContainer":{minHeight:"2rem !important",height:"2rem !important"},"& .MuiTablePagination-root":{minHeight:"2rem !important",height:"2rem !important"},"& .MuiToolbar-root":{minHeight:"2rem !important",height:"2rem !important"},"& .MuiTablePagination-displayedRows":{minHeight:"2rem !important",height:"2rem !important",margin:"0px !important",display:"flex",alignItems:"center",justifyContent:"center"},"& .MuiTablePagination-actions .MuiButtonBase-root":{minHeight:"2rem !important",height:"2rem !important"}}})})]})},Lt=()=>{const e=O(l=>l.data),t=O(l=>l.expanded),n=O(l=>l.isLoading),[i,s]=y.useState([]),c=Object.keys(e).sort(),a=l=>(p,g)=>{s(d=>g?[...d,l]:d.filter(x=>x!==l))};return o.jsx(o.Fragment,{children:n?o.jsx(Et,{}):c.length==0?o.jsx(f.Alert,{severity:"warning",children:"No existen datos con estos criterios de búsqueda"}):c.map(l=>{const p=e[l].length,g=p>0&&e[l][p-1].$FechaHora||"",d=t||i.includes(l);return o.jsx(zt,{cantidad:p,isExpanded:d,titulo:l,ultimaMod:g,data:e[l],onHandlerExpanded:a},l)})})},Nt=({handleConsultarAuditoria:e})=>o.jsxs(f.Stack,{direction:"column",gap:1,width:"100%",children:[o.jsx(Rt,{handleConsultarAuditoria:e}),o.jsx(Lt,{})]}),Ft=e=>o.jsxs(f.SvgIcon,{...e,viewBox:"0 0 40 40",width:"40",height:"40",children:[o.jsx("circle",{cx:"20",cy:"20",r:"20",fill:"#E6F3F8"}),o.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.1107 13.3153H21.0552L21.0514 13.3191C19.1828 13.3334 17.4273 14.0677 16.1043 15.3906C13.7958 17.6991 13.3931 21.2576 15.0227 23.9986L8.06708 30.9507C7.7347 31.2831 7.55273 31.7244 7.55273 32.1921C7.55273 32.6598 7.7347 33.1011 8.06708 33.4335C8.39947 33.7659 8.84081 33.9479 9.30851 33.9479C9.77622 33.9479 10.2176 33.7659 10.5499 33.4335L17.5057 26.4777C18.5919 27.12 19.8427 27.4645 21.1143 27.4645C23.0002 27.4645 24.7775 26.7288 26.1136 25.3927C27.4497 24.0566 28.1854 22.2793 28.1854 20.3899C28.1854 18.5005 27.4497 16.7232 26.1136 15.3871C24.7775 14.0509 23.0002 13.3153 21.1107 13.3153ZM16.9261 16.2125C18.0824 15.0562 19.5945 14.48 21.1072 14.48C22.6199 14.48 24.1355 15.0563 25.288 16.2123C27.5968 18.5211 27.597 22.2657 25.2881 24.5781C24.1355 25.7307 22.6234 26.307 21.1107 26.307C19.8181 26.307 18.5294 25.8878 17.4608 25.0462L17.3673 24.9725L9.72811 32.6117C9.61107 32.7287 9.45972 32.7868 9.30851 32.7868C9.15731 32.7868 9.00596 32.7287 8.88892 32.6117C8.65517 32.378 8.65603 32.0025 8.88832 31.7731L16.528 24.1334L16.4545 24.0399C14.6312 21.7206 14.7852 18.3499 16.9261 16.2125Z",fill:"#6392BD"}),o.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M25.1686 17.1759C25.5221 17.5291 25.5223 18.102 25.1691 18.4554L19.621 24.0078L16.7476 21.1343C16.3942 20.781 16.3942 20.2081 16.7476 19.8548C17.1009 19.5014 17.6738 19.5014 18.0271 19.8548L19.6205 21.4482L23.8891 17.1764C24.2423 16.8229 24.8152 16.8227 25.1686 17.1759Z",fill:"#00BCD4"}),o.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.9343 7.06944C10.8113 7.06944 10.6987 7.17305 10.6987 7.31574V26.7684C10.6987 27.0644 10.4589 27.3042 10.1629 27.3042C9.867 27.3042 9.6271 27.0644 9.6271 26.7684V7.31574C9.6271 6.59737 10.2034 5.99779 10.9343 5.99779H26.0099C26.5207 5.99779 26.9332 6.41669 26.9332 6.92467V11.3792L31.4131 11.3722C31.9239 11.3722 32.3364 11.7911 32.3364 12.2991V32.333C32.3364 33.0514 31.7601 33.6509 31.0292 33.6509H12.9291C12.6331 33.6509 12.3932 33.411 12.3932 33.1151C12.3932 32.8192 12.6331 32.5793 12.9291 32.5793H31.0292C31.1522 32.5793 31.2647 32.4757 31.2647 32.333V12.4441L26.7849 12.451C26.2673 12.451 25.8616 12.0289 25.8616 11.5241V7.06944H10.9343Z",fill:"#6392BD"}),o.jsx("path",{d:"M27.9938 9.89453V6.16329C27.9938 5.98749 28.2055 5.90139 28.3275 6.02337L32.2525 9.95194C32.3745 10.0739 32.2883 10.2856 32.1126 10.2856H28.3813C28.166 10.2856 27.9902 10.1098 27.9902 9.89453H27.9938Z",fill:"#00BCD4"})]}),qt=()=>{const e=O(s=>s.title),t=O(s=>s.subtitle),n=O(s=>s.onClose),i=f.useTheme();return o.jsxs(f.Stack,{direction:"row",alignItems:"flex-start",alignSelf:"stretch",children:[o.jsxs(f.Stack,{direction:"row",alignItems:"center",gap:2,flex:"1 0 0",children:[o.jsx(Ft,{sx:{height:"2.5rem",width:"2.5rem"}}),o.jsxs(f.Stack,{children:[o.jsx(f.Typography,{variant:"h6",color:i.palette.text.primary,children:e}),o.jsx(f.Typography,{variant:"body2",color:i.palette.text.secondary,children:`${t}`})]})]}),o.jsx(f.IconButton,{"aria-label":"Close",size:"small",onClick:n,sx:{height:"22px",width:"22px"},children:o.jsx(W.Close,{sx:{height:"16px",width:"16px"},color:"action"})})]})},Ut=()=>{const e=O(a=>a.open),t=O(a=>a.fullScreen),n=O(a=>a.fullWidth),i=O(a=>a.fetchAuditoria),s=O(a=>a.onClose),c=y.useCallback(()=>{i()},[i]);return y.useEffect(()=>{e&&c()},[e,c]),o.jsx(f.ThemeProvider,{theme:X,children:o.jsxs(f.Dialog,{fullWidth:n,fullScreen:t,maxWidth:"lg",open:e,onClose:s,sx:{"& .MuiDialog-container":{alignItems:"flex-start"},"& .MuiDialog-paper":{height:"100vh",display:"flex",flexDirection:"column"}},children:[o.jsx(f.DialogTitle,{sx:{display:"flex",padding:"8px 16px",flexDirection:"column",alignItems:"flex-start",alignSelf:"stretch"},children:o.jsx(qt,{})}),o.jsx(f.DialogContent,{sx:{display:"flex",padding:"12px 16px 8px 16px",flexDirection:"column",alignItems:"flex-start",gap:1.5,alignSelf:"stretch",flex:"1 0 0"},children:o.jsx(Nt,{handleConsultarAuditoria:c})})]})})},Wt={stateSession:{idEmpresa:-1,IdObra:0,IdSucursal:0,idUsuario:0,NitEmpresa:"",NombreEmpresa:"",NombreSucursal:"",NomEmpresa:"",NomObra:"",NomUsuario:"",UsuDominio:"",idOrigen:0,URL_Entorno:""}},Ue=y.createContext(Wt),Bt={idEmpresa:-1,IdObra:0,IdSucursal:0,idUsuario:0,NitEmpresa:"",NombreEmpresa:"",NombreSucursal:"",NomEmpresa:"",NomObra:"",NomUsuario:"",UsuDominio:"",idOrigen:0,URL_Entorno:""},We=e=>e.getDatosSesion?e.getDatosSesion():e.parent&&e.parent.getDatosSesion?e.parent.getDatosSesion():e.parent&&e.parent!==e?We(e.parent):Bt,Be=()=>window.location.href.includes("localhost")?{idEmpresa:1,IdObra:392,IdSucursal:392,idUsuario:50,NitEmpresa:"",NombreEmpresa:"",NombreSucursal:"",NomEmpresa:"",NomObra:"",NomUsuario:"jhonnatan",UsuDominio:"SINCO\\jhonnatan",idOrigen:0,URL_Entorno:window.location.href}:We(window);function $t({children:e}){return o.jsx(Ue.Provider,{value:{stateSession:Be()},children:e})}exports.ADPROTheme=X;exports.AuditoriaADPRO=Ut;exports.AutocompleteADPRO=Ee;exports.EllipsisWithTooltip=Le;exports.LoadingADPRO=_t;exports.MultiSelectADPRO=Tt;exports.NotificationADPRO=Mt;exports.RangoFechasADPRO=It;exports.RequestADPRO=Pe;exports.SessionContext=Ue;exports.SessionProvider=$t;exports.columnsAudit=qe;exports.getAuthorization=se;exports.getSession=Be;exports.getSincoERPAuthorization=Q;exports.useAuditoriaStore=O;exports.useAutocompleteADPRO=Re;exports.useMultiSelectADPRO=ze;exports.useNotificationStore=ae;exports.useRangoFechasADPRO=Fe;
@@ -107,31 +107,31 @@ function jt(e) {
107
107
  const T = G(
108
108
  (C) => {
109
109
  if (i) {
110
- const M = i ? i[a] : "", A = C.find((U) => U[a] == M);
111
- A && (x(A), u(A[l]));
110
+ const A = i ? i[a] : "", D = C.find((U) => U[a] == A);
111
+ D && (x(D), u(D[l]));
112
112
  }
113
113
  },
114
114
  [i, a, l]
115
115
  ), R = G(
116
116
  (C) => {
117
117
  if (i) {
118
- const M = i[a] || "", A = C.find((U) => U[a] == M);
119
- A && (x(A), u(A[l]));
118
+ const A = i[a] || "", D = C.find((U) => U[a] == A);
119
+ D && (x(D), u(D[l]));
120
120
  } else
121
121
  x(null), u("");
122
122
  },
123
123
  [i, a, l]
124
124
  ), k = G(
125
- (C, M) => {
125
+ (C, A) => {
126
126
  if (m) {
127
127
  if (t === "request" && n === "search" && I(!0), t === "request" && n === "all" && r.length > 0) return;
128
- let A = M !== void 0 ? M.trim() : v.trim();
129
- if ((A === "" || A === "-1") && (A = "_"), g && g[l] === A && n === "search") {
128
+ let D = A !== void 0 ? A.trim() : v.trim();
129
+ if ((D === "" || D === "-1" || p && D === String(p[l]).trim()) && (D = "_"), g && g[l] === D && n === "search") {
130
130
  h([g]), I(!1);
131
131
  return;
132
132
  }
133
133
  m.body = {
134
- [m.filterName || "filter"]: A
134
+ [m.filterName || "filter"]: D
135
135
  }, qt.Send(m).then((U) => {
136
136
  if (U) {
137
137
  let L = U;
@@ -155,7 +155,7 @@ function jt(e) {
155
155
  h(d);
156
156
  else {
157
157
  const C = d.filter(
158
- (M) => String(M[l]).toLowerCase().includes(v.toLowerCase()) || String(M[a]).toLowerCase().includes(v.toLowerCase())
158
+ (A) => String(A[l]).toLowerCase().includes(v.toLowerCase()) || String(A[a]).toLowerCase().includes(v.toLowerCase())
159
159
  );
160
160
  h(C);
161
161
  }
@@ -165,11 +165,11 @@ function jt(e) {
165
165
  p ? c && c(p) : (x(null), c && c(null)), u(""), h([]), k(void 0, "");
166
166
  else if (d)
167
167
  if (p) {
168
- const C = d.find((M) => M[a] == "-1");
168
+ const C = d.find((A) => A[a] == "-1");
169
169
  C ? (x(C), u(C[l]), c && c(C)) : (u(""), x(g || i), c && c(g || i));
170
170
  } else {
171
- const C = i ? i[a] : "", M = d.find((A) => A[a] == C);
172
- M ? (x(M), u(M[l]), c && c(M)) : (u(""), x(g), c && c(g));
171
+ const C = i ? i[a] : "", A = d.find((D) => D[a] == C);
172
+ A ? (x(A), u(A[l]), c && c(A)) : (u(""), x(g), c && c(g));
173
173
  }
174
174
  };
175
175
  return E(() => {
@@ -253,8 +253,8 @@ const fe = {
253
253
  type: J,
254
254
  labelText: K,
255
255
  labelKey: C,
256
- handleValue: M,
257
- label: A,
256
+ handleValue: A,
257
+ label: D,
258
258
  value: U,
259
259
  inputValue: L,
260
260
  required: me,
@@ -633,14 +633,14 @@ function rn(e) {
633
633
  }, v.componentWillUnmount = function() {
634
634
  this._resetIsScrollingTimeoutId !== null && Me(this._resetIsScrollingTimeoutId);
635
635
  }, v.render = function() {
636
- var r = this.props, h = r.children, f = r.className, y = r.direction, b = r.height, I = r.innerRef, S = r.innerElementType, w = r.innerTagName, T = r.itemCount, R = r.itemData, k = r.itemKey, q = k === void 0 ? nn : k, V = r.layout, J = r.outerElementType, K = r.outerTagName, C = r.style, M = r.useIsScrolling, A = r.width, U = this.state.isScrolling, L = y === "horizontal" || V === "horizontal", me = L ? this._onScrollHorizontal : this._onScrollVertical, oe = this._getRangeToRender(), ge = oe[0], xe = oe[1], se = [];
636
+ var r = this.props, h = r.children, f = r.className, y = r.direction, b = r.height, I = r.innerRef, S = r.innerElementType, w = r.innerTagName, T = r.itemCount, R = r.itemData, k = r.itemKey, q = k === void 0 ? nn : k, V = r.layout, J = r.outerElementType, K = r.outerTagName, C = r.style, A = r.useIsScrolling, D = r.width, U = this.state.isScrolling, L = y === "horizontal" || V === "horizontal", me = L ? this._onScrollHorizontal : this._onScrollVertical, oe = this._getRangeToRender(), ge = oe[0], xe = oe[1], se = [];
637
637
  if (T > 0)
638
638
  for (var j = ge; j <= xe; j++)
639
639
  se.push(te(h, {
640
640
  data: R,
641
641
  key: q(j, R),
642
642
  index: j,
643
- isScrolling: M ? U : void 0,
643
+ isScrolling: A ? U : void 0,
644
644
  style: this._getItemStyle(j)
645
645
  }));
646
646
  var ae = i(this.props, this._instanceProps);
@@ -651,7 +651,7 @@ function rn(e) {
651
651
  style: ue({
652
652
  position: "relative",
653
653
  height: b,
654
- width: A,
654
+ width: D,
655
655
  overflow: "auto",
656
656
  WebkitOverflowScrolling: "touch",
657
657
  willChange: "transform",
@@ -1352,12 +1352,12 @@ const Fe = 5e3, xn = 3e3, vn = 100, ui = () => {
1352
1352
  console.error(n), e({ data: {}, isLoading: !1 });
1353
1353
  }
1354
1354
  }
1355
- }), D = Ve()(
1355
+ }), M = Ve()(
1356
1356
  Ut((e, t, n) => ({
1357
1357
  ...Sn(e, t)
1358
1358
  }))
1359
1359
  ), bn = ({ handleConsultarAuditoria: e }) => {
1360
- const t = D((u) => u.date), n = D((u) => u.isLoading), i = D((u) => u.expanded), s = D((u) => u.usuario), c = D((u) => u.setUsuario), a = D((u) => u.setDate), l = D((u) => u.setExpanded), p = D((u) => u.serviceUsuario), m = D((u) => u.filterName), d = p.type.key, g = p.type.label, x = (u) => {
1360
+ const t = M((u) => u.date), n = M((u) => u.isLoading), i = M((u) => u.expanded), s = M((u) => u.usuario), c = M((u) => u.setUsuario), a = M((u) => u.setDate), l = M((u) => u.setExpanded), p = M((u) => u.serviceUsuario), m = M((u) => u.filterName), d = p.type.key, g = p.type.label, x = (u) => {
1361
1361
  c(u);
1362
1362
  }, v = () => {
1363
1363
  l(!i);
@@ -1558,7 +1558,7 @@ const Fe = 5e3, xn = 3e3, vn = 100, ui = () => {
1558
1558
  }
1559
1559
  );
1560
1560
  }, wn = () => {
1561
- const e = D((l) => l.data), t = D((l) => l.expanded), n = D((l) => l.isLoading), [i, s] = F([]), c = Object.keys(e).sort(), a = (l) => (p, m) => {
1561
+ const e = M((l) => l.data), t = M((l) => l.expanded), n = M((l) => l.isLoading), [i, s] = F([]), c = Object.keys(e).sort(), a = (l) => (p, m) => {
1562
1562
  s((d) => m ? [...d, l] : d.filter((g) => g !== l));
1563
1563
  };
1564
1564
  return /* @__PURE__ */ o(Q, { children: n ? /* @__PURE__ */ o(Cn, {}) : c.length == 0 ? /* @__PURE__ */ o(gt, { severity: "warning", children: "No existen datos con estos criterios de búsqueda" }) : c.map((l) => {
@@ -1586,7 +1586,7 @@ const Fe = 5e3, xn = 3e3, vn = 100, ui = () => {
1586
1586
  /* @__PURE__ */ o("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.9343 7.06944C10.8113 7.06944 10.6987 7.17305 10.6987 7.31574V26.7684C10.6987 27.0644 10.4589 27.3042 10.1629 27.3042C9.867 27.3042 9.6271 27.0644 9.6271 26.7684V7.31574C9.6271 6.59737 10.2034 5.99779 10.9343 5.99779H26.0099C26.5207 5.99779 26.9332 6.41669 26.9332 6.92467V11.3792L31.4131 11.3722C31.9239 11.3722 32.3364 11.7911 32.3364 12.2991V32.333C32.3364 33.0514 31.7601 33.6509 31.0292 33.6509H12.9291C12.6331 33.6509 12.3932 33.411 12.3932 33.1151C12.3932 32.8192 12.6331 32.5793 12.9291 32.5793H31.0292C31.1522 32.5793 31.2647 32.4757 31.2647 32.333V12.4441L26.7849 12.451C26.2673 12.451 25.8616 12.0289 25.8616 11.5241V7.06944H10.9343Z", fill: "#6392BD" }),
1587
1587
  /* @__PURE__ */ o("path", { d: "M27.9938 9.89453V6.16329C27.9938 5.98749 28.2055 5.90139 28.3275 6.02337L32.2525 9.95194C32.3745 10.0739 32.2883 10.2856 32.1126 10.2856H28.3813C28.166 10.2856 27.9902 10.1098 27.9902 9.89453H27.9938Z", fill: "#00BCD4" })
1588
1588
  ] }), On = () => {
1589
- const e = D((s) => s.title), t = D((s) => s.subtitle), n = D((s) => s.onClose), i = $e();
1589
+ const e = M((s) => s.title), t = M((s) => s.subtitle), n = M((s) => s.onClose), i = $e();
1590
1590
  return /* @__PURE__ */ _(z, { direction: "row", alignItems: "flex-start", alignSelf: "stretch", children: [
1591
1591
  /* @__PURE__ */ _(z, { direction: "row", alignItems: "center", gap: 2, flex: "1 0 0", children: [
1592
1592
  /* @__PURE__ */ o(_n, { sx: { height: "2.5rem", width: "2.5rem" } }),
@@ -1598,7 +1598,7 @@ const Fe = 5e3, xn = 3e3, vn = 100, ui = () => {
1598
1598
  /* @__PURE__ */ o(pe, { "aria-label": "Close", size: "small", onClick: n, sx: { height: "22px", width: "22px" }, children: /* @__PURE__ */ o(Ot, { sx: { height: "16px", width: "16px" }, color: "action" }) })
1599
1599
  ] });
1600
1600
  }, hi = () => {
1601
- const e = D((a) => a.open), t = D((a) => a.fullScreen), n = D((a) => a.fullWidth), i = D((a) => a.fetchAuditoria), s = D((a) => a.onClose), c = G(() => {
1601
+ const e = M((a) => a.open), t = M((a) => a.fullScreen), n = M((a) => a.fullWidth), i = M((a) => a.fetchAuditoria), s = M((a) => a.onClose), c = G(() => {
1602
1602
  i();
1603
1603
  }, [i]);
1604
1604
  return E(() => {
@@ -1691,7 +1691,7 @@ export {
1691
1691
  Be as getAuthorization,
1692
1692
  kn as getSession,
1693
1693
  de as getSincoERPAuthorization,
1694
- D as useAuditoriaStore,
1694
+ M as useAuditoriaStore,
1695
1695
  jt as useAutocompleteADPRO,
1696
1696
  Gt as useMultiSelectADPRO,
1697
1697
  Ze as useNotificationStore,
@@ -1 +1 @@
1
- {"version":3,"file":"useAutocompleteADPRO.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/hook/useAutocompleteADPRO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,WAAW,EAAE,KAAK,EAAG,MAAM,eAAe,CAAC;AACtG,OAAO,EAAgB,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,MAAM,WAAW,0BAA0B,CACvC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAC/B,SAAQ,IAAI,CACV,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC,EAC9E,SAAS,GACT,aAAa,GACb,UAAU,GACV,eAAe,GACf,cAAc,GACd,OAAO,GACP,cAAc,CACnB;IACG,MAAM,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC1B,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,KAAK,GAAG,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EACP,CAAC,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC,GAC3C,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,GAC/B,IAAI,GACJ,SAAS,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACnE,SAAQ,0BAA0B,CAAC,CAAC,CAAC;IACrC,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,qBAAqB,CAAC;CAClC;AAED,MAAM,WAAW,8BAA8B,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACzE,SAAQ,wBAAwB,CAAC,CAAC,CAAC;IACnC,MAAM,EAAE,QAAQ,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAChE,SAAQ,0BAA0B,CAAC,CAAC,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,EAAE,CAAC;CACb;AAED,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAC1D,wBAAwB,CAAC,CAAC,CAAC,GAC3B,8BAA8B,CAAC,CAAC,CAAC,GACjC,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAiB/B,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9D,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC;;;;;;wCA+KW,CAAC,GAAG,IAAI;sCASE,MAAM;0CAQF,6BAA6B;;;EAkIzF"}
1
+ {"version":3,"file":"useAutocompleteADPRO.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/hook/useAutocompleteADPRO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,WAAW,EAAE,KAAK,EAAG,MAAM,eAAe,CAAC;AACtG,OAAO,EAAgB,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,MAAM,WAAW,0BAA0B,CACvC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAC/B,SAAQ,IAAI,CACV,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC,EAC9E,SAAS,GACT,aAAa,GACb,UAAU,GACV,eAAe,GACf,cAAc,GACd,OAAO,GACP,cAAc,CACnB;IACG,MAAM,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC1B,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,KAAK,GAAG,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EACP,CAAC,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC,GAC3C,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,GAC/B,IAAI,GACJ,SAAS,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACnE,SAAQ,0BAA0B,CAAC,CAAC,CAAC;IACrC,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,qBAAqB,CAAC;CAClC;AAED,MAAM,WAAW,8BAA8B,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACzE,SAAQ,wBAAwB,CAAC,CAAC,CAAC;IACnC,MAAM,EAAE,QAAQ,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAChE,SAAQ,0BAA0B,CAAC,CAAC,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,EAAE,CAAC;CACb;AAED,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAC1D,wBAAwB,CAAC,CAAC,CAAC,GAC3B,8BAA8B,CAAC,CAAC,CAAC,GACjC,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAiB/B,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9D,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC;;;;;;wCA8KW,CAAC,GAAG,IAAI;sCASE,MAAM;0CAQF,6BAA6B;;;EAkIzF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adpro-react",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "author": "Joel Mateo Robles Atuesta",
5
5
  "main": "dist/adpro-react.cjs.js",
6
6
  "module": "dist/adpro-react.es.js",