Files
dtic-DIIAA/servicios/sysacad/.next/static/chunks/798-473a17c9c5489867.js
T

1 line
19 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[798],{798:function(e,t,r){let n,s,i,a,o;r.d(t,{Yp:function(){return P}});var u,c,l=r(2265);r(7437);var h=Object.create,d=Object.defineProperty,m=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,f=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty,g=(n=(e,t)=>{var n,s;n=e,s=function(e){var t,r=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,n=new WeakMap,s=(t=function(e,t){return n.set(e,t),t},function(e){var s=n.get(e),i=void 0===s?e.size:s<1073741824?s+1:0;if(!e.has(i))return t(e,i);if(e.size<536870912){for(;e.has(i);)i=Math.floor(1073741824*Math.random());return t(e,i)}if(e.size>r)throw Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(i);)i=Math.floor(Math.random()*r);return t(e,i)});e.addUniqueNumber=function(e){var t=s(e);return e.add(t),t},e.generateUniqueNumber=s},"object"==typeof e&&"u">typeof t?s(e):"function"==typeof define&&r.amdO?define(["exports"],s):s((n="u">typeof globalThis?globalThis:n||self).fastUniqueNumbers={})},()=>(s||n((s={exports:{}}).exports,s),s.exports));l.Component;var w=(a=null!=(i=g())?h(f(i)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of p(t))v.call(e,r)||void 0===r||d(e,r,{get:()=>t[r],enumerable:!(n=m(t,r))||n.enumerable});return e})(i&&i.__esModule?a:d(a,"default",{value:i,enumerable:!0}),i)),y=e=>void 0!==e.method&&"call"===e.method,b=e=>null===e.error&&"number"==typeof e.id;u=e=>{let t=new Map([[0,()=>{}]]),r=new Map([[0,()=>{}]]),n=new Map,s=new Worker(e);return s.addEventListener("message",({data:e})=>{if(y(e)){let{params:{timerId:s,timerType:i}}=e;if("interval"===i){let e=t.get(s);if("number"==typeof e){let t=n.get(e);if(void 0===t||t.timerId!==s||t.timerType!==i)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e();else throw Error("The timer is in an undefined state.")}else if("timeout"===i){let e=r.get(s);if("number"==typeof e){let t=n.get(e);if(void 0===t||t.timerId!==s||t.timerType!==i)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e(),r.delete(s);else throw Error("The timer is in an undefined state.")}}else if(b(e)){let{id:s}=e,i=n.get(s);if(void 0===i)throw Error("The timer is in an undefined state.");let{timerId:a,timerType:o}=i;n.delete(s),"interval"===o?t.delete(a):r.delete(a)}else{let{error:{message:t}}=e;throw Error(t)}}),{clearInterval:e=>{let r=(0,w.generateUniqueNumber)(n);n.set(r,{timerId:e,timerType:"interval"}),t.set(e,r),s.postMessage({id:r,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{let t=(0,w.generateUniqueNumber)(n);n.set(t,{timerId:e,timerType:"timeout"}),r.set(e,t),s.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,r)=>{let n=(0,w.generateUniqueNumber)(t);return t.set(n,()=>{e(),"function"==typeof t.get(n)&&s.postMessage({id:null,method:"set",params:{delay:r,now:performance.now(),timerId:n,timerType:"interval"}})}),s.postMessage({id:null,method:"set",params:{delay:r,now:performance.now(),timerId:n,timerType:"interval"}}),n},setTimeout:(e,t)=>{let n=(0,w.generateUniqueNumber)(r);return r.set(n,e),s.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:n,timerType:"timeout"}}),n}}},c='(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if("interval"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if("timeout"!==i)throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));(e=>{const r=t.get(e);if(void 0===r)throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if("set"!==s.method)throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);else{if("timeout"!==d)throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();',o=null,()=>{if(null!==o)return o;let e=new Blob([c],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return o=u(t),setTimeout(()=>URL.revokeObjectURL(t)),o};var T=(typeof window>"u"?"undefined":typeof window)=="object",E={setTimeout:T?setTimeout.bind(window):setTimeout,clearTimeout:T?clearTimeout.bind(window):clearTimeout,setInterval:T?setInterval.bind(window):setInterval,clearInterval:T?clearInterval.bind(window):clearInterval},k={},I=class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,k[e]=k[e]||[],k[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||null===e.newValue)return;let t=JSON.parse(e.newValue);this.mc.port2.postMessage(t)}postMessage(e){if(this.closed)throw Error("InvalidStateError");let t=JSON.stringify(e),r=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(r,t),E.setTimeout(()=>{window.localStorage.removeItem(r)},500),k[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage);let e=k[this.name].indexOf(this);k[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},M=typeof window>"u"?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:I;function L(){return Math.random().toString(36).substring(2)}var R=class{options;channel;token=L();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,t){this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,t=t=>{let{token:r,action:n}=t.data;r!==this.token&&(0===n&&r>this.token&&(e=!0),1===n&&(e=!0))};this.channel.addEventListener("message",t);try{return this.sendAction(0),await function(e=0){return new Promise(t=>E.setTimeout(t,e))}(this.options.responseTime),this.channel.removeEventListener("message",t),this.isApplying=!1,e?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,t=null;return new Promise(r=>{let n=()=>{if(e)return;e=!0;try{E.clearInterval(t)}catch{}let n=this.intervals.indexOf(t);n>=0&&this.intervals.splice(n,1),this.channel.removeEventListener("message",s),r()};t=E.setInterval(()=>{this.apply().then(()=>{this.isLeader&&n()})},this.options.fallbackInterval),this.intervals.push(t);let s=e=>{let{action:t}=e.data;2===t&&this.apply().then(()=>{this.isLeader&&n()})};this.channel.addEventListener("message",s)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=e=>{let{action:t}=e.data;0===t&&this.sendAction(1)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership()),this.deferred}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>E.clearInterval(e))}catch{}}}},A=class{channel;options;elector;token=L();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;this.options=e,this.channel=new M(t),this.registry.set(this.token,1),e.leaderElection&&(this.elector=new R(this.channel,{fallbackInterval:2e3,responseTime:100}),this.elector.waitForLeadership()),this.channel.addEventListener("message",e=>{let{action:t,token:r,data:n}=e.data;switch(t){case 3:this.registry.set(r,2);break;case 4:this.registry.delete(r);break;case 5:this.idle(r);break;case 6:this.active(r);break;case 7:this.prompt(r);break;case 8:this.start(r);break;case 9:this.reset(r);break;case 10:this.activate(r);break;case 11:this.pause(r);break;case 12:this.resume(r);break;case 13:this.options.onMessage(n)}}),this.send(3)}get isLeader(){if(!this.elector)throw Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(7),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(5),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(6),t&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}},C=T?document:null,O=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function S(e,t){let r=0;return function(...n){let s=new Date().getTime();if(!(s-r<t))return r=s,e(...n)}}var N=()=>Date.now();function P({timeout:e=12e5,promptTimeout:t=0,promptBeforeIdle:r=0,element:n=C,events:s=O,timers:i,immediateEvents:a=[],onPresenceChange:o=()=>{},onPrompt:u=()=>{},onIdle:c=()=>{},onActive:h=()=>{},onAction:d=()=>{},onMessage:m=()=>{},debounce:p=0,throttle:f=0,eventsThrottle:v=200,startOnMount:g=!0,startManually:w=!1,stopOnIdle:y=!1,crossTab:b=!1,name:k="idle-timer",syncTimers:I=0,leaderElection:M=!1,disabled:L=!1}={}){let R=(0,l.useRef)(N()),P=(0,l.useRef)(N()),D=(0,l.useRef)(null),j=(0,l.useRef)(null),x=(0,l.useRef)(0),U=(0,l.useRef)(0),_=(0,l.useRef)(0),B=(0,l.useRef)(0),q=(0,l.useRef)(!1),J=(0,l.useRef)(!1),F=(0,l.useRef)(!1),$=(0,l.useRef)(!0),z=(0,l.useRef)(!1),G=(0,l.useRef)(null),V=(0,l.useRef)(null),W=(0,l.useRef)(e),X=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(t&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),r&&t)throw Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(e>=2147483647)throw Error(`\u274C The value for the timeout property must fit in a 32 bit signed integer, 2147483647.`);if(t>=2147483647)throw Error(`\u274C The value for the promptTimeout property must fit in a 32 bit signed integer, 2147483647.`);if(r>=2147483647)throw Error(`\u274C The value for the promptBeforeIdle property must fit in a 32 bit signed integer, 2147483647.`);if(r>=e)throw Error(`\u274C The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);if(r?(W.current=e-r,X.current=r):(W.current=e,X.current=t),!$.current){if(w||L)return;q.current&&(en.current(null,e_),V.current&&V.current.active()),ew()}},[e,t,r,w,L]);let Y=(0,l.useRef)(y);(0,l.useEffect)(()=>{Y.current=y},[y]);let H=(0,l.useRef)(a),K=(0,l.useRef)(n),Q=(0,l.useRef)([...new Set([...s,...a]).values()]),Z=(0,l.useRef)(L);(0,l.useEffect)(()=>{Z.current=L,!$.current&&(L?eT():w||ew())},[L]);let ee=(0,l.useRef)(o);(0,l.useEffect)(()=>{ee.current=o},[o]);let et=(0,l.useRef)(u);(0,l.useEffect)(()=>{et.current=u},[u]);let er=(0,l.useRef)(c);(0,l.useEffect)(()=>{er.current=c},[c]);let en=(0,l.useRef)(h);(0,l.useEffect)(()=>{en.current=h},[h]);let es=(0,l.useRef)(d);(0,l.useEffect)(()=>{es.current=d},[d]);let ei=(0,l.useRef)(m);(0,l.useEffect)(()=>{ei.current=m},[m]);let ea=(0,l.useMemo)(()=>{let e=(e,t)=>es.current(e,t);return p>0?function(e,t){let r;function n(...s){r&&clearTimeout(r),r=setTimeout(()=>{e(...s),r=null},t)}return n.cancel=function(){clearTimeout(r)},n}(e,p):f>0?S(e,f):e},[f,p]),eo=(0,l.useRef)();(0,l.useEffect)(()=>{b&&I&&(eo.current=S(()=>{V.current.active()},I))},[b,I]);let eu=()=>{null!==G.current&&(E.clearTimeout(G.current),G.current=null)},ec=(e,t=!0)=>{eu(),G.current=E.setTimeout(em,e||W.current),t&&(j.current=N())},el=e=>{J.current||q.current||(et.current(e,e_),ee.current({type:"active",prompted:!0},e_)),B.current=0,_.current=N(),J.current=!0,ec(X.current,!1)},eh=()=>{eu(),q.current||(er.current(null,e_),ee.current({type:"idle"},e_)),q.current=!0,D.current=N(),Y.current?eg():J.current&&(_.current=0,J.current=!1)},ed=e=>{eu(),(q.current||J.current)&&(en.current(e,e_),ee.current({type:"active",prompted:!1},e_)),J.current=!1,_.current=0,q.current=!1,x.current+=N()-D.current,U.current+=N()-D.current,ev(),ec()},em=e=>{if(!q.current){ea.cancel&&ea.cancel();let t=N()-j.current;if(!(W.current+X.current<t)&&X.current>0&&!J.current){V.current?V.current.prompt():el(e);return}V.current?V.current.idle():eh();return}V.current?V.current.active():ed(e)},ep=e=>{if(g||j.current||(j.current=N(),en.current(null,e_)),ea(e,e_),J.current)return;if(eu(),!q.current&&H.current.includes(e.type)){em(e);return}let t=N()-j.current;if(q.current&&!y||!q.current&&t>=W.current){em(e);return}F.current=!1,B.current=0,_.current=0,ec(),b&&I&&eo.current()},ef=(0,l.useRef)(ep);(0,l.useEffect)(()=>{let e=z.current;e&&eg(),v>0?ef.current=S(ep,v):ef.current=ep,e&&ev()},[v,f,p,es,b,I]);let ev=()=>{T&&K.current&&(z.current||(Q.current.forEach(e=>{K.current.addEventListener(e,ef.current,{capture:!0,passive:!0})}),z.current=!0))},eg=(e=!1)=>{T&&K.current&&(z.current||e)&&(Q.current.forEach(e=>{K.current.removeEventListener(e,ef.current,{capture:!0})}),z.current=!1)},ew=(0,l.useCallback)(e=>!Z.current&&(eu(),ev(),q.current=!1,J.current=!1,F.current=!1,B.current=0,_.current=0,V.current&&!e&&V.current.start(),ec(),!0),[G,q,Z,W,V]),ey=(0,l.useCallback)(e=>!Z.current&&(eu(),ev(),P.current=N(),x.current+=N()-D.current,U.current+=N()-D.current,x.current=0,q.current=!1,J.current=!1,F.current=!1,B.current=0,_.current=0,V.current&&!e&&V.current.reset(),w||ec(),!0),[G,q,W,w,Z,V]),eb=(0,l.useCallback)(e=>!Z.current&&(eu(),ev(),(q.current||J.current)&&ed(),q.current=!1,J.current=!1,F.current=!1,B.current=0,_.current=0,P.current=N(),V.current&&!e&&V.current.activate(),ec(),!0),[G,q,J,Z,W,V]),eT=(0,l.useCallback)((e=!1)=>!Z.current&&!F.current&&(B.current=eC(),F.current=!0,eg(),eu(),V.current&&!e&&V.current.pause(),!0),[G,Z,V]),eE=(0,l.useCallback)((e=!1)=>!Z.current&&!!F.current&&(F.current=!1,J.current||ev(),q.current||ec(B.current),_.current&&(_.current=N()),V.current&&!e&&V.current.resume(),!0),[G,W,Z,B,V]),ek=(0,l.useCallback)((e,t)=>(V.current?(t&&ei.current(e,e_),V.current.message(e)):t&&ei.current(e,e_),!0),[m]),eI=(0,l.useCallback)(()=>q.current,[q]),eM=(0,l.useCallback)(()=>J.current,[J]),eL=(0,l.useCallback)(()=>V.current?V.current.isLeader:null,[V]),eR=(0,l.useCallback)(()=>V.current?V.current.isLastActive:null,[V]),eA=(0,l.useCallback)(()=>V.current?V.current.token:null,[V]),eC=(0,l.useCallback)(()=>{if(F.current)return B.current;let e=Math.floor((B.current?B.current:X.current+W.current)-(j.current?N()-j.current:0));return e<0?0:Math.abs(e)},[W,X,J,B,j]),eO=(0,l.useCallback)(()=>Math.round(N()-P.current),[P]),eS=(0,l.useCallback)(()=>Math.round(N()-R.current),[R]),eN=(0,l.useCallback)(()=>D.current?new Date(D.current):null,[D]),eP=(0,l.useCallback)(()=>j.current?new Date(j.current):null,[j]),eD=(0,l.useCallback)(()=>q.current?Math.round(N()-D.current+x.current):Math.round(x.current),[D,x]),ej=(0,l.useCallback)(()=>q.current?Math.round(N()-D.current+U.current):Math.round(U.current),[D,U]),ex=(0,l.useCallback)(()=>{let e=Math.round(eO()-eD());return e>=0?e:0},[D,x]),eU=(0,l.useCallback)(()=>{let e=Math.round(eS()-ej());return e>=0?e:0},[D,x]);(0,l.useEffect)(()=>{if(p>0&&f>0)throw Error("❌ onAction can either be throttled or debounced, not both.");i&&(E.setTimeout=i.setTimeout,E.clearTimeout=i.clearTimeout,E.setInterval=i.setInterval,E.clearInterval=i.clearInterval);let e=()=>{V.current&&V.current.close(),ea.cancel&&ea.cancel(),eu(),eg(!0)};return T&&window.addEventListener("beforeunload",e),()=>{T&&window.removeEventListener("beforeunload",e),V.current&&V.current.close(),ea.cancel&&ea.cancel(),eu(),eg(!0)}},[]),(0,l.useEffect)(()=>{V.current&&V.current.close(),b?V.current=new A({channelName:k,leaderElection:M,onPrompt:()=>{el()},onIdle:()=>{eh()},onActive:()=>{ed()},onMessage:e=>{ei.current(e,e_)},start:ew,reset:ey,activate:eb,pause:eT,resume:eE}):V.current=null},[b,k,M,et,er,en,ei,ew,ey,eT,eE]),(0,l.useEffect)(()=>{$.current||(eu(),eg(!0)),w||L||(g?ew():ev())},[w,g,L,$]),(0,l.useEffect)(()=>{if(!$.current){let e=[...new Set([...s,...a]).values()];eg(),Q.current=e,K.current=n,H.current=a,w||L||(g?ew():ev())}},[n,JSON.stringify(s),JSON.stringify(a),$,L,w,g]),(0,l.useEffect)(()=>{$.current&&($.current=!1)},[$]);let e_={message:ek,start:ew,reset:ey,activate:eb,pause:eT,resume:eE,isIdle:eI,isPrompted:eM,isLeader:eL,isLastActiveTab:eR,getTabId:eA,getRemainingTime:eC,getElapsedTime:eO,getTotalElapsedTime:eS,getLastIdleTime:eN,getLastActiveTime:eP,getIdleTime:eD,getTotalIdleTime:ej,getActiveTime:ex,getTotalActiveTime:eU,setOnPresenceChange:e=>{o=e,ee.current=e},setOnPrompt:e=>{u=e,et.current=e},setOnIdle:e=>{c=e,er.current=e},setOnActive:e=>{h=e,en.current=e},setOnAction:e=>{d=e,es.current=e},setOnMessage:e=>{m=e,ei.current=e}};return e_}(0,l.createContext)(null).Consumer}}]);