adpro-react 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/adpro-react.cjs.js
CHANGED
@@ -326,7 +326,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
326
326
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[E9]=this[E9]={accessors:{}}).accessors,o=this.prototype;function i(s){const l=Jr(s);n[l]||(Nh(o,s),n[l]=!0)}return G.isArray(t)?t.forEach(i):i(t),this}};t2.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);G.reduceDescriptors(t2.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});G.freezeMethods(t2);function C3(e,t){const r=this||_n,n=t||r,o=t2.from(n.headers);let i=n.data;return G.forEach(e,function(l){i=l.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function I8(e){return!!(e&&e.__CANCEL__)}function Hr(e,t,r){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,r),this.name="CanceledError"}G.inherits(Hr,Ve,{__CANCEL__:!0});function H8(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Ve("Request failed with status code "+r.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Fh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function jh(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=n[i];s||(s=u),r[o]=c,n[o]=u;let C=i,g=0;for(;C!==o;)g+=r[C++],C=C%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const v=d&&u-d;return v?Math.round(g*1e3/v):void 0}}function _h(e,t){let r=0,n=1e3/t,o,i;const s=(u,d=Date.now())=>{r=d,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),C=d-r;C>=n?s(u,d):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-C)))},()=>o&&s(o)]}const No=(e,t,r=3)=>{let n=0;const o=jh(50,250);return _h(i=>{const s=i.loaded,l=i.lengthComputable?i.total:void 0,c=s-n,u=o(c),d=s<=l;n=s;const C={loaded:s,total:l,progress:l?s/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-s)/u:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(C)},r)},w9=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},S9=e=>(...t)=>G.asap(()=>e(...t)),zh=Wt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Wt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Wt.origin),Wt.navigator&&/(msie|trident)/i.test(Wt.navigator.userAgent)):()=>!0,Zh=Wt.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];G.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),G.isString(n)&&s.push("path="+n),G.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Uh(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Wh(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function N8(e,t){return e&&!Uh(t)?Wh(e,t):t}const T9=e=>e instanceof t2?{...e}:e;function U1(e,t){t=t||{};const r={};function n(u,d,C,g){return G.isPlainObject(u)&&G.isPlainObject(d)?G.merge.call({caseless:g},u,d):G.isPlainObject(d)?G.merge({},d):G.isArray(d)?d.slice():d}function o(u,d,C,g){if(G.isUndefined(d)){if(!G.isUndefined(u))return n(void 0,u,C,g)}else return n(u,d,C,g)}function i(u,d){if(!G.isUndefined(d))return n(void 0,d)}function s(u,d){if(G.isUndefined(d)){if(!G.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function l(u,d,C){if(C in t)return n(u,d);if(C in e)return n(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,d,C)=>o(T9(u),T9(d),C,!0)};return G.forEach(Object.keys(Object.assign({},e,t)),function(d){const C=c[d]||o,g=C(e[d],t[d],d);G.isUndefined(g)&&C!==l||(r[d]=g)}),r}const F8=e=>{const t=U1({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:l}=t;t.headers=s=t2.from(s),t.url=D8(N8(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(G.isFormData(r)){if(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...d]=c?c.split(";").map(C=>C.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Wt.hasStandardBrowserEnv&&(n&&G.isFunction(n)&&(n=n(t)),n||n!==!1&&zh(t.url))){const u=o&&i&&Zh.read(i);u&&s.set(o,u)}return t},qh=typeof XMLHttpRequest<"u",Yh=qh&&function(e){return new Promise(function(r,n){const o=F8(e);let i=o.data;const s=t2.from(o.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=o,d,C,g,v,b;function m(){v&&v(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function S(){if(!x)return;const w=t2.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),y={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:w,config:e,request:x};H8(function(O){r(O),m()},function(O){n(O),m()},y),x=null}"onloadend"in x?x.onloadend=S:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(S)},x.onabort=function(){x&&(n(new Ve("Request aborted",Ve.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new Ve("Network Error",Ve.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const y=o.transitional||A8;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),n(new Ve(E,y.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,x)),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&G.forEach(s.toJSON(),function(E,y){x.setRequestHeader(y,E)}),G.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),l&&l!=="json"&&(x.responseType=o.responseType),u&&([g,b]=No(u,!0),x.addEventListener("progress",g)),c&&x.upload&&([C,v]=No(c),x.upload.addEventListener("progress",C),x.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(d=w=>{x&&(n(!w||w.type?new Hr(null,e,x):w),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const L=Fh(o.url);if(L&&Wt.protocols.indexOf(L)===-1){n(new Ve("Unsupported protocol "+L+":",Ve.ERR_BAD_REQUEST,e));return}x.send(i||null)})},Kh=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const i=function(u){if(!o){o=!0,l();const d=u instanceof Error?u:this.reason;n.abort(d instanceof Ve?d:new Hr(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{s=null,i(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>G.asap(l),c}},Gh=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},Xh=async function*(e,t){for await(const r of Jh(e))yield*Gh(r,t)},Jh=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},R9=(e,t,r,n)=>{const o=Xh(e,t);let i=0,s,l=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await o.next();if(u){l(),c.close();return}let C=d.byteLength;if(r){let g=i+=C;r(g)}c.enqueue(new Uint8Array(d))}catch(u){throw l(u),u}},cancel(c){return l(c),o.return()}},{highWaterMark:2})},Mi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",j8=Mi&&typeof ReadableStream=="function",Qh=Mi&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),_8=(e,...t)=>{try{return!!e(...t)}catch{return!1}},eg=j8&&_8(()=>{let e=!1;const t=new Request(Wt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),L9=64*1024,ta=j8&&_8(()=>G.isReadableStream(new Response("").body)),Fo={stream:ta&&(e=>e.body)};Mi&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fo[t]&&(Fo[t]=G.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new Ve(`Response type '${t}' is not supported`,Ve.ERR_NOT_SUPPORT,n)})})})(new Response);const tg=async e=>{if(e==null)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e))return(await new Request(Wt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(G.isArrayBufferView(e)||G.isArrayBuffer(e))return e.byteLength;if(G.isURLSearchParams(e)&&(e=e+""),G.isString(e))return(await Qh(e)).byteLength},rg=async(e,t)=>{const r=G.toFiniteNumber(e.getContentLength());return r??tg(t)},ng=Mi&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:d,withCredentials:C="same-origin",fetchOptions:g}=F8(e);u=u?(u+"").toLowerCase():"text";let v=Kh([o,i&&i.toAbortSignal()],s),b;const m=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let x;try{if(c&&eg&&r!=="get"&&r!=="head"&&(x=await rg(d,n))!==0){let y=new Request(t,{method:"POST",body:n,duplex:"half"}),R;if(G.isFormData(n)&&(R=y.headers.get("content-type"))&&d.setContentType(R),y.body){const[O,B]=w9(x,No(S9(c)));n=R9(y.body,L9,O,B)}}G.isString(C)||(C=C?"include":"omit");const S="credentials"in Request.prototype;b=new Request(t,{...g,signal:v,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:S?C:void 0});let L=await fetch(b);const w=ta&&(u==="stream"||u==="response");if(ta&&(l||w&&m)){const y={};["status","statusText","headers"].forEach(I=>{y[I]=L[I]});const R=G.toFiniteNumber(L.headers.get("content-length")),[O,B]=l&&w9(R,No(S9(l),!0))||[];L=new Response(R9(L.body,L9,O,()=>{B&&B(),m&&m()}),y)}u=u||"text";let E=await Fo[G.findKey(Fo,u)||"text"](L,e);return!w&&m&&m(),await new Promise((y,R)=>{H8(y,R,{data:E,headers:t2.from(L.headers),status:L.status,statusText:L.statusText,config:e,request:b})})}catch(S){throw m&&m(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,b),{cause:S.cause||S}):Ve.from(S,S&&S.code,e,b)}}),ra={http:yh,xhr:Yh,fetch:ng};G.forEach(ra,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const O9=e=>`- ${e}`,og=e=>G.isFunction(e)||e===null||e===!1,z8={getAdapter:e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!og(r)&&(n=ra[(s=String(r)).toLowerCase()],n===void 0))throw new Ve(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
327
327
|
`+i.map(O9).join(`
|
328
328
|
`):" "+O9(i[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:ra};function m3(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Hr(null,e)}function M9(e){return m3(e),e.headers=t2.from(e.headers),e.data=C3.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),z8.getAdapter(e.adapter||_n.adapter)(e).then(function(n){return m3(e),n.data=C3.call(e,e.transformResponse,n),n.headers=t2.from(n.headers),n},function(n){return I8(n)||(m3(e),n&&n.response&&(n.response.data=C3.call(e,e.transformResponse,n.response),n.response.headers=t2.from(n.response.headers))),Promise.reject(n)})}const Z8="1.7.9",$i={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const $9={};$i.transitional=function(t,r,n){function o(i,s){return"[Axios v"+Z8+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,l)=>{if(t===!1)throw new Ve(o(s," has been removed"+(r?" in "+r:"")),Ve.ERR_DEPRECATED);return r&&!$9[s]&&($9[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,l):!0}};$i.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function ig(e,t,r){if(typeof e!="object")throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const l=e[i],c=l===void 0||s(l,i,e);if(c!==!0)throw new Ve("option "+i+" must be "+c,Ve.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ve("Unknown option "+i,Ve.ERR_BAD_OPTION)}}const xo={assertOptions:ig,validators:$i},F2=xo.validators;let F1=class{constructor(t){this.defaults=t,this.interceptors={request:new x9,response:new x9}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
329
|
-
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=U1(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&xo.assertOptions(n,{silentJSONParsing:F2.transitional(F2.boolean),forcedJSONParsing:F2.transitional(F2.boolean),clarifyTimeoutError:F2.transitional(F2.boolean)},!1),o!=null&&(G.isFunction(o)?r.paramsSerializer={serialize:o}:xo.assertOptions(o,{encode:F2.function,serialize:F2.function},!0)),xo.assertOptions(r,{baseUrl:F2.spelling("baseURL"),withXsrfToken:F2.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&G.merge(i.common,i[r.method]);i&&G.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),r.headers=t2.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(c=c&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,C=0,g;if(!c){const b=[M9.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,u),g=b.length,d=Promise.resolve(r);C<g;)d=d.then(b[C++],b[C++]);return d}g=l.length;let v=r;for(C=0;C<g;){const b=l[C++],m=l[C++];try{v=b(v)}catch(x){m.call(this,x);break}}try{d=M9.call(this,v)}catch(b){return Promise.reject(b)}for(C=0,g=u.length;C<g;)d=d.then(u[C++],u[C++]);return d}getUri(t){t=U1(this.defaults,t);const r=N8(t.baseURL,t.url);return D8(r,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){F1.prototype[t]=function(r,n){return this.request(U1(n||{},{method:t,url:r,data:(n||{}).data}))}});G.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,l){return this.request(U1(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}F1.prototype[t]=r(),F1.prototype[t+"Form"]=r(!0)});let ag=class U8{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(l=>{n.subscribe(l),i=l}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,l){n.reason||(n.reason=new Hr(i,s,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new U8(function(o){t=o}),cancel:t}}};function sg(e){return function(r){return e.apply(null,r)}}function lg(e){return G.isObject(e)&&e.isAxiosError===!0}const na={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(na).forEach(([e,t])=>{na[t]=e});function W8(e){const t=new F1(e),r=E8(F1.prototype.request,t);return G.extend(r,F1.prototype,t,{allOwnKeys:!0}),G.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return W8(U1(e,o))},r}const Rt=W8(_n);Rt.Axios=F1;Rt.CanceledError=Hr;Rt.CancelToken=ag;Rt.isCancel=I8;Rt.VERSION=Z8;Rt.toFormData=Oi;Rt.AxiosError=Ve;Rt.Cancel=Rt.CanceledError;Rt.all=function(t){return Promise.all(t)};Rt.spread=sg;Rt.isAxiosError=lg;Rt.mergeConfig=U1;Rt.AxiosHeaders=t2;Rt.formToJSON=e=>B8(G.isHTMLForm(e)?new FormData(e):e);Rt.getAdapter=z8.getAdapter;Rt.HttpStatusCode=na;Rt.default=Rt;const{Axios:ww,AxiosError:cg,CanceledError:Sw,isCancel:Tw,CancelToken:Rw,VERSION:Lw,all:Ow,Cancel:Mw,isAxiosError:$w,spread:Pw,toFormData:kw,AxiosHeaders:Vw,HttpStatusCode:Dw,formToJSON:Aw,getAdapter:Bw,mergeConfig:Iw}=Rt;var cr={},P9;function ug(){if(P9)return cr;P9=1;var e=S2;if(process.env.NODE_ENV==="production")cr.createRoot=e.createRoot,cr.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;cr.createRoot=function(r,n){t.usingClientEntryPoint=!0;try{return e.createRoot(r,n)}finally{t.usingClientEntryPoint=!1}},cr.hydrateRoot=function(r,n,o){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(r,n,o)}finally{t.usingClientEntryPoint=!1}}}return cr}var dg=ug();let fn=`${window.location.href.split("#")[0].toLowerCase().split("v3")[0]}v3/adpro/api`;const pg={async Send(e){const{serviceUrl:t,body:r,method:n="get",defaultToken:o=!0,hideError:i=!1,srm:s}=e;let{headers:l}=e;window.parent.location.href.includes("localhost")&&(fn="http://localhost:3500");const c=Rt.create({baseURL:s==!0?`${fn.toLowerCase().replace("/adpro/","/srm/")}`:fn});return l=l||{},o&&(l.Authorization=await q8(window)),await c[n](t,fg(r,n,l),{headers:l,validateStatus:function(d){return d<400}}).then(function(d){const{data:C,status:g}=d;return C||{data:null,httpCode:g,message:"Transacción exitosa",success:!0}}).catch(d=>{var x,S,L,w;let C={primaryMessage:"Se han presentado errores en la solicitud",secondaryMessage:"Ha ocurrido un error en la petición",severity:"error",timeProgress:8},g={data:null,httpCode:500,message:"Ha ocurrido un error en la petición",success:!1};const v="Se han presentado errores en la solicitud",b="No se ha encontrado el recurso solicitado";let m=[];if(d instanceof cg){const E=d,y=(x=E.response)==null?void 0:x.data;if(y&&"data"in y&&"success"in y&&"httpCode"in y&&"message"in y&&"errors"in y){const R=y;g=R,C.secondaryMessage=R.message,R.errors&&Array.isArray(R.errors)?(C.details=R.errors.map(O=>`${O.property} - ${O.errorDescription}`),m=R.errors.map(O=>`${O.property} - ${O.errorDescription}`)):R.errors&&!Array.isArray(R.errors)&&(m=R.errors.stackTrace.map(O=>`${O.line} - ${O.method}`))}else((S=E.response)==null?void 0:S.status)==404?(C.secondaryMessage=b,g.message=b,m=[...m,`${(L=E.response)==null?void 0:L.status} - ${b}`]):(g.message=v,m=[...m,`${(w=E.response)==null?void 0:w.status} - ${v}`])}else C.secondaryMessage=v,g.message=v,m=[...m,`400 - ${v}`];throw i||Cg(C),console.error({title:"Error in requestADPRO",details:["Error in requestADPRO",e,C,...m]}),g}).finally(function(){})}},fg=(e,t,r)=>{const n=e;for(var o in e)e[o]===""&&(e[o]=null);return t==="get"||t==="delete"?{params:n,headers:r,data:n}:n},Cg=e=>{let t=document.createElement("div");t.id=`alerts${Math.random()}`,document.body.appendChild(t);const r=dg.createRoot(t),n=P.jsx(B0,{elements:{...e,finishAction:()=>{t.remove()}}});r.render(n)},q8=async e=>{let t="";return window.parent.location.href.includes("localhost")?(fn="http://localhost:3500",`Bearer ${(await Rt.get(`${fn}/token`)).data}`):(e.getToken!=null&&e.getToken!=null?t=e.getToken():(e.parent.getToken!=null&&e.parent.getToken!=null&&(t=e.parent.getToken()),t=await q8(e)),t)},mg=(e,t,r)=>e[t]!="-1"&&e[t]!="0"?e:r&&r[t]=="-1"?r:e;function Y8(e){const{type:t,action:r="search",value:n,inputValue:o,handleValue:i,labelKey:s,labelText:l,optionAll:c}=e,u=t==="request"?e.request:null,d=t==="list"?e.list:null,[C,g]=f.useState(mg(n,s,c)),[v,b]=f.useState(o||""),[m,x]=f.useState(d||[]),[S,L]=f.useState("input"),[w,E]=f.useState(!1),[y,R]=f.useState(!1),[O,B]=f.useState(!1);f.useEffect(()=>{t==="list"?I(m):r==="all"&&M(V=>I(V))},[]),f.useEffect(()=>{t==="list"||r==="all"?p(m):g(n)},[n]),f.useEffect(()=>{let V=null;return t=="request"&&(r==="search"&&v&&S==="input"||r==="all"&&!y)&&E(!0),r==="search"&&v&&S==="input"&&(V=setTimeout(()=>{M()},800)),()=>{E(!1),V&&clearInterval(V)}},[v]),f.useEffect(()=>{d&&d.length>0?x(d):x([])},[d]);const I=f.useCallback(V=>{if(n){const z=n||"",W=V.find(Z=>Z[s]==z);W&&(g(W),b(W[l]))}},[n,s,l]),p=f.useCallback(V=>{if(n){const z=n||"",W=V.find(Z=>Z[s]==z);W&&(g(W),b(W[l]))}else g(null),b("")},[n,s,l]),M=f.useCallback(V=>{if(u){t==="request"&&E(!0);let z=v.trim();if((z.trim()===""||z===" "||z===""||z==="-1"||z.trim()==="Todos")&&(z="_"),C&&C[l]===z){x([C]),E(!1);return}u.body={filter:z},pg.Send(u).then(W=>{if(W){let Z=W;Z=u!=null&&Z.length>20?Z.slice(0,20):Z??[],Z.length===void 0&&(Z=[]),x(Z),V&&V(Z)}t==="request"&&E(!1)})}},[v,m,u,r,t,w]),A=f.useCallback(V=>{V&&(g(V),i&&i(V))},[]),j=f.useCallback(V=>{V?b(V):H()},[r,t]),F=f.useCallback(V=>{L(V)},[]);f.useEffect(()=>{if(t==="list"&&r==="search"&&S==="input"&&d)if(v.trim()==="")x(d);else{const V=d.filter(z=>String(z[l]).toLowerCase().includes(v.toLowerCase()));x(V)}},[v]);const H=f.useCallback(()=>{if(t==="request")c?(x([]),g(c),b(c[l]),i&&i(c)):(g(null),b(""),x([]),i&&i(null));else if(d)if(c){const V=d.find(z=>z[s]=="-1");V?(g(V),b(V[l]),i&&i(V)):(b(""),g(n),i&&i(n))}else{const V=n||"",z=d.find(W=>W[s]==V);z?(g(z),b(z[l]),i&&i(z)):(b(""),g(n),i&&i(n))}},[]);return f.useEffect(()=>{O?t==="request"&&M():(t==="list"&&r==="search"&&(g(n),b(n[l])),t==="request"&&v!==""&&(g(n),b(n[l])))},[O]),{dataList:m,loading:w,isFocused:O,autocompleteValue:C,textFieldValue:v,handleAutocompleteValue:A,handleTextFieldValue:j,handleReasonChangeTextField:F,setIsFocused:B,clearValues:H}}const hg=qt(P.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),gg=qt(P.jsx("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp"),yg=qt(P.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M9.29 16.29 5.7 12.7a.996.996 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0s.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0"}),"CheckCircleRounded"),bg=qt(P.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"ClearRounded"),vg=qt(P.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined"),xg=qt(P.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"ErrorRounded"),Eg=qt(P.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1-8h-2V7h2z"}),"InfoRounded"),wg=qt(P.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchOutlined"),Sg=qt(P.jsx("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3M12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"WarningRounded");function C0(e,t,r){return(t=Rg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function r1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k9(Object(r),!0).forEach(function(n){C0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k9(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tg(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rg(e){var t=Tg(e,"string");return typeof t=="symbol"?t:t+""}function L1(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}var m0="$$material";function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jo.apply(null,arguments)}function K8(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Lg=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Og=K8(function(e){return Lg.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),oa=typeof document<"u";function Mg(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var G8=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||oa===!1&&t.compat!==void 0)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},$g=function(t,r,n){G8(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i="",s=r;do{var l=t.insert(r===s?"."+o:"",s,t.sheet,!0);!oa&&l!==void 0&&(i+=l),s=s.next}while(s!==void 0);if(!oa&&i.length!==0)return i}};function Pg(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var kg={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Vg=/[A-Z]|^ms/g,Dg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,X8=function(t){return t.charCodeAt(1)===45},V9=function(t){return t!=null&&typeof t!="boolean"},h3=K8(function(e){return X8(e)?e:e.replace(Vg,"-$&").toLowerCase()}),D9=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Dg,function(n,o,i){return Z2={name:o,styles:i,next:Z2},o})}return kg[t]!==1&&!X8(t)&&typeof r=="number"&&r!==0?r+"px":r};function Ln(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Z2={name:o.name,styles:o.styles,next:Z2},o.name;var i=r;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)Z2={name:s.name,styles:s.styles,next:Z2},s=s.next;var l=i.styles+";";return l}return Ag(e,t,r)}case"function":{if(e!==void 0){var c=Z2,u=r(e);return Z2=c,Ln(e,t,u)}break}}var d=r;if(t==null)return d;var C=t[d];return C!==void 0?C:d}function Ag(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Ln(e,t,r[o])+";";else for(var i in r){var s=r[i];if(typeof s!="object"){var l=s;t!=null&&t[l]!==void 0?n+=i+"{"+t[l]+"}":V9(l)&&(n+=h3(i)+":"+D9(i,l)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var c=0;c<s.length;c++)V9(s[c])&&(n+=h3(i)+":"+D9(i,s[c])+";");else{var u=Ln(e,t,s);switch(i){case"animation":case"animationName":{n+=h3(i)+":"+u+";";break}default:n+=i+"{"+u+"}"}}}return n}var A9=/label:\s*([^\s;{]+)\s*(;|$)/g,Z2;function J8(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Z2=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Ln(r,t,i);else{var s=i;o+=s[0]}for(var l=1;l<e.length;l++)if(o+=Ln(r,t,e[l]),n){var c=i;o+=c[l]}A9.lastIndex=0;for(var u="",d;(d=A9.exec(o))!==null;)u+="-"+d[1];var C=Pg(o)+u;return{name:C,styles:o,next:Z2}}var Bg=typeof document<"u",B9=function(t){return t()},Ig=T.useInsertionEffect?T.useInsertionEffect:!1,Hg=Bg&&Ig||B9,Ng=Og,Fg=function(t){return t!=="theme"},I9=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Ng:Fg},H9=function(t,r,n){var o;if(r){var i=r.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},N9=`You have illegal escape sequence in your template literal, most likely inside content's property value.
|
329
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=U1(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&xo.assertOptions(n,{silentJSONParsing:F2.transitional(F2.boolean),forcedJSONParsing:F2.transitional(F2.boolean),clarifyTimeoutError:F2.transitional(F2.boolean)},!1),o!=null&&(G.isFunction(o)?r.paramsSerializer={serialize:o}:xo.assertOptions(o,{encode:F2.function,serialize:F2.function},!0)),xo.assertOptions(r,{baseUrl:F2.spelling("baseURL"),withXsrfToken:F2.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&G.merge(i.common,i[r.method]);i&&G.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),r.headers=t2.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(c=c&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,C=0,g;if(!c){const b=[M9.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,u),g=b.length,d=Promise.resolve(r);C<g;)d=d.then(b[C++],b[C++]);return d}g=l.length;let v=r;for(C=0;C<g;){const b=l[C++],m=l[C++];try{v=b(v)}catch(x){m.call(this,x);break}}try{d=M9.call(this,v)}catch(b){return Promise.reject(b)}for(C=0,g=u.length;C<g;)d=d.then(u[C++],u[C++]);return d}getUri(t){t=U1(this.defaults,t);const r=N8(t.baseURL,t.url);return D8(r,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){F1.prototype[t]=function(r,n){return this.request(U1(n||{},{method:t,url:r,data:(n||{}).data}))}});G.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,l){return this.request(U1(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}F1.prototype[t]=r(),F1.prototype[t+"Form"]=r(!0)});let ag=class U8{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(l=>{n.subscribe(l),i=l}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,l){n.reason||(n.reason=new Hr(i,s,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new U8(function(o){t=o}),cancel:t}}};function sg(e){return function(r){return e.apply(null,r)}}function lg(e){return G.isObject(e)&&e.isAxiosError===!0}const na={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(na).forEach(([e,t])=>{na[t]=e});function W8(e){const t=new F1(e),r=E8(F1.prototype.request,t);return G.extend(r,F1.prototype,t,{allOwnKeys:!0}),G.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return W8(U1(e,o))},r}const Rt=W8(_n);Rt.Axios=F1;Rt.CanceledError=Hr;Rt.CancelToken=ag;Rt.isCancel=I8;Rt.VERSION=Z8;Rt.toFormData=Oi;Rt.AxiosError=Ve;Rt.Cancel=Rt.CanceledError;Rt.all=function(t){return Promise.all(t)};Rt.spread=sg;Rt.isAxiosError=lg;Rt.mergeConfig=U1;Rt.AxiosHeaders=t2;Rt.formToJSON=e=>B8(G.isHTMLForm(e)?new FormData(e):e);Rt.getAdapter=z8.getAdapter;Rt.HttpStatusCode=na;Rt.default=Rt;const{Axios:ww,AxiosError:cg,CanceledError:Sw,isCancel:Tw,CancelToken:Rw,VERSION:Lw,all:Ow,Cancel:Mw,isAxiosError:$w,spread:Pw,toFormData:kw,AxiosHeaders:Vw,HttpStatusCode:Dw,formToJSON:Aw,getAdapter:Bw,mergeConfig:Iw}=Rt;var cr={},P9;function ug(){if(P9)return cr;P9=1;var e=S2;if(process.env.NODE_ENV==="production")cr.createRoot=e.createRoot,cr.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;cr.createRoot=function(r,n){t.usingClientEntryPoint=!0;try{return e.createRoot(r,n)}finally{t.usingClientEntryPoint=!1}},cr.hydrateRoot=function(r,n,o){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(r,n,o)}finally{t.usingClientEntryPoint=!1}}}return cr}var dg=ug();let fn=`${window.location.href.split("#")[0].toLowerCase().split("v3")[0]}v3/adpro/api`;const pg={async Send(e){const{serviceUrl:t,body:r,method:n="get",defaultToken:o=!0,hideError:i=!1,srm:s}=e;let{headers:l}=e;window.parent.location.href.includes("localhost")&&(fn="http://localhost:3500");const c=Rt.create({baseURL:s==!0?`${fn.toLowerCase().replace("/adpro/","/srm/")}`:fn});return l=l||{},o&&(l.Authorization=await q8(window)),await c[n](t,fg(r,n,l),{headers:l,validateStatus:function(d){return d<400}}).then(function(d){const{data:C,status:g}=d;return C||{data:null,httpCode:g,message:"Transacción exitosa",success:!0}}).catch(d=>{var x,S,L,w;let C={primaryMessage:"Se han presentado errores en la solicitud",secondaryMessage:"Ha ocurrido un error en la petición",severity:"error",timeProgress:8},g={data:null,httpCode:500,message:"Ha ocurrido un error en la petición",success:!1};const v="Se han presentado errores en la solicitud",b="No se ha encontrado el recurso solicitado";let m=[];if(d instanceof cg){const E=d,y=(x=E.response)==null?void 0:x.data;if(y&&"data"in y&&"success"in y&&"httpCode"in y&&"message"in y&&"errors"in y){const R=y;g=R,C.secondaryMessage=R.message,R.errors&&Array.isArray(R.errors)?(C.details=R.errors.map(O=>`${O.property} - ${O.errorDescription}`),m=R.errors.map(O=>`${O.property} - ${O.errorDescription}`)):R.errors&&!Array.isArray(R.errors)&&(m=R.errors.stackTrace.map(O=>`${O.line} - ${O.method}`))}else((S=E.response)==null?void 0:S.status)==404?(C.secondaryMessage=b,g.message=b,m=[...m,`${(L=E.response)==null?void 0:L.status} - ${b}`]):(g.message=v,m=[...m,`${(w=E.response)==null?void 0:w.status} - ${v}`])}else C.secondaryMessage=v,g.message=v,m=[...m,`400 - ${v}`];throw i||Cg(C),console.error({title:"Error in requestADPRO",details:["Error in requestADPRO",e,C,...m]}),g}).finally(function(){})}},fg=(e,t,r)=>{const n=e;for(var o in e)e[o]===""&&(e[o]=null);return t==="get"||t==="delete"?{params:n,headers:r,data:n}:n},Cg=e=>{let t=document.createElement("div");t.id=`alerts${Math.random()}`,document.body.appendChild(t);const r=dg.createRoot(t),n=P.jsx(B0,{elements:{...e,finishAction:()=>{t.remove()}}});r.render(n)},q8=async e=>{let t="";return window.parent.location.href.includes("localhost")?(fn="http://localhost:3500",`Bearer ${(await Rt.get(`${fn}/token`)).data}`):(e.getToken!=null&&e.getToken!=null?t=e.getToken():(e.parent.getToken!=null&&e.parent.getToken!=null&&(t=e.parent.getToken()),t=await q8(e)),t)},mg=(e,t,r)=>(e[t]!=="-1"&&e[t]!=="0"&&e[t]!==-1,e);function Y8(e){const{type:t,action:r="search",value:n,inputValue:o,handleValue:i,labelKey:s,labelText:l,optionAll:c}=e,u=t==="request"?e.request:null,d=t==="list"?e.list:null,[C,g]=f.useState(mg(n,s)),[v,b]=f.useState(o||""),[m,x]=f.useState(d||[]),[S,L]=f.useState("input"),[w,E]=f.useState(!1),[y,R]=f.useState(!1),[O,B]=f.useState(!1);f.useEffect(()=>{t==="list"?I(m):r==="all"&&M(V=>I(V))},[]),f.useEffect(()=>{t==="list"||r==="all"?p(m):c?v!==""&&S==="input"&&g(n):g(n)},[n]),f.useEffect(()=>{let V=null;return t=="request"&&(r==="search"&&v&&S==="input"||r==="all"&&!y)&&E(!0),r==="search"&&v&&S==="input"&&(V=setTimeout(()=>{M()},800)),()=>{E(!1),V&&clearInterval(V)}},[v]),f.useEffect(()=>{d&&d.length>0?x(d):x([])},[d]);const I=f.useCallback(V=>{if(n){const z=n||"",W=V.find(Z=>Z[s]==z);W&&(g(W),b(W[l]))}},[n,s,l]),p=f.useCallback(V=>{if(n){const z=n||"",W=V.find(Z=>Z[s]==z);W&&(g(W),b(W[l]))}else g(null),b("")},[n,s,l]),M=f.useCallback(V=>{if(u){t==="request"&&E(!0);let z=v.trim();if((z.trim()===""||z===" "||z===""||z==="-1"||z.trim()==="Todos")&&(z="_"),C&&C[l]===z){x([C]),E(!1);return}u.body={filter:z},pg.Send(u).then(W=>{if(W){let Z=W;Z=u!=null&&Z.length>20?Z.slice(0,20):Z??[],Z.length===void 0&&(Z=[]),x(Z),V&&V(Z)}t==="request"&&E(!1)})}},[v,m,u,r,t,w]),A=f.useCallback(V=>{V&&(g(V),i&&i(V))},[]),j=f.useCallback(V=>{V?b(V):H()},[r,t]),F=f.useCallback(V=>{L(V)},[]);f.useEffect(()=>{if(t==="list"&&r==="search"&&S==="input"&&d)if(v.trim()==="")x(d);else{const V=d.filter(z=>String(z[l]).toLowerCase().includes(v.toLowerCase()));x(V)}},[v]);const H=f.useCallback(()=>{if(t==="request")c||g(null),b(""),x([]),i&&i(null),M();else if(d)if(c){const V=d.find(z=>z[s]=="-1");V?(g(V),b(V[l]),i&&i(V)):(b(""),g(C||n),i&&i(C||n))}else{const V=n||"",z=d.find(W=>W[s]==V);z?(g(z),b(z[l]),i&&i(z)):(b(""),g(C),i&&i(C))}},[]);return f.useEffect(()=>{O?t==="request"&&M():(t==="list"&&r==="search"&&(g(C),b(C?C[l]:""),v===""&&x(d||[])),t==="request"&&(c?(n[s]==="-1"||n[s]===-1)&&(g(c),b(c[l]),i&&i(c)):(console.log("entra"),g(C),b(C?C[l]:""))))},[O]),{dataList:m,loading:w,isFocused:O,autocompleteValue:C,textFieldValue:v,handleAutocompleteValue:A,handleTextFieldValue:j,handleReasonChangeTextField:F,setIsFocused:B,clearValues:H}}const hg=qt(P.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),gg=qt(P.jsx("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp"),yg=qt(P.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M9.29 16.29 5.7 12.7a.996.996 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0s.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0"}),"CheckCircleRounded"),bg=qt(P.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"ClearRounded"),vg=qt(P.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined"),xg=qt(P.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"ErrorRounded"),Eg=qt(P.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1-8h-2V7h2z"}),"InfoRounded"),wg=qt(P.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchOutlined"),Sg=qt(P.jsx("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3M12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"WarningRounded");function C0(e,t,r){return(t=Rg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function r1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k9(Object(r),!0).forEach(function(n){C0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k9(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tg(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rg(e){var t=Tg(e,"string");return typeof t=="symbol"?t:t+""}function L1(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}var m0="$$material";function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jo.apply(null,arguments)}function K8(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Lg=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Og=K8(function(e){return Lg.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),oa=typeof document<"u";function Mg(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var G8=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||oa===!1&&t.compat!==void 0)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},$g=function(t,r,n){G8(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i="",s=r;do{var l=t.insert(r===s?"."+o:"",s,t.sheet,!0);!oa&&l!==void 0&&(i+=l),s=s.next}while(s!==void 0);if(!oa&&i.length!==0)return i}};function Pg(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var kg={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Vg=/[A-Z]|^ms/g,Dg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,X8=function(t){return t.charCodeAt(1)===45},V9=function(t){return t!=null&&typeof t!="boolean"},h3=K8(function(e){return X8(e)?e:e.replace(Vg,"-$&").toLowerCase()}),D9=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Dg,function(n,o,i){return Z2={name:o,styles:i,next:Z2},o})}return kg[t]!==1&&!X8(t)&&typeof r=="number"&&r!==0?r+"px":r};function Ln(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Z2={name:o.name,styles:o.styles,next:Z2},o.name;var i=r;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)Z2={name:s.name,styles:s.styles,next:Z2},s=s.next;var l=i.styles+";";return l}return Ag(e,t,r)}case"function":{if(e!==void 0){var c=Z2,u=r(e);return Z2=c,Ln(e,t,u)}break}}var d=r;if(t==null)return d;var C=t[d];return C!==void 0?C:d}function Ag(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Ln(e,t,r[o])+";";else for(var i in r){var s=r[i];if(typeof s!="object"){var l=s;t!=null&&t[l]!==void 0?n+=i+"{"+t[l]+"}":V9(l)&&(n+=h3(i)+":"+D9(i,l)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var c=0;c<s.length;c++)V9(s[c])&&(n+=h3(i)+":"+D9(i,s[c])+";");else{var u=Ln(e,t,s);switch(i){case"animation":case"animationName":{n+=h3(i)+":"+u+";";break}default:n+=i+"{"+u+"}"}}}return n}var A9=/label:\s*([^\s;{]+)\s*(;|$)/g,Z2;function J8(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Z2=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Ln(r,t,i);else{var s=i;o+=s[0]}for(var l=1;l<e.length;l++)if(o+=Ln(r,t,e[l]),n){var c=i;o+=c[l]}A9.lastIndex=0;for(var u="",d;(d=A9.exec(o))!==null;)u+="-"+d[1];var C=Pg(o)+u;return{name:C,styles:o,next:Z2}}var Bg=typeof document<"u",B9=function(t){return t()},Ig=T.useInsertionEffect?T.useInsertionEffect:!1,Hg=Bg&&Ig||B9,Ng=Og,Fg=function(t){return t!=="theme"},I9=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Ng:Fg},H9=function(t,r,n){var o;if(r){var i=r.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},N9=`You have illegal escape sequence in your template literal, most likely inside content's property value.
|
330
330
|
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
331
331
|
You can read more about this here:
|
332
332
|
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,jg=typeof document<"u",_g=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;G8(r,n,o);var i=Hg(function(){return $g(r,n,o)});if(!jg&&i!==void 0){for(var s,l=n.name,c=n.next;c!==void 0;)l+=" "+c.name,c=c.next;return T.createElement("style",(s={},s["data-emotion"]=r.key+" "+l,s.dangerouslySetInnerHTML={__html:i},s.nonce=r.sheet.nonce,s))}return null},zg=function e(t,r){if(process.env.NODE_ENV!=="production"&&t===void 0)throw new Error(`You are trying to create a styled element with an undefined component.
|
@@ -730,4 +730,4 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
730
730
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
731
731
|
* See the License for the specific language governing permissions and
|
732
732
|
* limitations under the License.
|
733
|
-
*/function jr(e){return e.variant===Pn.FIDELITY||e.variant===Pn.CONTENT}function Mt(e){return e.variant===Pn.MONOCHROME}function fw(e,t,r,n){let o=r,i=_1.from(e,t,r);if(i.chroma<t){let s=i.chroma;for(;i.chroma<t;){o+=n?-1:1;const l=_1.from(e,t,o);if(s>l.chroma||Math.abs(l.chroma-t)<.4)break;const c=Math.abs(l.chroma-t),u=Math.abs(i.chroma-t);c<u&&(i=l),s=Math.max(s,l.chroma)}}return o}function Cw(e){return P2.make(void 0,void 0,e.isDark?30:80,void 0,void 0)}function A0(e,t){const r=e.inViewingConditions(Cw(t));return xe.tonePrefersLightForeground(e.tone)&&!xe.toneAllowsLightForeground(r.tone)?xe.enableLightForeground(e.tone):xe.enableLightForeground(r.tone)}class J{static highestSurface(t){return t.isDark?J.surfaceBright:J.surfaceDim}}J.contentAccentToneDelta=15;J.primaryPaletteKeyColor=xe.fromPalette({name:"primary_palette_key_color",palette:e=>e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone});J.secondaryPaletteKeyColor=xe.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone});J.tertiaryPaletteKeyColor=xe.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone});J.neutralPaletteKeyColor=xe.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone});J.neutralVariantPaletteKeyColor=xe.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone});J.background=xe.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});J.onBackground=xe.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>J.background,contrastCurve:new ze(3,3,4.5,7)});J.surface=xe.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});J.surfaceDim=xe.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:87,isBackground:!0});J.surfaceBright=xe.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?24:98,isBackground:!0});J.surfaceContainerLowest=xe.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?4:100,isBackground:!0});J.surfaceContainerLow=xe.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?10:96,isBackground:!0});J.surfaceContainer=xe.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?12:94,isBackground:!0});J.surfaceContainerHigh=xe.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?17:92,isBackground:!0});J.surfaceContainerHighest=xe.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?22:90,isBackground:!0});J.onSurface=xe.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>J.highestSurface(e),contrastCurve:new ze(4.5,7,11,21)});J.surfaceVariant=xe.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0});J.onSurfaceVariant=xe.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>J.highestSurface(e),contrastCurve:new ze(3,4.5,7,11)});J.inverseSurface=xe.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20});J.inverseOnSurface=xe.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>J.inverseSurface,contrastCurve:new ze(4.5,7,11,21)});J.outline=xe.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>J.highestSurface(e),contrastCurve:new ze(1.5,3,4.5,7)});J.outlineVariant=xe.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7)});J.shadow=xe.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0});J.scrim=xe.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0});J.surfaceTint=xe.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0});J.primary=xe.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>Mt(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(3,4.5,7,11),toneDeltaPair:e=>new o2(J.primaryContainer,J.primary,15,"nearer",!1)});J.onPrimary=xe.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>Mt(e)?e.isDark?10:90:e.isDark?20:100,background:e=>J.primary,contrastCurve:new ze(4.5,7,11,21)});J.primaryContainer=xe.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>jr(e)?A0(e.sourceColorHct,e):Mt(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.primaryContainer,J.primary,15,"nearer",!1)});J.onPrimaryContainer=xe.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>jr(e)?xe.foregroundTone(J.primaryContainer.tone(e),4.5):Mt(e)?e.isDark?0:100:e.isDark?90:10,background:e=>J.primaryContainer,contrastCurve:new ze(4.5,7,11,21)});J.inversePrimary=xe.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>J.inverseSurface,contrastCurve:new ze(3,4.5,7,11)});J.secondary=xe.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(3,4.5,7,11),toneDeltaPair:e=>new o2(J.secondaryContainer,J.secondary,15,"nearer",!1)});J.onSecondary=xe.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>Mt(e)?e.isDark?10:100:e.isDark?20:100,background:e=>J.secondary,contrastCurve:new ze(4.5,7,11,21)});J.secondaryContainer=xe.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{const t=e.isDark?30:90;if(Mt(e))return e.isDark?30:85;if(!jr(e))return t;let r=fw(e.secondaryPalette.hue,e.secondaryPalette.chroma,t,!e.isDark);return r=A0(e.secondaryPalette.getHct(r),e),r},isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.secondaryContainer,J.secondary,15,"nearer",!1)});J.onSecondaryContainer=xe.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>jr(e)?xe.foregroundTone(J.secondaryContainer.tone(e),4.5):e.isDark?90:10,background:e=>J.secondaryContainer,contrastCurve:new ze(4.5,7,11,21)});J.tertiary=xe.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(3,4.5,7,11),toneDeltaPair:e=>new o2(J.tertiaryContainer,J.tertiary,15,"nearer",!1)});J.onTertiary=xe.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?e.isDark?10:90:e.isDark?20:100,background:e=>J.tertiary,contrastCurve:new ze(4.5,7,11,21)});J.tertiaryContainer=xe.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(Mt(e))return e.isDark?60:49;if(!jr(e))return e.isDark?30:90;const t=A0(e.tertiaryPalette.getHct(e.sourceColorHct.tone),e),r=e.tertiaryPalette.getHct(t);return D0.fixIfDisliked(r).tone},isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.tertiaryContainer,J.tertiary,15,"nearer",!1)});J.onTertiaryContainer=xe.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?e.isDark?0:100:jr(e)?xe.foregroundTone(J.tertiaryContainer.tone(e),4.5):e.isDark?90:10,background:e=>J.tertiaryContainer,contrastCurve:new ze(4.5,7,11,21)});J.error=xe.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(3,4.5,7,11),toneDeltaPair:e=>new o2(J.errorContainer,J.error,15,"nearer",!1)});J.onError=xe.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>J.error,contrastCurve:new ze(4.5,7,11,21)});J.errorContainer=xe.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.errorContainer,J.error,15,"nearer",!1)});J.onErrorContainer=xe.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?90:10,background:e=>J.errorContainer,contrastCurve:new ze(4.5,7,11,21)});J.primaryFixed=xe.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>Mt(e)?40:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.primaryFixed,J.primaryFixedDim,10,"lighter",!0)});J.primaryFixedDim=xe.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>Mt(e)?30:80,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.primaryFixed,J.primaryFixedDim,10,"lighter",!0)});J.onPrimaryFixed=xe.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>Mt(e)?100:10,background:e=>J.primaryFixedDim,secondBackground:e=>J.primaryFixed,contrastCurve:new ze(4.5,7,11,21)});J.onPrimaryFixedVariant=xe.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>Mt(e)?90:30,background:e=>J.primaryFixedDim,secondBackground:e=>J.primaryFixed,contrastCurve:new ze(3,4.5,7,11)});J.secondaryFixed=xe.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>Mt(e)?80:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.secondaryFixed,J.secondaryFixedDim,10,"lighter",!0)});J.secondaryFixedDim=xe.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>Mt(e)?70:80,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.secondaryFixed,J.secondaryFixedDim,10,"lighter",!0)});J.onSecondaryFixed=xe.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>J.secondaryFixedDim,secondBackground:e=>J.secondaryFixed,contrastCurve:new ze(4.5,7,11,21)});J.onSecondaryFixedVariant=xe.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>Mt(e)?25:30,background:e=>J.secondaryFixedDim,secondBackground:e=>J.secondaryFixed,contrastCurve:new ze(3,4.5,7,11)});J.tertiaryFixed=xe.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?40:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.tertiaryFixed,J.tertiaryFixedDim,10,"lighter",!0)});J.tertiaryFixedDim=xe.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?30:80,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.tertiaryFixed,J.tertiaryFixedDim,10,"lighter",!0)});J.onTertiaryFixed=xe.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?100:10,background:e=>J.tertiaryFixedDim,secondBackground:e=>J.tertiaryFixed,contrastCurve:new ze(4.5,7,11,21)});J.onTertiaryFixedVariant=xe.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?90:30,background:e=>J.tertiaryFixedDim,secondBackground:e=>J.tertiaryFixed,contrastCurve:new ze(3,4.5,7,11)});const G7={...ya,components:{...ya.components,MuiTableHead:{styleOverrides:{root:{th:{padding:"0.2rem 0.5rem !important",borderBottom:"1px solid rgba(226, 227, 232, 1) !important",color:"text-primary",background:O3[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:O3[100]}}}},MuiTableFooter:{styleOverrides:{root:{".MuiTableCell-footer":{padding:"2px 4px !important"}}}}}},mw=e=>{const{label:t,helperText:r,inputRef:n,name:o,customTheme:i,required:s,error:l,placeholder:c,size:u,type:d,labelText:C,optionAll:g}=e,{dataList:v,loading:b,isFocused:m,autocompleteValue:x,textFieldValue:S,handleAutocompleteValue:L,handleTextFieldValue:w,handleReasonChangeTextField:E,setIsFocused:y,clearValues:R}=Y8(e);let O=i||G7,B=g?[g,...v]:v;const I=f.useMemo(()=>{const p={...e};return delete p.handleValue,delete p.labelText,delete p.labelKey,delete p.helperText,delete p.error,delete p.ref,delete p.inputRef,delete p.name,delete p.labelSelection,delete p.size,delete p.optionAll,p},[e]);return P.jsx(Gu,{theme:O,children:P.jsx(J4,{...I,filterOptions:p=>p,noOptionsText:"No se encontraron resultados.",options:B,onChange:(p,M)=>L(M),onInputChange:(p,M,A)=>{w(M),E(A)},getOptionLabel:e.getOptionLabel?e.getOptionLabel:p=>p?p[C]:"",renderOption:(p,M)=>f.createElement(t8,{component:"li",...p,key:`${M[e.labelKey]}-${M[e.labelText]}`,sx:{borderBottom:M[e.labelKey]==="-1"||M[e.labelKey]===-1?`${ya.palette.divider} 1px solid`:"inherit"}},M[e.labelText]),value:x,inputValue:S,loading:b,loadingText:"Consultando...",size:u,renderInput:p=>P.jsx(x8,{...p,label:t,value:S,error:l,helperText:r,placeholder:c,required:s,ref:n,name:o??"",size:u,onFocus:M=>{y(!0)},onBlur:()=>y(!1),InputProps:{...p.InputProps,endAdornment:P.jsxs(P.Fragment,{children:[S&&d!=="list"?P.jsx(Dr,{size:"small",onClick:R,children:P.jsx(bg,{fontSize:"small"})}):null,b?P.jsx(r8,{color:"primary",size:20}):d==="list"?m?P.jsx(gg,{sx:{color:"rgba(16,24,64,0.6)"},fontSize:"small"}):P.jsx(hg,{sx:{color:"rgba(16,24,64,0.6)"},fontSize:"small"}):P.jsx(wg,{sx:{color:"rgba(16,24,64,0.6)"},fontSize:"small"})]})}})})})},Ra=e=>{const{primaryMessage:t,secondaryMessage:r,details:n,finishAction:o,severity:i="success",timeProgress:s=5,customContent:l}=e,[c,u]=f.useState(0),d=f.useRef(null),[C,g]=f.useState(!0),v=()=>{u(S=>S>=100?(m(),100):S+parseFloat(`1.${10/s}`))},b=()=>{d.current=setInterval(()=>{v()},s*10)},m=()=>{d.current&&(clearInterval(d.current),d.current=null),g(!1)},x=f.useCallback(S=>{S?d.current&&(clearInterval(d.current),d.current=null):b()},[]);return f.useEffect(()=>{u(0),g(!0),b()},[e]),f.useEffect(()=>{!C&&o&&o()},[C]),C&&P.jsxs(Er,{children:[P.jsxs(I4,{"data-testid":"alert-toast-adpro",severity:i,onMouseOver:()=>x(!0),onMouseOut:()=>x(!1),sx:{boxShadow:"1px 5px 2px rgba(0,0,0,.2)",borderRadius:"4px 4px 0px 0px","& .MuiAlert-action":{marginBottom:"auto"},"& .MuiAlert-message ":{width:"100%"}},action:P.jsx(Dr,{onClick:()=>g(!1),sx:{padding:0},children:P.jsx(vg,{fontSize:"small",sx:{cursor:"pointer"}})}),children:[P.jsx(H4,{children:t}),r||"",n&&n.length>0&&P.jsx(Er,{maxHeight:"9rem",overflow:"auto",children:n.map((S,L)=>P.jsx(Ja,{variant:"caption",color:"text.secondary",children:S},L))}),P.jsx(Er,{paddingTop:1,children:l&&l})]}),P.jsx(l8,{value:c,variant:"determinate",color:i,sx:{borderEndEndRadius:4,borderEndStartRadius:4}})]})},B0=f.memo(e=>{const{elements:t}=e,[r,n]=f.useState(!0);return f.useEffect(()=>{n(!0)},[t]),r&&P.jsx(Er,{position:"fixed",top:25,right:25,zIndex:1500,maxWidth:"45%",minWidth:"25%",children:P.jsx(Er,{gap:1,sx:{flexDirection:"column"},children:r&&!Array.isArray(t)?P.jsx(Ra,{...t}):Array.isArray(t)&&t.map((o,i)=>P.jsx(Ra,{...o},i))})})}),hw=e=>{const[t,r]=f.useState(e),n=o=>r(o);return[t?S2.createPortal(P.jsx(B0,{elements:t}),document.body):S2.createPortal(P.jsx(P.Fragment,{}),document.body),n]};exports.ADPROTheme=G7;exports.AutocompleteADPRO=mw;exports.ToastADPRO=Ra;exports.ToastsContainer=B0;exports.useAutocompleteADPRO=Y8;exports.useToast=hw;
|
733
|
+
*/function jr(e){return e.variant===Pn.FIDELITY||e.variant===Pn.CONTENT}function Mt(e){return e.variant===Pn.MONOCHROME}function fw(e,t,r,n){let o=r,i=_1.from(e,t,r);if(i.chroma<t){let s=i.chroma;for(;i.chroma<t;){o+=n?-1:1;const l=_1.from(e,t,o);if(s>l.chroma||Math.abs(l.chroma-t)<.4)break;const c=Math.abs(l.chroma-t),u=Math.abs(i.chroma-t);c<u&&(i=l),s=Math.max(s,l.chroma)}}return o}function Cw(e){return P2.make(void 0,void 0,e.isDark?30:80,void 0,void 0)}function A0(e,t){const r=e.inViewingConditions(Cw(t));return xe.tonePrefersLightForeground(e.tone)&&!xe.toneAllowsLightForeground(r.tone)?xe.enableLightForeground(e.tone):xe.enableLightForeground(r.tone)}class J{static highestSurface(t){return t.isDark?J.surfaceBright:J.surfaceDim}}J.contentAccentToneDelta=15;J.primaryPaletteKeyColor=xe.fromPalette({name:"primary_palette_key_color",palette:e=>e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone});J.secondaryPaletteKeyColor=xe.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone});J.tertiaryPaletteKeyColor=xe.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone});J.neutralPaletteKeyColor=xe.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone});J.neutralVariantPaletteKeyColor=xe.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone});J.background=xe.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});J.onBackground=xe.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>J.background,contrastCurve:new ze(3,3,4.5,7)});J.surface=xe.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});J.surfaceDim=xe.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:87,isBackground:!0});J.surfaceBright=xe.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?24:98,isBackground:!0});J.surfaceContainerLowest=xe.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?4:100,isBackground:!0});J.surfaceContainerLow=xe.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?10:96,isBackground:!0});J.surfaceContainer=xe.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?12:94,isBackground:!0});J.surfaceContainerHigh=xe.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?17:92,isBackground:!0});J.surfaceContainerHighest=xe.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?22:90,isBackground:!0});J.onSurface=xe.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>J.highestSurface(e),contrastCurve:new ze(4.5,7,11,21)});J.surfaceVariant=xe.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0});J.onSurfaceVariant=xe.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>J.highestSurface(e),contrastCurve:new ze(3,4.5,7,11)});J.inverseSurface=xe.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20});J.inverseOnSurface=xe.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>J.inverseSurface,contrastCurve:new ze(4.5,7,11,21)});J.outline=xe.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>J.highestSurface(e),contrastCurve:new ze(1.5,3,4.5,7)});J.outlineVariant=xe.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7)});J.shadow=xe.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0});J.scrim=xe.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0});J.surfaceTint=xe.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0});J.primary=xe.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>Mt(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(3,4.5,7,11),toneDeltaPair:e=>new o2(J.primaryContainer,J.primary,15,"nearer",!1)});J.onPrimary=xe.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>Mt(e)?e.isDark?10:90:e.isDark?20:100,background:e=>J.primary,contrastCurve:new ze(4.5,7,11,21)});J.primaryContainer=xe.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>jr(e)?A0(e.sourceColorHct,e):Mt(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.primaryContainer,J.primary,15,"nearer",!1)});J.onPrimaryContainer=xe.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>jr(e)?xe.foregroundTone(J.primaryContainer.tone(e),4.5):Mt(e)?e.isDark?0:100:e.isDark?90:10,background:e=>J.primaryContainer,contrastCurve:new ze(4.5,7,11,21)});J.inversePrimary=xe.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>J.inverseSurface,contrastCurve:new ze(3,4.5,7,11)});J.secondary=xe.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(3,4.5,7,11),toneDeltaPair:e=>new o2(J.secondaryContainer,J.secondary,15,"nearer",!1)});J.onSecondary=xe.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>Mt(e)?e.isDark?10:100:e.isDark?20:100,background:e=>J.secondary,contrastCurve:new ze(4.5,7,11,21)});J.secondaryContainer=xe.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{const t=e.isDark?30:90;if(Mt(e))return e.isDark?30:85;if(!jr(e))return t;let r=fw(e.secondaryPalette.hue,e.secondaryPalette.chroma,t,!e.isDark);return r=A0(e.secondaryPalette.getHct(r),e),r},isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.secondaryContainer,J.secondary,15,"nearer",!1)});J.onSecondaryContainer=xe.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>jr(e)?xe.foregroundTone(J.secondaryContainer.tone(e),4.5):e.isDark?90:10,background:e=>J.secondaryContainer,contrastCurve:new ze(4.5,7,11,21)});J.tertiary=xe.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(3,4.5,7,11),toneDeltaPair:e=>new o2(J.tertiaryContainer,J.tertiary,15,"nearer",!1)});J.onTertiary=xe.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?e.isDark?10:90:e.isDark?20:100,background:e=>J.tertiary,contrastCurve:new ze(4.5,7,11,21)});J.tertiaryContainer=xe.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(Mt(e))return e.isDark?60:49;if(!jr(e))return e.isDark?30:90;const t=A0(e.tertiaryPalette.getHct(e.sourceColorHct.tone),e),r=e.tertiaryPalette.getHct(t);return D0.fixIfDisliked(r).tone},isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.tertiaryContainer,J.tertiary,15,"nearer",!1)});J.onTertiaryContainer=xe.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?e.isDark?0:100:jr(e)?xe.foregroundTone(J.tertiaryContainer.tone(e),4.5):e.isDark?90:10,background:e=>J.tertiaryContainer,contrastCurve:new ze(4.5,7,11,21)});J.error=xe.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(3,4.5,7,11),toneDeltaPair:e=>new o2(J.errorContainer,J.error,15,"nearer",!1)});J.onError=xe.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>J.error,contrastCurve:new ze(4.5,7,11,21)});J.errorContainer=xe.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.errorContainer,J.error,15,"nearer",!1)});J.onErrorContainer=xe.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?90:10,background:e=>J.errorContainer,contrastCurve:new ze(4.5,7,11,21)});J.primaryFixed=xe.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>Mt(e)?40:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.primaryFixed,J.primaryFixedDim,10,"lighter",!0)});J.primaryFixedDim=xe.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>Mt(e)?30:80,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.primaryFixed,J.primaryFixedDim,10,"lighter",!0)});J.onPrimaryFixed=xe.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>Mt(e)?100:10,background:e=>J.primaryFixedDim,secondBackground:e=>J.primaryFixed,contrastCurve:new ze(4.5,7,11,21)});J.onPrimaryFixedVariant=xe.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>Mt(e)?90:30,background:e=>J.primaryFixedDim,secondBackground:e=>J.primaryFixed,contrastCurve:new ze(3,4.5,7,11)});J.secondaryFixed=xe.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>Mt(e)?80:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.secondaryFixed,J.secondaryFixedDim,10,"lighter",!0)});J.secondaryFixedDim=xe.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>Mt(e)?70:80,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.secondaryFixed,J.secondaryFixedDim,10,"lighter",!0)});J.onSecondaryFixed=xe.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>J.secondaryFixedDim,secondBackground:e=>J.secondaryFixed,contrastCurve:new ze(4.5,7,11,21)});J.onSecondaryFixedVariant=xe.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>Mt(e)?25:30,background:e=>J.secondaryFixedDim,secondBackground:e=>J.secondaryFixed,contrastCurve:new ze(3,4.5,7,11)});J.tertiaryFixed=xe.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?40:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.tertiaryFixed,J.tertiaryFixedDim,10,"lighter",!0)});J.tertiaryFixedDim=xe.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?30:80,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new ze(1,1,3,7),toneDeltaPair:e=>new o2(J.tertiaryFixed,J.tertiaryFixedDim,10,"lighter",!0)});J.onTertiaryFixed=xe.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?100:10,background:e=>J.tertiaryFixedDim,secondBackground:e=>J.tertiaryFixed,contrastCurve:new ze(4.5,7,11,21)});J.onTertiaryFixedVariant=xe.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>Mt(e)?90:30,background:e=>J.tertiaryFixedDim,secondBackground:e=>J.tertiaryFixed,contrastCurve:new ze(3,4.5,7,11)});const G7={...ya,components:{...ya.components,MuiTableHead:{styleOverrides:{root:{th:{padding:"0.2rem 0.5rem !important",borderBottom:"1px solid rgba(226, 227, 232, 1) !important",color:"text-primary",background:O3[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:O3[100]}}}},MuiTableFooter:{styleOverrides:{root:{".MuiTableCell-footer":{padding:"2px 4px !important"}}}}}},mw=e=>{const{label:t,helperText:r,inputRef:n,name:o,customTheme:i,required:s,error:l,placeholder:c,size:u,type:d,labelText:C,optionAll:g}=e,{dataList:v,loading:b,isFocused:m,autocompleteValue:x,textFieldValue:S,handleAutocompleteValue:L,handleTextFieldValue:w,handleReasonChangeTextField:E,setIsFocused:y,clearValues:R}=Y8(e);let O=i||G7,B=g?[g,...v]:v;const I=f.useMemo(()=>{const p={...e};return delete p.handleValue,delete p.labelText,delete p.labelKey,delete p.helperText,delete p.error,delete p.ref,delete p.inputRef,delete p.name,delete p.labelSelection,delete p.size,delete p.optionAll,p},[e]);return P.jsx(Gu,{theme:O,children:P.jsx(J4,{...I,filterOptions:p=>p,noOptionsText:"No se encontraron resultados.",options:B,onChange:(p,M)=>L(M),onInputChange:(p,M,A)=>{w(M),E(A)},getOptionLabel:e.getOptionLabel?e.getOptionLabel:p=>p?p[C]:"",renderOption:(p,M)=>f.createElement(t8,{component:"li",...p,key:`${M[e.labelKey]}-${M[e.labelText]}`,sx:{borderBottom:M[e.labelKey]==="-1"||M[e.labelKey]===-1?`${ya.palette.divider} 1px solid`:"inherit"}},M[e.labelText]),value:x,inputValue:S,loading:b,loadingText:"Consultando...",size:u,onBlur:()=>{y(!1)},renderInput:p=>P.jsx(x8,{...p,label:t,value:S,error:l,helperText:r,placeholder:c,required:s,ref:n,name:o??"",size:u,onFocus:M=>{y(!0)},InputProps:{...p.InputProps,endAdornment:P.jsxs(P.Fragment,{children:[S&&d!=="list"?P.jsx(Dr,{size:"small",onClick:R,children:P.jsx(bg,{fontSize:"small"})}):null,b?P.jsx(r8,{color:"primary",size:20}):d==="list"?m?P.jsx(gg,{sx:{color:"rgba(16,24,64,0.6)"},fontSize:"small"}):P.jsx(hg,{sx:{color:"rgba(16,24,64,0.6)"},fontSize:"small"}):P.jsx(wg,{sx:{color:"rgba(16,24,64,0.6)"},fontSize:"small"})]})}})})})},Ra=e=>{const{primaryMessage:t,secondaryMessage:r,details:n,finishAction:o,severity:i="success",timeProgress:s=5,customContent:l}=e,[c,u]=f.useState(0),d=f.useRef(null),[C,g]=f.useState(!0),v=()=>{u(S=>S>=100?(m(),100):S+parseFloat(`1.${10/s}`))},b=()=>{d.current=setInterval(()=>{v()},s*10)},m=()=>{d.current&&(clearInterval(d.current),d.current=null),g(!1)},x=f.useCallback(S=>{S?d.current&&(clearInterval(d.current),d.current=null):b()},[]);return f.useEffect(()=>{u(0),g(!0),b()},[e]),f.useEffect(()=>{!C&&o&&o()},[C]),C&&P.jsxs(Er,{children:[P.jsxs(I4,{"data-testid":"alert-toast-adpro",severity:i,onMouseOver:()=>x(!0),onMouseOut:()=>x(!1),sx:{boxShadow:"1px 5px 2px rgba(0,0,0,.2)",borderRadius:"4px 4px 0px 0px","& .MuiAlert-action":{marginBottom:"auto"},"& .MuiAlert-message ":{width:"100%"}},action:P.jsx(Dr,{onClick:()=>g(!1),sx:{padding:0},children:P.jsx(vg,{fontSize:"small",sx:{cursor:"pointer"}})}),children:[P.jsx(H4,{children:t}),r||"",n&&n.length>0&&P.jsx(Er,{maxHeight:"9rem",overflow:"auto",children:n.map((S,L)=>P.jsx(Ja,{variant:"caption",color:"text.secondary",children:S},L))}),P.jsx(Er,{paddingTop:1,children:l&&l})]}),P.jsx(l8,{value:c,variant:"determinate",color:i,sx:{borderEndEndRadius:4,borderEndStartRadius:4}})]})},B0=f.memo(e=>{const{elements:t}=e,[r,n]=f.useState(!0);return f.useEffect(()=>{n(!0)},[t]),r&&P.jsx(Er,{position:"fixed",top:25,right:25,zIndex:1500,maxWidth:"45%",minWidth:"25%",children:P.jsx(Er,{gap:1,sx:{flexDirection:"column"},children:r&&!Array.isArray(t)?P.jsx(Ra,{...t}):Array.isArray(t)&&t.map((o,i)=>P.jsx(Ra,{...o},i))})})}),hw=e=>{const[t,r]=f.useState(e),n=o=>r(o);return[t?S2.createPortal(P.jsx(B0,{elements:t}),document.body):S2.createPortal(P.jsx(P.Fragment,{}),document.body),n]};exports.ADPROTheme=G7;exports.AutocompleteADPRO=mw;exports.ToastADPRO=Ra;exports.ToastsContainer=B0;exports.useAutocompleteADPRO=Y8;exports.useToast=hw;
|
package/dist/adpro-react.es.js
CHANGED
@@ -21844,7 +21844,7 @@ const Eg = {
|
|
21844
21844
|
}, J8 = async (e) => {
|
21845
21845
|
let t = "";
|
21846
21846
|
return window.parent.location.href.includes("localhost") ? (yn = "http://localhost:3500", `Bearer ${(await Rt.get(`${yn}/token`)).data}`) : (e.getToken != null && e.getToken != null ? t = e.getToken() : (e.parent.getToken != null && e.parent.getToken != null && (t = e.parent.getToken()), t = await J8(e)), t);
|
21847
|
-
}, Tg = (e, t, r) => e[t]
|
21847
|
+
}, Tg = (e, t, r) => (e[t] !== "-1" && e[t] !== "0" && e[t] !== -1, e);
|
21848
21848
|
function Rg(e) {
|
21849
21849
|
const {
|
21850
21850
|
type: t,
|
@@ -21855,11 +21855,11 @@ function Rg(e) {
|
|
21855
21855
|
labelKey: s,
|
21856
21856
|
labelText: l,
|
21857
21857
|
optionAll: c
|
21858
|
-
} = e, u = t === "request" ? e.request : null, d = t === "list" ? e.list : null, [f, g] = $2(Tg(n, s
|
21858
|
+
} = e, u = t === "request" ? e.request : null, d = t === "list" ? e.list : null, [f, g] = $2(Tg(n, s)), [v, b] = $2(o || ""), [C, x] = $2(d || []), [S, L] = $2("input"), [w, E] = $2(!1), [y, R] = $2(!1), [M, B] = $2(!1);
|
21859
21859
|
c1(() => {
|
21860
21860
|
t === "list" ? I(C) : r === "all" && O((V) => I(V));
|
21861
21861
|
}, []), c1(() => {
|
21862
|
-
t === "list" || r === "all" ? p(C) : g(n);
|
21862
|
+
t === "list" || r === "all" ? p(C) : c ? v !== "" && S === "input" && g(n) : g(n);
|
21863
21863
|
}, [n]), c1(() => {
|
21864
21864
|
let V = null;
|
21865
21865
|
return t == "request" && (r === "search" && v && S === "input" || r === "all" && !y) && E(!0), r === "search" && v && S === "input" && (V = setTimeout(() => {
|
@@ -21928,18 +21928,18 @@ function Rg(e) {
|
|
21928
21928
|
}, [v]);
|
21929
21929
|
const H = T1(() => {
|
21930
21930
|
if (t === "request")
|
21931
|
-
c
|
21931
|
+
c || g(null), b(""), x([]), i && i(null), O();
|
21932
21932
|
else if (d)
|
21933
21933
|
if (c) {
|
21934
21934
|
const V = d.find((z) => z[s] == "-1");
|
21935
|
-
V ? (g(V), b(V[l]), i && i(V)) : (b(""), g(n), i && i(n));
|
21935
|
+
V ? (g(V), b(V[l]), i && i(V)) : (b(""), g(f || n), i && i(f || n));
|
21936
21936
|
} else {
|
21937
21937
|
const V = n || "", z = d.find((W) => W[s] == V);
|
21938
|
-
z ? (g(z), b(z[l]), i && i(z)) : (b(""), g(
|
21938
|
+
z ? (g(z), b(z[l]), i && i(z)) : (b(""), g(f), i && i(f));
|
21939
21939
|
}
|
21940
21940
|
}, []);
|
21941
21941
|
return c1(() => {
|
21942
|
-
M ? t === "request" && O() : (t === "list" && r === "search" && (g(
|
21942
|
+
M ? t === "request" && O() : (t === "list" && r === "search" && (g(f), b(f ? f[l] : ""), v === "" && x(d || [])), t === "request" && (c ? (n[s] === "-1" || n[s] === -1) && (g(c), b(c[l]), i && i(c)) : (console.log("entra"), g(f), b(f ? f[l] : ""))));
|
21943
21943
|
}, [M]), {
|
21944
21944
|
dataList: C,
|
21945
21945
|
loading: w,
|
@@ -38698,6 +38698,9 @@ const Rw = {
|
|
38698
38698
|
loading: b,
|
38699
38699
|
loadingText: "Consultando...",
|
38700
38700
|
size: u,
|
38701
|
+
onBlur: () => {
|
38702
|
+
y(!1);
|
38703
|
+
},
|
38701
38704
|
renderInput: (p) => /* @__PURE__ */ P.jsx(
|
38702
38705
|
R8,
|
38703
38706
|
{
|
@@ -38714,7 +38717,6 @@ const Rw = {
|
|
38714
38717
|
onFocus: (O) => {
|
38715
38718
|
y(!0);
|
38716
38719
|
},
|
38717
|
-
onBlur: () => y(!1),
|
38718
38720
|
InputProps: {
|
38719
38721
|
...p.InputProps,
|
38720
38722
|
endAdornment: /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
|
@@ -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;CACjB;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;AAe/B,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9D,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC;;;;;;
|
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;CACjB;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;AAe/B,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9D,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC;;;;;;wCAmLuB,CAAC,GAAG,IAAI;sCASV,MAAM;0CAQF,6BAA6B;;;EAiHzF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AuctocompleteADPRO.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/view/AuctocompleteADPRO.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAwB,MAAM,8BAA8B,CAAC;AAQ5F,eAAO,MAAM,iBAAiB,GACzB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,SAAS,sBAAsB,CAAC,CAAC,CAAC,
|
1
|
+
{"version":3,"file":"AuctocompleteADPRO.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/view/AuctocompleteADPRO.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAwB,MAAM,8BAA8B,CAAC;AAQ5F,eAAO,MAAM,iBAAiB,GACzB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,SAAS,sBAAsB,CAAC,CAAC,CAAC,4CA+I/D,CAAA"}
|
package/dist/main.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,KAAK,+
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,KAAK,+CAwGjB,CAAA"}
|