113 lines
1.0 MiB
JavaScript
113 lines
1.0 MiB
JavaScript
![]() |
(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const _ of document.querySelectorAll('link[rel="modulepreload"]'))s(_);new MutationObserver(_=>{for(const i of _)if(i.type==="childList")for(const f of i.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&s(f)}).observe(document,{childList:!0,subtree:!0});function u(_){const i={};return _.integrity&&(i.integrity=_.integrity),_.referrerPolicy&&(i.referrerPolicy=_.referrerPolicy),_.crossOrigin==="use-credentials"?i.credentials="include":_.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(_){if(_.ep)return;_.ep=!0;const i=u(_);fetch(_.href,i)}})();function gt(){}function Na(c,a){for(const u in a)c[u]=a[u];return c}function lu(c){return c()}function x1(){return Object.create(null)}function Dn(c){c.forEach(lu)}function c0(c){return typeof c=="function"}function Pt(c,a){return c!=c?a==a:c!==a||c&&typeof c=="object"||typeof c=="function"}let Y0;function hs(c,a){return Y0||(Y0=document.createElement("a")),Y0.href=a,c===Y0.href}function ac(c){return Object.keys(c).length===0}function d1(c,...a){if(c==null)return gt;const u=c.subscribe(...a);return u.unsubscribe?()=>u.unsubscribe():u}function fs(c){let a;return d1(c,u=>a=u)(),a}function $n(c,a,u){c.$$.on_destroy.push(d1(a,u))}function oo(c,a,u,s){if(c){const _=ru(c,a,u,s);return c[0](_)}}function ru(c,a,u,s){return c[1]&&s?Na(u.ctx.slice(),c[1](s(a))):u.ctx}function so(c,a,u,s){if(c[2]&&s){const _=c[2](s(u));if(a.dirty===void 0)return _;if(typeof _=="object"){const i=[],f=Math.max(a.dirty.length,_.length);for(let n=0;n<f;n+=1)i[n]=a.dirty[n]|_[n];return i}return a.dirty|_}return a.dirty}function uo(c,a,u,s,_,i){if(_){const f=ru(a,u,s,i);c.p(f,_)}}function co(c){if(c.ctx.length>32){const a=[],u=c.ctx.length/32;for(let s=0;s<u;s++)a[s]=-1;return a}return-1}function T0(c){const a={};for(const u in c)u[0]!=="$"&&(a[u]=c[u]);return a}function S0(c,a){const u={};a=new Set(a);for(const s in c)!a.has(s)&&s[0]!=="$"&&(u[s]=c[s]);return u}function Pa(c){return c??""}function d0(c,a,u){return c.set(u),a}const lc=["",!0,1,"true","contenteditable"],rc=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function j(c,a){c.appendChild(a)}function fe(c,a,u){c.insertBefore(a,u||null)}function he(c){c.parentNode&&c.parentNode.removeChild(c)}function qn(c,a){for(let u=0;u<c.length;u+=1)c[u]&&c[u].d(a)}function R(c){return document.createElement(c)}function Xe(c){return document.createTextNode(c)}function ce(){return Xe(" ")}function Gi(){return Xe("")}function tt(c,a,u,s){return c.addEventListener(a,u,s),()=>c.removeEventListener(a,u,s)}function Zt(c){return function(a){return a.preventDefault(),c.call(this,a)}}function E(c,a,u){u==null?c.removeAttribute(a):c.getAttribute(a)!==u&&c.setAttribute(a,u)}const oc=["width","height"];function ms(c,a){const u=Object.getOwnPropertyDescriptors(c.__proto__);for(const s in a)a[s]==null?c.removeAttribute(s):s==="style"?c.style.cssText=a[s]:s==="__value"?c.value=c[s]=a[s]:u[s]&&u[s].set&&oc.indexOf(s)===-1?c[s]=a[s]:E(c,s,a[s])}function _r(c){return c===""?null:+c}function sc(c){return Array.from(c.childNodes)}function wt(c,a){a=""+a,c.data!==a&&(c.data=a)}function dc(c,a){a=""+a,c.wholeText!==a&&(c.data=a)}function uc(c,a,u){~lc.indexOf(u)?dc(c,a):wt(c,a)}function Ht(c,a){c.value=a??""}function ll(c,a,u,s){u==null?c.style.removeProperty(a):c.style.setProperty(a,u,s?"important":"")}function Ci(c,a,u){for(let s=0;s<c.options.length;s+=1){const _=c.options[s];if(_.__value===a){_.selected=!0;return}}(!u||a!==void 0)&&(c.selectedIndex=-1)}function ho(c){const a=c.querySelector(":checked");return a&&a.__value}function cc(c,a,{bubbles:u=!1,cancelable:s=!1}={}){const _=document.createEvent("CustomEvent");return _.initCustomEvent(c,u,s,a),_}function rl(c,a){return new c(a)}let u0;function n0(c){u0=c}function h0(){if(!u0)throw new Error("Function called outside component initialization");return u0}function _o(c){h0().$$.on_mount.push(c)}function hc(c){h0().$$.on_destroy.push(c)}function Rl(){const c=h0(
|
|||
|
|
|||
|
Occurred in: ${_}`:"",f=f1(c),n=hu(a)?a(f):a;return`<${f}> ${n}${i}`}const Tu=c=>(...a)=>c(Tc(...a)),Su=Tu(c=>{throw new Error(c)}),j0=Tu(console.warn),T1=4,Sc=3,jc=2,Ac=1,Cc=1;function Oc(c,a){const u=c.default?0:sl(c.fullPath).reduce((s,_)=>{let i=s;return i+=T1,Mc(_)?i+=Cc:wc(_)?i+=jc:bu(_)?i-=T1+Ac:i+=Sc,i},0);return{route:c,score:u,index:a}}function Ec(c){return c.map(Oc).sort((a,u)=>a.score<u.score?1:a.score>u.score?-1:a.index-u.index)}function ju(c,a){let u,s;const[_]=a.split("?"),i=sl(_),f=i[0]==="",n=Ec(c);for(let o=0,h=n.length;o<h;o++){const{route:y}=n[o];let v=!1;const w={},Y=N=>({...y,params:w,uri:N});if(y.default){s=Y(a);continue}const D=sl(y.fullPath),A=Math.max(i.length,D.length);let O=0;for(;O<A;O++){const N=D[O],B=i[O];if(!D1(N)&&bu(N)){const U=N==="*"?"*":N.slice(1);w[U]=i.slice(O).map(decodeURIComponent).join("/");break}if(D1(B)){v=!0;break}const H=vu.exec(N);if(H&&!f){const U=decodeURIComponent(B);w[H[1]]=U}else if(N!==B){v=!0;break}}if(!v){u=Y(m0(...i.slice(0,O)));break}}return u||s||null}function m1(c,a){return ju([c],a)}function Hc(c,a){if(t1(c,"/"))return c;const[u,s]=c.split("?"),[_]=a.split("?"),i=sl(u),f=sl(_);if(i[0]==="")return Z0(_,s);if(!t1(i[0],".")){const h=f.concat(i).join("/");return Z0((_==="/"?"":"/")+h,s)}const n=f.concat(i),o=[];return n.forEach(h=>{h===".."?o.pop():h!=="."&&o.push(h)}),Z0(`/${o.join("/")}`,s)}function n1(c,a){const{pathname:u,hash:s="",search:_="",state:i}=c,f=sl(a,!0),n=sl(u,!0);for(;f.length;)f[0]!==n[0]&&Su(mo,`Invalid state: All locations must begin with the basepath "${a}", found "${u}"`),f.shift(),n.shift();return{pathname:m0(...n),hash:s,search:_,state:i}}const S1=c=>c.length===1?"":c,_1=c=>{const a=c.indexOf("?"),u=c.indexOf("#"),s=a!==-1,_=u!==-1,i=_?S1(t0(c,u)):"",f=_?t0(c,0,u):c,n=s?S1(t0(f,a)):"";return{pathname:(s?t0(f,0,a):f)||"/",search:n,hash:i}},Pc=c=>{const{pathname:a,search:u,hash:s}=c;return a+u+s};function Nc(c,a,u){return m0(u,Hc(c,a))}function Ic(c,a){const u=c1(Lc(c)),s=sl(u,!0),_=sl(a,!0).slice(0,s.length),i=m1({fullPath:u},m0(..._));return i&&i.uri}const U0="POP",Fc="PUSH",zc="REPLACE";function q0(c){return{...c.location,pathname:encodeURI(decodeURI(c.location.pathname)),state:c.history.state,_key:c.history.state&&c.history.state._key||"initial"}}function p1(c){let a=[],u=q0(c),s=U0;const _=(i=a)=>i.forEach(f=>f({location:u,action:s}));return{get location(){return u},listen(i){a.push(i);const f=()=>{u=q0(c),s=U0,_([i])};_([i]);const n=_u(c,"popstate",f);return()=>{n(),a=a.filter(o=>o!==i)}},navigate(i,f){const{state:n={},replace:o=!1}=f||{};if(s=o?zc:Fc,fu(i))f&&j0(Du,"Navigation options (state or replace) are not supported, when passing a number as the first argument to navigate. They are ignored."),s=U0,c.history.go(i);else{const h={...n,_key:yc()};try{c.history[o?"replaceState":"pushState"](h,"",i)}catch{c.location[o?"replace":"assign"](i)}}u=q0(c),_()}}}function J0(c,a){return{..._1(a),state:c}}function Wc(c="/"){let a=0,u=[J0(null,c)];return{get entries(){return u},get location(){return u[a]},addEventListener(){},removeEventListener(){},history:{get state(){return u[a].state},pushState(s,_,i){a++,u=u.slice(0,a),u.push(J0(s,i))},replaceState(s,_,i){u[a]=J0(s,i)},go(s){const _=a+s;_<0||_>u.length-1||(a=_)}}}}const Rc=!!(!mr&&window.document&&window.document.createElement),$c=!mr&&window.location.origin==="null",Bc=p1(Rc&&!$c?window:Wc());let zl=null,Au=!0;function Vc(c,a){const u=document.querySelectorAll("[data-svnav-router]");for(let s=0;s<u.length;s++){const _=u[s],i=Number(_.dataset.svnavRouter);if(i===c)return!0;if(i===a)return!1}return!1}function Zc(c){(!zl||c.level>zl.level||c.level===zl.level&&Vc(c.routerId,zl.routerId))&&(zl=c)}function Uc(){zl=null}function qc(){Au=!1}function j1(c){if(!c)return!1;const a="tabindex";try{if(!c.hasAttribute(a)){c.setAttribute(a,"-1");let u;u=_u(c,"blur",()=>{c.removeAttribute(a),u()})}return c.focus(),document.activeElement===c}catch{return!1}}function Jc(c,a){return Number(c.dataset.svnavRouteEnd)===a}function Gc(c){return/^H[1-6]$/i.test(c.tagName)}function A1(c,a=document){return a.querySel
|
|||
|
Ingresar al sistema`),ll(u,"margin-top","100px"),E(i,"class","card-header bg-dark text-center p-3"),E(y,"class","form-label"),E(y,"for",null),E(w,"class","form-control form-control-lg"),E(w,"type","text"),w.required=!0,E(w,"placeholder","Ingrese su cuenta de usuario"),E(h,"class","mb-3"),E(A,"class","form-label"),E(A,"for",null),E(N,"class","form-control form-control-lg"),E(N,"type","password"),N.required=!0,E(N,"placeholder","Ingrese su contraseña"),E(D,"class","mb-3"),E(G,"class","fa fa-key mr-3"),E(V,"type","submit"),E(V,"class","btn btn-dark"),V.disabled=c[2],E(F,"class","text-center mt-3"),E(n,"class","card-body"),E(_,"class","card mb-4 m-auto svelte-151sjv0"),E(a,"class","container p-4 bg-neutral box-login svelte-151sjv0")},m(ne,ae){fe(ne,a,ae),j(a,u),j(a,s),j(a,_),j(_,i),j(_,f),j(_,n),j(n,o),j(o,h),j(h,y),j(h,v),j(h,w),Ht(w,c[0].username),j(o,Y),j(o,D),j(D,A),j(D,O),j(D,N),Ht(N,c[0].password),j(o,B),de&&de.m(o,null),j(o,H),lt(U,o,null),j(o,W),j(o,F),j(F,V),j(V,G),j(V,te),oe=!0,pe||(ye=[tt(w,"input",c[4]),tt(N,"input",c[5]),tt(o,"submit",Zt(c[3]))],pe=!0)},p(ne,[ae]){ae&1&&w.value!==ne[0].username&&Ht(w,ne[0].username),ae&1&&N.value!==ne[0].password&&Ht(N,ne[0].password),ne[1]?de?de.p(ne,ae):(de=H1(ne),de.c(),de.m(o,H)):de&&(de.d(1),de=null);const ge={};ae&64&&(ge.$$scope={dirty:ae,ctx:ne}),U.$set(ge),(!oe||ae&4)&&(V.disabled=ne[2])},i(ne){oe||(Pe(U.$$.fragment,ne),oe=!0)},o(ne){$e(U.$$.fragment,ne),oe=!1},d(ne){ne&&he(a),de&&de.d(),rt(U),pe=!1,Dn(ye)}}}function wh(c,a,u){let s={username:"",pass:""},_="",i=!1;async function f(){try{u(2,i=!0),u(1,_="");const{token:h}=await yh(s);sessionStorage.setItem("token",h),document.location.reload()}catch(h){u(1,_=h.message||h),setTimeout(()=>u(1,_=""),3e3)}finally{u(2,i=!1)}}function n(){s.username=this.value,u(0,s)}function o(){s.password=this.value,u(0,s)}return[s,_,i,f,n,o]}class P1 extends Ft{constructor(a){super(),It(this,a,wh,Mh,Pt,{})}}function Lh(c){let a;return{c(){a=Xe("En desarrollo")},m(u,s){fe(u,a,s)},p:gt,i:gt,o:gt,d(u){u&&he(a)}}}class kh extends Ft{constructor(a){super(),It(this,a,null,Lh,Pt,{})}}function xh(c){let a;return{c(){a=Xe("En desarrollo")},m(u,s){fe(u,a,s)},p:gt,i:gt,o:gt,d(u){u&&he(a)}}}class Yh extends Ft{constructor(a){super(),It(this,a,null,xh,Pt,{})}}const N1=[{path:"/",component:P1},{path:"/recovery",component:kh},{path:"/new-password",component:Yh},{path:"*",component:P1}];function A0(){return A0=Object.assign?Object.assign.bind():function(c){for(var a=1;a<arguments.length;a++){var u=arguments[a];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(c[s]=u[s])}return c},A0.apply(this,arguments)}var ds;(function(c){c.Pop="POP",c.Push="PUSH",c.Replace="REPLACE"})(ds||(ds={}));var I1=function(c){return c},F1="beforeunload",Dh="hashchange",Th="popstate";function Sh(c){c===void 0&&(c={});var a=c,u=a.window,s=u===void 0?document.defaultView:u,_=s.history;function i(){var G=R1(s.location.hash.substr(1)),te=G.pathname,oe=te===void 0?"/":te,pe=G.search,ye=pe===void 0?"":pe,de=G.hash,ne=de===void 0?"":de,ae=_.state||{};return[ae.idx,I1({pathname:oe,search:ye,hash:ne,state:ae.usr||null,key:ae.key||"default"})]}var f=null;function n(){if(f)Y.call(f),f=null;else{var G=ds.Pop,te=i(),oe=te[0],pe=te[1];if(Y.length){if(oe!=null){var ye=y-oe;ye&&(f={action:G,location:pe,retry:function(){F(ye*-1)}},F(ye))}}else H(G)}}s.addEventListener(Th,n),s.addEventListener(Dh,function(){var G=i(),te=G[1];G0(te)!==G0(v)&&n()});var o=ds.Pop,h=i(),y=h[0],v=h[1],w=W1(),Y=W1();y==null&&(y=0,_.replaceState(A0({},_.state,{idx:y}),""));function D(){var G=document.querySelector("base"),te="";if(G&&G.getAttribute("href")){var oe=s.location.href,pe=oe.indexOf("#");te=pe===-1?oe:oe.slice(0,pe)}return te}function A(G){return D()+"#"+(typeof G=="string"?G:G0(G))}function O(G,te){return te===void 0&&(te=null),I1(A0({pathname:v.pathname,hash:"",search:""},typeof G=="string"?R1(G):G,{state:te,key:jh()}))}function N(G,te){return[{usr:G.state,key:G.key,idx:te},A(G)]}function B(G,te,oe){return!Y.length||(Y.call({action:G,location:te,retry:oe}),!1)}function H(G){o
|
|||
|
<p class="lead">Acceda a su cuenta para continuar</p>`,n=ce();for(let w=0;w<y.length;w+=1)y[w].c();E(f,"class","text-center mt-4"),E(i,"class","d-table-cell align-middle"),E(_,"class","col-sm-10 col-md-8 col-lg-6 mx-auto d-table h-100"),E(s,"class","row vh-100"),E(u,"class","container d-flex flex-column"),E(a,"class","d-flex w-100")},m(w,Y){fe(w,a,Y),j(a,u),j(u,s),j(s,_),j(_,i),j(i,f),j(i,n);for(let D=0;D<y.length;D+=1)y[D]&&y[D].m(i,null);o=!0},p(w,Y){if(Y&0){h=N1;let D;for(D=0;D<h.length;D+=1){const A=$1(w,h,D);y[D]?(y[D].p(A,Y),Pe(y[D],1)):(y[D]=B1(A),y[D].c(),Pe(y[D],1),y[D].m(i,null))}for(xn(),D=h.length;D<y.length;D+=1)v(D);Yn()}},i(w){if(!o){for(let Y=0;Y<h.length;Y+=1)Pe(y[Y]);o=!0}},o(w){y=y.filter(Boolean);for(let Y=0;Y<y.length;Y+=1)$e(y[Y]);o=!1},d(w){w&&he(a),qn(y,w)}}}function Oh(c){let a,u,s;return u=new g1({props:{history:c[0],primary:!1,$$slots:{default:[Ch]},$$scope:{ctx:c}}}),{c(){a=ce(),st(u.$$.fragment),document.title="Transporte: Acceso"},m(_,i){fe(_,a,i),lt(u,_,i),s=!0},p(_,[i]){const f={};i&16&&(f.$$scope={dirty:i,ctx:_}),u.$set(f)},i(_){s||(Pe(u.$$.fragment,_),s=!0)},o(_){$e(u.$$.fragment,_),s=!1},d(_){_&&he(a),rt(u,_)}}}function Eh(c){return[p1(Nu())]}class Hh extends Ft{constructor(a){super(),It(this,a,Eh,Oh,Pt,{})}}/*! For license information please see app.js.LICENSE.txt */(function(){var c={5657:function(){window.theme={primary:"#3B7DDD",secondary:"#6c757d",success:"#1cbb8c",info:"#17a2b8",warning:"#fcb92c",danger:"#dc3545",white:"#fff","gray-100":"#f8f9fa","gray-200":"#e9ecef","gray-300":"#dee2e6","gray-400":"#ced4da","gray-500":"#adb5bd","gray-600":"#6c757d","gray-700":"#495057","gray-800":"#343a40","gray-900":"#212529",black:"#000"}},7386:function(){jsVectorMap.addMap("world",{insets:[{width:900,top:0,left:0,height:440.70631074413296,bbox:[{y:-12671671123330014e-9,x:-20004297151525836e-9},{y:6930392025135122e-9,x:2002657239474939e-8}]}],paths:{BD:{path:"M651.84,230.21l-0.6,-2.0l-1.36,-1.71l-2.31,-0.11l-0.41,0.48l0.2,0.94l-0.53,0.99l-0.72,-0.36l-0.68,0.35l-1.2,-0.36l-0.37,-2.0l-0.81,-1.86l0.39,-1.46l-0.22,-0.47l-1.14,-0.53l0.29,-0.5l1.48,-0.94l0.03,-0.65l-1.55,-1.22l0.55,-1.14l1.61,0.94l1.04,0.15l0.18,1.54l0.34,0.35l5.64,0.63l-0.84,1.64l-1.22,0.34l-0.77,1.51l0.07,0.47l1.37,1.37l0.67,-0.19l0.42,-1.39l1.21,3.84l-0.03,1.21l-0.33,-0.15l-0.4,0.28Z",name:"Bangladesh"},BE:{path:"M429.29,144.05l1.91,0.24l2.1,-0.63l2.63,1.99l-0.21,1.66l-0.69,0.4l-0.18,1.2l-1.66,-1.13l-1.39,0.15l-2.73,-2.7l-1.17,-0.18l-0.16,-0.52l1.54,-0.5Z",name:"Belgium"},BF:{path:"M421.42,247.64l-0.11,0.95l0.34,1.16l1.4,1.71l0.07,1.1l0.32,0.37l2.55,0.51l-0.04,1.28l-0.38,0.53l-1.07,0.21l-0.72,1.18l-0.63,0.21l-3.22,-0.25l-0.94,0.39l-5.4,-0.05l-0.39,0.38l0.16,2.73l-1.23,-0.43l-1.17,0.1l-0.89,0.57l-2.27,-1.72l-0.13,-1.11l0.61,-0.96l0.02,-0.93l1.87,-1.98l0.44,-1.81l0.43,-0.39l1.28,0.26l1.05,-0.52l0.47,-0.73l1.84,-1.09l0.55,-0.83l2.2,-1.0l1.15,-0.3l0.72,0.45l1.13,-0.01Z",name:"Burkina Faso"},BG:{path:"M491.65,168.18l-0.86,0.88l-0.91,2.17l0.48,1.34l-1.6,-0.24l-2.55,0.95l-0.28,1.51l-1.8,0.22l-2.0,-1.0l-1.92,0.79l-1.42,-0.07l-0.15,-1.63l-1.05,-0.97l0.0,-0.8l1.2,-1.57l0.01,-0.56l-1.14,-1.23l-0.05,-0.94l0.88,0.97l0.88,-0.2l1.91,0.47l3.68,0.16l1.42,-0.81l2.72,-0.66l2.55,1.24Z",name:"Bulgaria"},BA:{path:"M463.49,163.65l2.1,0.5l1.72,-0.03l1.52,0.68l-0.36,0.78l0.08,0.45l1.04,1.02l-0.25,0.98l-1.81,1.15l-0.38,1.38l-1.67,-0.87l-0.89,-1.2l-2.11,-1.83l-1.63,-2.22l0.23,-0.57l0.48,0.38l0.55,-0.06l0.43,-0.51l0.94,-0.06Z",name:"Bosnia and Herz."},BN:{path:"M707.48,273.58l0.68,-0.65l1.41,-0.91l-0.15,1.63l-0.81,-0.05l-0.61,0.58l-0.53,-0.6Z",name:"Brunei"},BO:{path:"M263.83,340.69l-3.09,-0.23l-0.38,0.23l-0.7,1.52l-1.31,-1.53l-3.28,-0.64l-2.37,2.4l-1.31,0.26l-0.88,-3.26l-1.3,-2.86l0.74,-2.37l-0.13,-0.43l-1.2,-1.01l-0.37,-1.89l-1.08,-1.55l1.45,-2.56l-0.96,-2.33l0.47,-1.06l-0.34,-0.73l0.91,-1.32l0.16,-3.84l0.5,-1.18l-1.81,-3.41l2.46,0.07l0.8,-0.85l3.4,-1.91l2.66,-0.35l-0.19,1.38l0.3,1.07l-0.05,1.97l2.72,2.27l2.88,0.49l0.89,0.86l1.79,0.58l0.98,0.7l1.71,0.05l1.17,0.61l0.6,2.7l-0.7,0.54l0.96,2.99l0.37,0.28l4.3,0.1l-0.25,1.2l0.27,1.02
|
|||
|
* DOM element rendering detection\r
|
|||
|
* https://davidwalsh.name/detect-node-insertion\r
|
|||
|
*/\r
|
|||
|
@keyframes chartjs-render-animation {\r
|
|||
|
from { opacity: 0.99; }\r
|
|||
|
to { opacity: 1; }\r
|
|||
|
}\r
|
|||
|
\r
|
|||
|
.chartjs-render-monitor {\r
|
|||
|
animation: chartjs-render-animation 0.001s;\r
|
|||
|
}\r
|
|||
|
\r
|
|||
|
/*\r
|
|||
|
* DOM element resizing detection\r
|
|||
|
* https://github.com/marcj/css-element-queries\r
|
|||
|
*/\r
|
|||
|
.chartjs-size-monitor,\r
|
|||
|
.chartjs-size-monitor-expand,\r
|
|||
|
.chartjs-size-monitor-shrink {\r
|
|||
|
position: absolute;\r
|
|||
|
direction: ltr;\r
|
|||
|
left: 0;\r
|
|||
|
top: 0;\r
|
|||
|
right: 0;\r
|
|||
|
bottom: 0;\r
|
|||
|
overflow: hidden;\r
|
|||
|
pointer-events: none;\r
|
|||
|
visibility: hidden;\r
|
|||
|
z-index: -1;\r
|
|||
|
}\r
|
|||
|
\r
|
|||
|
.chartjs-size-monitor-expand > div {\r
|
|||
|
position: absolute;\r
|
|||
|
width: 1000000px;\r
|
|||
|
height: 1000000px;\r
|
|||
|
left: 0;\r
|
|||
|
top: 0;\r
|
|||
|
}\r
|
|||
|
\r
|
|||
|
.chartjs-size-monitor-shrink > div {\r
|
|||
|
position: absolute;\r
|
|||
|
width: 200%;\r
|
|||
|
height: 200%;\r
|
|||
|
left: 0;\r
|
|||
|
top: 0;\r
|
|||
|
}\r
|
|||
|
`,Ms=o(Object.freeze({__proto__:null,default:bs})),zn="$chartjs",Va="chartjs-",ta=Va+"size-monitor",Sr=Va+"render-monitor",jr=Va+"render-animation",Ar=["animationstart","webkitAnimationStart"],ws={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function xo(e,t){var r=J.getStyle(e,t),d=r&&r.match(/^(\d+)(\.\d+)?px$/);return d?Number(d[1]):void 0}function Ls(e,t){var r=e.style,d=e.getAttribute("height"),m=e.getAttribute("width");if(e[zn]={initial:{height:d,width:m,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",m===null||m===""){var b=xo(e,"width");b!==void 0&&(e.width=b)}if(d===null||d==="")if(e.style.height==="")e.height=e.width/(t.options.aspectRatio||2);else{var M=xo(e,"height");b!==void 0&&(e.height=M)}return e}var Ma=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch{}return e}()&&{passive:!0};function Xn(e,t,r){e.addEventListener(t,r,Ma)}function ql(e,t,r){e.removeEventListener(t,r,Ma)}function sn(e,t,r,d,m){return{type:e,chart:t,native:m||null,x:r!==void 0?r:null,y:d!==void 0?d:null}}function vl(e,t){var r=ws[e.type]||e.type,d=J.getRelativePosition(e,t);return sn(r,t,d.x,d.y,e)}function ks(e,t){var r=!1,d=[];return function(){d=Array.prototype.slice.call(arguments),t=t||this,r||(r=!0,J.requestAnimFrame.call(window,function(){r=!1,e.apply(t,d)}))}}function Za(e){var t=document.createElement("div");return t.className=e||"",t}function Cr(e){var t=1e6,r=Za(ta),d=Za(ta+"-expand"),m=Za(ta+"-shrink");d.appendChild(Za()),m.appendChild(Za()),r.appendChild(d),r.appendChild(m),r._reset=function(){d.scrollLeft=t,d.scrollTop=t,m.scrollLeft=t,m.scrollTop=t};var b=function(){r._reset(),e()};return Xn(d,"scroll",b.bind(d,"expand")),Xn(m,"scroll",b.bind(m,"shrink")),r}function Fi(e,t){var r=e[zn]||(e[zn]={}),d=r.renderProxy=function(m){m.animationName===jr&&t()};J.each(Ar,function(m){Xn(e,m,d)}),r.reflow=!!e.offsetParent,e.classList.add(Sr)}function fi(e){var t=e[zn]||{},r=t.renderProxy;r&&(J.each(Ar,function(d){ql(e,d,r)}),delete t.renderProxy),e.classList.remove(Sr)}function Or(e,t,r){var d=e[zn]||(e[zn]={}),m=d.resizer=Cr(ks(function(){if(d.resizer){var b=r.options.maintainAspectRatio&&e.parentNode,M=b?b.clientWidth:0;t(sn("resize",r)),b&&b.clientWidth<M&&r.canvas&&t(sn("resize",r))}}));Fi(e,function(){if(d.resizer){var b=e.parentNode;b&&b!==m.parentNode&&b.insertBefore(m,b.firstChild),m._reset()}})}function Er(e){var t=e[zn]||{},r=t.resizer;delete t.resizer,fi(e),r&&r.parentNode&&r.parentNode.removeChild(r)}function zi(e,t){var r=e[zn]||(e[zn]={});if(!r.containsStyles){r.containsStyles=!0,t=`/* Chart.js */
|
|||
|
`+t;var d=document.createElement("style");d.setAttribute("type","text/css"),d.appendChild(document.createTextNode(t)),e.appendChild(d)}}var Yo={disableCSSInjection:!1,_enabled:typeof window<"u"&&typeof document<"u",_ensureLoaded:function(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document;zi(t.host?t:document.head,Ms)}},acquireContext:function(e,t){typeof e=="string"?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(this._ensureLoaded(e),Ls(e,t),r):null},releaseContext:function(e){var t=e.canvas;if(t[zn]){var r=t[zn].initial;["height","width"].forEach(function(d){var m=r[d];J.isNullOrUndef(m)?t.removeAttribute(d):t.setAttribute(d,m)}),J.each(r.style||{},function(d,m){t.style[m]=d}),t.width=t.width,delete t[zn]}},addEventListener:function(e,t,r){var d=e.canvas;if(t!=="resize"){var m=r[zn]||(r[zn]={});Xn(d,t,(m.proxies||(m.proxies={}))[e.id+"_"+t]=function(b){r(vl(b,e))})}else Or(d,r,e)},removeEventListener:function(e,t,r){var d=e.canvas;if(t!=="resize"){var m=((r[zn]||{}).proxies||{})[e.id+"_"+t];m&&ql(d,t,m)}else Er(d)}};J.addEvent=Xn,J.removeEvent=ql;var na=Yo._enabled?Yo:vs,wa=J.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},na);Qe._set("global",{plugins:{}});var en={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach(function(r){t.indexOf(r)===-1&&t.push(r)}),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach(function(r){var d=t.indexOf(r);d!==-1&&t.splice(d,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,r){var d,m,b,M,T,x=this.descriptors(e),C=x.length;for(d=0;d<C;++d)if(typeof(T=(b=(m=x[d]).plugin)[t])=="function"&&((M=[e].concat(r||[])).push(m.options),T.apply(b,M)===!1))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var r=[],d=[],m=e&&e.config||{},b=m.options&&m.options.plugins||{};return this._plugins.concat(m.plugins||[]).forEach(function(M){if(r.indexOf(M)===-1){var T=M.id,x=b[T];x!==!1&&(x===!0&&(x=J.clone(Qe.global.plugins[T])),r.push(M),d.push({plugin:M,options:x||{}}))}}),t.descriptors=d,t.id=this._cacheId,d},_invalidate:function(e){delete e.$plugins}},La={constructors:{},defaults:{},registerScaleType:function(e,t,r){this.constructors[e]=t,this.defaults[e]=J.clone(r)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?J.merge(Object.create(null),[Qe.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){var r=this;r.defaults.hasOwnProperty(e)&&(r.defaults[e]=J.extend(r.defaults[e],t))},addScalesToLayout:function(e){J.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,ei.addBox(e,t)})}},ti=J.valueOrDefault,Ua=J.rtl.getRtlAdapter;Qe._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:J.noop,title:function(e,t){var r="",d=t.labels,m=d?d.length:0;if(e.length>0){var b=e[0];b.label?r=b.label:b.xLabel?r=b.xLabel:m>0&&b.index<m&&(r=d[b.index])}return r},afterTitle:J.noop,beforeBody:J.noop,beforeLabel:J.noop,label:function(e,t){var r=t.datasets[e.datasetIndex].label||"";return r&&(r+=": "),J.isNullOrUndef(e.value)?r+=e.yLabel:r+=e.value,r},labelColor:functio
|
|||
|
`)>-1?e.split(`
|
|||
|
`):e}function To(e){var t=e._xScale,r=e._yScale||e._scale,d=e._index,m=e._datasetIndex,b=e._chart.getDatasetMeta(m).controller,M=b._getIndexScale(),T=b._getValueScale();return{xLabel:t?t.getLabelForIndex(d,m):"",yLabel:r?r.getLabelForIndex(d,m):"",label:M?""+M.getLabelForIndex(d,m):"",value:T?""+T.getLabelForIndex(d,m):"",index:d,datasetIndex:m,x:e._model.x,y:e._model.y}}function Hr(e){var t=Qe.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:ti(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:ti(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:ti(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:ti(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:ti(e.titleFontStyle,t.defaultFontStyle),titleFontSize:ti(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:ti(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:ti(e.footerFontStyle,t.defaultFontStyle),footerFontSize:ti(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function So(e,t){var r=e._chart.ctx,d=2*t.yPadding,m=0,b=t.body,M=b.reduce(function(Ye,xe){return Ye+xe.before.length+xe.lines.length+xe.after.length},0);M+=t.beforeBody.length+t.afterBody.length;var T=t.title.length,x=t.footer.length,C=t.titleFontSize,z=t.bodyFontSize,Z=t.footerFontSize;d+=T*C,d+=T?(T-1)*t.titleSpacing:0,d+=T?t.titleMarginBottom:0,d+=M*z,d+=M?(M-1)*t.bodySpacing:0,d+=x?t.footerMarginTop:0,d+=x*Z,d+=x?(x-1)*t.footerSpacing:0;var Q=0,ve=function(Ye){m=Math.max(m,r.measureText(Ye).width+Q)};return r.font=J.fontString(C,t._titleFontStyle,t._titleFontFamily),J.each(t.title,ve),r.font=J.fontString(z,t._bodyFontStyle,t._bodyFontFamily),J.each(t.beforeBody.concat(t.afterBody),ve),Q=t.displayColors?z+2:0,J.each(b,function(Ye){J.each(Ye.before,ve),J.each(Ye.lines,ve),J.each(Ye.after,ve)}),Q=0,r.font=J.fontString(Z,t._footerFontStyle,t._footerFontFamily),J.each(t.footer,ve),{width:m+=2*t.xPadding,height:d}}function xs(e,t){var r,d,m,b,M,T=e._model,x=e._chart,C=e._chart.chartArea,z="center",Z="center";T.y<t.height?Z="top":T.y>x.height-t.height&&(Z="bottom");var Q=(C.left+C.right)/2,ve=(C.top+C.bottom)/2;Z==="center"?(r=function(xe){return xe<=Q},d=function(xe){return xe>Q}):(r=function(xe){return xe<=t.width/2},d=function(xe){return xe>=x.width-t.width/2}),m=function(xe){return xe+t.width+T.caretSize+T.caretPadding>x.width},b=function(xe){return xe-t.width-T.caretSize-T.caretPadding<0},M=function(xe){return xe<=ve?"top":"bottom"},r(T.x)?(z="left",m(T.x)&&(z="center",Z=M(T.y))):d(T.x)&&(z="right",b(T.x)&&(z="center",Z=M(T.y)));var Ye=e._options;return{xAlign:Ye.xAlign?Ye.xAlign:z,yAlign:Ye.yAlign?Ye.yAlign:Z}}function qa(e,t,r,d){var m=e.x,b=e.y,M=e.caretSize,T=e.caretPadding,x=e.cornerRadius,C=r.xAlign,z=r.yAlign,Z=M+T,Q=x+T;return C==="right"?m-=t.width:C==="center"&&((m-=t.width/2)+t.width>d.width&&(m=d.width-t.width),m<0&&(m=0)),z==="top"?b+=Z:b-=z==="bottom"?t.height+Z:t.height/2,z==="center"?C==="left"?m+=Z:C==="right"&&(m-=Z):C==="left"?m-=Q:C==="right"&&(m+=Q),{x:m,y:b}}function ki(e,t){return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-e.xPadding:e.x+e.xPadding}function Pr(e){return Li([],Wi(e))}var Jl=Nn.extend({initialize:function(){this._model=Hr(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options.callbacks,r=t.beforeTitle.apply(e,arguments),d=t.title.apply(e,arguments),m=t.afterTitle.apply(e,arguments),b=[];return b=Li(b,Wi(r)),b=Li(b,Wi(d)),b=Li(b,Wi(m))},getBeforeBody:function(){return Pr(this._options.callbacks.beforeBody.a
|
|||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(ee){for(var K=(this.document||this.ownerDocument).querySelectorAll(ee),I=K.length;n("i")>=0&&K.item(I)!==this;);return I>-1}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(ee){if(ee==null)throw new TypeError("Cannot convert first argument to object");for(var K=Object(ee),I=1;I<arguments.length;I++){var X=arguments[I];if(X!=null){X=Object(X);for(var ie=Object.keys(Object(X)),Le=0,Ae=ie.length;Le<Ae;Le++){var Je=ie[Le],ut=Object.getOwnPropertyDescriptor(X,Je);ut!==void 0&&ut.enumerable&&(K[Je]=X[Je])}}}return K}});var y=function(ee){return function(K){return!!K&&typeof K=="object"}(ee)&&!function(K){var I=Object.prototype.toString.call(K);return I==="[object RegExp]"||I==="[object Date]"||function(X){return X instanceof Node}(K)||function(X){return X.$$typeof===v}(K)}(ee)},v=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function w(ee,K){return K.clone!==!1&&K.isMergeableObject(ee)?N((I=ee,Array.isArray(I)?[]:{}),ee,K):ee;var I}function Y(ee,K,I){return ee.concat(K).map(function(X){return w(X,I)})}function D(ee){return Object.keys(ee).concat(function(K){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(K).filter(function(I){return K.propertyIsEnumerable(I)}):[]}(ee))}function A(ee,K){try{return K in ee}catch{return!1}}function O(ee,K,I){var X={};return I.isMergeableObject(ee)&&D(ee).forEach(function(ie){X[ie]=w(ee[ie],I)}),D(K).forEach(function(ie){(function(Le,Ae){return A(Le,Ae)&&!(Object.hasOwnProperty.call(Le,Ae)&&Object.propertyIsEnumerable.call(Le,Ae))})(ee,ie)||(A(ee,ie)&&I.isMergeableObject(K[ie])?X[ie]=function(Le,Ae){if(!Ae.customMerge)return N;var Je=Ae.customMerge(Le);return typeof Je=="function"?Je:N}(ie,I)(ee[ie],K[ie],I):X[ie]=w(K[ie],I))}),X}var N=function(ee,K,I){(I=I||{}).arrayMerge=I.arrayMerge||Y,I.isMergeableObject=I.isMergeableObject||y,I.cloneUnlessOtherwiseSpecified=w;var X=Array.isArray(K);return X===Array.isArray(ee)?X?I.arrayMerge(ee,K,I):O(ee,K,I):w(K,I)},B=function(ee){return typeof ee=="object"&&ee.nodeType!==void 0?ee:typeof ee=="string"?document.querySelector(ee):null},H=function(ee,K,I,X){X===void 0&&(X=!1);var ie=document.createElement(ee);return I&&(ie[X?"innerHTML":"textContent"]=I),K&&(ie.className=K),ie},U=function(ee){ee.parentNode.removeChild(ee)},W=function(ee,K,I){return I===void 0&&(I=!1),I?N(ee,K):Object.assign(ee,K)},F=function(ee,K){return ee.toLowerCase()+":to:"+K.toLowerCase()},V=function(ee,K){Object.assign(ee.prototype,K)},G={},te=1,oe={on:function(ee,K,I,X){X===void 0&&(X={});var ie="jvm:"+K+"::"+te++;G[ie]={selector:ee,handler:I},I._uid=ie,ee.addEventListener(K,I,X)},delegate:function(ee,K,I,X){(K=K.split(" ")).forEach(function(ie){oe.on(ee,ie,function(Le){var Ae=Le.target;Ae.matches(I)&&X.call(Ae,Le)})})},off:function(ee,K,I){var X=K.split(":")[1];ee.removeEventListener(X,I),delete G[I._uid]},flush:function(){Object.keys(G).forEach(function(ee){oe.off(G[ee].selector,ee,G[ee].handler)})},getEventRegistry:function(){return G}},pe={onLoaded:"map:loaded",onViewportChange:"viewport:changed",onRegionClick:"region:clicked",onMarkerClick:"marker:clicked",onRegionSelected:"region:selected",onMarkerSelected:"marker:selected",onRegionTooltipShow:"region.tooltip:show",onMarkerTooltipShow:"marker.tooltip:show",onDestroyed:"map:destroyed"},ye=function(ee,K,I){var X=B(K),ie=X.getAttribute("class").indexOf("jvm-region")===-1?"marker":"region",Le=ie==="region",Ae=Le?X.getAttribute("data-code"):X.getAttribute("data-index"),Je=Le?pe.onRegionSelected:pe.onMarkerSelected;return I&&(Je=Le?pe.onRegionTooltipShow:pe.onMarkerTooltipShow),{type:ie,code:Ae,event:Je,element:Le?ee.regions[Ae].element:ee._markers[Ae].element,tooltipText:Le?ee._mapData.paths[Ae].name||
|
|||
|
[`+re+"] ",arguments[0])w(arguments[0],be)&&($+=be+": "+arguments[0][be]+", ");$=$.slice(0,-2)}else $=arguments[re];Ie.push($)}de(p+`
|
|||
|
Arguments: `+Array.prototype.slice.call(Ie).join("")+`
|
|||
|
`+new Error().stack),S=!1}return L.apply(this,arguments)},L)}var ae,ge={};function Ce(p,L){o.deprecationHandler!=null&&o.deprecationHandler(p,L),ge[p]||(de(L),ge[p]=!0)}function Be(p){return typeof Function<"u"&&p instanceof Function||Object.prototype.toString.call(p)==="[object Function]"}function ue(p){var L,S;for(S in p)w(p,S)&&(Be(L=p[S])?this[S]=L:this["_"+S]=L);this._config=p,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function ke(p,L){var S,$=B({},p);for(S in L)w(L,S)&&(v(p[S])&&v(L[S])?($[S]={},B($[S],p[S]),B($[S],L[S])):L[S]!=null?$[S]=L[S]:delete $[S]);for(S in p)w(p,S)&&!w(L,S)&&v(p[S])&&($[S]=B({},$[S]));return $}function we(p){p!=null&&this.set(p)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,ae=Object.keys?Object.keys:function(p){var L,S=[];for(L in p)w(p,L)&&S.push(L);return S};var Oe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Ve(p,L,S){var $=this._calendar[p]||this._calendar.sameElse;return Be($)?$.call(L,S):$}function We(p,L,S){var $=""+Math.abs(p),re=L-$.length;return(p>=0?S?"+":"":"-")+Math.pow(10,Math.max(0,re)).toString().substr(1)+$}var Ee=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,je=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ze={},Ne={};function se(p,L,S,$){var re=$;typeof $=="string"&&(re=function(){return this[$]()}),p&&(Ne[p]=re),L&&(Ne[L[0]]=function(){return We(re.apply(this,arguments),L[1],L[2])}),S&&(Ne[S]=function(){return this.localeData().ordinal(re.apply(this,arguments),p)})}function ze(p){return p.match(/\[[\s\S]/)?p.replace(/^\[|\]$/g,""):p.replace(/\\/g,"")}function Ke(p){var L,S,$=p.match(Ee);for(L=0,S=$.length;L<S;L++)Ne[$[L]]?$[L]=Ne[$[L]]:$[L]=ze($[L]);return function(re){var be,Ie="";for(be=0;be<S;be++)Ie+=Be($[be])?$[be].call(re,p):$[be];return Ie}}function ee(p,L){return p.isValid()?(L=K(L,p.localeData()),Ze[L]=Ze[L]||Ke(L),Ze[L](p)):p.localeData().invalidDate()}function K(p,L){var S=5;function $(re){return L.longDateFormat(re)||re}for(je.lastIndex=0;S>=0&&je.test(p);)p=p.replace(je,$),je.lastIndex=0,S-=1;return p}var I={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function X(p){var L=this._longDateFormat[p],S=this._longDateFormat[p.toUpperCase()];return L||!S?L:(this._longDateFormat[p]=S.match(Ee).map(function($){return $==="MMMM"||$==="MM"||$==="DD"||$==="dddd"?$.slice(1):$}).join(""),this._longDateFormat[p])}var ie="Invalid date";function Le(){return this._invalidDate}var Ae="%d",Je=/\d{1,2}/;function ut(p){return this._ordinal.replace("%d",p)}var Wt={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Qe(p,L,S,$){var re=this._relativeTime[S];return Be(re)?re(p,L,S,$):re.replace(/%d/i,p)}function an(p,L){var S=this._relativeTime[p>0?"future":"past"];return Be(S)?S(L):S.replace(/%s/i,L)}var un={};function Xt(p,L){var S=p.toLowerCase();un[S]=un[S+"s"]=un[L]=p}function pt(p){return typeof p=="string"?un[p]||un[p.toLowerCase()]:void 0}function An(p){var L,S,$={};for(S in p)w(p,S)&&(L=pt(S))&&($[L]=p[S]);return $}var Oi={};function mn(p,L){Oi[p]=L}function J(p){var L,S=[];for(L in p)w(p,L)&&S.push({unit:L,priority:Oi[L]});return S.sort(function($,re){return $.priority-re.priority}),S}function Ia(p){return p%4==0&&p%100!=0||p%400==0}function Jn(p){return p<0?Math.ceil(p)||0:Math.floor(p)}function At(p){var L=+p,S=0;return L!==0&&isFinite(L)&&(S=Jn(L)),S}function Xi(p,L){return function(S){return S!=null?(go(this,p,S),o.updateOffset(this,L),this):dl(this,p)}}function dl(p,L){return p.isValid()?p._d["get"+(p._isUTC?"UTC":"")+L]():NaN}function go(p,L,S){p.isValid(
|
|||
|
`)&&(we="(?: "+we+")",Ve=" "+Ve,Oe++),G=new RegExp("^(?:"+we+")",ke)),W&&(G=new RegExp("^"+we+"$(?!\\s)",ke)),H&&(te=ne.lastIndex),oe=O.call(ue?G:ne,Ve),ue?oe?(oe.input=oe.input.slice(Oe),oe[0]=oe[0].slice(Oe),oe.index=ne.lastIndex,ne.lastIndex+=oe[0].length):ne.lastIndex=0:H&&oe&&(ne.lastIndex=ne.global?oe.index+oe[0].length:te),W&&oe&&oe.length>1&&N.call(oe[0],G,function(){for(pe=1;pe<arguments.length-2;pe++)arguments[pe]===void 0&&(oe[pe]=void 0)}),oe&&Be)for(oe.groups=ye=w(null),pe=0;pe<Be.length;pe++)ye[(de=Be[pe])[0]]=oe[de[1]];return oe}),s.exports=B},8383:function(s,_,i){var f=i(1474);s.exports=function(){var n=f(this),o="";return n.global&&(o+="g"),n.ignoreCase&&(o+="i"),n.multiline&&(o+="m"),n.dotAll&&(o+="s"),n.unicode&&(o+="u"),n.sticky&&(o+="y"),o}},6558:function(s,_,i){var f=i(6183),n=i(8454).RegExp;_.UNSUPPORTED_Y=f(function(){var o=n("a","y");return o.lastIndex=2,o.exec("abcd")!=null}),_.BROKEN_CARET=f(function(){var o=n("^r","gy");return o.lastIndex=2,o.exec("str")!=null})},7672:function(s,_,i){var f=i(6183),n=i(8454).RegExp;s.exports=f(function(){var o=n(".","s");return!(o.dotAll&&o.exec(`
|
|||
|
`)&&o.flags==="s")})},9729:function(s,_,i){var f=i(6183),n=i(8454).RegExp;s.exports=f(function(){var o=n("(?<a>b)","g");return o.exec("b").groups.a!=="b"||"b".replace(o,"$<a>c")!=="bc"})},7431:function(s){s.exports=function(_){if(_==null)throw TypeError("Can't call method on "+_);return _}},7852:function(s,_,i){var f=i(8454);s.exports=function(n,o){try{Object.defineProperty(f,n,{value:o,configurable:!0,writable:!0})}catch{f[n]=o}return o}},820:function(s,_,i){var f=i(9168).f,n=i(3520),o=i(8149)("toStringTag");s.exports=function(h,y,v){h&&!n(h=v?h:h.prototype,o)&&f(h,o,{configurable:!0,value:y})}},8873:function(s,_,i){var f=i(1748),n=i(9059),o=f("keys");s.exports=function(h){return o[h]||(o[h]=n(h))}},2047:function(s,_,i){var f=i(8454),n=i(7852),o="__core-js_shared__",h=f[o]||n(o,{});s.exports=h},1748:function(s,_,i){var f=i(8977),n=i(2047);(s.exports=function(o,h){return n[o]||(n[o]=h!==void 0?h:{})})("versions",[]).push({version:"3.18.1",mode:f?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},7321:function(s,_,i){var f=i(8874),n=i(7655),o=i(7431),h=function(y){return function(v,w){var Y,D,A=n(o(v)),O=f(w),N=A.length;return O<0||O>=N?y?"":void 0:(Y=A.charCodeAt(O))<55296||Y>56319||O+1===N||(D=A.charCodeAt(O+1))<56320||D>57343?y?A.charAt(O):Y:y?A.slice(O,O+2):D-56320+(Y-55296<<10)+65536}};s.exports={codeAt:h(!1),charAt:h(!0)}},9749:function(s,_,i){var f=i(7431),n=i(7655),o="["+i(8342)+"]",h=RegExp("^"+o+o+"*"),y=RegExp(o+o+"*$"),v=function(w){return function(Y){var D=n(f(Y));return 1&w&&(D=D.replace(h,"")),2&w&&(D=D.replace(y,"")),D}};s.exports={start:v(1),end:v(2),trim:v(3)}},9623:function(s,_,i){var f=i(8874),n=Math.max,o=Math.min;s.exports=function(h,y){var v=f(h);return v<0?n(v+y,0):o(v,y)}},3206:function(s,_,i){var f=i(7530),n=i(7431);s.exports=function(o){return f(n(o))}},8874:function(s){var _=Math.ceil,i=Math.floor;s.exports=function(f){return isNaN(f=+f)?0:(f>0?i:_)(f)}},3917:function(s,_,i){var f=i(8874),n=Math.min;s.exports=function(o){return o>0?n(f(o),9007199254740991):0}},9473:function(s,_,i){var f=i(7431);s.exports=function(n){return Object(f(n))}},3948:function(s,_,i){var f=i(5896),n=i(1527),o=i(9827),h=i(6891),y=i(8149)("toPrimitive");s.exports=function(v,w){if(!f(v)||n(v))return v;var Y,D=o(v,y);if(D){if(w===void 0&&(w="default"),Y=D.call(v,w),!f(Y)||n(Y))return Y;throw TypeError("Can't convert object to primitive value")}return w===void 0&&(w="number"),h(v,w)}},2988:function(s,_,i){var f=i(3948),n=i(1527);s.exports=function(o){var h=f(o,"string");return n(h)?h:String(h)}},4823:function(s,_,i){var f={};f[i(8149)("toStringTag")]="z",s.exports=String(f)==="[object z]"},7655:function(s,_,i){var f=i(9225);s.exports=function(n){if(f(n)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(n)}},180:function(s){s.exports=function(_){try{return String(_)}catch{return"Object"}}},9059:function(s){var _=0,i=Math.random();s.exports=function(f){return"Symbol("+String(f===void 0?"":f)+")_"+(++_+i).toString(36)}},4746:function(s,_,i){var f=i(323);s.exports=f&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8149:function(s,_,i){var f=i(8454),n=i(1748),o=i(3520),h=i(9059),y=i(323),v=i(4746),w=n("wks"),Y=f.Symbol,D=v?Y:Y&&Y.withoutSetter||h;s.exports=function(A){return o(w,A)&&(y||typeof w[A]=="string")||(y&&o(Y,A)?w[A]=Y[A]:w[A]=D("Symbol."+A)),w[A]}},8342:function(s){s.exports=`
|
|||
|
\v\f\r \u2028\u2029\uFEFF`},8165:function(s,_,i){var f=i(4761),n=i(528).filter;f({target:"Array",proto:!0,forced:!i(4820)("filter")},{filter:function(o){return n(this,o,arguments.length>1?arguments[1]:void 0)}})},7543:function(s,_,i){var f=i(3206),n=i(9256),o=i(6126),h=i(1030),y=i(7583),v="Array Iterator",w=h.set,Y=h.getterFor(v);s.exports=y(Array,"Array",function(D,A){w(this,{type:v,target:f(D),index:0,kind:A})},function(){var D=Y(this),A=D.target,O=D.kind,N=D.index++;return!A||N>=A.length?(D.target=void 0,{value:void 0,done:!0}):O=="keys"?{value:N,done:!1}:O=="values"?{value:A[N],done:!1}:{value:[N,A[N]],done:!1}},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},7985:function(s,_,i){var f=i(4761),n=i(6589).left,o=i(1923),h=i(4324),y=i(7594);f({target:"Array",proto:!0,forced:!o("reduce")||!y&&h>79&&h<83},{reduce:function(v){return n(this,v,arguments.length,arguments.length>1?arguments[1]:void 0)}})},6618:function(s,_,i){var f=i(723),n=i(4530).EXISTS,o=i(9168).f,h=Function.prototype,y=h.toString,v=/^\s*function ([^ (]*)/;f&&!n&&o(h,"name",{configurable:!0,get:function(){try{return y.call(this).match(v)[1]}catch{return""}}})},7692:function(s,_,i){var f=i(4761),n=i(4727);f({target:"Object",stat:!0,forced:Object.assign!==n},{assign:n})},2352:function(s,_,i){var f=i(4823),n=i(3971),o=i(4117);f||n(Object.prototype,"toString",o,{unsafe:!0})},4249:function(s,_,i){var f=i(4761),n=i(8513);f({global:!0,forced:parseInt!=n},{parseInt:n})},9989:function(s,_,i){var f=i(4761),n=i(5510);f({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},3344:function(s,_,i){var f=i(7321).charAt,n=i(7655),o=i(1030),h=i(7583),y="String Iterator",v=o.set,w=o.getterFor(y);h(String,"String",function(Y){v(this,{type:y,string:n(Y),index:0})},function(){var Y,D=w(this),A=D.string,O=D.index;return O>=A.length?{value:void 0,done:!0}:(Y=f(A,O),D.index+=Y.length,{value:Y,done:!1})})},8307:function(s,_,i){var f=i(9696),n=i(1474),o=i(3917),h=i(7655),y=i(7431),v=i(9827),w=i(3615),Y=i(8734);f("match",function(D,A,O){return[function(N){var B=y(this),H=N==null?void 0:v(N,D);return H?H.call(N,B):new RegExp(N)[D](h(B))},function(N){var B=n(this),H=h(N),U=O(A,B,H);if(U.done)return U.value;if(!B.global)return Y(B,H);var W=B.unicode;B.lastIndex=0;for(var F,V=[],G=0;(F=Y(B,H))!==null;){var te=h(F[0]);V[G]=te,te===""&&(B.lastIndex=w(H,o(B.lastIndex),W)),G++}return G===0?null:V}]})},4390:function(s,_,i){var f=i(9696),n=i(6183),o=i(1474),h=i(6282),y=i(8874),v=i(3917),w=i(7655),Y=i(7431),D=i(3615),A=i(9827),O=i(4742),N=i(8734),B=i(8149)("replace"),H=Math.max,U=Math.min,W="a".replace(/./,"$0")==="$0",F=!!/./[B]&&/./[B]("a","$0")==="";f("replace",function(V,G,te){var oe=F?"$":"$0";return[function(pe,ye){var de=Y(this),ne=pe==null?void 0:A(pe,B);return ne?ne.call(pe,de,ye):G.call(w(de),pe,ye)},function(pe,ye){var de=o(this),ne=w(pe);if(typeof ye=="string"&&ye.indexOf(oe)===-1&&ye.indexOf("$<")===-1){var ae=te(G,de,ne,ye);if(ae.done)return ae.value}var ge=h(ye);ge||(ye=w(ye));var Ce=de.global;if(Ce){var Be=de.unicode;de.lastIndex=0}for(var ue=[];;){var ke=N(de,ne);if(ke===null||(ue.push(ke),!Ce))break;w(ke[0])===""&&(de.lastIndex=D(ne,v(de.lastIndex),Be))}for(var we,Oe="",Ve=0,We=0;We<ue.length;We++){ke=ue[We];for(var Ee=w(ke[0]),je=H(U(y(ke.index),ne.length),0),Ze=[],Ne=1;Ne<ke.length;Ne++)Ze.push((we=ke[Ne])===void 0?we:String(we));var se=ke.groups;if(ge){var ze=[Ee].concat(Ze,je,ne);se!==void 0&&ze.push(se);var Ke=w(ye.apply(void 0,ze))}else Ke=O(Ee,ne,je,Ze,se,ye);je>=Ve&&(Oe+=ne.slice(Ve,je)+Ke,Ve=je+Ee.length)}return Oe+ne.slice(Ve)}]},!!n(function(){var V=/./;return V.exec=function(){var G=[];return G.groups={a:"7"},G},"".replace(V,"$<a>")!=="7"})||!W||F)},7323:function(s,_,i){var f,n=i(8454),o=i(9573),h=i(6582),y=i(6645),v=i(7790),w=i(5896),Y=i(1030).enforce,D=i(4404),A=!n.ActiveXObject&&"ActiveXObject"in n,O=Object.isExtensible,N=function(G){return function(){return G(this,arguments.length?arguments[0]:void 0)}},B=s.exports=y("WeakMap",N,v);if(D&&A){f=v.getConstructor(N,"WeakMap",!0),h.enable();var H=B.
|
|||
|
<span class='flatpickr-weekday'>
|
|||
|
`+me.join("</span><span class='flatpickr-weekday'>")+`
|
|||
|
</span>
|
|||
|
`}}function Sn(_e,me){me===void 0&&(me=!0);var De=me?_e:_e-l.currentMonth;De<0&&l._hidePrevMonthArrow===!0||De>0&&l._hideNextMonthArrow===!0||(l.currentMonth+=De,(l.currentMonth<0||l.currentMonth>11)&&(l.currentYear+=l.currentMonth>11?1:-1,l.currentMonth=(l.currentMonth+12)%12,gn("onYearChange"),jt()),Dt(),gn("onMonthChange"),Ha())}function Kn(_e){return l.calendarContainer.contains(_e)}function yi(_e){if(l.isOpen&&!l.config.inline){var me=Zi(_e),De=Kn(me),He=!(me===l.input||me===l.altInput||l.element.contains(me)||_e.path&&_e.path.indexOf&&(~_e.path.indexOf(l.input)||~_e.path.indexOf(l.altInput)))&&!De&&!Kn(_e.relatedTarget),nt=!l.config.ignoredFocusElements.some(function(ct){return ct.contains(me)});He&&nt&&(l.config.allowInput&&l.setDate(l._input.value,!1,l.config.altInput?l.config.altFormat:l.config.dateFormat),l.timeContainer!==void 0&&l.minuteElement!==void 0&&l.hourElement!==void 0&&l.input.value!==""&&l.input.value!==void 0&&Me(),l.close(),l.config&&l.config.mode==="range"&&l.selectedDates.length===1&&l.clear(!1))}}function Di(_e){if(!(!_e||l.config.minDate&&_e<l.config.minDate.getFullYear()||l.config.maxDate&&_e>l.config.maxDate.getFullYear())){var me=_e,De=l.currentYear!==me;l.currentYear=me||l.currentYear,l.config.maxDate&&l.currentYear===l.config.maxDate.getFullYear()?l.currentMonth=Math.min(l.config.maxDate.getMonth(),l.currentMonth):l.config.minDate&&l.currentYear===l.config.minDate.getFullYear()&&(l.currentMonth=Math.max(l.config.minDate.getMonth(),l.currentMonth)),De&&(l.redraw(),gn("onYearChange"),jt())}}function Un(_e,me){var De;me===void 0&&(me=!0);var He=l.parseDate(_e,void 0,me);if(l.config.minDate&&He&&Ui(He,l.config.minDate,me!==void 0?me:!l.minDateHasTime)<0||l.config.maxDate&&He&&Ui(He,l.config.maxDate,me!==void 0?me:!l.maxDateHasTime)>0)return!1;if(!l.config.enable&&l.config.disable.length===0)return!0;if(He===void 0)return!1;for(var nt=!!l.config.enable,ct=(De=l.config.enable)!==null&&De!==void 0?De:l.config.disable,xt=0,at=void 0;xt<ct.length;xt++){if(typeof(at=ct[xt])=="function"&&at(He)||at instanceof Date&&He!==void 0&&at.getTime()===He.getTime())return nt;if(typeof at=="string"){var Yt=l.parseDate(at,void 0,!0);return Yt&&Yt.getTime()===He.getTime()?nt:!nt}if(typeof at=="object"&&He!==void 0&&at.from&&at.to&&He.getTime()>=at.from.getTime()&&He.getTime()<=at.to.getTime())return nt}return!nt}function kn(_e){return l.daysContainer!==void 0&&_e.className.indexOf("hidden")===-1&&_e.className.indexOf("flatpickr-disabled")===-1&&l.daysContainer.contains(_e)}function tl(_e){var me=_e.target===l._input,De=l._input.value.trimEnd()!==il();!me||!De||_e.relatedTarget&&Kn(_e.relatedTarget)||l.setDate(l._input.value,!0,_e.target===l.altInput?l.config.altFormat:l.config.dateFormat)}function nl(_e){var me=Zi(_e),De=l.config.wrap?k.contains(me):me===l._input,He=l.config.allowInput,nt=l.isOpen&&(!He||!De),ct=l.config.inline&&De&&!He;if(_e.keyCode===13&&De){if(He)return l.setDate(l._input.value,!0,me===l.altInput?l.config.altFormat:l.config.dateFormat),l.close(),me.blur();l.open()}else if(Kn(me)||nt||ct){var xt=!!l.timeContainer&&l.timeContainer.contains(me);switch(_e.keyCode){case 13:xt?(_e.preventDefault(),Me(),hr()):lo(_e);break;case 27:_e.preventDefault(),hr();break;case 8:case 46:De&&!l.config.allowInput&&(_e.preventDefault(),l.clear());break;case 37:case 39:if(xt||De)l.hourElement&&l.hourElement.focus();else{_e.preventDefault();var at=P();if(l.daysContainer!==void 0&&(He===!1||at&&kn(at))){var Yt=_e.keyCode===39?1:-1;_e.ctrlKey?(_e.stopPropagation(),Sn(Yt),Mt(qt(1),0)):Mt(void 0,Yt)}}break;case 38:case 40:_e.preventDefault();var vt=_e.keyCode===40?1:-1;l.daysContainer&&me.$i!==void 0||me===l.input||me===l.altInput?_e.ctrlKey?(_e.stopPropagation(),Di(l.currentYear-vt),Mt(qt(1),0)):xt||Mt(void 0,7*vt):me===l.currentYearElement?Di(l.currentYear-vt):l.config.enableTime&&(!xt&&l.hourElement&&l.hourElement.focus(),Me(_e),l._debouncedChange());break;case 9:if(xt){var St=[l.hourElement,l.minuteElement,l.secondElement,l.amPM].concat(l.pluginElements).filter(function(jn){return jn}),Lt=St.indexOf(me);if(Lt
|
|||
|
<div class="col-6 text-end"><ul class="list-inline"><li class="list-inline-item"><a class="text-muted" href="https://www.empresa.com/support/" target="_blank" rel="noreferrer">Soporte</a></li></ul></div></div></div>`,E(a,"class","footer")},m(u,s){fe(u,a,s)},p:gt,i:gt,o:gt,d(u){u&&he(a)}}}class hf extends Ft{constructor(a){super(),It(this,a,null,cf,Pt,{})}}async function ff(c){}function V1(c,a,u){const s=c.slice();return s[5]=a[u],s[7]=u,s}function Z1(c){let a,u,s,_,i,f=c[2](c[5].fecha_hora)+"",n,o,h,y=c[5].mensaje+"",v,w,Y,D,A,O;function N(){return c[3](c[5])}return{c(){a=R("div"),u=R("i"),s=ce(),_=R("div"),i=R("strong"),n=Xe(f),o=ce(),h=R("div"),v=Xe(y),w=ce(),Y=R("button"),D=ce(),E(u,"class","bi bi-info-circle fs-1 me-2"),E(Y,"type","button"),E(Y,"class","btn-close ms-auto"),E(Y,"aria-label","Close"),E(a,"class",Pa("alert d-flex mb-3"+(c[7]===0?" alert-primary shadow":" alert-info shadow-sm"))+" svelte-tc0kh7")},m(B,H){fe(B,a,H),j(a,u),j(a,s),j(a,_),j(_,i),j(i,n),j(_,o),j(_,h),j(h,v),j(a,w),j(a,Y),j(a,D),A||(O=tt(Y,"click",Zt(N)),A=!0)},p(B,H){c=B,H&1&&f!==(f=c[2](c[5].fecha_hora)+"")&&wt(n,f),H&1&&y!==(y=c[5].mensaje+"")&&wt(v,y)},d(B){B&&he(a),A=!1,O()}}}function mf(c){let a,u,s,_,i=c[0],f=[];for(let n=0;n<i.length;n+=1)f[n]=Z1(V1(c,i,n));return{c(){a=R("div"),u=R("div"),u.innerHTML=`<h5 class="offcanvas-title text-info" id="offcanvasRightLabel"><i class="bi bi-bell-fill text-info"></i> Alertas</h5>
|
|||
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>`,s=ce(),_=R("div");for(let n=0;n<f.length;n+=1)f[n].c();E(u,"class","offcanvas-header"),E(_,"class","offcanvas-body"),E(a,"class","offcanvas offcanvas-end"),E(a,"tabindex","-1"),E(a,"id","offcanvasRight"),E(a,"aria-labelledby","offcanvasRightLabel"),ll(a,"visibility","inherit")},m(n,o){fe(n,a,o),j(a,u),j(a,s),j(a,_);for(let h=0;h<f.length;h+=1)f[h]&&f[h].m(_,null)},p(n,[o]){if(o&7){i=n[0];let h;for(h=0;h<i.length;h+=1){const y=V1(n,i,h);f[h]?f[h].p(y,o):(f[h]=Z1(y),f[h].c(),f[h].m(_,null))}for(;h<f.length;h+=1)f[h].d(1);f.length=i.length}},i:gt,o:gt,d(n){n&&he(a),qn(f,n)}}}function _f(c,a,u){let s=[],_=new Date().toISOString().substring(0,10);C0.subscribe(o=>u(0,s=o));async function i(o){try{await ff(o),C0.update(h=>h.filter(y=>y.id!==o))}catch(h){globalThis.toast.error(h.message||h)}}function f(o){if(!o)return"--:--";const h=new Date(o);return h.toISOString()<_?h.toLocaleString():h.toLocaleTimeString()}return[s,i,f,o=>i(o.id)]}class pf extends Ft{constructor(a){super(),It(this,a,_f,mf,Pt,{})}}function gf(c){let a;return{c(){a=R("div"),a.innerHTML='<span class="visually-hidden">Loading...</span>',E(a,"class","spinner-border text-primary"),E(a,"role","status")},m(u,s){fe(u,a,s)},p:gt,i:gt,o:gt,d(u){u&&he(a)}}}class M1 extends Ft{constructor(a){super(),It(this,a,null,gf,Pt,{})}}function U1(c){let a,u,s;return u=new M1({}),{c(){a=R("div"),st(u.$$.fragment),E(a,"class","col")},m(_,i){fe(_,a,i),lt(u,a,null),s=!0},i(_){s||(Pe(u.$$.fragment,_),s=!0)},o(_){$e(u.$$.fragment,_),s=!1},d(_){_&&he(a),rt(u)}}}function yf(c){let a,u,s,_,i;const f=c[2].default,n=oo(f,c,c[1],null);let o=c[0]&&U1();return{c(){a=R("div"),u=R("div"),s=R("h3"),n&&n.c(),_=ce(),o&&o.c(),E(s,"class","h3 mb-3"),E(u,"class","col-auto"),E(a,"class","row")},m(h,y){fe(h,a,y),j(a,u),j(u,s),n&&n.m(s,null),j(a,_),o&&o.m(a,null),i=!0},p(h,[y]){n&&n.p&&(!i||y&2)&&uo(n,f,h,h[1],i?so(f,h[1],y,null):co(h[1]),null),h[0]?o?y&1&&Pe(o,1):(o=U1(),o.c(),Pe(o,1),o.m(a,null)):o&&(xn(),$e(o,1,1,()=>{o=null}),Yn())},i(h){i||(Pe(n,h),Pe(o),i=!0)},o(h){$e(n,h),$e(o),i=!1},d(h){h&&he(a),n&&n.d(h),o&&o.d()}}}function vf(c,a,u){let{$$slots:s={},$$scope:_}=a,{loading:i=!1}=a;return c.$$set=f=>{"loading"in f&&u(0,i=f.loading),"$$scope"in f&&u(1,_=f.$$scope)},[i,_,s]}class ha extends Ft{constructor(a){super(),It(this,a,vf,yf,Pt,{loading:0})}}function bf(c){let a;return{c(){a=Xe("Inicio")},m(u,s){fe(u,a,s)},d(u){u&&he(a)}}}function Mf(c){let a,u,s,_;return a=new ha({props:{$$slots:{default:[bf]},$$scope:{ctx:c}}}),{c(){st(a.$$.fragment),u=ce(),s=R("div"),s.innerHTML=`<div class="col-12"><div class="card"><div class="card-header"><h5 class="card-title mb-0">Empty card</h5></div>
|
|||
|
<div class="card-body"></div></div></div>`,E(s,"class","row")},m(i,f){lt(a,i,f),fe(i,u,f),fe(i,s,f),_=!0},p(i,[f]){const n={};f&1&&(n.$$scope={dirty:f,ctx:i}),a.$set(n)},i(i){_||(Pe(a.$$.fragment,i),_=!0)},o(i){$e(a.$$.fragment,i),_=!1},d(i){rt(a,i),i&&he(u),i&&he(s)}}}class wf extends Ft{constructor(a){super(),It(this,a,null,Mf,Pt,{})}}function Lf(c){let a;return{c(){a=Xe("Perfil de usuario")},m(u,s){fe(u,a,s)},d(u){u&&he(a)}}}function kf(c){let a,u,s,_,i,f,n,o,h,y,v,w,Y,D,A,O=c[0].nombres+"",N,B,H,U,W,F=c[0].apellido_a+"",V,G,te=c[0].apellido_b+"",oe,pe,ye,de,ne,ae;return a=new ha({props:{$$slots:{default:[Lf]},$$scope:{ctx:c}}}),{c(){st(a.$$.fragment),u=ce(),s=R("div"),_=R("div"),i=R("div"),f=R("div"),n=R("img"),h=ce(),y=R("section"),y.innerHTML=`<div class="section-body"><p>Twitter del perfil: <br/>
|
|||
|
@twitter</p></div>`,v=ce(),w=R("div"),Y=R("section"),D=R("div"),A=R("h4"),N=Xe(O),B=ce(),H=R("div"),H.innerHTML=`<a class="link-icon" href="#"><i class="cl cl-facebook"></i></a>
|
|||
|
<a class="link-icon" href="#"><i class="cl cl-twitter"></i></a>`,U=ce(),W=R("div"),V=Xe(F),G=ce(),oe=Xe(te),pe=ce(),ye=R("div"),ye.innerHTML=`<p>Vestibulum
|
|||
|
volutpat lacus ac magna ullamcorper, id semper sem aliquam. Donec
|
|||
|
vestibulum turpis mi, sed ullamcorper lorem feugiat sed. Praesent
|
|||
|
ut fringilla dolor. Sed viverra posuere felis eu ullamcorper.</p>
|
|||
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>`,de=ce(),ne=R("div"),ne.innerHTML=`<section class="section"><div class="section-header"><h6 class="pb-2 border-bottom border-accent">Información de contacto:</h6></div>
|
|||
|
<div class="section-body"><p class="mb-1">Sitio Web: <a href="http://wwww.example.com">http://wwww.example.com</a></p>
|
|||
|
<p class="mb-1">Twitter: @twitter</p>
|
|||
|
<p class="mb-2">Facebook: facebook/ejemplo</p><a class="btn btn-primary btn-block" href="#">Ir al
|
|||
|
sitio</a></div></section>`,E(n,"class","img-fluid"),E(n,"width","100%"),E(n,"alt",""),hs(n.src,o=c[1])||E(n,"src",o),E(y,"class","section"),E(f,"class","col-2"),E(A,"class","pb-2 border-bottom border-accent"),E(H,"class","section-icons"),E(W,"class","profile-charge"),E(D,"class","section-header with-profile-charge"),E(ye,"class","section-body"),E(Y,"class","section"),E(w,"class","col"),E(i,"class","row"),E(_,"class","card-body"),E(ne,"class","card-footer"),E(s,"class","card")},m(ge,Ce){lt(a,ge,Ce),fe(ge,u,Ce),fe(ge,s,Ce),j(s,_),j(_,i),j(i,f),j(f,n),j(f,h),j(f,y),j(i,v),j(i,w),j(w,Y),j(Y,D),j(D,A),j(A,N),j(D,B),j(D,H),j(D,U),j(D,W),j(W,V),j(W,G),j(W,oe),j(Y,pe),j(Y,ye),j(s,de),j(s,ne),ae=!0},p(ge,[Ce]){const Be={};Ce&8&&(Be.$$scope={dirty:Ce,ctx:ge}),a.$set(Be),(!ae||Ce&2&&!hs(n.src,o=ge[1]))&&E(n,"src",o),(!ae||Ce&1)&&O!==(O=ge[0].nombres+"")&&wt(N,O),(!ae||Ce&1)&&F!==(F=ge[0].apellido_a+"")&&wt(V,F),(!ae||Ce&1)&&te!==(te=ge[0].apellido_b+"")&&wt(oe,te)},i(ge){ae||(Pe(a.$$.fragment,ge),ae=!0)},o(ge){$e(a.$$.fragment,ge),ae=!1},d(ge){rt(a,ge),ge&&he(u),ge&&he(s)}}}function xf(c,a,u){let s;$n(c,O0,f=>u(2,s=f));let _={},i=null;return c.$$.update=()=>{c.$$.dirty&4&&u(0,_=s.persona||{}),c.$$.dirty&4&&u(1,i=(s==null?void 0:s.avatar_img)||"/avatars/avatar2.png")},[_,i,s]}class Yf extends Ft{constructor(a){super(),It(this,a,xf,kf,Pt,{})}}function Df(c){let a;return{c(){a=Xe("NO EXISTE")},m(u,s){fe(u,a,s)},p:gt,i:gt,o:gt,d(u){u&&he(a)}}}let Tf=class extends Ft{constructor(a){super(),It(this,a,null,Df,Pt,{})}};function Sf(c){let a,u,s,_,i,f;return{c(){a=R("li"),u=R("a"),s=Xe(c[5]),E(u,"role","button"),E(u,"class",c[1]),E(u,"href",c[4]),E(u,"tabindex","0"),E(u,"aria-label",c[2]),E(u,"aria-current",c[6]),E(a,"class",_=Pa(c[0])+" svelte-5wvubo")},m(n,o){fe(n,a,o),j(a,u),j(u,s),i||(f=[tt(u,"click",c[11]),tt(u,"keypress",function(){c0(c[3])&&c[3].apply(this,arguments)})],i=!0)},p(n,[o]){c=n,o&32&&wt(s,c[5]),o&2&&E(u,"class",c[1]),o&16&&E(u,"href",c[4]),o&4&&E(u,"aria-label",c[2]),o&64&&E(u,"aria-current",c[6]),o&1&&_!==(_=Pa(c[0])+" svelte-5wvubo")&&E(a,"class",_)},i:gt,o:gt,d(n){n&&he(a),i=!1,Dn(f)}}}function jf(c,a,u){let{onClick:s=null}=a,{selected:_=!1}=a,{pageClassName:i=""}=a,{pageLinkClassName:f=""}=a,{activeClassName:n=""}=a,{activeLinkClassName:o=""}=a,{extraAriaContext:h=""}=a,{href:y=""}=a,{ariaLabel:v=""}=a,{page:w=0}=a,Y={pageClassName:i,pageLinkClassName:f,activeClassName:n,activeLinkClassName:o},D=null;function A(O){ou.call(this,c,O)}return c.$$set=O=>{"onClick"in O&&u(3,s=O.onClick),"selected"in O&&u(9,_=O.selected),"pageClassName"in O&&u(0,i=O.pageClassName),"pageLinkClassName"in O&&u(1,f=O.pageLinkClassName),"activeClassName"in O&&u(7,n=O.activeClassName),"activeLinkClassName"in O&&u(8,o=O.activeLinkClassName),"extraAriaContext"in O&&u(10,h=O.extraAriaContext),"href"in O&&u(4,y=O.href),"ariaLabel"in O&&u(2,v=O.ariaLabel),"page"in O&&u(5,w=O.page)},c.$$.update=()=>{c.$$.dirty&1060&&u(2,v=v||"Page "+w+(h?" "+h:"")),c.$$.dirty&512&&(_||(u(1,f=Y.pageLinkClassName),u(0,i=Y.pageClassName),u(7,n=Y.activeClassName),u(8,o=Y.activeLinkClassName))),c.$$.dirty&935&&_&&(u(6,D="page"),u(2,v=v||"Page "+w+" is your current page"),typeof i<"u"?u(0,i=i+" "+n):u(0,i=n),typeof f<"u"?typeof o<"u"&&u(1,f=f+" "+o):u(1,f=o))},[i,f,v,s,y,w,D,n,o,_,h,A]}class q1 extends Ft{constructor(a){super(),It(this,a,jf,Sf,Pt,{onClick:3,selected:9,pageClassName:0,pageLinkClassName:1,activeClassName:7,activeLinkClassName:8,extraAriaContext:10,href:4,ariaLabel:2,page:5})}}function Af(c){let a,u,s,_,i,f;return{c(){a=R("li"),u=R("a"),s=Xe(c[0]),E(u,"class",c[1]),E(u,"role","button"),E(u,"tabindex","0"),E(a,"class",_=Pa(c[3])+" svelte-5wvubo")},m(n,o){fe(n,a,o),j(a,u),j(u,s),i||(f=[tt(u,"click",c[5]),tt(u,"keypress",function(){c0(c[2])&&c[2].apply(this,arguments)})],i=!0)},p(n,[o]){c=n,o&1&&wt(s,c[0]),o&2&&E(u,"class",c[1]),o&8&&_!==(_=Pa(c[3])+" svelte-5wvubo")&&E(a,"class",_)},i:gt,o:gt,d(n){n&&he(a),i=!1,Dn(f)}}}function Cf(c,a,u){let{breakLabel:s=""}=a,{breakClassName:_=""}=a,{breakLinkClassName:i=""}=a,{onClick:f=null}=a,n="";function
|
|||
|
<th>Nombres</th>
|
|||
|
<th>Apellido 1</th>
|
|||
|
<th>Apellido 2</th>
|
|||
|
<th>Email</th></tr>`,O=ce(),N=R("tbody");for(let de=0;de<pe.length;de+=1)pe[de].c();B=ce(),H=R("div"),U=R("a"),U.innerHTML='<i class="bi bi-arrow-repeat"></i>',W=ce(),st(F.$$.fragment),E(o,"class","m-auto"),E(i,"class","mb-3 d-flex"),E(_,"class","card-header"),E(D,"class","table table-bordered"),E(Y,"class","table-responsive svelte-4zkp90"),E(w,"class","card-body"),E(U,"href","#"),E(U,"class","btn btn-outline-secondary me-3"),E(H,"class","card-footer d-flex"),E(s,"class","card")},m(de,ne){lt(a,de,ne),fe(de,u,ne),fe(de,s,ne),j(s,_),j(_,i),lt(f,i,null),j(i,n),j(i,o),j(i,h),lt(y,i,null),j(s,v),j(s,w),j(w,Y),j(Y,D),j(D,A),j(D,O),j(D,N);for(let ae=0;ae<pe.length;ae+=1)pe[ae]&&pe[ae].m(N,null);j(s,B),j(s,H),j(H,U),j(H,W),lt(F,H,null),V=!0,G||(te=tt(U,"click",Zt(c[4])),G=!0)},p(de,[ne]){const ae={};ne&4&&(ae.loading=de[2]),ne&512&&(ae.$$scope={dirty:ne,ctx:de}),a.$set(ae);const ge={};ne&512&&(ge.$$scope={dirty:ne,ctx:de}),f.$set(ge);const Ce={};if(ne&512&&(Ce.$$scope={dirty:ne,ctx:de}),y.$set(Ce),ne&2){oe=de[1].results;let ue;for(ue=0;ue<oe.length;ue+=1){const ke=sd(de,oe,ue);pe[ue]?(pe[ue].p(ke,ne),Pe(pe[ue],1)):(pe[ue]=dd(ke),pe[ue].c(),Pe(pe[ue],1),pe[ue].m(N,null))}for(xn(),ue=oe.length;ue<pe.length;ue+=1)ye(ue);Yn()}const Be={};ne&1&&(Be.offset=(de[0]-1)*r0),ne&2&&(Be.count=de[1].count),F.$set(Be)},i(de){if(!V){Pe(a.$$.fragment,de),Pe(f.$$.fragment,de),Pe(y.$$.fragment,de);for(let ne=0;ne<oe.length;ne+=1)Pe(pe[ne]);Pe(F.$$.fragment,de),V=!0}},o(de){$e(a.$$.fragment,de),$e(f.$$.fragment,de),$e(y.$$.fragment,de),pe=pe.filter(Boolean);for(let ne=0;ne<pe.length;ne+=1)$e(pe[ne]);$e(F.$$.fragment,de),V=!1},d(de){rt(a,de),de&&he(u),de&&he(s),rt(f),rt(y),qn(pe,de),rt(F),G=!1,te()}}}const r0=15;function gm(c,a,u){let s={count:0,results:[]},_=1,i=!1;async function f(h){try{u(2,i=!0);const y=(h-1)*r0;u(1,s=await om({offset:y,limit:r0,ordering:"login"}))}catch(y){alert(y.detail||y)}finally{u(2,i=!1)}}const n=()=>f(_),o=h=>u(0,_=h.detail);return c.$$.update=()=>{c.$$.dirty&1&&f(_)},[_,s,i,f,n,o]}let ym=class extends Ft{constructor(a){super(),It(this,a,gm,pm,Pt,{})}};async function vm(c){const a=c?"?"+new URLSearchParams(c).toString():"",u=await fetch(`${Nt}/tipos/persona/${a}`,{headers:{Authorization:`Bearer ${zt()}`,"Content-Type":"application/json"}});if(!u.ok)throw await u.json();return u.json()}function ud(c,a,u){const s=c.slice();return s[15]=a[u],s}function cd(c){let a,u=c[15].tratamiento+"",s,_;return{c(){a=R("option"),s=Xe(u),a.__value=_=c[15].id_tipo_tratamiento,a.value=a.__value},m(i,f){fe(i,a,f),j(a,s)},p(i,f){f&4&&u!==(u=i[15].tratamiento+"")&&wt(s,u),f&4&&_!==(_=i[15].id_tipo_tratamiento)&&(a.__value=_,a.value=a.__value)},d(i){i&&he(a)}}}function bm(c){let a,u,s,_,i,f,n,o,h,y,v,w,Y,D,A,O,N,B,H,U,W,F,V,G,te,oe,pe,ye,de,ne,ae,ge,Ce,Be,ue,ke,we,Oe,Ve,We,Ee,je,Ze,Ne,se,ze,Ke,ee,K=c[2],I=[];for(let X=0;X<K.length;X+=1)I[X]=cd(ud(c,K,X));return{c(){a=R("div"),u=R("div"),s=Xe(`RUT
|
|||
|
`),_=R("input"),f=ce(),n=R("div"),o=Xe(`Tipo Tratamiento
|
|||
|
`),h=R("select"),y=R("option");for(let X=0;X<I.length;X+=1)I[X].c();v=ce(),w=R("div"),Y=R("div"),D=Xe(`Nombres
|
|||
|
`),A=R("input"),O=ce(),N=R("div"),B=Xe(`Apellido 1
|
|||
|
`),H=R("input"),U=ce(),W=R("div"),F=Xe(`Apellido 2
|
|||
|
`),V=R("input"),G=ce(),te=R("div"),oe=R("div"),pe=Xe(`Teléfono
|
|||
|
`),ye=R("input"),de=ce(),ne=R("div"),ae=Xe(`Email
|
|||
|
`),ge=R("input"),Ce=ce(),Be=R("div"),ue=Xe(`Fecha de nacimiento
|
|||
|
`),ke=R("input"),we=ce(),Oe=R("div"),Ve=R("div"),We=Xe(`Comuna
|
|||
|
`),Ee=R("select"),je=R("option"),Ze=ce(),Ne=R("div"),se=Xe(`Dirección
|
|||
|
`),ze=R("input"),E(_,"type","text"),_.value=c[3],E(_,"class","form-control"),_.required=!0,_.disabled=i=!c[1],E(u,"class","col-md mb-3"),y.__value="",y.value=y.__value,E(h,"class","form-select"),c[0].id_tipo_tratamiento===void 0&&ol(()=>c[5].call(h)),E(n,"class","col-md mb-3"),E(a,"class","row"),E(A,"type","text"),E(A,"class","form-control"),A.required=!0,E(Y,"class","col-md mb-3"),E(H,"type","text"),E(H,"class","form-control"),H.required=!0,E(N,"class","col-md mb-3"),E(V,"type","text"),E(V,"class","form-control"),E(W,"class","col-md mb-3"),E(w,"class","row"),E(ye,"type","tel"),E(ye,"class","form-control"),E(oe,"class","col-md mb-3"),E(ge,"type","email"),E(ge,"class","form-control"),ge.required=!0,E(ne,"class","col-md mb-3"),E(ke,"type","date"),E(ke,"class","form-control"),E(Be,"class","col-md mb-3"),E(te,"class","row"),je.__value="",je.value=je.__value,E(Ee,"class","form-select"),c[0].id_comuna===void 0&&ol(()=>c[12].call(Ee)),E(Ve,"class","col-md mb-3"),E(ze,"type","text"),E(ze,"class","form-control"),E(Ne,"class","col-md mb-3"),E(Oe,"class","row")},m(X,ie){fe(X,a,ie),j(a,u),j(u,s),j(u,_),j(a,f),j(a,n),j(n,o),j(n,h),j(h,y);for(let Le=0;Le<I.length;Le+=1)I[Le]&&I[Le].m(h,null);Ci(h,c[0].id_tipo_tratamiento,!0),fe(X,v,ie),fe(X,w,ie),j(w,Y),j(Y,D),j(Y,A),Ht(A,c[0].nombres),j(w,O),j(w,N),j(N,B),j(N,H),Ht(H,c[0].apellido_a),j(w,U),j(w,W),j(W,F),j(W,V),Ht(V,c[0].apellido_b),fe(X,G,ie),fe(X,te,ie),j(te,oe),j(oe,pe),j(oe,ye),Ht(ye,c[0].fono),j(te,de),j(te,ne),j(ne,ae),j(ne,ge),Ht(ge,c[0].email),j(te,Ce),j(te,Be),j(Be,ue),j(Be,ke),Ht(ke,c[0].fecha_nacimiento),fe(X,we,ie),fe(X,Oe,ie),j(Oe,Ve),j(Ve,We),j(Ve,Ee),j(Ee,je),Ci(Ee,c[0].id_comuna,!0),j(Oe,Ze),j(Oe,Ne),j(Ne,se),j(Ne,ze),Ht(ze,c[0].direccion),Ke||(ee=[tt(_,"input",c[4]),tt(h,"change",c[5]),tt(A,"input",c[6]),tt(H,"input",c[7]),tt(V,"input",c[8]),tt(ye,"input",c[9]),tt(ge,"input",c[10]),tt(ke,"input",c[11]),tt(Ee,"change",c[12]),tt(ze,"input",c[13])],Ke=!0)},p(X,[ie]){if(ie&8&&_.value!==X[3]&&(_.value=X[3]),ie&2&&i!==(i=!X[1])&&(_.disabled=i),ie&4){K=X[2];let Le;for(Le=0;Le<K.length;Le+=1){const Ae=ud(X,K,Le);I[Le]?I[Le].p(Ae,ie):(I[Le]=cd(Ae),I[Le].c(),I[Le].m(h,null))}for(;Le<I.length;Le+=1)I[Le].d(1);I.length=K.length}ie&5&&Ci(h,X[0].id_tipo_tratamiento),ie&5&&A.value!==X[0].nombres&&Ht(A,X[0].nombres),ie&5&&H.value!==X[0].apellido_a&&Ht(H,X[0].apellido_a),ie&5&&V.value!==X[0].apellido_b&&Ht(V,X[0].apellido_b),ie&5&&Ht(ye,X[0].fono),ie&5&&ge.value!==X[0].email&&Ht(ge,X[0].email),ie&5&&Ht(ke,X[0].fecha_nacimiento),ie&5&&Ci(Ee,X[0].id_comuna),ie&5&&ze.value!==X[0].direccion&&Ht(ze,X[0].direccion)},i:gt,o:gt,d(X){X&&he(a),qn(I,X),X&&he(v),X&&he(w),X&&he(G),X&&he(te),X&&he(we),X&&he(Oe),Ke=!1,Dn(ee)}}}function Mm(c,a,u){let{form:s={}}=a,{es_nuevo:_=!0}=a,i=[],f="";async function n(B){try{u(2,i=await vm())}catch(H){alert(H.detail||H)}}function o({target:{value:B}}){const[H=null,U=null]=B.split("-");u(0,s={...s,rut:H,dv:U})}function h(){s.id_tipo_tratamiento=ho(this),u(0,s),u(2,i)}function y(){s.nombres=this.value,u(0,s),u(2,i)}function v(){s.apellido_a=this.value,u(0,s),u(2,i)}function w(){s.apellido_b=this.value,u(0,s),u(2,i)}function Y(){s.fono=this.value,u(0,s),u(2,i)}function D(){s.email=this.value,u(0,s),u(2,i)}function A(){s.fecha_nacimiento=this.value,u(0,s),u(2,i)}function O(){s.id_comuna=ho(this),u(0,s),u(2,i)}function N(){s.direccion=this.value,u(0,s),u(2,i)}return c.$$set=B=>{"form"in B&&u(0,s=B.form),"es_nuevo"in B&&u(1,_=B.es_nuevo)},c.$$.update=()=>{c.$$.dirty&2&&n(),c.$$.dirty&3&&!_&&u(3,f=`${s.rut||""}-${s.dv||""}`)},[s,_,i,f,o,h,y,v,w,Y,D,A,O,N]}let Fu=class extends Ft{constructor(a){super(),It(this,a,Mm,bm,Pt,{form:0,es_nuevo:1})}};function wm(c){let a,u,s,_,i,f,n,o,h,y,v,w,Y,D,A,O,N,B,H,U,W,F,V,G;return{c(){a=R("div"),u=R("div"),s=Xe(`Login
|
|||
|
`),_=R("input"),f=ce(),n=R("div"),o=R("div"),h=R("input"),y=ce(),v=R("label"),v.textContent="Vigente",w=ce(),Y=R("div"),D=R("div"),A=Xe(`Contraseña
|
|||
|
`),O=R("input"),B=ce(),H=R("div"),U=Xe(`Repita Contraseña
|
|||
|
`),W=R("input"),E(_,"type","text"),E(_,"class","form-control"),_.required=!0,_.disabled=i=!c[2],E(u,"class","col-md mb-3"),E(h,"class","form-check-input"),E(h,"type","checkbox"),E(h,"role","switch"),E(h,"id","usuario-vigente"),E(v,"class","form-check-label"),E(v,"for","usuario-vigente"),E(o,"class","form-check form-switch"),E(n,"class","col-md mb-3 pt-3"),E(a,"class","row"),E(O,"type","password"),E(O,"class","form-control"),O.required=N=c[2]||!!c[1],E(D,"class","col-md mb-3"),E(W,"type","password"),E(W,"class","form-control"),W.required=F=c[2]||!!c[0].clave,E(H,"class","col-md mb-3"),E(Y,"class","row")},m(te,oe){fe(te,a,oe),j(a,u),j(u,s),j(u,_),Ht(_,c[0].login),j(a,f),j(a,n),j(n,o),j(o,h),h.checked=c[0].vigente,j(o,y),j(o,v),fe(te,w,oe),fe(te,Y,oe),j(Y,D),j(D,A),j(D,O),Ht(O,c[0].clave),j(Y,B),j(Y,H),j(H,U),j(H,W),Ht(W,c[1]),V||(G=[tt(_,"input",c[3]),tt(h,"change",c[4]),tt(O,"input",c[5]),tt(W,"input",c[6])],V=!0)},p(te,[oe]){oe&4&&i!==(i=!te[2])&&(_.disabled=i),oe&1&&_.value!==te[0].login&&Ht(_,te[0].login),oe&1&&(h.checked=te[0].vigente),oe&6&&N!==(N=te[2]||!!te[1])&&(O.required=N),oe&1&&O.value!==te[0].clave&&Ht(O,te[0].clave),oe&5&&F!==(F=te[2]||!!te[0].clave)&&(W.required=F),oe&2&&W.value!==te[1]&&Ht(W,te[1])},i:gt,o:gt,d(te){te&&he(a),te&&he(w),te&&he(Y),V=!1,Dn(G)}}}function Lm(c,a,u){let{form:s={}}=a,{es_nuevo:_=!0}=a,{clave2:i=""}=a;function f(){s.login=this.value,u(0,s)}function n(){s.vigente=this.checked,u(0,s)}function o(){s.clave=this.value,u(0,s)}function h(){i=this.value,u(1,i)}return c.$$set=y=>{"form"in y&&u(0,s=y.form),"es_nuevo"in y&&u(2,_=y.es_nuevo),"clave2"in y&&u(1,i=y.clave2)},[s,i,_,f,n,o,h]}let km=class extends Ft{constructor(a){super(),It(this,a,Lm,wm,Pt,{form:0,es_nuevo:2,clave2:1})}};async function xm(c){const a=c?"?"+new URLSearchParams(c).toString():"",u=await fetch(`${Nt}/personas/${a}`,{headers:{Authorization:`Bearer ${zt()}`,"Content-Type":"application/json"}});if(!u.ok)throw await u.text();return u.json()}async function Ym(c){const a=await fetch(`${Nt}/personas/${c}/`,{headers:{Authorization:`Bearer ${zt()}`,"Content-Type":"application/json"}});if(!a.ok)throw await a.text();return a.json()}async function Dm(c){const a=await fetch(`${Nt}/personas/`,{method:"POST",body:JSON.stringify(c),headers:{Authorization:`Bearer ${zt()}`,"Content-Type":"application/json"}});if(!a.ok)throw await a.text();return a.json()}async function zu({rut:c=null,...a}){const u=await fetch(`${Nt}/personas/${c}/`,{method:"PATCH",body:JSON.stringify(a),headers:{Authorization:`Bearer ${zt()}`,"Content-Type":"application/json"}});if(!u.ok)throw await u.text();return u.json()}function Tm(c){let a=c[0]?"Nuevo Usuario":"Editar Usuario",u;return{c(){u=Xe(a)},m(s,_){fe(s,u,_)},p(s,_){_&1&&a!==(a=s[0]?"Nuevo Usuario":"Editar Usuario")&&wt(u,a)},d(s){s&&he(u)}}}function hd(c){let a,u,s;return{c(){a=R("button"),a.innerHTML='<i class="bi bi-trash"></i> Eliminar',E(a,"type","button"),E(a,"class","btn btn-danger ms-2")},m(_,i){fe(_,a,i),u||(s=tt(a,"click",Zt(c[7])),u=!0)},p:gt,d(_){_&&he(a),u=!1,s()}}}function Sm(c){let a;return{c(){a=Xe("Volver")},m(u,s){fe(u,a,s)},d(u){u&&he(a)}}}function jm(c){let a,u,s,_,i,f,n,o,h,y,v,w,Y,D,A,O,N,B,H,U,W,F,V,G,te,oe,pe,ye;a=new ha({props:{loading:c[4],$$slots:{default:[Tm]},$$scope:{ctx:c}}});let de=!c[0]&&hd(c);v=new ca({props:{to:"/usuarios",class:"btn btn-outline-secondary",$$slots:{default:[Sm]},$$scope:{ctx:c}}});function ne(ue){c[9](ue)}let ae={es_nuevo:c[0]};c[1]!==void 0&&(ae.form=c[1]),O=new Fu({props:ae}),al.push(()=>l0(O,"form",ne));function ge(ue){c[10](ue)}function Ce(ue){c[11](ue)}let Be={es_nuevo:c[0]};return c[2]!==void 0&&(Be.form=c[2]),c[3]!==void 0&&(Be.clave2=c[3]),V=new km({props:Be}),al.push(()=>l0(V,"form",ge)),al.push(()=>l0(V,"clave2",Ce)),{c(){st(a.$$.fragment),u=ce(),s=R("form"),_=R("div"),i=R("div"),f=R("button"),f.innerHTML='<i class="bi bi-save"></i> Guardar',n=ce(),de&&de.c(),o=ce(),h=R("div"),y=ce(),st(v.$$.fragment),w=ce(),Y=R("div"),D=R("h4"),D.textContent="Datos de la persona",A=ce(),st(O.$$.fragment),B=ce(),H=R("hr"),U=ce(),W=R("h4"),W.textContent="
|
|||
|
<th>Nombre</th>
|
|||
|
<th>Región</th></tr>`,O=ce(),N=R("tbody");for(let ae=0;ae<de.length;ae+=1)de[ae].c();B=ce(),H=R("div"),U=R("a"),U.innerHTML='<i class="bi bi-arrow-repeat"></i>',W=ce(),st(F.$$.fragment),V=ce(),ne&&ne.c(),G=Gi(),E(f,"class","btn btn-primary me-3"),E(o,"class","m-auto"),E(i,"class","mb-3 d-flex"),E(_,"class","card-header"),E(D,"class","table table-bordered"),E(Y,"class","table-responsive svelte-4zkp90"),E(w,"class","card-body"),E(U,"href","#"),E(U,"class","btn btn-outline-secondary me-3"),E(H,"class","card-footer d-flex"),E(s,"class","card")},m(ae,ge){lt(a,ae,ge),fe(ae,u,ge),fe(ae,s,ge),j(s,_),j(_,i),j(i,f),j(i,n),j(i,o),j(i,h),lt(y,i,null),j(s,v),j(s,w),j(w,Y),j(Y,D),j(D,A),j(D,O),j(D,N);for(let Ce=0;Ce<de.length;Ce+=1)de[Ce]&&de[Ce].m(N,null);j(s,B),j(s,H),j(H,U),j(H,W),lt(F,H,null),fe(ae,V,ge),ne&&ne.m(ae,ge),fe(ae,G,ge),te=!0,oe||(pe=[tt(f,"click",Zt(c[6])),tt(U,"click",Zt(c[11]))],oe=!0)},p(ae,[ge]){const Ce={};ge&16&&(Ce.loading=ae[4]),ge&262144&&(Ce.$$scope={dirty:ge,ctx:ae}),a.$set(Ce);const Be={};if(ge&262144&&(Be.$$scope={dirty:ge,ctx:ae}),y.$set(Be),ge&136){ye=ae[3].results;let ke;for(ke=0;ke<ye.length;ke+=1){const we=pd(ae,ye,ke);de[ke]?de[ke].p(we,ge):(de[ke]=gd(we),de[ke].c(),de[ke].m(N,null))}for(;ke<de.length;ke+=1)de[ke].d(1);de.length=ye.length}const ue={};ge&1&&(ue.offset=(ae[0]-1)*o0),ge&8&&(ue.count=ae[3].count),F.$set(ue),ae[1]?ne?(ne.p(ae,ge),ge&2&&Pe(ne,1)):(ne=yd(ae),ne.c(),Pe(ne,1),ne.m(G.parentNode,G)):ne&&(xn(),$e(ne,1,1,()=>{ne=null}),Yn())},i(ae){te||(Pe(a.$$.fragment,ae),Pe(y.$$.fragment,ae),Pe(F.$$.fragment,ae),Pe(ne),te=!0)},o(ae){$e(a.$$.fragment,ae),$e(y.$$.fragment,ae),$e(F.$$.fragment,ae),$e(ne),te=!1},d(ae){rt(a,ae),ae&&he(u),ae&&he(s),rt(y),qn(de,ae),rt(F),ae&&he(V),ne&&ne.d(ae),ae&&he(G),oe=!1,Dn(pe)}}}const o0=15;function Bm(c,a,u){let s=null,_=!0,i={count:0,results:[]},f=1,n=!1;async function o(B){try{u(4,n=!0);const H=(B-1)*o0;u(3,i=await Wu({offset:H,limit:o0,ordering:"id_region"}))}catch(H){alert(H.detail||H)}finally{u(4,n=!1)}}function h(){u(1,s={}),u(2,_=!0)}async function y({id_comuna:B}){try{u(4,n=!0),u(1,s=await Cm(B)),u(2,_=!1)}catch(H){alert(H.detail||H)}finally{u(4,n=!1)}}async function v(){try{_?await Om(s):await Em(s),alert("Comuna guardada con exito"),u(1,s=null),o(f)}catch(B){alert(B.detail||B)}}async function w(){try{if(!confirm(`Desea eliminar la comuna [${s.nombre_comuna}]?`))return;await Hm(s.id_comuna),alert("Comuna eliminada con exito"),u(1,s=null),o(f)}catch(B){alert(B.detail||B)}}const Y=B=>y(B),D=()=>o(f),A=B=>u(0,f=B.detail);function O(B){s=B,u(1,s)}const N=()=>u(1,s=null);return c.$$.update=()=>{c.$$.dirty&1&&o(f)},[f,s,_,i,n,o,h,y,v,w,Y,D,A,O,N]}let Vm=class extends Ft{constructor(a){super(),It(this,a,Bm,$m,Pt,{})}};function bd(c,a,u){const s=c.slice();return s[5]=a[u],s}function Zm(c){let a;return{c(){a=Xe("Personas")},m(u,s){fe(u,a,s)},d(u){u&&he(a)}}}function Um(c){let a,u;return{c(){a=R("i"),u=Xe(" Nuevo"),E(a,"class","bi bi-plus-lg")},m(s,_){fe(s,a,_),fe(s,u,_)},p:gt,d(s){s&&he(a),s&&he(u)}}}function qm(c){let a=c[5].rut+"",u,s,_=c[5].dv+"",i;return{c(){u=Xe(a),s=Xe("-"),i=Xe(_)},m(f,n){fe(f,u,n),fe(f,s,n),fe(f,i,n)},p(f,n){n&2&&a!==(a=f[5].rut+"")&&wt(u,a),n&2&&_!==(_=f[5].dv+"")&&wt(i,_)},d(f){f&&he(u),f&&he(s),f&&he(i)}}}function Md(c){let a,u,s,_,i,f=c[5].nombres+"",n,o,h,y=c[5].apellido_a+"",v,w,Y,D=c[5].apellido_b+"",A,O,N,B=c[5].fono+"",H,U,W;return s=new ca({props:{to:"/personas/"+c[5].rut,$$slots:{default:[qm]},$$scope:{ctx:c}}}),{c(){a=R("tr"),u=R("td"),st(s.$$.fragment),_=ce(),i=R("td"),n=Xe(f),o=ce(),h=R("td"),v=Xe(y),w=ce(),Y=R("td"),A=Xe(D),O=ce(),N=R("td"),H=Xe(B),U=ce()},m(F,V){fe(F,a,V),j(a,u),lt(s,u,null),j(a,_),j(a,i),j(i,n),j(a,o),j(a,h),j(h,v),j(a,w),j(a,Y),j(Y,A),j(a,O),j(a,N),j(N,H),j(a,U),W=!0},p(F,V){const G={};V&2&&(G.to="/personas/"+F[5].rut),V&258&&(G.$$scope={dirty:V,ctx:F}),s.$set(G),(!W||V&2)&&f!==(f=F[5].nombres+"")&&wt(n,f),(!W||V&2)&&y!==(y=F[5].apellido_a+"")&&wt(v,y),(!W||V&2)&&D!==(D=F[5].apellido_b+"")&&wt(A,D),(!W||V&2)&&B!==(B=F[5].fono+"")&&wt(H,B)},i(F){W||(Pe(s.$$.fragment,F),W=!0)}
|
|||
|
<th>Nombres</th>
|
|||
|
<th>Apellido 1</th>
|
|||
|
<th>Apellido 2</th>
|
|||
|
<th>Teléfono</th></tr>`,y=ce(),v=R("tbody");for(let H=0;H<N.length;H+=1)N[H].c();w=ce(),Y=R("div"),st(D.$$.fragment),E(_,"class","card-header"),E(o,"class","table table-sm"),E(n,"class","card-body"),E(Y,"class","card-footer"),E(s,"class","card")},m(H,U){lt(a,H,U),fe(H,u,U),fe(H,s,U),j(s,_),lt(i,_,null),j(s,f),j(s,n),j(n,o),j(o,h),j(o,y),j(o,v);for(let W=0;W<N.length;W+=1)N[W]&&N[W].m(v,null);j(s,w),j(s,Y),lt(D,Y,null),A=!0},p(H,[U]){const W={};U&4&&(W.loading=H[2]),U&256&&(W.$$scope={dirty:U,ctx:H}),a.$set(W);const F={};if(U&256&&(F.$$scope={dirty:U,ctx:H}),i.$set(F),U&2){O=H[1].results;let G;for(G=0;G<O.length;G+=1){const te=bd(H,O,G);N[G]?(N[G].p(te,U),Pe(N[G],1)):(N[G]=Md(te),N[G].c(),Pe(N[G],1),N[G].m(v,null))}for(xn(),G=O.length;G<N.length;G+=1)B(G);Yn()}const V={};U&1&&(V.offset=(H[0]-1)/s0),U&2&&(V.count=H[1].count),D.$set(V)},i(H){if(!A){Pe(a.$$.fragment,H),Pe(i.$$.fragment,H);for(let U=0;U<O.length;U+=1)Pe(N[U]);Pe(D.$$.fragment,H),A=!0}},o(H){$e(a.$$.fragment,H),$e(i.$$.fragment,H),N=N.filter(Boolean);for(let U=0;U<N.length;U+=1)$e(N[U]);$e(D.$$.fragment,H),A=!1},d(H){rt(a,H),H&&he(u),H&&he(s),rt(i),qn(N,H),rt(D)}}}let s0=15;function Gm(c,a,u){let s=1,_={results:[],count:0},i=!1;async function f(o){try{u(2,i=!0);const h=(o-1)*s0;u(1,_=await xm({offset:h,limit:s0}))}catch(h){alert(h.detail||h)}finally{u(2,i=!1)}}const n=o=>u(0,s=o.detail);return c.$$.update=()=>{c.$$.dirty&1&&f(s)},[s,_,i,n]}let Xm=class extends Ft{constructor(a){super(),It(this,a,Gm,Jm,Pt,{})}};function Km(c){let a=c[0]?"Nuevo Persona":"Editar Persona",u;return{c(){u=Xe(a)},m(s,_){fe(s,u,_)},p(s,_){_&1&&a!==(a=s[0]?"Nuevo Persona":"Editar Persona")&&wt(u,a)},d(s){s&&he(u)}}}function Qm(c){let a;return{c(){a=Xe("Volver")},m(u,s){fe(u,a,s)},d(u){u&&he(a)}}}function e2(c){let a,u,s,_,i,f,n,o,h,y,v,w,Y,D,A,O,N,B,H;a=new ha({props:{loading:c[2],$$slots:{default:[Km]},$$scope:{ctx:c}}}),y=new ca({props:{to:"/personas",class:"btn btn-outline-secondary",$$slots:{default:[Qm]},$$scope:{ctx:c}}});function U(F){c[6](F)}let W={es_nuevo:c[0]};return c[1]!==void 0&&(W.form=c[1]),A=new Fu({props:W}),al.push(()=>l0(A,"form",U)),{c(){st(a.$$.fragment),u=ce(),s=R("form"),_=R("div"),i=R("div"),f=R("button"),f.innerHTML='<i class="bi bi-save"></i> Guardar',n=ce(),o=R("div"),h=ce(),st(y.$$.fragment),v=ce(),w=R("div"),Y=R("h4"),Y.textContent="Datos de la persona",D=ce(),st(A.$$.fragment),E(f,"type","submit"),E(f,"class","btn btn-primary"),E(o,"class","m-auto"),E(i,"class","card-header d-flex"),E(Y,"class","h4 mb-3"),E(w,"class","card-body"),E(_,"class","card"),E(s,"action","")},m(F,V){lt(a,F,V),fe(F,u,V),fe(F,s,V),j(s,_),j(_,i),j(i,f),j(i,n),j(i,o),j(i,h),lt(y,i,null),j(_,v),j(_,w),j(w,Y),j(w,D),lt(A,w,null),N=!0,B||(H=tt(s,"submit",Zt(c[4])),B=!0)},p(F,[V]){const G={};V&4&&(G.loading=F[2]),V&1025&&(G.$$scope={dirty:V,ctx:F}),a.$set(G);const te={};V&1024&&(te.$$scope={dirty:V,ctx:F}),y.$set(te);const oe={};V&1&&(oe.es_nuevo=F[0]),!O&&V&2&&(O=!0,oe.form=F[1],a0(()=>O=!1)),A.$set(oe)},i(F){N||(Pe(a.$$.fragment,F),Pe(y.$$.fragment,F),Pe(A.$$.fragment,F),N=!0)},o(F){$e(a.$$.fragment,F),$e(y.$$.fragment,F),$e(A.$$.fragment,F),N=!1},d(F){rt(a,F),F&&he(u),F&&he(s),rt(y),rt(A),B=!1,H()}}}function t2(c,a,u){let s,_;$n(c,cs,Y=>u(7,_=Y)),_o(()=>(d0(cs,_.showSidebar=!1,_),()=>{d0(cs,_.showSidebar=!0,_)}));const i=Hu();$n(c,i,Y=>u(5,s=Y));const f=b1();let n=!0,o={},h=!1;async function y({rut:Y=null}){try{if(!Y)return;u(2,h=!0),u(1,o=await Ym(Y))}catch(D){alert(D.detail||D)}finally{u(2,h=!1)}}async function v(){try{n?await Dm(o):await zu(o),alert("Datos guardados con exito!"),f("/personas")}catch(Y){alert(Y.detail||Y)}}function w(Y){o=Y,u(1,o)}return c.$$.update=()=>{c.$$.dirty&32&&u(0,n=!s.rut),c.$$.dirty&32&&y(s)},[n,o,h,i,v,s,w]}class wd extends Ft{constructor(a){super(),It(this,a,t2,e2,Pt,{})}}async function n2(c){const a=c?"?"+new URLSearchParams(c).toString():"",u=await fetch(`${Nt}/mapas/paraderos/${a}`,{headers:{Authorization:`Bearer ${zt()}`,"Content-Type":"application/json"}});if(!u.ok)throw await u.text();return u.json()}async function i2(c){const
|
|||
|
<h1>${ke}</h1>
|
|||
|
<p>${we}</p>
|
|||
|
<button class="btn btn-primary" onclick="onEditaParada(${Ve})">Editar</button>
|
|||
|
<hr>
|
|||
|
${Ee}
|
|||
|
`;f.setContent(je),f.open(We.getMap(),We)}),i.push(We)}ae&&ae.setCenter(N[0].position);const Ce=new ge.maps.LatLngBounds;N.forEach(Be=>Ce.extend(Be.position)),n&&n.fitBounds(Ce)}globalThis.onEditaParada=function(ae){u(2,h={id_paradero:ae})};const te=()=>U(null);function oe(){v=ho(this),u(4,v),u(5,w)}function pe(){y=ho(this),u(3,y),u(6,D)}function ye(){A=this.value,u(0,A)}const de=ae=>G(ae.detail),ne=()=>u(2,h=null);return c.$$.update=()=>{c.$$.dirty[0]&1&&F()},[A,_,h,y,v,w,D,B,U,W,V,G,te,oe,pe,ye,de,ne]}class v2 extends Ft{constructor(a){super(),It(this,a,y2,g2,Pt,{},null,[-1,-1])}}async function b2(c){const a=c?"?"+new URLSearchParams(c).toString():"",u=await fetch(`${Nt}/operadores/${a}`,{headers:{Authorization:`Bearer ${zt()}`,"Content-Type":"application/json"}});if(!u.ok)throw await u.text();return u.json()}async function M2(c){const a=c?"?"+new URLSearchParams(c).toString():"",u=await fetch(`${Nt}/lineas/${a}`,{headers:{Authorization:`Bearer ${zt()}`,"Content-Type":"application/json"}});if(!u.ok)throw await u.text();return u.json()}function Cd(c,a,u){const s=c.slice();return s[17]=a[u],s}function Od(c,a,u){const s=c.slice();return s[20]=a[u],s}function w2(c){let a;return{c(){a=Xe("Paraderos")},m(u,s){fe(u,a,s)},d(u){u&&he(a)}}}function Ed(c){let a,u=c[20].nombre_operador+"",s,_;return{c(){a=R("option"),s=Xe(u),a.__value=_=c[20].id_operador,a.value=a.__value},m(i,f){fe(i,a,f),j(a,s)},p(i,f){f&4&&u!==(u=i[20].nombre_operador+"")&&wt(s,u),f&4&&_!==(_=i[20].id_operador)&&(a.__value=_,a.value=a.__value)},d(i){i&&he(a)}}}function Hd(c){let a,u=c[17].route_short_name+"",s,_;return{c(){a=R("option"),s=Xe(u),a.__value=_=c[17].id_linea,a.value=a.__value},m(i,f){fe(i,a,f),j(a,s)},p(i,f){f&9&&u!==(u=i[17].route_short_name+"")&&wt(s,u),f&13&&_!==(_=i[17].id_linea)&&(a.__value=_,a.value=a.__value)},d(i){i&&he(a)}}}function Pd(c){let a,u,s,_;return a=new M1({}),{c(){st(a.$$.fragment),u=ce(),s=R("span"),s.textContent="Cargando rutas..."},m(i,f){lt(a,i,f),fe(i,u,f),fe(i,s,f),_=!0},i(i){_||(Pe(a.$$.fragment,i),_=!0)},o(i){$e(a.$$.fragment,i),_=!1},d(i){rt(a,i),i&&he(u),i&&he(s)}}}function Nd(c){let a,u,s,_;return u=new $u({props:{google_api_key:c[5]}}),u.$on("start",c[12]),{c(){a=R("div"),st(u.$$.fragment),E(a,"class",s=c[1]?"d-block":"d-none")},m(i,f){fe(i,a,f),lt(u,a,null),_=!0},p(i,f){const n={};f&32&&(n.google_api_key=i[5]),u.$set(n),(!_||f&11&&s!==(s=i[1]?"d-block":"d-none"))&&E(a,"class",s)},i(i){_||(Pe(u.$$.fragment,i),_=!0)},o(i){$e(u.$$.fragment,i),_=!1},d(i){i&&he(a),rt(u)}}}function L2(c){let a,u,s,_,i,f,n,o,h,y,v,w,Y,D,A,O,N,B,H,U,W,F,V,G,te;a=new ha({props:{$$slots:{default:[w2]},$$scope:{ctx:c}}});let oe=c[2],pe=[];for(let ge=0;ge<oe.length;ge+=1)pe[ge]=Ed(Od(c,oe,ge));let ye=c[3].filter(c[10]),de=[];for(let ge=0;ge<ye.length;ge+=1)de[ge]=Hd(Cd(c,ye,ge));let ne=c[4]&&Pd(),ae=c[5]&&Nd(c);return{c(){st(a.$$.fragment),u=ce(),s=R("div"),_=R("div"),i=R("div"),f=R("div"),n=R("div"),o=R("div"),o.textContent="Operador",h=ce(),y=R("select"),v=R("option");for(let ge=0;ge<pe.length;ge+=1)pe[ge].c();w=ce(),Y=R("div"),D=R("div"),A=R("div"),A.textContent="Linea",O=ce(),N=R("select"),B=R("option");for(let ge=0;ge<de.length;ge+=1)de[ge].c();H=ce(),U=R("div"),ne&&ne.c(),W=ce(),F=R("div"),ae&&ae.c(),E(o,"class","input-group-text"),v.__value="",v.value=v.__value,E(y,"class","form-select"),c[0]===void 0&&ol(()=>c[8].call(y)),E(n,"class","input-group"),E(f,"class","col-md-auto"),E(A,"class","input-group-text"),B.__value="",B.value=B.__value,E(N,"class","form-select"),c[1]===void 0&&ol(()=>c[11].call(N)),E(D,"class","input-group"),E(Y,"class","col-md-auto"),E(U,"class","col-md"),E(i,"class","row"),E(_,"class","card-header"),E(F,"class","card-body"),E(s,"class","card")},m(ge,Ce){lt(a,ge,Ce),fe(ge,u,Ce),fe(ge,s,Ce),j(s,_),j(_,i),j(i,f),j(f,n),j(n,o),j(n,h),j(n,y),j(y,v);for(let Be=0;Be<pe.length;Be+=1)pe[Be]&&pe[Be].m(y,null);Ci(y,c[0],!0),j(i,w),j(i,Y),j(Y,D),j(D,A),j(D,O),j(D,N),j(N,B);for(let Be=0;Be<de.length;Be+=1)de[Be]&&de[Be].m(N,null);Ci(N,c[1],!0),j(i,H),j(i,U),ne&&ne.m(U,null),j(s,W),j(s,F),ae&&ae.m(F,null),V=!0,G||
|
|||
|
|
|||
|
`,O=ce(),N=R("div"),B=R("div"),H=R("div"),U=R("table"),W=R("thead"),W.innerHTML=`<tr><th>Aplicaciones</th>
|
|||
|
<th>Acceso</th>
|
|||
|
<th>Solo visualizar</th></tr>`,F=ce(),V=R("tbody");for(let ae=0;ae<ne.length;ae+=1)ne[ae].c();E(s,"class","col-md-3"),E(i,"class","col-md"),E(u,"class","row mb-3"),E(o,"class","col-md-3"),E(v,"type","text"),v.required=!0,E(v,"class","form-control"),E(y,"class","col-md"),E(n,"class","row mb-3"),E(Y,"class","h4 mb-3"),E(U,"class","table table-sm table-bordered"),E(H,"class","table-responsive"),E(B,"class","card-body"),E(N,"class","card"),E(a,"class","form")},m(ae,ge){fe(ae,a,ge),j(a,u),j(u,s),j(u,_),j(u,i),ye.m(i,null),j(a,f),j(a,n),j(n,o),j(n,h),j(n,y),j(y,v),Ht(v,c[1].nombre_rol),j(a,w),j(a,Y),j(a,D),j(a,A),j(a,O),j(a,N),j(N,B),j(B,H),j(H,U),j(U,W),j(U,F),j(U,V);for(let Ce=0;Ce<ne.length;Ce+=1)ne[Ce]&&ne[Ce].m(V,null);G||(te=tt(v,"input",c[8]),G=!0)},p(ae,ge){if(pe===(pe=oe(ae))&&ye?ye.p(ae,ge):(ye.d(1),ye=pe(ae),ye&&(ye.c(),ye.m(i,null))),ge&2&&v.value!==ae[1].nombre_rol&&Ht(v,ae[1].nombre_rol),ge&8){de=ae[3];let Ce;for(Ce=0;Ce<de.length;Ce+=1){const Be=Id(ae,de,Ce);ne[Ce]?ne[Ce].p(Be,ge):(ne[Ce]=Fd(Be),ne[Ce].c(),ne[Ce].m(V,null))}for(;Ce<ne.length;Ce+=1)ne[Ce].d(1);ne.length=de.length}},d(ae){ae&&he(a),ye.d(),qn(ne,ae),G=!1,te()}}}function P2(c){let a,u,s,_,i,f,n;return{c(){a=R("button"),u=Xe("Guardar"),s=ce(),_=R("button"),i=Xe("Eliminar"),E(a,"class","btn btn-primary"),E(a,"type","submit"),a.disabled=c[2],E(_,"class","btn btn-danger"),_.disabled=c[2]},m(o,h){fe(o,a,h),j(a,u),fe(o,s,h),fe(o,_,h),j(_,i),f||(n=tt(_,"click",Zt(c[6])),f=!0)},p(o,h){h&4&&(a.disabled=o[2]),h&4&&(_.disabled=o[2])},d(o){o&&he(a),o&&he(s),o&&he(_),f=!1,n()}}}function N2(c){let a,u,s,_,i;return u=new p0({props:{title:"rol #"+(c[0].id_rol||"Nuevo"),size:"lg",$$slots:{buttons:[P2],default:[H2]},$$scope:{ctx:c}}}),u.$on("close",c[11]),{c(){a=R("form"),st(u.$$.fragment),E(a,"action","")},m(f,n){fe(f,a,n),lt(u,a,null),s=!0,_||(i=tt(a,"submit",Zt(c[5])),_=!0)},p(f,[n]){const o={};n&1&&(o.title="rol #"+(f[0].id_rol||"Nuevo")),n&1048591&&(o.$$scope={dirty:n,ctx:f}),u.$set(o)},i(f){s||(Pe(u.$$.fragment,f),s=!0)},o(f){$e(u.$$.fragment,f),s=!1},d(f){f&&he(a),rt(u),_=!1,i()}}}function I2(c,a){const u=[];for(const s of c){const _={...s},i=a.find(f=>f.id_aplicacion===s.id_aplicacion);i?(_.id_rol=i.id_rol!==void 0?i.id_rol:null,_.solo_visualizar=i.solo_visualizar!==void 0?i.solo_visualizar:null,_.id_rol_app=i.id_rol_app!==void 0?i.id_rol_app:null,_.acceso=!0):(_.id_rol=null,_.solo_visualizar=null,_.acceso=!1,_.id_rol_app=!1),u.push(_)}return u}function F2(c,a){const u=[];for(const s of c)s.acceso&&u.push({id_aplicacion:s.id_aplicacion,id_rol:a,solo_visualizar:s.solo_visualizar});return u}function z2(c,a,u){const s=[];for(let _=0;_<a.length;_++){const i=a[_],f=u[_],n={id_aplicacion:i.id_aplicacion,id_rol:c,solo_visualizar:f.solo_visualizar};i.acceso!==f.acceso?(n.opcion=i.acceso?"Eliminar":"Crear",i.acceso==!0&&(n.id_rol_app=i.id_rol_app)):i.solo_visualizar!==f.solo_visualizar?(n.opcion="Editar",n.id_rol_app=i.id_rol_app):n.opcion=null,s.push(n)}return s}function W2(c,a,u){const s=Rl();let{rol:_={}}=a,i={},f=!1,n=[],o=[],h=[],y=[];async function v(U){try{if(!U)return;u(1,i=await D2(U)||{})}catch(W){alert(W.detail||W)}}async function w(U){try{n=await Iu()||[],U?h=await Bu(U):h=[],u(3,o=I2(n,h));for(const W of o){const F={id_rol_app:W.id_rol_app,id_aplicacion:W.id_aplicacion,nombre_app:W.nombre_app,vigente:W.vigente,id_rol:W.id_rol,solo_visualizar:W.solo_visualizar,acceso:W.acceso};y.push(F)}}catch(W){alert(W.detail||W)}}async function Y(){try{if(u(2,f=!0),_.id_rol){u(1,i=await S2(i)),u(3,o=z2(_.id_rol,y,o));for(const U of o)U.opcion=="Crear"?await l1(U):U.opcion=="Editar"?await Vu(U):U.opcion=="Eliminar"&&await r1(U.id_rol_app)}else{u(1,i=await T2(i)),u(3,o=F2(o,i.id_rol));for(const U of o)await l1(U)}alert("Se ha guardado la aplicación"),s("refresh"),s("close")}catch(U){U.detail?alert(U.detail):alert(JSON.stringify(U))}finally{u(2,f=!1)}}async function D(){try{if(!confirm("Eliminará el registro?"))return;u(2,f=!0);for(const U of y)U.id_rol_app!=!1&&(U.acceso=!0)&&await r1(U.id_rol_app);await j2(i.id_rol),alert("Se ha eli
|