tabby-server-stats 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("tabby-core"),require("tabby-settings"));else if("function"==typeof define&&define.amd)define(["@angular/core","@angular/common","@angular/forms","rxjs","rxjs/operators","tabby-core","tabby-settings"],e);else{var n="object"==typeof exports?e(require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("tabby-core"),require("tabby-settings")):e(t["@angular/core"],t["@angular/common"],t["@angular/forms"],t.rxjs,t["rxjs/operators"],t["tabby-core"],t["tabby-settings"]);for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(this,(t,e,n,i,s,a,o)=>(()=>{"use strict";var r,l,c={182:t=>{t.exports=n},358:t=>{t.exports=e},439:t=>{t.exports=s},650:t=>{t.exports=a},700:t=>{t.exports=o},860:e=>{e.exports=t},943:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\r\n <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>\r\n</svg>'},961:t=>{t.exports=i}},d={};function h(t){var e=d[t];if(void 0!==e)return e.exports;var n=d[t]={exports:{}};return c[t](n,n.exports,h),n.exports}h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},l=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,h.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var n=Object.create(null);h.r(n);var i={};r=r||[null,l({}),l([]),l(l)];for(var s=2&e&&t;("object"==typeof s||"function"==typeof s)&&!~r.indexOf(s);s=l(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>t[e]);return i.default=()=>t,h.d(n,i),n},h.d=(t,e)=>{for(var n in e)h.o(e,n)&&!h.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),h.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var p={};function u(t,e,n,i){var s,a=arguments.length,o=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(o=(a<3?s(o):a>3?s(e,n,o):s(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}function g(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}h.r(p),h.d(p,{default:()=>Zg}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var m=h(860),f=h.t(m,2),b=h(358),y=h(182),v=h(961),_=h(439),x={left:"right",right:"left",bottom:"top",top:"bottom"};function w(t){return t.replace(/left|right|bottom|top/g,function(t){return x[t]})}function D(t){return t.split("-")[0]}var I={start:"end",end:"start"};function k(t){return t.replace(/start|end/g,function(t){return I[t]})}var C="top",M="bottom",S="right",T="left",O="auto",E=[C,M,S,T],R="start",P="end",F="viewport",V="popper",A=E.reduce(function(t,e){return t.concat([e+"-"+R,e+"-"+P])},[]),N=[].concat(E,[O]).reduce(function(t,e){return t.concat([e,e+"-"+R,e+"-"+P])},[]),j=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function L(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function z(t){return t instanceof L(t).Element||t instanceof Element}function B(t){return t instanceof L(t).HTMLElement||t instanceof HTMLElement}function $(t){return"undefined"!=typeof ShadowRoot&&(t instanceof L(t).ShadowRoot||t instanceof ShadowRoot)}function H(t){return((z(t)?t.ownerDocument:t.document)||window.document).documentElement}var W=Math.max,U=Math.min,q=Math.round;function Y(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Z(){return!/^((?!chrome|android).)*safari/i.test(Y())}function K(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),s=1,a=1;e&&B(t)&&(s=t.offsetWidth>0&&q(i.width)/t.offsetWidth||1,a=t.offsetHeight>0&&q(i.height)/t.offsetHeight||1);var o=(z(t)?L(t):window).visualViewport,r=!Z()&&n,l=(i.left+(r&&o?o.offsetLeft:0))/s,c=(i.top+(r&&o?o.offsetTop:0))/a,d=i.width/s,h=i.height/a;return{width:d,height:h,top:c,right:l+d,bottom:c+h,left:l,x:l,y:c}}function G(t){var e=L(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function X(t){return K(H(t)).left+G(t).scrollLeft}function J(t){return L(t).getComputedStyle(t)}function Q(t){return t?(t.nodeName||"").toLowerCase():null}function tt(t){return"html"===Q(t)?t:t.assignedSlot||t.parentNode||($(t)?t.host:null)||H(t)}function et(t){var e=J(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function nt(t){return["html","body","#document"].indexOf(Q(t))>=0?t.ownerDocument.body:B(t)&&et(t)?t:nt(tt(t))}function it(t,e){var n;void 0===e&&(e=[]);var i=nt(t),s=i===(null==(n=t.ownerDocument)?void 0:n.body),a=L(i),o=s?[a].concat(a.visualViewport||[],et(i)?i:[]):i,r=e.concat(o);return s?r:r.concat(it(tt(o)))}function st(t){return["table","td","th"].indexOf(Q(t))>=0}function at(t){return B(t)&&"fixed"!==J(t).position?t.offsetParent:null}function ot(t){for(var e=L(t),n=at(t);n&&st(n)&&"static"===J(n).position;)n=at(n);return n&&("html"===Q(n)||"body"===Q(n)&&"static"===J(n).position)?e:n||function(t){var e=/firefox/i.test(Y());if(/Trident/i.test(Y())&&B(t)&&"fixed"===J(t).position)return null;var n=tt(t);for($(n)&&(n=n.host);B(n)&&["html","body"].indexOf(Q(n))<0;){var i=J(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function rt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&$(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function lt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ct(t,e,n){return e===F?lt(function(t,e){var n=L(t),i=H(t),s=n.visualViewport,a=i.clientWidth,o=i.clientHeight,r=0,l=0;if(s){a=s.width,o=s.height;var c=Z();(c||!c&&"fixed"===e)&&(r=s.offsetLeft,l=s.offsetTop)}return{width:a,height:o,x:r+X(t),y:l}}(t,n)):z(e)?function(t,e){var n=K(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):lt(function(t){var e,n=H(t),i=G(t),s=null==(e=t.ownerDocument)?void 0:e.body,a=W(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=W(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),r=-i.scrollLeft+X(t),l=-i.scrollTop;return"rtl"===J(s||n).direction&&(r+=W(n.clientWidth,s?s.clientWidth:0)-a),{width:a,height:o,x:r,y:l}}(H(t)))}function dt(t){return t.split("-")[1]}function ht(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function pt(t){var e,n=t.reference,i=t.element,s=t.placement,a=s?D(s):null,o=s?dt(s):null,r=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(a){case C:e={x:r,y:n.y-i.height};break;case M:e={x:r,y:n.y+n.height};break;case S:e={x:n.x+n.width,y:l};break;case T:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=a?ht(a):null;if(null!=c){var d="y"===c?"height":"width";switch(o){case R:e[c]=e[c]-(n[d]/2-i[d]/2);break;case P:e[c]=e[c]+(n[d]/2-i[d]/2)}}return e}function ut(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function gt(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function mt(t,e){void 0===e&&(e={});var n=e,i=n.placement,s=void 0===i?t.placement:i,a=n.strategy,o=void 0===a?t.strategy:a,r=n.boundary,l=void 0===r?"clippingParents":r,c=n.rootBoundary,d=void 0===c?F:c,h=n.elementContext,p=void 0===h?V:h,u=n.altBoundary,g=void 0!==u&&u,m=n.padding,f=void 0===m?0:m,b=ut("number"!=typeof f?f:gt(f,E)),y=p===V?"reference":V,v=t.rects.popper,_=t.elements[g?y:p],x=function(t,e,n,i){var s="clippingParents"===e?function(t){var e=it(tt(t)),n=["absolute","fixed"].indexOf(J(t).position)>=0&&B(t)?ot(t):t;return z(n)?e.filter(function(t){return z(t)&&rt(t,n)&&"body"!==Q(t)}):[]}(t):[].concat(e),a=[].concat(s,[n]),o=a[0],r=a.reduce(function(e,n){var s=ct(t,n,i);return e.top=W(s.top,e.top),e.right=U(s.right,e.right),e.bottom=U(s.bottom,e.bottom),e.left=W(s.left,e.left),e},ct(t,o,i));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}(z(_)?_:_.contextElement||H(t.elements.popper),l,d,o),w=K(t.elements.reference),D=pt({reference:w,element:v,strategy:"absolute",placement:s}),I=lt(Object.assign({},v,D)),k=p===V?I:w,T={top:x.top-k.top+b.top,bottom:k.bottom-x.bottom+b.bottom,left:x.left-k.left+b.left,right:k.right-x.right+b.right},O=t.modifiersData.offset;if(p===V&&O){var R=O[s];Object.keys(T).forEach(function(t){var e=[S,M].indexOf(t)>=0?1:-1,n=[C,M].indexOf(t)>=0?"y":"x";T[t]+=R[n]*e})}return T}const ft={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=n.mainAxis,a=void 0===s||s,o=n.altAxis,r=void 0===o||o,l=n.fallbackPlacements,c=n.padding,d=n.boundary,h=n.rootBoundary,p=n.altBoundary,u=n.flipVariations,g=void 0===u||u,m=n.allowedAutoPlacements,f=e.options.placement,b=D(f),y=l||(b!==f&&g?function(t){if(D(t)===O)return[];var e=w(t);return[k(t),e,k(e)]}(f):[w(f)]),v=[f].concat(y).reduce(function(t,n){return t.concat(D(n)===O?function(t,e){void 0===e&&(e={});var n=e,i=n.placement,s=n.boundary,a=n.rootBoundary,o=n.padding,r=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?N:l,d=dt(i),h=d?r?A:A.filter(function(t){return dt(t)===d}):E,p=h.filter(function(t){return c.indexOf(t)>=0});0===p.length&&(p=h);var u=p.reduce(function(e,n){return e[n]=mt(t,{placement:n,boundary:s,rootBoundary:a,padding:o})[D(n)],e},{});return Object.keys(u).sort(function(t,e){return u[t]-u[e]})}(e,{placement:n,boundary:d,rootBoundary:h,padding:c,flipVariations:g,allowedAutoPlacements:m}):n)},[]),_=e.rects.reference,x=e.rects.popper,I=new Map,P=!0,F=v[0],V=0;V<v.length;V++){var j=v[V],L=D(j),z=dt(j)===R,B=[C,M].indexOf(L)>=0,$=B?"width":"height",H=mt(e,{placement:j,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),W=B?z?S:T:z?M:C;_[$]>x[$]&&(W=w(W));var U=w(W),q=[];if(a&&q.push(H[L]<=0),r&&q.push(H[W]<=0,H[U]<=0),q.every(function(t){return t})){F=j,P=!1;break}I.set(j,q)}if(P)for(var Y=function(t){var e=v.find(function(e){var n=I.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return F=e,"break"},Z=g?3:1;Z>0&&"break"!==Y(Z);Z--);e.placement!==F&&(e.modifiersData[i]._skip=!0,e.placement=F,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return W(t,U(e,n))}function yt(t){var e=K(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}const vt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,s=n.mainAxis,a=void 0===s||s,o=n.altAxis,r=void 0!==o&&o,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,h=n.padding,p=n.tether,u=void 0===p||p,g=n.tetherOffset,m=void 0===g?0:g,f=mt(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),b=D(e.placement),y=dt(e.placement),v=!y,_=ht(b),x="x"===_?"y":"x",w=e.modifiersData.popperOffsets,I=e.rects.reference,k=e.rects.popper,O="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,E="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(w){if(a){var V,A="y"===_?C:T,N="y"===_?M:S,j="y"===_?"height":"width",L=w[_],z=L+f[A],B=L-f[N],$=u?-k[j]/2:0,H=y===R?I[j]:k[j],q=y===R?-k[j]:-I[j],Y=e.elements.arrow,Z=u&&Y?yt(Y):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=K[A],X=K[N],J=bt(0,I[j],Z[j]),Q=v?I[j]/2-$-J-G-E.mainAxis:H-J-G-E.mainAxis,tt=v?-I[j]/2+$+J+X+E.mainAxis:q+J+X+E.mainAxis,et=e.elements.arrow&&ot(e.elements.arrow),nt=et?"y"===_?et.clientTop||0:et.clientLeft||0:0,it=null!=(V=null==P?void 0:P[_])?V:0,st=L+tt-it,at=bt(u?U(z,L+Q-it-nt):z,L,u?W(B,st):B);w[_]=at,F[_]=at-L}if(r){var rt,lt="x"===_?C:T,ct="x"===_?M:S,pt=w[x],ut="y"===x?"height":"width",gt=pt+f[lt],ft=pt-f[ct],vt=-1!==[C,T].indexOf(b),_t=null!=(rt=null==P?void 0:P[x])?rt:0,xt=vt?gt:pt-I[ut]-k[ut]-_t+E.altAxis,wt=vt?pt+I[ut]+k[ut]-_t-E.altAxis:ft,Dt=u&&vt?function(t,e,n){var i=bt(t,e,n);return i>n?n:i}(xt,pt,wt):bt(u?xt:gt,pt,u?wt:ft);w[x]=Dt,F[x]=Dt-pt}e.modifiersData[i]=F}},requiresIfExists:["offset"]},_t={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,s=t.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,r=D(n.placement),l=ht(r),c=[T,S].indexOf(r)>=0?"height":"width";if(a&&o){var d=function(t,e){return ut("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:gt(t,E))}(s.padding,n),h=yt(a),p="y"===l?C:T,u="y"===l?M:S,g=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],m=o[l]-n.rects.reference[l],f=ot(a),b=f?"y"===l?f.clientHeight||0:f.clientWidth||0:0,y=g/2-m/2,v=d[p],_=b-h[c]-d[u],x=b/2-h[c]/2+y,w=bt(v,x,_),I=l;n.modifiersData[i]=((e={})[I]=w,e.centerOffset=w-x,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&rt(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function xt(t,e,n){void 0===n&&(n=!1);var i,s,a=B(e),o=B(e)&&function(t){var e=t.getBoundingClientRect(),n=q(e.width)/t.offsetWidth||1,i=q(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),r=H(e),l=K(t,o,n),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(a||!a&&!n)&&(("body"!==Q(e)||et(r))&&(c=(i=e)!==L(i)&&B(i)?{scrollLeft:(s=i).scrollLeft,scrollTop:s.scrollTop}:G(i)),B(e)?((d=K(e,!0)).x+=e.clientLeft,d.y+=e.clientTop):r&&(d.x=X(r))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function wt(t){var e=new Map,n=new Set,i=[];function s(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&s(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||s(t)}),i}var Dt={placement:"bottom",modifiers:[],strategy:"absolute"};function It(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function kt(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,i=void 0===n?[]:n,s=e.defaultOptions,a=void 0===s?Dt:s;return function(t,e,n){void 0===n&&(n=a);var s,o,r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Dt,a),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,d={state:r,setOptions:function(n){var s="function"==typeof n?n(r.options):n;h(),r.options=Object.assign({},a,r.options,s),r.scrollParents={reference:z(t)?it(t):t.contextElement?it(t.contextElement):[],popper:it(e)};var o,c,p=function(t){var e=wt(t);return j.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((o=[].concat(i,r.options.modifiers),c=o.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return r.orderedModifiers=p.filter(function(t){return t.enabled}),r.orderedModifiers.forEach(function(t){var e=t.name,n=t.options,i=void 0===n?{}:n,s=t.effect;if("function"==typeof s){var a=s({state:r,name:e,instance:d,options:i});l.push(a||function(){})}}),d.update()},forceUpdate:function(){if(!c){var t=r.elements,e=t.reference,n=t.popper;if(It(e,n)){r.rects={reference:xt(e,ot(n),"fixed"===r.options.strategy),popper:yt(n)},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach(function(t){return r.modifiersData[t.name]=Object.assign({},t.data)});for(var i=0;i<r.orderedModifiers.length;i++)if(!0!==r.reset){var s=r.orderedModifiers[i],a=s.fn,o=s.options,l=void 0===o?{}:o,h=s.name;"function"==typeof a&&(r=a({state:r,options:l,name:h,instance:d})||r)}else r.reset=!1,i=-1}}},update:(s=function(){return new Promise(function(t){d.forceUpdate(),t(r)})},function(){return o||(o=new Promise(function(t){Promise.resolve().then(function(){o=void 0,t(s())})})),o}),destroy:function(){h(),c=!0}};if(!It(t,e))return d;function h(){l.forEach(function(t){return t()}),l=[]}return d.setOptions(n).then(function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)}),d}}var Ct={passive:!0},Mt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function St(t){var e,n=t.popper,i=t.popperRect,s=t.placement,a=t.variation,o=t.offsets,r=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,h=t.isFixed,p=o.x,u=void 0===p?0:p,g=o.y,m=void 0===g?0:g,f="function"==typeof d?d({x:u,y:m}):{x:u,y:m};u=f.x,m=f.y;var b=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),v=T,_=C,x=window;if(c){var w=ot(n),D="clientHeight",I="clientWidth";w===L(n)&&"static"!==J(w=H(n)).position&&"absolute"===r&&(D="scrollHeight",I="scrollWidth"),(s===C||(s===T||s===S)&&a===P)&&(_=M,m-=(h&&w===x&&x.visualViewport?x.visualViewport.height:w[D])-i.height,m*=l?1:-1),s!==T&&(s!==C&&s!==M||a!==P)||(v=S,u-=(h&&w===x&&x.visualViewport?x.visualViewport.width:w[I])-i.width,u*=l?1:-1)}var k,O=Object.assign({position:r},c&&Mt),E=!0===d?function(t,e){var n=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:q(n*s)/s||0,y:q(i*s)/s||0}}({x:u,y:m},L(n)):{x:u,y:m};return u=E.x,m=E.y,l?Object.assign({},O,((k={})[_]=y?"0":"",k[v]=b?"0":"",k.transform=(x.devicePixelRatio||1)<=1?"translate("+u+"px, "+m+"px)":"translate3d("+u+"px, "+m+"px, 0)",k)):Object.assign({},O,((e={})[_]=y?m+"px":"",e[v]=b?u+"px":"",e.transform="",e))}var Tt=kt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,a=void 0===s||s,o=i.resize,r=void 0===o||o,l=L(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&c.forEach(function(t){t.addEventListener("scroll",n.update,Ct)}),r&&l.addEventListener("resize",n.update,Ct),function(){a&&c.forEach(function(t){t.removeEventListener("scroll",n.update,Ct)}),r&&l.removeEventListener("resize",n.update,Ct)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=pt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=void 0===i||i,a=n.adaptive,o=void 0===a||a,r=n.roundOffsets,l=void 0===r||r,c={placement:D(e.placement),variation:dt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,St(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,St(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},s=e.elements[t];B(s)&&Q(s)&&(Object.assign(s.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var i=e.elements[t],s=e.attributes[t]||{},a=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});B(i)&&Q(i)&&(Object.assign(i.style,a),Object.keys(s).forEach(function(t){i.removeAttribute(t)}))})}},requires:["computeStyles"]}]});const Ot={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,s=n.offset,a=void 0===s?[0,0]:s,o=N.reduce(function(t,n){return t[n]=function(t,e,n){var i=D(t),s=[T,C].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,o=a[0],r=a[1];return o=o||0,r=(r||0)*s,[T,S].indexOf(i)>=0?{x:r,y:o}:{x:o,y:r}}(n,e.rects,a),t},{}),r=o[e.placement],l=r.x,c=r.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=o}};function Et(t){return parseInt(`${t}`,10)}function Rt(t){return null!=t?`${t}`:""}function Pt(t,e,n=0){return Math.max(Math.min(t,e),n)}function Ft(t){return"string"==typeof t}function Vt(t){return!isNaN(Et(t))}function At(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function Nt(t){return null!=t}function jt(t){return t&&t.then}function Lt(t){return Vt(t)?`0${t}`.slice(-2):""}function zt(t,e){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(e)>=0}function Bt(t){return(t||document.body).getBoundingClientRect()}function $t(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const Ht={animation:!0,transitionTimerDelayMs:5},Wt=()=>{},{transitionTimerDelayMs:Ut}=Ht,qt=new Map,Yt=(t,e,n,i)=>{let s=i.context||{};const a=qt.get(e);if(a)switch(i.runningTransition){case"continue":return v.EMPTY;case"stop":t.run(()=>a.transition$.complete()),s=Object.assign(a.context,s),qt.delete(e)}const o=n(e,i.animation,s)||Wt;if(!i.animation||"none"===window.getComputedStyle(e).transitionProperty)return t.run(()=>o()),(0,v.of)(void 0).pipe(function(t){return e=>new v.Observable(n=>e.subscribe({next:e=>t.run(()=>n.next(e)),error:e=>t.run(()=>n.error(e)),complete:()=>t.run(()=>n.complete())}))}(t));const r=new v.Subject,l=new v.Subject,c=r.pipe((0,_.endWith)(!0));qt.set(e,{transition$:r,complete:()=>{l.next(),l.complete()},context:s});const d=function(t){const{transitionDelay:e,transitionDuration:n}=window.getComputedStyle(t);return 1e3*(parseFloat(e)+parseFloat(n))}(e);return t.runOutsideAngular(()=>{const n=(0,v.fromEvent)(e,"transitionend").pipe((0,_.takeUntil)(c),(0,_.filter)(({target:t})=>t===e)),i=(0,v.timer)(d+Ut).pipe((0,_.takeUntil)(c));(0,v.race)(i,n,l).pipe((0,_.takeUntil)(c)).subscribe(()=>{qt.delete(e),t.run(()=>{o(),r.next(),r.complete()})})}),r.asObservable()},Zt=(t,e,n)=>{let{direction:i,maxSize:s,dimension:a}=n;const{classList:o}=t;function r(){o.add("collapse"),"show"===i?o.add("show"):o.remove("show")}if(e)return s||(s=function(t,e){if("undefined"==typeof navigator)return"0px";const{classList:n}=t,i=n.contains("show");i||n.add("show"),t.style[e]="";const s=t.getBoundingClientRect()[e]+"px";return i||n.remove("show"),s}(t,a),n.maxSize=s,t.style[a]="show"!==i?s:"0px",o.remove("collapse"),o.remove("collapsing"),o.remove("show"),Bt(t),o.add("collapsing")),t.style[a]="show"===i?s:"0px",()=>{r(),o.remove("collapsing"),t.style[a]=""};r()};class Kt{constructor(){this.animation=Ht.animation}}Kt.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Kt,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Kt.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Kt,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Kt,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class Gt{constructor(t){this._ngbConfig=t,this.closeOthers=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Gt.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gt,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),Gt.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gt,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gt,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});let Xt=0;class Jt{constructor(t){this.templateRef=t}}Jt.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Jt,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),Jt.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Jt,isStandalone:!0,selector:"ng-template[ngbPanelHeader]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Jt,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPanelHeader]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class Qt{constructor(t){this.templateRef=t}}Qt.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qt,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),Qt.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Qt,isStandalone:!0,selector:"ng-template[ngbPanelTitle]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qt,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPanelTitle]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class te{constructor(t){this.templateRef=t}}te.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:te,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),te.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:te,isStandalone:!0,selector:"ng-template[ngbPanelContent]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:te,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPanelContent]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class ee{constructor(){this.disabled=!1,this.id="ngb-panel-"+Xt++,this.isOpen=!1,this.initClassDone=!1,this.transitionRunning=!1,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter}ngAfterContentChecked(){this.titleTpl=this.titleTpls.first,this.headerTpl=this.headerTpls.first,this.contentTpl=this.contentTpls.first}}ee.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ee,deps:[],target:m["ɵɵFactoryTarget"].Directive}),ee.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ee,isStandalone:!0,selector:"ngb-panel",inputs:{disabled:"disabled",id:"id",title:"title",type:"type",cardClass:"cardClass"},outputs:{shown:"shown",hidden:"hidden"},queries:[{propertyName:"titleTpls",predicate:Qt},{propertyName:"headerTpls",predicate:Jt},{propertyName:"contentTpls",predicate:te}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ee,decorators:[{type:m.Directive,args:[{selector:"ngb-panel",standalone:!0}]}],propDecorators:{disabled:[{type:m.Input}],id:[{type:m.Input}],title:[{type:m.Input}],type:[{type:m.Input}],cardClass:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}],titleTpls:[{type:m.ContentChildren,args:[Qt,{descendants:!1}]}],headerTpls:[{type:m.ContentChildren,args:[Jt,{descendants:!1}]}],contentTpls:[{type:m.ContentChildren,args:[te,{descendants:!1}]}]}});class ne{constructor(t){this._El=t,this.ngbRef=new m.EventEmitter}ngOnInit(){this.ngbRef.emit(this._El.nativeElement)}ngOnDestroy(){this.ngbRef.emit(null)}}ne.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ne,deps:[{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),ne.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ne,isStandalone:!0,selector:"[ngbRef]",outputs:{ngbRef:"ngbRef"},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ne,decorators:[{type:m.Directive,args:[{selector:"[ngbRef]",standalone:!0}]}],ctorParameters:function(){return[{type:m.ElementRef}]},propDecorators:{ngbRef:[{type:m.Output}]}});class ie{constructor(t,e){this.accordion=t,this.panel=e}set ngbPanelToggle(t){t&&(this.panel=t)}}ie.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ie,deps:[{token:(0,m.forwardRef)(()=>se)},{token:ee,host:!0,optional:!0}],target:m["ɵɵFactoryTarget"].Directive}),ie.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ie,isStandalone:!0,selector:"button[ngbPanelToggle]",inputs:{ngbPanelToggle:"ngbPanelToggle"},host:{attributes:{type:"button"},listeners:{click:"accordion.toggle(panel.id)"},properties:{disabled:"panel.disabled","class.collapsed":"!panel.isOpen","attr.aria-expanded":"panel.isOpen","attr.aria-controls":"panel.id"}},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ie,decorators:[{type:m.Directive,args:[{selector:"button[ngbPanelToggle]",standalone:!0,host:{type:"button","[disabled]":"panel.disabled","[class.collapsed]":"!panel.isOpen","[attr.aria-expanded]":"panel.isOpen","[attr.aria-controls]":"panel.id","(click)":"accordion.toggle(panel.id)"}}]}],ctorParameters:function(){return[{type:se,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>se)]}]},{type:ee,decorators:[{type:m.Optional},{type:m.Host}]}]},propDecorators:{ngbPanelToggle:[{type:m.Input}]}});class se{constructor(t,e,n){this._ngZone=e,this._changeDetector=n,this.activeIds=[],this.destroyOnHide=!0,this.panelChange=new m.EventEmitter,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this.animation=t.animation,this.type=t.type,this.closeOtherPanels=t.closeOthers}isExpanded(t){return this.activeIds.indexOf(t)>-1}expand(t){this._changeOpenState(this._findPanelById(t),!0)}expandAll(){this.closeOtherPanels?0===this.activeIds.length&&this.panels.length&&this._changeOpenState(this.panels.first,!0):this.panels.forEach(t=>this._changeOpenState(t,!0))}collapse(t){this._changeOpenState(this._findPanelById(t),!1)}collapseAll(){this.panels.forEach(t=>{this._changeOpenState(t,!1)})}toggle(t){const e=this._findPanelById(t);e&&this._changeOpenState(e,!e.isOpen)}ngAfterContentChecked(){Ft(this.activeIds)&&(this.activeIds=this.activeIds.split(/\s*,\s*/)),this.panels.forEach(t=>{t.isOpen=!t.disabled&&this.activeIds.indexOf(t.id)>-1}),this.activeIds.length>1&&this.closeOtherPanels&&(this._closeOthers(this.activeIds[0],!1),this._updateActiveIds()),this._ngZone.onStable.pipe((0,_.take)(1)).subscribe(()=>{this.panels.forEach(t=>{const e=t.panelDiv;e?t.initClassDone||(t.initClassDone=!0,Yt(this._ngZone,e,Zt,{animation:!1,runningTransition:"continue",context:{direction:t.isOpen?"show":"hide",dimension:"height"}})):t.initClassDone=!1})})}_changeOpenState(t,e){if(null!=t&&!t.disabled&&t.isOpen!==e){let n=!1;this.panelChange.emit({panelId:t.id,nextState:e,preventDefault:()=>{n=!0}}),n||(t.isOpen=e,t.transitionRunning=!0,e&&this.closeOtherPanels&&this._closeOthers(t.id),this._updateActiveIds(),this._runTransitions(this.animation))}}_closeOthers(t,e=!0){this.panels.forEach(n=>{n.id!==t&&n.isOpen&&(n.isOpen=!1,n.transitionRunning=e)})}_findPanelById(t){return this.panels.find(e=>e.id===t)||null}_updateActiveIds(){this.activeIds=this.panels.filter(t=>t.isOpen&&!t.disabled).map(t=>t.id)}_runTransitions(t){this._changeDetector.detectChanges(),this.panels.forEach(e=>{if(e.transitionRunning){const n=e.panelDiv;Yt(this._ngZone,n,Zt,{animation:t,runningTransition:"stop",context:{direction:e.isOpen?"show":"hide",dimension:"height"}}).subscribe(()=>{e.transitionRunning=!1;const{id:t}=e;e.isOpen?(e.shown.emit(),this.shown.emit(t)):(e.hidden.emit(),this.hidden.emit(t))})}})}}se.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:se,deps:[{token:Gt},{token:m.NgZone},{token:m.ChangeDetectorRef}],target:m["ɵɵFactoryTarget"].Component}),se.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:se,isStandalone:!0,selector:"ngb-accordion",inputs:{animation:"animation",activeIds:"activeIds",closeOtherPanels:["closeOthers","closeOtherPanels"],destroyOnHide:"destroyOnHide",type:"type"},outputs:{panelChange:"panelChange",shown:"shown",hidden:"hidden"},host:{attributes:{role:"tablist"},properties:{"attr.aria-multiselectable":"!closeOtherPanels"},classAttribute:"accordion"},queries:[{propertyName:"panels",predicate:ee}],exportAs:["ngbAccordion"],ngImport:f,template:'\n\t\t<ng-template #t ngbPanelHeader let-panel>\n\t\t\t<button class="accordion-button" [ngbPanelToggle]="panel">\n\t\t\t\t{{ panel.title }}\n\t\t\t\t<ng-template [ngTemplateOutlet]="panel.titleTpl?.templateRef"></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t\t<ng-template ngFor let-panel [ngForOf]="panels">\n\t\t\t<div [class]="\'accordion-item \' + (panel.cardClass || \'\')">\n\t\t\t\t<div\n\t\t\t\t\trole="tab"\n\t\t\t\t\tid="{{ panel.id }}-header"\n\t\t\t\t\t[class]="\'accordion-header \' + (panel.type ? \'bg-\' + panel.type : type ? \'bg-\' + type : \'\')"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="panel.headerTpl?.templateRef || t"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: panel, opened: panel.isOpen }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tid="{{ panel.id }}"\n\t\t\t\t\t(ngbRef)="panel.panelDiv = $event"\n\t\t\t\t\trole="tabpanel"\n\t\t\t\t\t[attr.aria-labelledby]="panel.id + \'-header\'"\n\t\t\t\t\t*ngIf="!destroyOnHide || panel.isOpen || panel.transitionRunning"\n\t\t\t\t>\n\t\t\t\t\t<div class="accordion-body">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]="panel.contentTpl?.templateRef || null"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:ie,selector:"button[ngbPanelToggle]",inputs:["ngbPanelToggle"]},{kind:"directive",type:ne,selector:"[ngbRef]",outputs:["ngbRef"]},{kind:"directive",type:Jt,selector:"ng-template[ngbPanelHeader]"},{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:se,decorators:[{type:m.Component,args:[{selector:"ngb-accordion",exportAs:"ngbAccordion",standalone:!0,imports:[b.NgFor,b.NgTemplateOutlet,ie,ne,Jt,b.NgIf],encapsulation:m.ViewEncapsulation.None,host:{class:"accordion",role:"tablist","[attr.aria-multiselectable]":"!closeOtherPanels"},template:'\n\t\t<ng-template #t ngbPanelHeader let-panel>\n\t\t\t<button class="accordion-button" [ngbPanelToggle]="panel">\n\t\t\t\t{{ panel.title }}\n\t\t\t\t<ng-template [ngTemplateOutlet]="panel.titleTpl?.templateRef"></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t\t<ng-template ngFor let-panel [ngForOf]="panels">\n\t\t\t<div [class]="\'accordion-item \' + (panel.cardClass || \'\')">\n\t\t\t\t<div\n\t\t\t\t\trole="tab"\n\t\t\t\t\tid="{{ panel.id }}-header"\n\t\t\t\t\t[class]="\'accordion-header \' + (panel.type ? \'bg-\' + panel.type : type ? \'bg-\' + type : \'\')"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="panel.headerTpl?.templateRef || t"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: panel, opened: panel.isOpen }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tid="{{ panel.id }}"\n\t\t\t\t\t(ngbRef)="panel.panelDiv = $event"\n\t\t\t\t\trole="tabpanel"\n\t\t\t\t\t[attr.aria-labelledby]="panel.id + \'-header\'"\n\t\t\t\t\t*ngIf="!destroyOnHide || panel.isOpen || panel.transitionRunning"\n\t\t\t\t>\n\t\t\t\t\t<div class="accordion-body">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]="panel.contentTpl?.templateRef || null"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t'}]}],ctorParameters:function(){return[{type:Gt},{type:m.NgZone},{type:m.ChangeDetectorRef}]},propDecorators:{panels:[{type:m.ContentChildren,args:[ee]}],animation:[{type:m.Input}],activeIds:[{type:m.Input}],closeOtherPanels:[{type:m.Input,args:["closeOthers"]}],destroyOnHide:[{type:m.Input}],type:[{type:m.Input}],panelChange:[{type:m.Output}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});class ae{constructor(t){this._ngbConfig=t,this.horizontal=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ae.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ae,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),ae.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ae,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ae,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});class oe{constructor(t,e,n){this._element=t,this._zone=n,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new m.EventEmitter,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this.animation=e.animation,this.horizontal=e.horizontal}set collapsed(t){this._isCollapsed!==t&&(this._isCollapsed=t,this._afterInit&&this._runTransitionWithEvents(t,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(t=this._isCollapsed){this.collapsed=!t,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(t,e){return Yt(this._zone,this._element.nativeElement,Zt,{animation:e,runningTransition:"stop",context:{direction:t?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(t,e){this._runTransition(t,e).subscribe(()=>{t?this.hidden.emit():this.shown.emit()})}}oe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:oe,deps:[{token:m.ElementRef},{token:ae},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Directive}),oe.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:oe,isStandalone:!0,selector:"[ngbCollapse]",inputs:{animation:"animation",collapsed:["ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},host:{properties:{"class.collapse-horizontal":"horizontal"}},exportAs:["ngbCollapse"],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:oe,decorators:[{type:m.Directive,args:[{selector:"[ngbCollapse]",exportAs:"ngbCollapse",standalone:!0,host:{"[class.collapse-horizontal]":"horizontal"}}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:ae},{type:m.NgZone}]},propDecorators:{animation:[{type:m.Input}],collapsed:[{type:m.Input,args:["ngbCollapse"]}],ngbCollapseChange:[{type:m.Output}],horizontal:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});let re=0;class le{constructor(){this._appRef=(0,m.inject)(m.ApplicationRef),this._element=(0,m.inject)(m.ElementRef).nativeElement,this._item=(0,m.inject)(ue),this._viewRef=null}ngAfterContentChecked(){this._bodyTpl&&(this._item.animatingBodyCollapse||!this._item.destroyOnHide?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef&&(this._appRef.detachView(this._viewRef),this._viewRef.destroy(),this._viewRef=null)}_createViewIfNotExists(){if(!this._viewRef){this._viewRef=this._bodyTpl.createEmbeddedView(null),this._viewRef.detectChanges(),this._appRef.attachView(this._viewRef);for(const t of this._viewRef.rootNodes)this._element.appendChild(t)}}}le.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:le,deps:[],target:m["ɵɵFactoryTarget"].Directive}),le.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:le,isStandalone:!0,selector:"[ngbAccordionBody]",host:{properties:{"class.accordion-body":"true"}},queries:[{propertyName:"_bodyTpl",first:!0,predicate:m.TemplateRef,descendants:!0,static:!0}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:le,decorators:[{type:m.Directive,args:[{selector:"[ngbAccordionBody]",standalone:!0,host:{"[class.accordion-body]":"true"}}]}],propDecorators:{_bodyTpl:[{type:m.ContentChild,args:[m.TemplateRef,{static:!0}]}]}});class ce{constructor(t,e){this.item=t,this.ngbCollapse=e}}ce.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ce,deps:[{token:(0,m.forwardRef)(()=>ue)},{token:oe}],target:m["ɵɵFactoryTarget"].Directive}),ce.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ce,isStandalone:!0,selector:"[ngbAccordionCollapse]",host:{attributes:{role:"region"},properties:{"class.accordion-collapse":"true",id:"item.collapseId","attr.aria-labelledby":"item.toggleId"}},exportAs:["ngbAccordionCollapse"],hostDirectives:[{directive:oe}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ce,decorators:[{type:m.Directive,args:[{exportAs:"ngbAccordionCollapse",standalone:!0,selector:"[ngbAccordionCollapse]",host:{role:"region","[class.accordion-collapse]":"true","[id]":"item.collapseId","[attr.aria-labelledby]":"item.toggleId"},hostDirectives:[{directive:oe}]}]}],ctorParameters:function(){return[{type:ue,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ue)]}]},{type:oe}]}});class de{constructor(t,e){this.item=t,this.accordion=e}}de.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:de,deps:[{token:(0,m.forwardRef)(()=>ue)},{token:(0,m.forwardRef)(()=>ge)}],target:m["ɵɵFactoryTarget"].Directive}),de.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:de,isStandalone:!0,selector:"[ngbAccordionToggle]",host:{listeners:{click:"!item.disabled && accordion.toggle(item.id)"},properties:{id:"item.toggleId","class.collapsed":"item.collapsed","attr.aria-controls":"item.collapseId","attr.aria-expanded":"!item.collapsed"}},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:de,decorators:[{type:m.Directive,args:[{selector:"[ngbAccordionToggle]",standalone:!0,host:{"[id]":"item.toggleId","[class.collapsed]":"item.collapsed","[attr.aria-controls]":"item.collapseId","[attr.aria-expanded]":"!item.collapsed","(click)":"!item.disabled && accordion.toggle(item.id)"}}]}],ctorParameters:function(){return[{type:ue,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ue)]}]},{type:ge,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ge)]}]}]}});class he{constructor(t){this.item=t}}he.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:he,deps:[{token:(0,m.forwardRef)(()=>ue)}],target:m["ɵɵFactoryTarget"].Directive}),he.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:he,isStandalone:!0,selector:"button[ngbAccordionButton]",host:{attributes:{type:"button"},properties:{disabled:"item.disabled","class.accordion-button":"true"}},hostDirectives:[{directive:de}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:he,decorators:[{type:m.Directive,args:[{selector:"button[ngbAccordionButton]",standalone:!0,host:{"[disabled]":"item.disabled","[class.accordion-button]":"true",type:"button"},hostDirectives:[{directive:de}]}]}],ctorParameters:function(){return[{type:ue,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ue)]}]}]}});class pe{constructor(t){this.item=t}}pe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:pe,deps:[{token:(0,m.forwardRef)(()=>ue)}],target:m["ɵɵFactoryTarget"].Directive}),pe.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:pe,isStandalone:!0,selector:"[ngbAccordionHeader]",host:{attributes:{role:"heading"},properties:{"class.accordion-header":"true","class.collapsed":"item.collapsed"}},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:pe,decorators:[{type:m.Directive,args:[{selector:"[ngbAccordionHeader]",standalone:!0,host:{role:"heading","[class.accordion-header]":"true","[class.collapsed]":"item.collapsed"}}]}],ctorParameters:function(){return[{type:ue,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ue)]}]}]}});class ue{constructor(t,e){this._accordion=t,this._cd=e,this._subscriptions=[],this._collapsed=!0,this._id="ngb-accordion-item-"+re++,this.animatingBodyCollapse=!1,this.destroyOnHide=this._accordion.destroyOnHide,this.disabled=!1,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter}set id(t){Ft(t)&&""!==t&&(this._id=t)}set collapsed(t){if(this.collapsed!==t){if(this.collapsed&&!this._accordion._ensureCanExpand(this))return;this._collapsed=t,this._cd.markForCheck(),this.collapsed||(this.animatingBodyCollapse=!0,this._cd.detectChanges()),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=this.collapsed}}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}ngAfterContentInit(){const{ngbCollapse:t}=this._collapse;t.animation=!1,t.collapsed=this.collapsed,t.animation=this._accordion.animation,this._subscriptions.push(t.hidden.subscribe(()=>{this.animatingBodyCollapse=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),t.shown.subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id)}))}ngOnDestroy(){this._subscriptions.forEach(t=>t.unsubscribe())}toggle(){this.collapsed=!this.collapsed}expand(){this.collapsed=!1}collapse(){this.collapsed=!0}}ue.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ue,deps:[{token:(0,m.forwardRef)(()=>ge)},{token:m.ChangeDetectorRef}],target:m["ɵɵFactoryTarget"].Directive}),ue.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ue,isStandalone:!0,selector:"[ngbAccordionItem]",inputs:{id:["ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.accordion-item":"true",id:"id"}},queries:[{propertyName:"_collapse",first:!0,predicate:ce,descendants:!0,static:!0}],exportAs:["ngbAccordionItem"],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ue,decorators:[{type:m.Directive,args:[{selector:"[ngbAccordionItem]",exportAs:"ngbAccordionItem",standalone:!0,host:{"[class.accordion-item]":"true","[id]":"id"}}]}],ctorParameters:function(){return[{type:ge,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ge)]}]},{type:m.ChangeDetectorRef}]},propDecorators:{_collapse:[{type:m.ContentChild,args:[ce,{static:!0}]}],id:[{type:m.Input,args:["ngbAccordionItem"]}],destroyOnHide:[{type:m.Input}],disabled:[{type:m.Input}],collapsed:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});class ge{constructor(t){this.destroyOnHide=!0,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=t.animation,this.closeOthers=t.closeOthers}toggle(t){var e;null===(e=this._getItem(t))||void 0===e||e.toggle()}expand(t){var e;null===(e=this._getItem(t))||void 0===e||e.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(t=>!t.collapsed)||this._items.first.expand():this._items.forEach(t=>t.expand()))}collapse(t){var e;null===(e=this._getItem(t))||void 0===e||e.collapse()}collapseAll(){var t;null===(t=this._items)||void 0===t||t.forEach(t=>t.collapse())}isExpanded(t){const e=this._getItem(t);return!!e&&!e.collapsed}_ensureCanExpand(t){var e;return!(this.closeOthers&&(this._items?(null===(e=this._items.find(e=>!e.collapsed&&t!==e))||void 0===e||e.collapse(),0):this._anItemWasAlreadyExpandedDuringInitialisation||(this._anItemWasAlreadyExpandedDuringInitialisation=!0,0)))}_getItem(t){var e;return null===(e=this._items)||void 0===e?void 0:e.find(e=>e.id===t)}}ge.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ge,deps:[{token:Gt}],target:m["ɵɵFactoryTarget"].Directive}),ge.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ge,isStandalone:!0,selector:"[ngbAccordion]",inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.accordion":"true"}},queries:[{propertyName:"_items",predicate:ue}],exportAs:["ngbAccordion"],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ge,decorators:[{type:m.Directive,args:[{selector:"[ngbAccordion]",standalone:!0,exportAs:"ngbAccordion",host:{"[class.accordion]":"true"}}]}],ctorParameters:function(){return[{type:Gt}]},propDecorators:{_items:[{type:m.ContentChildren,args:[ue,{descendants:!1}]}],animation:[{type:m.Input}],closeOthers:[{type:m.Input}],destroyOnHide:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});const me=[se,ee,Qt,te,Jt,ie,he,ge,ue,pe,de,le,ce];class fe{}fe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fe,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),fe.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:fe,imports:[se,ee,Qt,te,Jt,ie,he,ge,ue,pe,de,le,ce],exports:[se,ee,Qt,te,Jt,ie,he,ge,ue,pe,de,le,ce]}),fe.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fe,imports:[se]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fe,decorators:[{type:m.NgModule,args:[{imports:me,exports:me}]}]});const be=({classList:t})=>{t.remove("show")};class ye{constructor(t){this._ngbConfig=t,this.dismissible=!0,this.type="warning"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ye.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ye,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),ye.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ye,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ye,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});class ve{constructor(t,e,n,i){this._renderer=e,this._element=n,this._zone=i,this.closed=new m.EventEmitter,this.dismissible=t.dismissible,this.type=t.type,this.animation=t.animation}close(){const t=Yt(this._zone,this._element.nativeElement,be,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>this.closed.emit()),t}ngOnChanges(t){const e=t.type;e&&!e.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${e.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${e.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}ve.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ve,deps:[{token:ye},{token:m.Renderer2},{token:m.ElementRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),ve.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ve,isStandalone:!0,selector:"ngb-alert",inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},host:{attributes:{role:"alert"},properties:{"class.fade":"animation","class.alert-dismissible":"dismissible"},classAttribute:"alert show"},exportAs:["ngbAlert"],usesOnChanges:!0,ngImport:f,template:'\n\t\t<ng-content></ng-content>\n\t\t<button\n\t\t\t*ngIf="dismissible"\n\t\t\ttype="button"\n\t\t\tclass="btn-close"\n\t\t\taria-label="Close"\n\t\t\ti18n-aria-label="@@ngb.alert.close"\n\t\t\t(click)="close()"\n\t\t>\n\t\t</button>\n\t',isInline:!0,styles:["ngb-alert{display:block}\n"],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ve,decorators:[{type:m.Component,args:[{selector:"ngb-alert",exportAs:"ngbAlert",standalone:!0,imports:[b.NgIf],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{role:"alert",class:"alert show","[class.fade]":"animation","[class.alert-dismissible]":"dismissible"},template:'\n\t\t<ng-content></ng-content>\n\t\t<button\n\t\t\t*ngIf="dismissible"\n\t\t\ttype="button"\n\t\t\tclass="btn-close"\n\t\t\taria-label="Close"\n\t\t\ti18n-aria-label="@@ngb.alert.close"\n\t\t\t(click)="close()"\n\t\t>\n\t\t</button>\n\t',styles:["ngb-alert{display:block}\n"]}]}],ctorParameters:function(){return[{type:ye},{type:m.Renderer2},{type:m.ElementRef},{type:m.NgZone}]},propDecorators:{animation:[{type:m.Input}],dismissible:[{type:m.Input}],type:[{type:m.Input}],closed:[{type:m.Output}]}});class _e{}var xe;_e.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_e,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),_e.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:_e,imports:[ve],exports:[ve]}),_e.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_e,imports:[ve]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_e,decorators:[{type:m.NgModule,args:[{imports:[ve],exports:[ve]}]}]}),function(t){t.START="start",t.END="end"}(xe||(xe={}));const we=({classList:t})=>t.contains("carousel-item-start")||t.contains("carousel-item-end"),De=t=>{t.remove("carousel-item-start"),t.remove("carousel-item-end")},Ie=t=>{De(t),t.remove("carousel-item-prev"),t.remove("carousel-item-next")},ke=(t,e,{direction:n})=>{const{classList:i}=t;return e?(we(t)?De(i):(i.add("carousel-item-"+(n===xe.START?"next":"prev")),Bt(t),i.add("carousel-item-"+n)),()=>{Ie(i),i.add("active")}):(De(i),Ie(i),void i.add("active"))},Ce=(t,e,{direction:n})=>{const{classList:i}=t;return e?(we(t)?De(i):i.add("carousel-item-"+n),()=>{Ie(i),i.remove("active")}):(De(i),Ie(i),void i.remove("active"))};class Me{constructor(t){this._ngbConfig=t,this.interval=5e3,this.wrap=!0,this.keyboard=!0,this.pauseOnHover=!0,this.pauseOnFocus=!0,this.showNavigationArrows=!0,this.showNavigationIndicators=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Me.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Me,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),Me.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Me,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Me,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});let Se=0;class Te{constructor(t){this.tplRef=t,this.id="ngb-slide-"+Se++,this.slid=new m.EventEmitter}}Te.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Te,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),Te.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Te,isStandalone:!0,selector:"ng-template[ngbSlide]",inputs:{id:"id"},outputs:{slid:"slid"},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Te,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbSlide]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]},propDecorators:{id:[{type:m.Input}],slid:[{type:m.Output}]}});class Oe{constructor(t,e,n,i,s){this._platformId=e,this._ngZone=n,this._cd=i,this._container=s,this.NgbSlideEventSource=Ee,this._destroy$=new v.Subject,this._interval$=new v.BehaviorSubject(0),this._mouseHover$=new v.BehaviorSubject(!1),this._focused$=new v.BehaviorSubject(!1),this._pauseOnHover$=new v.BehaviorSubject(!1),this._pauseOnFocus$=new v.BehaviorSubject(!1),this._pause$=new v.BehaviorSubject(!1),this._wrap$=new v.BehaviorSubject(!1),this.slide=new m.EventEmitter,this.slid=new m.EventEmitter,this._transitionIds=null,this.animation=t.animation,this.interval=t.interval,this.wrap=t.wrap,this.keyboard=t.keyboard,this.pauseOnHover=t.pauseOnHover,this.pauseOnFocus=t.pauseOnFocus,this.showNavigationArrows=t.showNavigationArrows,this.showNavigationIndicators=t.showNavigationIndicators}set interval(t){this._interval$.next(t)}get interval(){return this._interval$.value}set wrap(t){this._wrap$.next(t)}get wrap(){return this._wrap$.value}set pauseOnHover(t){this._pauseOnHover$.next(t)}get pauseOnHover(){return this._pauseOnHover$.value}set pauseOnFocus(t){this._pauseOnFocus$.next(t)}get pauseOnFocus(){return this._pauseOnFocus$.value}set mouseHover(t){this._mouseHover$.next(t)}get mouseHover(){return this._mouseHover$.value}set focused(t){this._focused$.next(t)}get focused(){return this._focused$.value}arrowLeft(){this.focus(),this.prev(Ee.ARROW_LEFT)}arrowRight(){this.focus(),this.next(Ee.ARROW_RIGHT)}ngAfterContentInit(){(0,b.isPlatformBrowser)(this._platformId)&&this._ngZone.runOutsideAngular(()=>{const t=(0,v.combineLatest)([this.slide.pipe((0,_.map)(t=>t.current),(0,_.startWith)(this.activeId)),this._wrap$,this.slides.changes.pipe((0,_.startWith)(null))]).pipe((0,_.map)(([t,e])=>{const n=this.slides.toArray(),i=this._getSlideIdxById(t);return e?n.length>1:i<n.length-1}),(0,_.distinctUntilChanged)());(0,v.combineLatest)([this._pause$,this._pauseOnHover$,this._mouseHover$,this._pauseOnFocus$,this._focused$,this._interval$,t]).pipe((0,_.map)(([t,e,n,i,s,a,o])=>t||e&&n||i&&s||!o?0:a),(0,_.distinctUntilChanged)(),(0,_.switchMap)(t=>t>0?(0,v.timer)(t,t):v.NEVER),(0,_.takeUntil)(this._destroy$)).subscribe(()=>this._ngZone.run(()=>this.next(Ee.TIMER)))}),this.slides.changes.pipe((0,_.takeUntil)(this._destroy$)).subscribe(()=>{var t;null===(t=this._transitionIds)||void 0===t||t.forEach(t=>(t=>{var e;null===(e=qt.get(t))||void 0===e||e.complete()})(this._getSlideElement(t))),this._transitionIds=null,this._cd.markForCheck(),this._ngZone.onStable.pipe((0,_.take)(1)).subscribe(()=>{for(const{id:t}of this.slides){const e=this._getSlideElement(t);t===this.activeId?e.classList.add("active"):e.classList.remove("active")}})})}ngAfterContentChecked(){let t=this._getSlideById(this.activeId);this.activeId=t?t.id:this.slides.length?this.slides.first.id:""}ngAfterViewInit(){if(this.activeId){const t=this._getSlideElement(this.activeId);t&&t.classList.add("active")}}ngOnDestroy(){this._destroy$.next()}select(t,e){this._cycleToSelected(t,this._getSlideEventDirection(this.activeId,t),e)}prev(t){this._cycleToSelected(this._getPrevSlide(this.activeId),xe.END,t)}next(t){this._cycleToSelected(this._getNextSlide(this.activeId),xe.START,t)}pause(){this._pause$.next(!0)}cycle(){this._pause$.next(!1)}focus(){this._container.nativeElement.focus()}_cycleToSelected(t,e,n){const i=this._transitionIds;if(i&&(i[0]!==t||i[1]!==this.activeId))return;let s=this._getSlideById(t);if(s&&s.id!==this.activeId){this._transitionIds=[this.activeId,t],this.slide.emit({prev:this.activeId,current:s.id,direction:e,paused:this._pause$.value,source:n});const i={animation:this.animation,runningTransition:"stop",context:{direction:e}},a=[],o=this._getSlideById(this.activeId);if(o){const t=Yt(this._ngZone,this._getSlideElement(o.id),Ce,i);t.subscribe(()=>{o.slid.emit({isShown:!1,direction:e,source:n})}),a.push(t)}const r=this.activeId;this.activeId=s.id;const l=this._getSlideById(this.activeId),c=Yt(this._ngZone,this._getSlideElement(s.id),ke,i);c.subscribe(()=>{null==l||l.slid.emit({isShown:!0,direction:e,source:n})}),a.push(c),(0,v.zip)(...a).pipe((0,_.take)(1)).subscribe(()=>{this._transitionIds=null,this.slid.emit({prev:r,current:s.id,direction:e,paused:this._pause$.value,source:n})})}this._cd.markForCheck()}_getSlideEventDirection(t,e){return this._getSlideIdxById(t)>this._getSlideIdxById(e)?xe.END:xe.START}_getSlideById(t){return this.slides.find(e=>e.id===t)||null}_getSlideIdxById(t){const e=this._getSlideById(t);return null!=e?this.slides.toArray().indexOf(e):-1}_getNextSlide(t){const e=this.slides.toArray(),n=this._getSlideIdxById(t);return n===e.length-1?this.wrap?e[0].id:e[e.length-1].id:e[n+1].id}_getPrevSlide(t){const e=this.slides.toArray(),n=this._getSlideIdxById(t);return 0===n?this.wrap?e[e.length-1].id:e[0].id:e[n-1].id}_getSlideElement(t){return this._container.nativeElement.querySelector(`#slide-${t}`)}}var Ee,Re,Pe;Oe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Oe,deps:[{token:Me},{token:m.PLATFORM_ID},{token:m.NgZone},{token:m.ChangeDetectorRef},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Component}),Oe.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Oe,isStandalone:!0,selector:"ngb-carousel",inputs:{animation:"animation",activeId:"activeId",interval:"interval",wrap:"wrap",keyboard:"keyboard",pauseOnHover:"pauseOnHover",pauseOnFocus:"pauseOnFocus",showNavigationArrows:"showNavigationArrows",showNavigationIndicators:"showNavigationIndicators"},outputs:{slide:"slide",slid:"slid"},host:{attributes:{tabIndex:"0"},listeners:{"keydown.arrowLeft":"keyboard && arrowLeft()","keydown.arrowRight":"keyboard && arrowRight()",mouseenter:"mouseHover = true",mouseleave:"mouseHover = false",focusin:"focused = true",focusout:"focused = false"},properties:{"style.display":'"block"',"attr.aria-activedescendant":"'slide-' + activeId"},classAttribute:"carousel slide"},queries:[{propertyName:"slides",predicate:Te}],exportAs:["ngbCarousel"],ngImport:f,template:'\n\t\t<div class="carousel-indicators" [class.visually-hidden]="!showNavigationIndicators" role="tablist">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tdata-bs-target\n\t\t\t\t*ngFor="let slide of slides"\n\t\t\t\t[class.active]="slide.id === activeId"\n\t\t\t\trole="tab"\n\t\t\t\t[attr.aria-labelledby]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-controls]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-selected]="slide.id === activeId"\n\t\t\t\t(click)="focus(); select(slide.id, NgbSlideEventSource.INDICATOR)"\n\t\t\t></button>\n\t\t</div>\n\t\t<div class="carousel-inner">\n\t\t\t<div\n\t\t\t\t*ngFor="let slide of slides; index as i; count as c"\n\t\t\t\tclass="carousel-item"\n\t\t\t\t[id]="\'slide-\' + slide.id"\n\t\t\t\trole="tabpanel"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclass="visually-hidden"\n\t\t\t\t\ti18n="Currently selected slide number read by screen reader@@ngb.carousel.slide-number"\n\t\t\t\t>\n\t\t\t\t\tSlide {{ i + 1 }} of {{ c }}\n\t\t\t\t</span>\n\t\t\t\t<ng-template [ngTemplateOutlet]="slide.tplRef"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t\t<button class="carousel-control-prev" type="button" (click)="arrowLeft()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-prev-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.previous">Previous</span>\n\t\t</button>\n\t\t<button class="carousel-control-next" type="button" (click)="arrowRight()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-next-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.next">Next</span>\n\t\t</button>\n\t',isInline:!0,dependencies:[{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Oe,decorators:[{type:m.Component,args:[{selector:"ngb-carousel",exportAs:"ngbCarousel",standalone:!0,imports:[b.NgFor,b.NgTemplateOutlet,b.NgIf],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{class:"carousel slide","[style.display]":'"block"',tabIndex:"0","(keydown.arrowLeft)":"keyboard && arrowLeft()","(keydown.arrowRight)":"keyboard && arrowRight()","(mouseenter)":"mouseHover = true","(mouseleave)":"mouseHover = false","(focusin)":"focused = true","(focusout)":"focused = false","[attr.aria-activedescendant]":"'slide-' + activeId"},template:'\n\t\t<div class="carousel-indicators" [class.visually-hidden]="!showNavigationIndicators" role="tablist">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tdata-bs-target\n\t\t\t\t*ngFor="let slide of slides"\n\t\t\t\t[class.active]="slide.id === activeId"\n\t\t\t\trole="tab"\n\t\t\t\t[attr.aria-labelledby]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-controls]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-selected]="slide.id === activeId"\n\t\t\t\t(click)="focus(); select(slide.id, NgbSlideEventSource.INDICATOR)"\n\t\t\t></button>\n\t\t</div>\n\t\t<div class="carousel-inner">\n\t\t\t<div\n\t\t\t\t*ngFor="let slide of slides; index as i; count as c"\n\t\t\t\tclass="carousel-item"\n\t\t\t\t[id]="\'slide-\' + slide.id"\n\t\t\t\trole="tabpanel"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclass="visually-hidden"\n\t\t\t\t\ti18n="Currently selected slide number read by screen reader@@ngb.carousel.slide-number"\n\t\t\t\t>\n\t\t\t\t\tSlide {{ i + 1 }} of {{ c }}\n\t\t\t\t</span>\n\t\t\t\t<ng-template [ngTemplateOutlet]="slide.tplRef"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t\t<button class="carousel-control-prev" type="button" (click)="arrowLeft()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-prev-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.previous">Previous</span>\n\t\t</button>\n\t\t<button class="carousel-control-next" type="button" (click)="arrowRight()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-next-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.next">Next</span>\n\t\t</button>\n\t'}]}],ctorParameters:function(){return[{type:Me},{type:void 0,decorators:[{type:m.Inject,args:[m.PLATFORM_ID]}]},{type:m.NgZone},{type:m.ChangeDetectorRef},{type:m.ElementRef}]},propDecorators:{slides:[{type:m.ContentChildren,args:[Te]}],animation:[{type:m.Input}],activeId:[{type:m.Input}],interval:[{type:m.Input}],wrap:[{type:m.Input}],keyboard:[{type:m.Input}],pauseOnHover:[{type:m.Input}],pauseOnFocus:[{type:m.Input}],showNavigationArrows:[{type:m.Input}],showNavigationIndicators:[{type:m.Input}],slide:[{type:m.Output}],slid:[{type:m.Output}]}}),function(t){t.TIMER="timer",t.ARROW_LEFT="arrowLeft",t.ARROW_RIGHT="arrowRight",t.INDICATOR="indicator"}(Ee||(Ee={}));class Fe{}Fe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fe,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Fe.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Fe,imports:[Oe,Te],exports:[Oe,Te]}),Fe.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fe,imports:[Oe]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fe,decorators:[{type:m.NgModule,args:[{imports:[Oe,Te],exports:[Oe,Te]}]}]});class Ve{}Ve.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ve,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Ve.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Ve,imports:[oe],exports:[oe]}),Ve.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ve}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ve,decorators:[{type:m.NgModule,args:[{imports:[oe],exports:[oe]}]}]});class Ae{constructor(t,e,n){this.year=At(t)?t:null,this.month=At(e)?e:null,this.day=At(n)?n:null}static from(t){return t instanceof Ae?t:t?new Ae(t.year,t.month,t.day):null}equals(t){return null!=t&&this.year===t.year&&this.month===t.month&&this.day===t.day}before(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day<t.day:this.month<t.month:this.year<t.year)}after(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day>t.day:this.month>t.month:this.year>t.year)}}function Ne(t,e){return!function(t,e){return!t&&!e||!!t&&!!e&&t.equals(e)}(t,e)}function je(t,e){return!(!t&&!e||t&&e&&t.year===e.year&&t.month===e.month)}function Le(t,e,n){return t&&e&&t.before(e)?e:t&&n&&t.after(n)?n:t||null}function ze(t,e){const{minDate:n,maxDate:i,disabled:s,markDisabled:a}=e;return!(null==t||s||a&&a(t,{year:t.year,month:t.month})||n&&t.before(n)||i&&t.after(i))}function Be(t){return new Ae(t.getFullYear(),t.getMonth()+1,t.getDate())}function $e(t){const e=new Date(t.year,t.month-1,t.day,12);return isNaN(e.getTime())||e.setFullYear(t.year),e}function He(){return new Ue}class We{}We.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:We,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),We.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:We,providedIn:"root",useFactory:He}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:We,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:He}]}]});class Ue extends We{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){let i=$e(t),s=!0,a=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":a+=n,i.setMonth(a),a%=12,a<0&&(a+=12);break;case"d":i.setDate(i.getDate()+n),s=!1;break;default:return t}return s&&i.getMonth()!==a&&i.setDate(0),Be(i)}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){let e=$e(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=$e(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}getToday(){return Be(new Date)}isValid(t){if(!(t&&At(t.year)&&At(t.month)&&At(t.day)))return!1;if(0===t.year)return!1;const e=$e(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year&&e.getMonth()+1===t.month&&e.getDate()===t.day}}function qe(t){return new Ze(t)}Ue.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ue,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Ue.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ue}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ue,decorators:[{type:m.Injectable}]});class Ye{getMonthLabel(t){return`${this.getMonthFullName(t.month,t.year)} ${this.getYearNumerals(t.year)}`}getDayNumerals(t){return`${t.day}`}getWeekNumerals(t){return`${t}`}getYearNumerals(t){return`${t}`}getWeekLabel(){return""}}Ye.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ye,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Ye.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ye,providedIn:"root",useFactory:qe,deps:[{token:m.LOCALE_ID}]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ye,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:qe,deps:[m.LOCALE_ID]}]}]});class Ze extends Ye{constructor(t){super(),this._locale=t,this._monthsShort=(0,b.getLocaleMonthNames)(t,b.FormStyle.Standalone,b.TranslationWidth.Abbreviated),this._monthsFull=(0,b.getLocaleMonthNames)(t,b.FormStyle.Standalone,b.TranslationWidth.Wide)}getWeekdayLabel(t,e){const n=(0,b.getLocaleDayNames)(this._locale,b.FormStyle.Standalone,void 0===e?b.TranslationWidth.Short:e),i=n.map((t,e)=>n[(e+1)%7]);return i[t-1]||""}getMonthShortName(t){return this._monthsShort[t-1]||""}getMonthFullName(t){return this._monthsFull[t-1]||""}getDayAriaLabel(t){const e=new Date(t.year,t.month-1,t.day);return(0,b.formatDate)(e,"fullDate",this._locale)}}Ze.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ze,deps:[{token:m.LOCALE_ID}],target:m["ɵɵFactoryTarget"].Injectable}),Ze.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ze}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ze,decorators:[{type:m.Injectable}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[m.LOCALE_ID]}]}]}});class Ke{constructor(t,e){this._calendar=t,this._i18n=e,this._VALIDATORS={dayTemplateData:t=>{if(this._state.dayTemplateData!==t)return{dayTemplateData:t}},displayMonths:t=>{if(At(t=Et(t))&&t>0&&this._state.displayMonths!==t)return{displayMonths:t}},disabled:t=>{if(this._state.disabled!==t)return{disabled:t}},firstDayOfWeek:t=>{if(At(t=Et(t))&&t>=0&&this._state.firstDayOfWeek!==t)return{firstDayOfWeek:t}},focusVisible:t=>{if(this._state.focusVisible!==t&&!this._state.disabled)return{focusVisible:t}},markDisabled:t=>{if(this._state.markDisabled!==t)return{markDisabled:t}},maxDate:t=>{const e=this.toValidDate(t,null);if(Ne(this._state.maxDate,e))return{maxDate:e}},minDate:t=>{const e=this.toValidDate(t,null);if(Ne(this._state.minDate,e))return{minDate:e}},navigation:t=>{if(this._state.navigation!==t)return{navigation:t}},outsideDays:t=>{if(this._state.outsideDays!==t)return{outsideDays:t}},weekdays:t=>{const e=!0===t||!1===t?b.TranslationWidth.Short:t,n=!0!==t&&!1!==t||t;if(this._state.weekdayWidth!==e||this._state.weekdaysVisible!==n)return{weekdayWidth:e,weekdaysVisible:n}}},this._model$=new v.Subject,this._dateSelect$=new v.Subject,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:b.TranslationWidth.Short,weekdaysVisible:!0}}get model$(){return this._model$.pipe((0,_.filter)(t=>t.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe((0,_.filter)(t=>null!==t))}set(t){let e=Object.keys(t).map(e=>this._VALIDATORS[e](t[e])).reduce((t,e)=>Object.assign(Object.assign({},t),e),{});Object.keys(e).length>0&&this._nextState(e)}focus(t){const e=this.toValidDate(t,null);null!=e&&!this._state.disabled&&Ne(this._state.focusDate,e)&&this._nextState({focusDate:t})}focusSelect(){ze(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(t){const e=this.toValidDate(t,this._calendar.getToday());null==e||this._state.disabled||this._state.firstDate&&!je(this._state.firstDate,e)||this._nextState({firstDate:e})}select(t,e={}){const n=this.toValidDate(t,null);null==n||this._state.disabled||(Ne(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),e.emitEvent&&ze(n,this._state)&&this._dateSelect$.next(n))}toValidDate(t,e){const n=Ae.from(t);return void 0===e&&(e=this._calendar.getToday()),this._calendar.isValid(n)?n:e}getMonth(t){for(let e of this._state.months)if(t.month===e.number&&t.year===e.year)return e;throw new Error(`month ${t.month} of year ${t.year} not found`)}_nextState(t){const e=this._updateState(t);this._patchContexts(e),this._state=e,this._model$.next(this._state)}_patchContexts(t){const{months:e,displayMonths:n,selectedDate:i,focusDate:s,focusVisible:a,disabled:o,outsideDays:r}=t;t.months.forEach(t=>{t.weeks.forEach(l=>{l.days.forEach(l=>{s&&(l.context.focused=s.equals(l.date)&&a),l.tabindex=!o&&s&&l.date.equals(s)&&s.month===t.number?0:-1,!0===o&&(l.context.disabled=!0),void 0!==i&&(l.context.selected=null!==i&&i.equals(l.date)),t.number!==l.date.month&&(l.hidden="hidden"===r||"collapsed"===r||n>1&&l.date.after(e[0].firstDate)&&l.date.before(e[n-1].lastDate))})})})}_updateState(t){const e=Object.assign({},this._state,t);let n=e.firstDate;if(("minDate"in t||"maxDate"in t)&&(function(t,e){if(e&&t&&e.before(t))throw new Error(`'maxDate' ${e} should be greater than 'minDate' ${t}`)}(e.minDate,e.maxDate),e.focusDate=Le(e.focusDate,e.minDate,e.maxDate),e.firstDate=Le(e.firstDate,e.minDate,e.maxDate),n=e.focusDate),"disabled"in t&&(e.focusVisible=!1),"selectedDate"in t&&0===this._state.months.length&&(n=e.selectedDate),"focusVisible"in t)return e;if("focusDate"in t&&(e.focusDate=Le(e.focusDate,e.minDate,e.maxDate),n=e.focusDate,0!==e.months.length&&e.focusDate&&!e.focusDate.before(e.firstDate)&&!e.focusDate.after(e.lastDate)))return e;if("firstDate"in t&&(e.firstDate=Le(e.firstDate,e.minDate,e.maxDate),n=e.firstDate),n){const i="dayTemplateData"in t||"firstDayOfWeek"in t||"markDisabled"in t||"minDate"in t||"maxDate"in t||"disabled"in t||"outsideDays"in t||"weekdaysVisible"in t,s=function(t,e,n,i,s){const{displayMonths:a,months:o}=n,r=o.splice(0,o.length);return Array.from({length:a},(n,i)=>{const a=Object.assign(t.getNext(e,"m",i),{day:1});if(o[i]=null,!s){const t=r.findIndex(t=>t.firstDate.equals(a));-1!==t&&(o[i]=r.splice(t,1)[0])}return a}).forEach((e,s)=>{null===o[s]&&(o[s]=function(t,e,n,i,s={}){const{dayTemplateData:a,minDate:o,maxDate:r,firstDayOfWeek:l,markDisabled:c,outsideDays:d,weekdayWidth:h,weekdaysVisible:p}=n,u=t.getToday();s.firstDate=null,s.lastDate=null,s.number=e.month,s.year=e.year,s.weeks=s.weeks||[],s.weekdays=s.weekdays||[],e=function(t,e,n){const i=t.getDaysPerWeek(),s=new Ae(e.year,e.month,1),a=t.getWeekday(s)%i;return t.getPrev(s,"d",(i+a-n)%i)}(t,e,l),p||(s.weekdays.length=0);for(let n=0;n<t.getWeeksPerMonth();n++){let g=s.weeks[n];g||(g=s.weeks[n]={number:0,days:[],collapsed:!0});const m=g.days;for(let l=0;l<t.getDaysPerWeek();l++){0===n&&p&&(s.weekdays[l]=i.getWeekdayLabel(t.getWeekday(e),h));const d=new Ae(e.year,e.month,e.day),g=t.getNext(d),f=i.getDayAriaLabel(d);let b=!!(o&&d.before(o)||r&&d.after(r));!b&&c&&(b=c(d,{month:s.number,year:s.year}));let y=d.equals(u),v=a?a(d,{month:s.number,year:s.year}):void 0;null===s.firstDate&&d.month===s.number&&(s.firstDate=d),d.month===s.number&&g.month!==s.number&&(s.lastDate=d);let _=m[l];_||(_=m[l]={}),_.date=d,_.context=Object.assign(_.context||{},{$implicit:d,date:d,data:v,currentMonth:s.number,currentYear:s.year,disabled:b,focused:!1,selected:!1,today:y}),_.tabindex=-1,_.ariaLabel=f,_.hidden=!1,e=g}g.number=t.getWeekNumber(m.map(t=>t.date),l),g.collapsed="collapsed"===d&&m[0].date.month!==s.number&&m[m.length-1].date.month!==s.number}return s}(t,e,n,i,r.shift()||{}))}),o}(this._calendar,n,e,this._i18n,i);e.months=s,e.firstDate=s[0].firstDate,e.lastDate=s[s.length-1].lastDate,"selectedDate"in t&&!ze(e.selectedDate,e)&&(e.selectedDate=null),"firstDate"in t&&(!e.focusDate||e.focusDate.before(e.firstDate)||e.focusDate.after(e.lastDate))&&(e.focusDate=n);const a=!this._state.firstDate||this._state.firstDate.year!==e.firstDate.year,o=!this._state.firstDate||this._state.firstDate.month!==e.firstDate.month;"select"===e.navigation?(("minDate"in t||"maxDate"in t||0===e.selectBoxes.years.length||a)&&(e.selectBoxes.years=function(t,e,n){if(!t)return[];const i=e?Math.max(e.year,t.year-500):t.year-10,s=(n?Math.min(n.year,t.year+500):t.year+10)-i+1,a=Array(s);for(let t=0;t<s;t++)a[t]=i+t;return a}(e.firstDate,e.minDate,e.maxDate)),("minDate"in t||"maxDate"in t||0===e.selectBoxes.months.length||a)&&(e.selectBoxes.months=function(t,e,n,i){if(!e)return[];let s=t.getMonths(e.year);if(n&&e.year===n.year){const t=s.findIndex(t=>t===n.month);s=s.slice(t)}if(i&&e.year===i.year){const t=s.findIndex(t=>t===i.month);s=s.slice(0,t+1)}return s}(this._calendar,e.firstDate,e.minDate,e.maxDate))):e.selectBoxes={years:[],months:[]},"arrows"!==e.navigation&&"select"!==e.navigation||!(o||a||"minDate"in t||"maxDate"in t||"disabled"in t)||(e.prevDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getPrev(e,"m"),{day:1});return null!=n&&(i.year===n.year&&i.month<n.month||i.year<n.year&&1===n.month)}(this._calendar,e.firstDate,e.minDate),e.nextDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getNext(e,"m"),{day:1});return null!=n&&i.after(n)}(this._calendar,e.lastDate,e.maxDate))}return e}}Ke.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ke,deps:[{token:We},{token:Ye}],target:m["ɵɵFactoryTarget"].Injectable}),Ke.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ke}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ke,decorators:[{type:m.Injectable}],ctorParameters:function(){return[{type:We},{type:Ye}]}}),function(t){t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT"}(Re||(Re={}));class Ge{constructor(t){this.i18n=t}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}}Ge.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ge,deps:[{token:Ye}],target:m["ɵɵFactoryTarget"].Component}),Ge.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Ge,isStandalone:!0,selector:"[ngbDatepickerDayView]",inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},host:{properties:{"class.bg-primary":"selected","class.text-white":"selected","class.text-muted":"isMuted()","class.outside":"isMuted()","class.active":"focused"},classAttribute:"btn-light"},ngImport:f,template:"{{ i18n.getDayNumerals(date) }}",isInline:!0,styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ge,decorators:[{type:m.Component,args:[{selector:"[ngbDatepickerDayView]",standalone:!0,changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{class:"btn-light","[class.bg-primary]":"selected","[class.text-white]":"selected","[class.text-muted]":"isMuted()","[class.outside]":"isMuted()","[class.active]":"focused"},template:"{{ i18n.getDayNumerals(date) }}",styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"]}]}],ctorParameters:function(){return[{type:Ye}]},propDecorators:{currentMonth:[{type:m.Input}],date:[{type:m.Input}],disabled:[{type:m.Input}],focused:[{type:m.Input}],selected:[{type:m.Input}]}});class Xe{constructor(t,e){this.i18n=t,this._renderer=e,this.select=new m.EventEmitter,this._month=-1,this._year=-1}changeMonth(t){this.select.emit(new Ae(this.date.year,Et(t),1))}changeYear(t){this.select.emit(new Ae(Et(t),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}}Xe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xe,deps:[{token:Ye},{token:m.Renderer2}],target:m["ɵɵFactoryTarget"].Component}),Xe.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Xe,isStandalone:!0,selector:"ngb-datepicker-navigation-select",inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},viewQueries:[{propertyName:"monthSelect",first:!0,predicate:["month"],descendants:!0,read:m.ElementRef,static:!0},{propertyName:"yearSelect",first:!0,predicate:["year"],descendants:!0,read:m.ElementRef,static:!0}],ngImport:f,template:'\n\t\t<select\n\t\t\t#month\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-month"\n\t\t\taria-label="Select month"\n\t\t\ti18n-title="@@ngb.datepicker.select-month"\n\t\t\ttitle="Select month"\n\t\t\t(change)="changeMonth($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let m of months" [attr.aria-label]="i18n.getMonthFullName(m, date.year)" [value]="m">{{\n\t\t\t\ti18n.getMonthShortName(m, date.year)\n\t\t\t}}</option> </select\n\t\t><select\n\t\t\t#year\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-year"\n\t\t\taria-label="Select year"\n\t\t\ti18n-title="@@ngb.datepicker.select-year"\n\t\t\ttitle="Select year"\n\t\t\t(change)="changeYear($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let y of years" [value]="y">{{ i18n.getYearNumerals(y) }}</option>\n\t\t</select>\n\t',isInline:!0,styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"],dependencies:[{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xe,decorators:[{type:m.Component,args:[{selector:"ngb-datepicker-navigation-select",standalone:!0,imports:[b.NgFor],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,template:'\n\t\t<select\n\t\t\t#month\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-month"\n\t\t\taria-label="Select month"\n\t\t\ti18n-title="@@ngb.datepicker.select-month"\n\t\t\ttitle="Select month"\n\t\t\t(change)="changeMonth($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let m of months" [attr.aria-label]="i18n.getMonthFullName(m, date.year)" [value]="m">{{\n\t\t\t\ti18n.getMonthShortName(m, date.year)\n\t\t\t}}</option> </select\n\t\t><select\n\t\t\t#year\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-year"\n\t\t\taria-label="Select year"\n\t\t\ti18n-title="@@ngb.datepicker.select-year"\n\t\t\ttitle="Select year"\n\t\t\t(change)="changeYear($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let y of years" [value]="y">{{ i18n.getYearNumerals(y) }}</option>\n\t\t</select>\n\t',styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"]}]}],ctorParameters:function(){return[{type:Ye},{type:m.Renderer2}]},propDecorators:{date:[{type:m.Input}],disabled:[{type:m.Input}],months:[{type:m.Input}],years:[{type:m.Input}],select:[{type:m.Output}],monthSelect:[{type:m.ViewChild,args:["month",{static:!0,read:m.ElementRef}]}],yearSelect:[{type:m.ViewChild,args:["year",{static:!0,read:m.ElementRef}]}]}});class Je{constructor(t){this.i18n=t,this.navigation=Re,this.months=[],this.navigate=new m.EventEmitter,this.select=new m.EventEmitter}onClickPrev(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}}Je.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Je,deps:[{token:Ye}],target:m["ɵɵFactoryTarget"].Component}),Je.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Je,isStandalone:!0,selector:"ngb-datepicker-navigation",inputs:{date:"date",disabled:"disabled",months:"months",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},ngImport:f,template:'\n\t\t<div class="ngb-dp-arrow">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickPrev($event)"\n\t\t\t\t[disabled]="prevDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.previous-month"\n\t\t\t\taria-label="Previous month"\n\t\t\t\ti18n-title="@@ngb.datepicker.previous-month"\n\t\t\t\ttitle="Previous month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t\t<ngb-datepicker-navigation-select\n\t\t\t*ngIf="showSelect"\n\t\t\tclass="ngb-dp-navigation-select"\n\t\t\t[date]="date"\n\t\t\t[disabled]="disabled"\n\t\t\t[months]="selectBoxes.months"\n\t\t\t[years]="selectBoxes.years"\n\t\t\t(select)="select.emit($event)"\n\t\t>\n\t\t</ngb-datepicker-navigation-select>\n\n\t\t<ng-template *ngIf="!showSelect" ngFor let-month [ngForOf]="months" let-i="index">\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i > 0"></div>\n\t\t\t<div class="ngb-dp-month-name">\n\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t</div>\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i !== months.length - 1"></div>\n\t\t</ng-template>\n\t\t<div class="ngb-dp-arrow right">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickNext($event)"\n\t\t\t\t[disabled]="nextDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.next-month"\n\t\t\t\taria-label="Next month"\n\t\t\t\ti18n-title="@@ngb.datepicker.next-month"\n\t\t\t\ttitle="Next month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t',isInline:!0,styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"component",type:Xe,selector:"ngb-datepicker-navigation-select",inputs:["date","disabled","months","years"],outputs:["select"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Je,decorators:[{type:m.Component,args:[{selector:"ngb-datepicker-navigation",standalone:!0,imports:[b.NgIf,b.NgFor,Xe],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,template:'\n\t\t<div class="ngb-dp-arrow">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickPrev($event)"\n\t\t\t\t[disabled]="prevDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.previous-month"\n\t\t\t\taria-label="Previous month"\n\t\t\t\ti18n-title="@@ngb.datepicker.previous-month"\n\t\t\t\ttitle="Previous month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t\t<ngb-datepicker-navigation-select\n\t\t\t*ngIf="showSelect"\n\t\t\tclass="ngb-dp-navigation-select"\n\t\t\t[date]="date"\n\t\t\t[disabled]="disabled"\n\t\t\t[months]="selectBoxes.months"\n\t\t\t[years]="selectBoxes.years"\n\t\t\t(select)="select.emit($event)"\n\t\t>\n\t\t</ngb-datepicker-navigation-select>\n\n\t\t<ng-template *ngIf="!showSelect" ngFor let-month [ngForOf]="months" let-i="index">\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i > 0"></div>\n\t\t\t<div class="ngb-dp-month-name">\n\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t</div>\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i !== months.length - 1"></div>\n\t\t</ng-template>\n\t\t<div class="ngb-dp-arrow right">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickNext($event)"\n\t\t\t\t[disabled]="nextDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.next-month"\n\t\t\t\taria-label="Next month"\n\t\t\t\ti18n-title="@@ngb.datepicker.next-month"\n\t\t\t\ttitle="Next month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t',styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"]}]}],ctorParameters:function(){return[{type:Ye}]},propDecorators:{date:[{type:m.Input}],disabled:[{type:m.Input}],months:[{type:m.Input}],showSelect:[{type:m.Input}],prevDisabled:[{type:m.Input}],nextDisabled:[{type:m.Input}],selectBoxes:[{type:m.Input}],navigate:[{type:m.Output}],select:[{type:m.Output}]}}),function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(Pe||(Pe={}));class Qe{processKey(t,e){const{state:n,calendar:i}=e;switch(t.which){case Pe.PageUp:e.focusDate(i.getPrev(n.focusedDate,t.shiftKey?"y":"m",1));break;case Pe.PageDown:e.focusDate(i.getNext(n.focusedDate,t.shiftKey?"y":"m",1));break;case Pe.End:e.focusDate(t.shiftKey?n.maxDate:n.lastDate);break;case Pe.Home:e.focusDate(t.shiftKey?n.minDate:n.firstDate);break;case Pe.ArrowLeft:e.focusDate(i.getPrev(n.focusedDate,"d",1));break;case Pe.ArrowUp:e.focusDate(i.getPrev(n.focusedDate,"d",i.getDaysPerWeek()));break;case Pe.ArrowRight:e.focusDate(i.getNext(n.focusedDate,"d",1));break;case Pe.ArrowDown:e.focusDate(i.getNext(n.focusedDate,"d",i.getDaysPerWeek()));break;case Pe.Enter:case Pe.Space:e.focusSelect();break;default:return}t.preventDefault(),t.stopPropagation()}}Qe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qe,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Qe.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qe,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qe,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class tn{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays=b.TranslationWidth.Short}}function en(){return new sn}tn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:tn,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),tn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:tn,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:tn,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class nn{}nn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:nn,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),nn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:nn,providedIn:"root",useFactory:en}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:nn,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:en}]}]});class sn extends nn{fromModel(t){return t&&At(t.year)&&At(t.month)&&At(t.day)?{year:t.year,month:t.month,day:t.day}:null}toModel(t){return t&&At(t.year)&&At(t.month)&&At(t.day)?{year:t.year,month:t.month,day:t.day}:null}}sn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:sn,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),sn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:sn}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:sn,decorators:[{type:m.Injectable}]});class an{constructor(t){this.templateRef=t}}an.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:an,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),an.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:an,isStandalone:!0,selector:"ng-template[ngbDatepickerContent]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:an,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbDatepickerContent]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class on{constructor(t,e,n,i){this.i18n=t,this.datepicker=e,this._keyboardService=n,this._service=i}set month(t){this.viewModel=this._service.getMonth(t)}onKeyDown(t){this._keyboardService.processKey(t,this.datepicker)}doSelect(t){t.context.disabled||t.hidden||this.datepicker.onDateSelect(t.date)}}on.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:on,deps:[{token:Ye},{token:(0,m.forwardRef)(()=>rn)},{token:Qe},{token:Ke}],target:m["ɵɵFactoryTarget"].Component}),on.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:on,isStandalone:!0,selector:"ngb-datepicker-month",inputs:{month:"month"},host:{attributes:{role:"grid"},listeners:{keydown:"onKeyDown($event)"}},ngImport:f,template:'\n\t\t<div *ngIf="viewModel.weekdays.length > 0" class="ngb-dp-week ngb-dp-weekdays" role="row">\n\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-weekday ngb-dp-showweek small">{{\n\t\t\t\ti18n.getWeekLabel()\n\t\t\t}}</div>\n\t\t\t<div *ngFor="let weekday of viewModel.weekdays" class="ngb-dp-weekday small" role="columnheader">{{\n\t\t\t\tweekday\n\t\t\t}}</div>\n\t\t</div>\n\t\t<ng-template ngFor let-week [ngForOf]="viewModel.weeks">\n\t\t\t<div *ngIf="!week.collapsed" class="ngb-dp-week" role="row">\n\t\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-week-number small text-muted">{{\n\t\t\t\t\ti18n.getWeekNumerals(week.number)\n\t\t\t\t}}</div>\n\t\t\t\t<div\n\t\t\t\t\t*ngFor="let day of week.days"\n\t\t\t\t\t(click)="doSelect(day); $event.preventDefault()"\n\t\t\t\t\tclass="ngb-dp-day"\n\t\t\t\t\trole="gridcell"\n\t\t\t\t\t[class.disabled]="day.context.disabled"\n\t\t\t\t\t[tabindex]="day.tabindex"\n\t\t\t\t\t[class.hidden]="day.hidden"\n\t\t\t\t\t[class.ngb-dp-today]="day.context.today"\n\t\t\t\t\t[attr.aria-label]="day.ariaLabel"\n\t\t\t\t>\n\t\t\t\t\t<ng-template [ngIf]="!day.hidden">\n\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t[ngTemplateOutlet]="datepicker.dayTemplate"\n\t\t\t\t\t\t\t[ngTemplateOutletContext]="day.context"\n\t\t\t\t\t\t></ng-template>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n'],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:on,decorators:[{type:m.Component,args:[{selector:"ngb-datepicker-month",standalone:!0,imports:[b.NgIf,b.NgFor,b.NgTemplateOutlet],host:{role:"grid","(keydown)":"onKeyDown($event)"},encapsulation:m.ViewEncapsulation.None,template:'\n\t\t<div *ngIf="viewModel.weekdays.length > 0" class="ngb-dp-week ngb-dp-weekdays" role="row">\n\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-weekday ngb-dp-showweek small">{{\n\t\t\t\ti18n.getWeekLabel()\n\t\t\t}}</div>\n\t\t\t<div *ngFor="let weekday of viewModel.weekdays" class="ngb-dp-weekday small" role="columnheader">{{\n\t\t\t\tweekday\n\t\t\t}}</div>\n\t\t</div>\n\t\t<ng-template ngFor let-week [ngForOf]="viewModel.weeks">\n\t\t\t<div *ngIf="!week.collapsed" class="ngb-dp-week" role="row">\n\t\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-week-number small text-muted">{{\n\t\t\t\t\ti18n.getWeekNumerals(week.number)\n\t\t\t\t}}</div>\n\t\t\t\t<div\n\t\t\t\t\t*ngFor="let day of week.days"\n\t\t\t\t\t(click)="doSelect(day); $event.preventDefault()"\n\t\t\t\t\tclass="ngb-dp-day"\n\t\t\t\t\trole="gridcell"\n\t\t\t\t\t[class.disabled]="day.context.disabled"\n\t\t\t\t\t[tabindex]="day.tabindex"\n\t\t\t\t\t[class.hidden]="day.hidden"\n\t\t\t\t\t[class.ngb-dp-today]="day.context.today"\n\t\t\t\t\t[attr.aria-label]="day.ariaLabel"\n\t\t\t\t>\n\t\t\t\t\t<ng-template [ngIf]="!day.hidden">\n\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t[ngTemplateOutlet]="datepicker.dayTemplate"\n\t\t\t\t\t\t\t[ngTemplateOutletContext]="day.context"\n\t\t\t\t\t\t></ng-template>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n']}]}],ctorParameters:function(){return[{type:Ye},{type:rn,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>rn)]}]},{type:Qe},{type:Ke}]},propDecorators:{month:[{type:m.Input}]}});class rn{constructor(t,e,n,i,s,a,o,r){this._service=t,this._calendar=e,this._i18n=n,this._elementRef=a,this._ngbDateAdapter=o,this._ngZone=r,this.injector=(0,m.inject)(m.Injector),this._controlValue=null,this._destroyed$=new v.Subject,this._publicState={},this.navigate=new m.EventEmitter,this.dateSelect=new m.EventEmitter,this.onChange=t=>{},this.onTouched=()=>{},["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekNumbers","startDate","weekdays"].forEach(t=>this[t]=i[t]),t.dateSelect$.pipe((0,_.takeUntil)(this._destroyed$)).subscribe(t=>{this.dateSelect.emit(t)}),t.model$.pipe((0,_.takeUntil)(this._destroyed$)).subscribe(t=>{const e=t.firstDate,n=this.model?this.model.firstDate:null;this._publicState={maxDate:t.maxDate,minDate:t.minDate,firstDate:t.firstDate,lastDate:t.lastDate,focusedDate:t.focusDate,months:t.months.map(t=>t.firstDate)};let i=!1;if(!e.equals(n)&&(this.navigate.emit({current:n?{year:n.year,month:n.month}:null,next:{year:e.year,month:e.month},preventDefault:()=>i=!0}),i&&null!==n))return void this._service.open(n);const a=t.selectedDate,o=t.focusDate,r=this.model?this.model.focusDate:null;this.model=t,Ne(a,this._controlValue)&&(this._controlValue=a,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(a))),Ne(o,r)&&r&&t.focusVisible&&this.focus(),s.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}get i18n(){return this._i18n}focusDate(t){this._service.focus(Ae.from(t))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{const t=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');t&&t.focus()})}navigateTo(t){this._service.open(Ae.from(t?t.day?t:Object.assign(Object.assign({},t),{day:1}):null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const t=(0,v.fromEvent)(this._contentEl.nativeElement,"focusin"),e=(0,v.fromEvent)(this._contentEl.nativeElement,"focusout"),{nativeElement:n}=this._elementRef;(0,v.merge)(t,e).pipe((0,_.filter)(({target:t,relatedTarget:e})=>!(zt(t,"ngb-dp-day")&&zt(e,"ngb-dp-day")&&n.contains(t)&&n.contains(e))),(0,_.takeUntil)(this._destroyed$)).subscribe(({type:t})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===t})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const t={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].forEach(e=>t[e]=this[e]),this._service.set(t),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(t){const e={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].filter(e=>e in t).forEach(t=>e[t]=this[t]),this._service.set(e),"startDate"in t){const{currentValue:e,previousValue:n}=t.startDate;je(n,e)&&this.navigateTo(this.startDate)}}onDateSelect(t){this._service.focus(t),this._service.select(t,{emitEvent:!0})}onNavigateDateSelect(t){this._service.open(t)}onNavigateEvent(t){switch(t){case Re.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case Re.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._service.set({disabled:t})}writeValue(t){this._controlValue=Ae.from(this._ngbDateAdapter.fromModel(t)),this._service.select(this._controlValue)}}rn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:rn,deps:[{token:Ke},{token:We},{token:Ye},{token:tn},{token:m.ChangeDetectorRef},{token:m.ElementRef},{token:nn},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),rn.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:rn,isStandalone:!0,selector:"ngb-datepicker",inputs:{contentTemplate:"contentTemplate",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",weekdays:"weekdays"},outputs:{navigate:"navigate",dateSelect:"dateSelect"},host:{properties:{"class.disabled":"model.disabled"}},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>rn),multi:!0},Ke],queries:[{propertyName:"contentTemplateFromContent",first:!0,predicate:an,descendants:!0,static:!0}],viewQueries:[{propertyName:"_defaultDayTemplate",first:!0,predicate:["defaultDayTemplate"],descendants:!0,static:!0},{propertyName:"_contentEl",first:!0,predicate:["content"],descendants:!0,static:!0}],exportAs:["ngbDatepicker"],usesOnChanges:!0,ngImport:f,template:'\n\t\t<ng-template\n\t\t\t#defaultDayTemplate\n\t\t\tlet-date="date"\n\t\t\tlet-currentMonth="currentMonth"\n\t\t\tlet-selected="selected"\n\t\t\tlet-disabled="disabled"\n\t\t\tlet-focused="focused"\n\t\t>\n\t\t\t<div\n\t\t\t\tngbDatepickerDayView\n\t\t\t\t[date]="date"\n\t\t\t\t[currentMonth]="currentMonth"\n\t\t\t\t[selected]="selected"\n\t\t\t\t[disabled]="disabled"\n\t\t\t\t[focused]="focused"\n\t\t\t>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<ng-template #defaultContentTemplate>\n\t\t\t<div *ngFor="let month of model.months; let i = index" class="ngb-dp-month">\n\t\t\t\t<div *ngIf="navigation === \'none\' || (displayMonths > 1 && navigation === \'select\')" class="ngb-dp-month-name">\n\t\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t\t</div>\n\t\t\t\t<ngb-datepicker-month [month]="month.firstDate"></ngb-datepicker-month>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<div class="ngb-dp-header">\n\t\t\t<ngb-datepicker-navigation\n\t\t\t\t*ngIf="navigation !== \'none\'"\n\t\t\t\t[date]="model.firstDate!"\n\t\t\t\t[months]="model.months"\n\t\t\t\t[disabled]="model.disabled"\n\t\t\t\t[showSelect]="model.navigation === \'select\'"\n\t\t\t\t[prevDisabled]="model.prevDisabled"\n\t\t\t\t[nextDisabled]="model.nextDisabled"\n\t\t\t\t[selectBoxes]="model.selectBoxes"\n\t\t\t\t(navigate)="onNavigateEvent($event)"\n\t\t\t\t(select)="onNavigateDateSelect($event)"\n\t\t\t>\n\t\t\t</ngb-datepicker-navigation>\n\t\t</div>\n\n\t\t<div class="ngb-dp-content" [class.ngb-dp-months]="!contentTemplate" #content>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="contentTemplate || contentTemplateFromContent?.templateRef || defaultContentTemplate"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: this }"\n\t\t\t\t[ngTemplateOutletInjector]="injector"\n\t\t\t></ng-template>\n\t\t</div>\n\n\t\t<ng-template [ngTemplateOutlet]="footerTemplate"></ng-template>\n\t',isInline:!0,styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"component",type:Ge,selector:"[ngbDatepickerDayView]",inputs:["currentMonth","date","disabled","focused","selected"]},{kind:"component",type:on,selector:"ngb-datepicker-month",inputs:["month"]},{kind:"component",type:Je,selector:"ngb-datepicker-navigation",inputs:["date","disabled","months","showSelect","prevDisabled","nextDisabled","selectBoxes"],outputs:["navigate","select"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:rn,decorators:[{type:m.Component,args:[{exportAs:"ngbDatepicker",selector:"ngb-datepicker",standalone:!0,imports:[b.NgIf,b.NgFor,b.NgTemplateOutlet,Ge,on,Je],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{"[class.disabled]":"model.disabled"},template:'\n\t\t<ng-template\n\t\t\t#defaultDayTemplate\n\t\t\tlet-date="date"\n\t\t\tlet-currentMonth="currentMonth"\n\t\t\tlet-selected="selected"\n\t\t\tlet-disabled="disabled"\n\t\t\tlet-focused="focused"\n\t\t>\n\t\t\t<div\n\t\t\t\tngbDatepickerDayView\n\t\t\t\t[date]="date"\n\t\t\t\t[currentMonth]="currentMonth"\n\t\t\t\t[selected]="selected"\n\t\t\t\t[disabled]="disabled"\n\t\t\t\t[focused]="focused"\n\t\t\t>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<ng-template #defaultContentTemplate>\n\t\t\t<div *ngFor="let month of model.months; let i = index" class="ngb-dp-month">\n\t\t\t\t<div *ngIf="navigation === \'none\' || (displayMonths > 1 && navigation === \'select\')" class="ngb-dp-month-name">\n\t\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t\t</div>\n\t\t\t\t<ngb-datepicker-month [month]="month.firstDate"></ngb-datepicker-month>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<div class="ngb-dp-header">\n\t\t\t<ngb-datepicker-navigation\n\t\t\t\t*ngIf="navigation !== \'none\'"\n\t\t\t\t[date]="model.firstDate!"\n\t\t\t\t[months]="model.months"\n\t\t\t\t[disabled]="model.disabled"\n\t\t\t\t[showSelect]="model.navigation === \'select\'"\n\t\t\t\t[prevDisabled]="model.prevDisabled"\n\t\t\t\t[nextDisabled]="model.nextDisabled"\n\t\t\t\t[selectBoxes]="model.selectBoxes"\n\t\t\t\t(navigate)="onNavigateEvent($event)"\n\t\t\t\t(select)="onNavigateDateSelect($event)"\n\t\t\t>\n\t\t\t</ngb-datepicker-navigation>\n\t\t</div>\n\n\t\t<div class="ngb-dp-content" [class.ngb-dp-months]="!contentTemplate" #content>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="contentTemplate || contentTemplateFromContent?.templateRef || defaultContentTemplate"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: this }"\n\t\t\t\t[ngTemplateOutletInjector]="injector"\n\t\t\t></ng-template>\n\t\t</div>\n\n\t\t<ng-template [ngTemplateOutlet]="footerTemplate"></ng-template>\n\t',providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>rn),multi:!0},Ke],styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"]}]}],ctorParameters:function(){return[{type:Ke},{type:We},{type:Ye},{type:tn},{type:m.ChangeDetectorRef},{type:m.ElementRef},{type:nn},{type:m.NgZone}]},propDecorators:{_defaultDayTemplate:[{type:m.ViewChild,args:["defaultDayTemplate",{static:!0}]}],_contentEl:[{type:m.ViewChild,args:["content",{static:!0}]}],contentTemplate:[{type:m.Input}],contentTemplateFromContent:[{type:m.ContentChild,args:[an,{static:!0}]}],dayTemplate:[{type:m.Input}],dayTemplateData:[{type:m.Input}],displayMonths:[{type:m.Input}],firstDayOfWeek:[{type:m.Input}],footerTemplate:[{type:m.Input}],markDisabled:[{type:m.Input}],maxDate:[{type:m.Input}],minDate:[{type:m.Input}],navigation:[{type:m.Input}],outsideDays:[{type:m.Input}],showWeekNumbers:[{type:m.Input}],startDate:[{type:m.Input}],weekdays:[{type:m.Input}],navigate:[{type:m.Output}],dateSelect:[{type:m.Output}]}});const ln=(t,e)=>!!e&&e.some(e=>e.contains(t)),cn=(t,e)=>!e||null!=function(t,e){return e?void 0===t.closest?null:t.closest(e):null}(t,e),dn="undefined"!=typeof navigator&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));function hn(t,e,n,i,s,a,o,r){var l;n&&t.runOutsideAngular((l=()=>{const l=(0,v.fromEvent)(e,"keydown").pipe((0,_.takeUntil)(s),(0,_.filter)(t=>t.which===Pe.Escape),(0,_.tap)(t=>t.preventDefault())),c=(0,v.fromEvent)(e,"mousedown").pipe((0,_.map)(t=>{const e=t.target;return 2!==t.button&&!ln(e,o)&&("inside"===n?ln(e,a)&&cn(e,r):"outside"===n?!ln(e,a):cn(e,r)||!ln(e,a))}),(0,_.takeUntil)(s)),d=(0,v.fromEvent)(e,"mouseup").pipe((0,_.withLatestFrom)(c),(0,_.filter)(([t,e])=>e),(0,_.delay)(0),(0,_.takeUntil)(s));(0,v.race)([l.pipe((0,_.map)(t=>0)),d.pipe((0,_.map)(t=>1))]).subscribe(e=>t.run(()=>i(e)))},dn?()=>setTimeout(()=>l(),100):l))}const pn=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function un(t){const e=Array.from(t.querySelectorAll(pn)).filter(t=>-1!==t.tabIndex);return[e[0],e[e.length-1]]}const gn=(t,e,n,i=!1)=>{t.runOutsideAngular(()=>{const t=(0,v.fromEvent)(e,"focusin").pipe((0,_.takeUntil)(n),(0,_.map)(t=>t.target));(0,v.fromEvent)(e,"keydown").pipe((0,_.takeUntil)(n),(0,_.filter)(t=>t.which===Pe.Tab),(0,_.withLatestFrom)(t)).subscribe(([t,n])=>{const[i,s]=un(e);n!==i&&n!==e||!t.shiftKey||(s.focus(),t.preventDefault()),n!==s||t.shiftKey||(i.focus(),t.preventDefault())}),i&&(0,v.fromEvent)(e,"click").pipe((0,_.takeUntil)(n),(0,_.withLatestFrom)(t),(0,_.map)(t=>t[1])).subscribe(t=>t.focus())})};class mn{constructor(t){this._element=t.documentElement}isRTL(){return"rtl"===(this._element.getAttribute("dir")||"").toLowerCase()}}mn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:mn,deps:[{token:b.DOCUMENT}],target:m["ɵɵFactoryTarget"].Injectable}),mn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:mn,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:mn,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]}]}});const fn=/\s+/,bn=/ +/gi,yn={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]},vn=/^left/,_n=/^right/,xn=/^start/,wn=/^end/;function Dn({placement:t,baseClass:e},n){let i=Array.isArray(t)?t:t.split(fn);let s=i.findIndex(t=>"auto"===t);s>=0&&["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"].forEach(function(t){null==i.find(e=>-1!==e.search("^"+t))&&i.splice(s++,1,t)});const a=i.map(t=>function(t,e){const[n,i]=yn[t];return e&&i||n}(t,n.isRTL()));let o=a.shift();const r={name:"bootstrapClasses",enabled:!!e,phase:"write",fn({state:t}){const n=new RegExp(e+"(-[a-z]+)*","gi"),i=t.elements.popper,s=t.placement;let a=i.className;a=a.replace(n,""),a+=` ${function(t,e){let[n,i]=e.split("-");const s=n.replace(vn,"start").replace(_n,"end");let a=[s];if(i){let t=i;"left"!==n&&"right"!==n||(t=t.replace(xn,"top").replace(wn,"bottom")),a.push(`${s}-${t}`)}return t&&(a=a.map(e=>`${t}-${e}`)),a.join(" ")}(e,s)}`,a=a.trim().replace(bn," "),i.className=a}};return{placement:o,modifiers:[r,ft,vt,_t,{enabled:!0,name:"flip",options:{fallbackPlacements:a}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function In(t){return t}function kn(){const t=(0,m.inject)(mn);let e=null;return{createPopper(n){if(!e){let i=(n.updatePopperOptions||In)(Dn(n,t));e=Tt(n.hostElement,n.targetElement,i)}},update(){e&&e.update()},setOptions(n){if(e){let i=(n.updatePopperOptions||In)(Dn(n,t));e.setOptions(i)}},destroy(){e&&(e.destroy(),e=null)}}}class Cn extends tn{constructor(){super(...arguments),this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t,this.restoreFocus=!0}}function Mn(t){return e=>(e.modifiers.push(Ot,{name:"offset",options:{offset:()=>t}}),e)}function Sn(){return new On}Cn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cn,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Cn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cn,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cn,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class Tn{}Tn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Tn,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Tn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Tn,providedIn:"root",useFactory:Sn}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Tn,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:Sn}]}]});class On extends Tn{parse(t){if(null!=t){const e=t.trim().split("-");if(1===e.length&&Vt(e[0]))return{year:Et(e[0]),month:null,day:null};if(2===e.length&&Vt(e[0])&&Vt(e[1]))return{year:Et(e[0]),month:Et(e[1]),day:null};if(3===e.length&&Vt(e[0])&&Vt(e[1])&&Vt(e[2]))return{year:Et(e[0]),month:Et(e[1]),day:Et(e[2])}}return null}format(t){return t?`${t.year}-${Vt(t.month)?Lt(t.month):""}-${Vt(t.day)?Lt(t.day):""}`:""}}On.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:On,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),On.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:On}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:On,decorators:[{type:m.Injectable}]});class En{constructor(t,e,n,i,s,a,o,r,l,c){this._parserFormatter=t,this._elRef=e,this._vcRef=n,this._renderer=i,this._ngZone=s,this._calendar=a,this._dateAdapter=o,this._document=r,this._changeDetector=l,this._cRef=null,this._disabled=!1,this._elWithFocus=null,this._model=null,this._destroyCloseHandlers$=new v.Subject,this.dateSelect=new m.EventEmitter,this.navigate=new m.EventEmitter,this.closed=new m.EventEmitter,this._onChange=t=>{},this._onTouched=()=>{},this._validatorChange=()=>{},["autoClose","container","positionTarget","placement","popperOptions"].forEach(t=>this[t]=c[t]),this._positioning=kn()}get disabled(){return this._disabled}set disabled(t){this._disabled=""===t||t&&"false"!==t,this.isOpen()&&this._cRef.instance.setDisabledState(this._disabled)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}registerOnValidatorChange(t){this._validatorChange=t}setDisabledState(t){this.disabled=t}validate(t){const{value:e}=t;if(null!=e){const t=this._fromDateStruct(this._dateAdapter.fromModel(e));if(!t)return{ngbDate:{invalid:e}};if(this.minDate&&t.before(Ae.from(this.minDate)))return{ngbDate:{minDate:{minDate:this.minDate,actual:e}}};if(this.maxDate&&t.after(Ae.from(this.maxDate)))return{ngbDate:{maxDate:{maxDate:this.maxDate,actual:e}}}}return null}writeValue(t){this._model=this._fromDateStruct(this._dateAdapter.fromModel(t)),this._writeModelValue(this._model)}manualDateChange(t,e=!1){const n=t!==this._inputValue;n&&(this._inputValue=t,this._model=this._fromDateStruct(this._parserFormatter.parse(t))),!n&&e||this._onChange(this._model?this._dateAdapter.toModel(this._model):""===t?null:t),e&&this._model&&this._writeModelValue(this._model)}isOpen(){return!!this._cRef}open(){if(!this.isOpen()){let t;if(this._cRef=this._vcRef.createComponent(rn),this._applyPopupStyling(this._cRef.location.nativeElement),this._applyDatepickerInputs(this._cRef),this._subscribeForDatepickerOutputs(this._cRef.instance),this._cRef.instance.ngOnInit(),this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model)),this._cRef.instance.registerOnChange(t=>{this.writeValue(t),this._onChange(t),this._onTouched()}),this._cRef.changeDetectorRef.detectChanges(),this._cRef.instance.setDisabledState(this.disabled),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._cRef.location.nativeElement),this._elWithFocus=this._document.activeElement,gn(this._ngZone,this._cRef.location.nativeElement,this.closed,!0),setTimeout(()=>{var t;return null===(t=this._cRef)||void 0===t?void 0:t.instance.focus()}),t=Ft(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget instanceof HTMLElement?this.positionTarget:this._elRef.nativeElement,this._ngZone.runOutsideAngular(()=>{this._cRef&&(this._positioning.createPopper({hostElement:t,targetElement:this._cRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(Mn([0,2])(t))}),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update()))}),this.positionTarget&&!t)throw new Error("ngbDatepicker could not find element declared in [positionTarget] to position against.");this._setCloseHandlers()}}close(){var t;if(this.isOpen()){this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView)),this._cRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._destroyCloseHandlers$.next(),this.closed.emit(),this._changeDetector.markForCheck();let e=this._elWithFocus;Ft(this.restoreFocus)?e=this._document.querySelector(this.restoreFocus):void 0!==this.restoreFocus&&(e=this.restoreFocus),e&&e.focus?e.focus():this._document.body.focus()}}toggle(){this.isOpen()?this.close():this.open()}navigateTo(t){this.isOpen()&&this._cRef.instance.navigateTo(t)}onBlur(){this._onTouched()}onFocus(){this._elWithFocus=this._elRef.nativeElement}ngOnChanges(t){if((t.minDate||t.maxDate)&&(this._validatorChange(),this.isOpen()&&(t.minDate&&(this._cRef.instance.minDate=this.minDate),t.maxDate&&(this._cRef.instance.maxDate=this.maxDate),this._cRef.instance.ngOnChanges(t))),t.datepickerClass){const{currentValue:e,previousValue:n}=t.datepickerClass;this._applyPopupClass(e,n)}t.autoClose&&this.isOpen()&&this._setCloseHandlers()}ngOnDestroy(){this.close()}_applyDatepickerInputs(t){["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showNavigation","showWeekNumbers","weekdays"].forEach(e=>{void 0!==this[e]&&t.setInput(e,this[e])}),t.setInput("startDate",this.startDate||this._model)}_applyPopupClass(t,e){var n;const i=null===(n=this._cRef)||void 0===n?void 0:n.location.nativeElement;i&&(t&&this._renderer.addClass(i,t),e&&this._renderer.removeClass(i,e))}_applyPopupStyling(t){this._renderer.addClass(t,"dropdown-menu"),this._renderer.addClass(t,"show"),"body"===this.container&&this._renderer.addClass(t,"ngb-dp-body"),this._applyPopupClass(this.datepickerClass)}_subscribeForDatepickerOutputs(t){t.navigate.subscribe(t=>this.navigate.emit(t)),t.dateSelect.subscribe(t=>{this.dateSelect.emit(t),!0!==this.autoClose&&"inside"!==this.autoClose||this.close()})}_writeModelValue(t){const e=this._parserFormatter.format(t);this._inputValue=e,this._renderer.setProperty(this._elRef.nativeElement,"value",e),this.isOpen()&&(this._cRef.instance.writeValue(this._dateAdapter.toModel(t)),this._onTouched())}_fromDateStruct(t){const e=t?new Ae(t.year,t.month,t.day):null;return this._calendar.isValid(e)?e:null}_setCloseHandlers(){this._destroyCloseHandlers$.next(),hn(this._ngZone,this._document,this.autoClose,()=>this.close(),this._destroyCloseHandlers$,[],[this._elRef.nativeElement,this._cRef.location.nativeElement])}}En.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:En,deps:[{token:Tn},{token:m.ElementRef},{token:m.ViewContainerRef},{token:m.Renderer2},{token:m.NgZone},{token:We},{token:nn},{token:b.DOCUMENT},{token:m.ChangeDetectorRef},{token:Cn}],target:m["ɵɵFactoryTarget"].Directive}),En.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:En,isStandalone:!0,selector:"input[ngbDatepicker]",inputs:{autoClose:"autoClose",contentTemplate:"contentTemplate",datepickerClass:"datepickerClass",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",minDate:"minDate",maxDate:"maxDate",navigation:"navigation",outsideDays:"outsideDays",placement:"placement",popperOptions:"popperOptions",restoreFocus:"restoreFocus",showWeekNumbers:"showWeekNumbers",startDate:"startDate",container:"container",positionTarget:"positionTarget",weekdays:"weekdays",disabled:"disabled"},outputs:{dateSelect:"dateSelect",navigate:"navigate",closed:"closed"},host:{listeners:{input:"manualDateChange($event.target.value)",change:"manualDateChange($event.target.value, true)",focus:"onFocus()",blur:"onBlur()"},properties:{disabled:"disabled"}},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>En),multi:!0},{provide:y.NG_VALIDATORS,useExisting:(0,m.forwardRef)(()=>En),multi:!0},{provide:tn,useExisting:Cn}],exportAs:["ngbDatepicker"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:En,decorators:[{type:m.Directive,args:[{selector:"input[ngbDatepicker]",exportAs:"ngbDatepicker",standalone:!0,host:{"(input)":"manualDateChange($event.target.value)","(change)":"manualDateChange($event.target.value, true)","(focus)":"onFocus()","(blur)":"onBlur()","[disabled]":"disabled"},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>En),multi:!0},{provide:y.NG_VALIDATORS,useExisting:(0,m.forwardRef)(()=>En),multi:!0},{provide:tn,useExisting:Cn}]}]}],ctorParameters:function(){return[{type:Tn},{type:m.ElementRef},{type:m.ViewContainerRef},{type:m.Renderer2},{type:m.NgZone},{type:We},{type:nn},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.ChangeDetectorRef},{type:Cn}]},propDecorators:{autoClose:[{type:m.Input}],contentTemplate:[{type:m.Input}],datepickerClass:[{type:m.Input}],dayTemplate:[{type:m.Input}],dayTemplateData:[{type:m.Input}],displayMonths:[{type:m.Input}],firstDayOfWeek:[{type:m.Input}],footerTemplate:[{type:m.Input}],markDisabled:[{type:m.Input}],minDate:[{type:m.Input}],maxDate:[{type:m.Input}],navigation:[{type:m.Input}],outsideDays:[{type:m.Input}],placement:[{type:m.Input}],popperOptions:[{type:m.Input}],restoreFocus:[{type:m.Input}],showWeekNumbers:[{type:m.Input}],startDate:[{type:m.Input}],container:[{type:m.Input}],positionTarget:[{type:m.Input}],weekdays:[{type:m.Input}],dateSelect:[{type:m.Output}],navigate:[{type:m.Output}],closed:[{type:m.Output}],disabled:[{type:m.Input}]}});class Rn extends We{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){switch(t=new Ae(t.year,t.month,t.day),e){case"y":return(t=this._setYear(t,t.year+n)).month=1,t.day=1,t;case"m":return(t=this._setMonth(t,t.month+n)).day=1,t;case"d":return this._setDay(t,t.day+n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=this.toGregorian(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=t[(11-e)%7],i=this.toGregorian(n);i.setDate(i.getDate()+4-(i.getDay()||7));const s=i.getTime(),a=this.toGregorian(new Ae(n.year,1,1));return Math.floor(Math.round((s-a.getTime())/864e5)/7)+1}getToday(){return this.fromGregorian(new Date)}isValid(t){return null!=t&&Vt(t.year)&&Vt(t.month)&&Vt(t.day)&&!isNaN(this.toGregorian(t).getTime())}_setDay(t,e){e=+e;let n=this.getDaysPerMonth(t.month,t.year);if(e<=0)for(;e<=0;)t=this._setMonth(t,t.month-1),n=this.getDaysPerMonth(t.month,t.year),e+=n;else if(e>n)for(;e>n;)e-=n,t=this._setMonth(t,t.month+1),n=this.getDaysPerMonth(t.month,t.year);return t.day=e,t}_setMonth(t,e){return e=+e,t.year=t.year+Math.floor((e-1)/12),t.month=Math.floor(((e-1)%12+12)%12)+1,t}_setYear(t,e){return t.year=+e,t}}function Pn(t){const e=t.getFullYear();return e%4==0&&e%100!=0||e%400==0}function Fn(t,e){return t-e*Math.floor(t/e)}Rn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rn,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Rn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rn}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rn,decorators:[{type:m.Injectable}]});const Vn=1721425.5,An=1948439.5;class Nn extends Rn{fromGregorian(t){const e=t.getFullYear(),n=t.getMonth(),i=t.getDate();let s=1721424.5+365*(e-1)+Math.floor((e-1)/4)+-Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*(n+1)-362)/12+(n+1<=2?0:Pn(t)?-1:-2)+i);s=Math.floor(s)+.5;const a=s-An,o=Math.floor((30*a+10646)/10631);let r=Math.ceil((a-29-(354*((l=o)-1)+Math.floor((3+11*l)/30)))/29.5);var l;r=Math.min(r,11);const c=Math.ceil(a-function(t,e){return Math.ceil(29.5*e)+354*(t-1)+Math.floor((3+11*t)/30)}(o,r))+1;return new Ae(o,r+1,c)}toGregorian(t){const e=t.year,n=t.month-1,i=t.day+Math.ceil(29.5*n)+354*(e-1)+Math.floor((3+11*e)/30)+An-1,s=Math.floor(i-.5)+.5,a=s-Vn,o=Math.floor(a/146097),r=Fn(a,146097),l=Math.floor(r/36524),c=Fn(r,36524),d=Math.floor(c/1461),h=Fn(c,1461),p=Math.floor(h/365);let u=400*o+100*l+4*d+p;4!==l&&4!==p&&u++;const g=s-(Vn+365*(u-1)+Math.floor((u-1)/4)-Math.floor((u-1)/100)+Math.floor((u-1)/400)),m=s<1721424.5+365*(u-1)+Math.floor((u-1)/4)-Math.floor((u-1)/100)+Math.floor((u-1)/400)+Math.floor(739/12+(Pn(new Date(u,3,1))?-1:-2)+1)?0:Pn(new Date(u,3,1))?1:2,f=Math.floor((12*(g+m)+373)/367),b=1721424.5+365*(u-1)+Math.floor((u-1)/4)-Math.floor((u-1)/100)+Math.floor((u-1)/400)+Math.floor((367*f-362)/12+(f<=2?0:Pn(new Date(u,f-1,1))?-1:-2)+1);return new Date(u,f-1,s-b+1)}getDaysPerMonth(t,e){e+=Math.floor(t/13);let n=29+(t=(t-1)%12+1)%2;return 12===t&&(14+11*e)%30<11&&n++,n}}Nn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Nn,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Nn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Nn}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Nn,decorators:[{type:m.Injectable}]});const jn=new Date(1882,10,12),Ln=new Date(2174,10,25),zn=1300,Bn=["101010101010","110101010100","111011001001","011011010100","011011101010","001101101100","101010101101","010101010101","011010101001","011110010010","101110101001","010111010100","101011011010","010101011100","110100101101","011010010101","011101001010","101101010100","101101101010","010110101101","010010101110","101001001111","010100010111","011010001011","011010100101","101011010101","001011010110","100101011011","010010011101","101001001101","110100100110","110110010101","010110101100","100110110110","001010111010","101001011011","010100101011","101010010101","011011001010","101011101001","001011110100","100101110110","001010110110","100101010110","101011001010","101110100100","101111010010","010111011001","001011011100","100101101101","010101001101","101010100101","101101010010","101110100101","010110110100","100110110110","010101010111","001010010111","010101001011","011010100011","011101010010","101101100101","010101101010","101010101011","010100101011","110010010101","110101001010","110110100101","010111001010","101011010110","100101010111","010010101011","100101001011","101010100101","101101010010","101101101010","010101110101","001001110110","100010110111","010001011011","010101010101","010110101001","010110110100","100111011010","010011011101","001001101110","100100110110","101010101010","110101010100","110110110010","010111010101","001011011010","100101011011","010010101011","101001010101","101101001001","101101100100","101101110001","010110110100","101010110101","101001010101","110100100101","111010010010","111011001001","011011010100","101011101001","100101101011","010010101011","101010010011","110101001001","110110100100","110110110010","101010111001","010010111010","101001011011","010100101011","101010010101","101100101010","101101010101","010101011100","010010111101","001000111101","100100011101","101010010101","101101001010","101101011010","010101101101","001010110110","100100111011","010010011011","011001010101","011010101001","011101010100","101101101010","010101101100","101010101101","010101010101","101100101001","101110010010","101110101001","010111010100","101011011010","010101011010","101010101011","010110010101","011101001001","011101100100","101110101010","010110110101","001010110110","101001010110","111001001101","101100100101","101101010010","101101101010","010110101101","001010101110","100100101111","010010010111","011001001011","011010100101","011010101100","101011010110","010101011101","010010011101","101001001101","110100010110","110110010101","010110101010","010110110101","001011011010","100101011011","010010101101","010110010101","011011001010","011011100100","101011101010","010011110101","001010110110","100101010110","101010101010","101101010100","101111010010","010111011001","001011101010","100101101101","010010101101","101010010101","101101001010","101110100101","010110110010","100110110101","010011010110","101010010111","010101000111","011010010011","011101001001","101101010101","010101101010","101001101011","010100101011","101010001011","110101000110","110110100011","010111001010","101011010110","010011011011","001001101011","100101001011","101010100101","101101010010","101101101001","010101110101","000101110110","100010110111","001001011011","010100101011","010101100101","010110110100","100111011010","010011101101","000101101101","100010110110","101010100110","110101010010","110110101001","010111010100","101011011010","100101011011","010010101011","011001010011","011100101001","011101100010","101110101001","010110110010","101010110101","010101010101","101100100101","110110010010","111011001001","011011010010","101011101001","010101101011","010010101011","101001010101","110100101001","110101010100","110110101010","100110110101","010010111010","101000111011","010010011011","101001001101","101010101010","101011010101","001011011010","100101011101","010001011110","101000101110","110010011010","110101010101","011010110010","011010111001","010010111010","101001011101","010100101101","101010010101","101101010010","101110101000","101110110100","010110111001","001011011010","100101011010","101101001010","110110100100","111011010001","011011101000","101101101010","010101101101","010100110101","011010010101","110101001010","110110101000","110111010100","011011011010","010101011011","001010011101","011000101011","101100010101","101101001010","101110010101","010110101010","101010101110","100100101110","110010001111","010100100111","011010010101","011010101010","101011010110","010101011101","001010011101"];class $n extends Nn{fromGregorian(t){let e=1,n=0,i=1300,s=function(t,e){const n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),s=Math.abs(n-i);return Math.round(s/864e5)}(t,jn);if(t.getTime()-jn.getTime()>=0&&t.getTime()-Ln.getTime()<=0){let t=1300;for(let a=0;a<Bn.length;a++,t++)for(let o=0;o<12;o++){let r=+Bn[a][o]+29;if(s<=r)return e=s+1,e>r&&(e=1,o++),o>11&&(o=0,t++),n=o,i=t,new Ae(i,n+1,e);s-=r}return null}return super.fromGregorian(t)}toGregorian(t){const e=t.year,n=t.month-1,i=t.day;let s=new Date(jn),a=i-1;if(e>=zn&&e<=1600){for(let t=0;t<e-zn;t++)for(let e=0;e<12;e++)a+=+Bn[t][e]+29;for(let t=0;t<n;t++)a+=+Bn[e-zn][t]+29;s.setDate(jn.getDate()+a)}else s=super.toGregorian(t);return s}getDaysPerMonth(t,e){return e>=zn&&e<=1600?+Bn[e-zn][t-1]+29:super.getDaysPerMonth(t,e)}}function Hn(t){let e=Zn(function(t,e,n){let i=Yn(t);return Kn(i.gy,3,i.march)+31*(e-1)-qn(e,7)*(e-7)+n-1}(t.year,t.month,t.day));return e.setHours(6,30,3,200),e}function Wn(t,e){return e=+e,t.year=t.year+Math.floor((e-1)/12),t.month=Math.floor(((e-1)%12+12)%12)+1,t}function Un(t,e){return t-e*Math.floor(t/e)}function qn(t,e){return Math.trunc(t/e)}function Yn(t){let e=[-61,9,38,199,426,686,756,818,1111,1181,1210,1635,2060,2097,2192,2262,2324,2394,2456,3178];const n=e.length,i=t+621;let s,a=-14,o=e[0];if(t<o||t>=e[n-1])throw new Error("Invalid Jalali year "+t);for(let i=1;i<n;i+=1){const n=e[i];if(s=n-o,t<n)break;a=a+8*qn(s,33)+qn(Un(s,33),4),o=n}let r=t-o;a=a+8*qn(r,33)+qn(Un(r,33)+3,4),4===Un(s,33)&&s-r===4&&(a+=1);const l=20+a-(qn(i,4)-qn(3*(qn(i,100)+1),4)-150);s-r<6&&(r=r-s+33*qn(s+4,33));let c=Un(Un(r+1,33)-1,4);return-1===c&&(c=4),{leap:c,gy:i,march:l}}function Zn(t){let e=4*t+139361631;e=e+4*qn(3*qn(4*t+183187720,146097),4)-3908;const n=5*qn(Un(e,1461),4)+308,i=qn(Un(n,153),5)+1,s=Un(qn(n,153),12)+1,a=qn(e,1461)-100100+qn(8-s,6);return new Date(a,s-1,i)}function Kn(t,e,n){let i=qn(1461*(t+qn(e-8,6)+100100),4)+qn(153*Un(e+9,12)+2,5)+n-34840408;return i=i-qn(3*qn(t+100100+qn(e-8,6),100),4)+752,i}function Gn(t,e){return t<=6?31:t<=11||0===Yn(e).leap?30:29}$n.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$n,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),$n.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$n}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$n,decorators:[{type:m.Injectable}]});class Xn extends We{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){switch(t=new Ae(t.year,t.month,t.day),e){case"y":return(t=function(t,e){return t.year=+e,t}(t,t.year+n)).month=1,t.day=1,t;case"m":return(t=Wn(t,t.month+n)).day=1,t;case"d":return function(t,e){let n=Gn(t.month,t.year);if(e<=0)for(;e<=0;)n=Gn((t=Wn(t,t.month-1)).month,t.year),e+=n;else if(e>n)for(;e>n;)e-=n,n=Gn((t=Wn(t,t.month+1)).month,t.year);return t.day=e,t}(t,t.day+n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=Hn(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=t[(11-e)%7],i=Hn(n);i.setDate(i.getDate()+4-(i.getDay()||7));const s=i.getTime(),a=Hn(new Ae(n.year,1,1));return Math.floor(Math.round((s-a.getTime())/864e5)/7)+1}getToday(){return function(t){let e,n,i,s=Zn(t).getFullYear(),a=s-621,o=Yn(a);if(i=t-Kn(s,3,o.march),i>=0){if(i<=185)return n=1+qn(i,31),e=Un(i,31)+1,new Ae(a,n,e);i-=186}else a-=1,i+=179,1===o.leap&&(i+=1);return n=7+qn(i,30),e=Un(i,30)+1,new Ae(a,n,e)}(Kn((t=new Date).getFullYear(),t.getMonth()+1,t.getDate()));var t}isValid(t){return null!=t&&At(t.year)&&At(t.month)&&At(t.day)&&!isNaN(Hn(t).getTime())}}Xn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xn,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Xn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xn}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xn,decorators:[{type:m.Injectable}]});const Jn=25920;function Qn(t){return t%4==0&&t%100!=0||t%400==0}function ti(t){let e=Math.floor((235*t-234)/19),n=13753*e+12084,i=29*e+Math.floor(n/Jn),s=n%Jn,a=i%7;return 2!==a&&4!==a&&6!==a||(i++,a=i%7),1===a&&s>16404&&!si(t)?i+=2:0===a&&s>23269&&si(t-1)&&i++,i}function ei(t,e){let n=[31,28,31,30,31,30,31,31,30,31,30,31];return Qn(e)&&n[1]++,n[t-1]}function ni(t){return si(t)?13:12}function ii(t){return ti(t+1)-ti(t)}function si(t){if(null!=t){let e=(12*t+17)%19;return e>=(e<0?-7:12)}return!1}function ai(t,e){let n=ti(e+1)-ti(e),i=(n<=380?n:n-30)-353,s=si(e)?[30,29,29,29,30,30,29,30,29,30,29,30,29]:[30,29,29,29,30,29,30,29,30,29,30,29];return i>0&&s[2]++,i>1&&s[1]++,s[t-1]}function oi(t){let e=0;for(let n=1;n<t.month;n++)e+=ai(n,t.year);return e+t.day}function ri(t){const e=new Date(t),n=e.getFullYear(),i=e.getMonth(),s=e.getDate();let a=1721424.5+365*(n-1)+Math.floor((n-1)/4)-Math.floor((n-1)/100)+Math.floor((n-1)/400)+Math.floor((367*(i+1)-362)/12+(i+1<=2?0:Qn(n)?-1:-2)+s);a=Math.floor(a+.5);let o=a-347997,r=Math.floor(o*Jn/765433),l=Math.floor((19*r+234)/235)+1,c=ti(l),d=o-c;for(;d<1;)l--,c=ti(l),d=o-c;let h=1,p=d;for(;p>ai(h,l);)p-=ai(h,l),h++;return new Ae(l,h,p)}function li(t){const e=t.year,n=t.month,i=t.day;let s=ti(e);for(let t=1;t<n;t++)s+=ai(t,e);s+=i;let a=s-2092591,o=a>=0;o||(a=-a);let r=1970,l=1,c=1;for(;a>0;)o?a>=(Qn(r)?366:365)?(a-=Qn(r)?366:365,r++):a>=ei(l,r)?(a-=ei(l,r),l++):(c+=a,a=0):a>=(Qn(r-1)?366:365)?(a-=Qn(r-1)?366:365,r--):(l>1?l--:(l=12,r--),a>=ei(l,r)?a-=ei(l,r):(c=ei(l,r)-a+1,a=0));return new Date(r,l-1,c)}function ci(t){if(!t)return"";const e=["","א","ב","ג","ד","ה","ו","ז","ח","ט"],n=["י","יא","יב","יג","יד","טו","טז","יז","יח","יט"],i=["","","כ","ל","מ","נ","ס","ע","פ","צ"],s=["","ק","ר","ש","ת","תק","תר","תש","תת","תתק"],a=["","א","ב","בא","בב","ה","הא","הב","הבא","הבב"];let o=0,r=[],l=0;for(;t>0;){let c=t%10;if(0===l)o=c;else if(1===l)1!==c?r.unshift(i[c],e[o]):r.unshift(n[o]);else{if(2!==l){5!==c&&r.unshift(a[c],"׳"," ");break}r.unshift(s[c])}t=Math.floor(t/10),0===l&&0===t&&r.unshift(e[c]),l++}return r=r.join("").split(""),1===r.length?r.push("׳"):r.length>1&&r.splice(r.length-1,0,"״"),r.join("")}class di extends We{getDaysPerWeek(){return 7}getMonths(t){return t&&si(t)?[1,2,3,4,5,6,7,8,9,10,11,12,13]:[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}isValid(t){if(null!=t){let e=Vt(t.year)&&Vt(t.month)&&Vt(t.day);return e=e&&t.month>0&&t.month<=(si(t.year)?13:12),e=e&&t.day>0&&t.day<=ai(t.month,t.year),e&&!isNaN(li(t).getTime())}return!1}getNext(t,e="d",n=1){switch(t=new Ae(t.year,t.month,t.day),e){case"y":return t.year+=n,t.month=1,t.day=1,t;case"m":return(t=function(t,e){let n=e>=0;for(n||(e=-e);e>0;)n?e>ni(t.year)-t.month?(e-=ni(t.year)-t.month+1,t.year++,t.month=1):(t.month+=e,e=0):e>=t.month?(t.year--,e-=t.month,t.month=ni(t.year)):(t.month-=e,e=0);return t}(t,n)).day=1,t;case"d":return function(t,e){let n=e>=0;for(n||(e=-e);e>0;)n?e>ii(t.year)-oi(t)?(e-=ii(t.year)-oi(t)+1,t.year++,t.month=1,t.day=1):e>ai(t.month,t.year)-t.day?(e-=ai(t.month,t.year)-t.day+1,t.month++,t.day=1):(t.day+=e,e=0):e>=t.day?(e-=t.day,t.month--,0===t.month&&(t.year--,t.month=ni(t.year)),t.day=ai(t.month,t.year)):(t.day-=e,e=0);return t}(t,n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=li(t).getDay();return 0===e?7:e}getWeekNumber(t,e){const n=t[t.length-1];return Math.ceil(oi(n)/7)}getToday(){return ri(new Date)}toGregorian(t){return Be(li(t))}fromGregorian(t){return ri($e(t))}}di.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:di,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),di.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:di}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:di,decorators:[{type:m.Injectable}]});const hi=["שני","שלישי","רביעי","חמישי","שישי","שבת","ראשון"],pi=["תשרי","חשון","כסלו","טבת","שבט","אדר","ניסן","אייר","סיון","תמוז","אב","אלול"],ui=["תשרי","חשון","כסלו","טבת","שבט","אדר א׳","אדר ב׳","ניסן","אייר","סיון","תמוז","אב","אלול"];class gi extends Ye{getMonthShortName(t,e){return this.getMonthFullName(t,e)}getMonthFullName(t,e){return si(e)?ui[t-1]||"":pi[t-1]||""}getWeekdayLabel(t,e){return hi[t-1]||""}getDayAriaLabel(t){return`${ci(t.day)} ${this.getMonthFullName(t.month,t.year)} ${ci(t.year)}`}getDayNumerals(t){return ci(t.day)}getWeekNumerals(t){return ci(t)}getYearNumerals(t){return ci(t)}}function mi(t){return new Date(t.year-543,t.month-1,t.day)}function fi(t){return new Ae(t.getFullYear()+543,t.getMonth()+1,t.getDate())}gi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:gi,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),gi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:gi}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:gi,decorators:[{type:m.Injectable}]});class bi extends Ue{getToday(){return fi(new Date)}getNext(t,e="d",n=1){let i=mi(t),s=!0,a=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":a+=n,i.setMonth(a),a%=12,a<0&&(a+=12);break;case"d":i.setDate(i.getDate()+n),s=!1;break;default:return t}return s&&i.getMonth()!==a&&i.setDate(0),fi(i)}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){let e=mi(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=mi(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}isValid(t){if(!(t&&At(t.year)&&At(t.month)&&At(t.day)))return!1;if(0===t.year)return!1;const e=mi(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year-543&&e.getMonth()+1===t.month&&e.getDate()===t.day}}bi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bi,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),bi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bi}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bi,decorators:[{type:m.Injectable}]});class yi extends nn{fromModel(t){return t instanceof Date&&!isNaN(t.getTime())?this._fromNativeDate(t):null}toModel(t){return t&&At(t.year)&&At(t.month)&&At(t.day)?this._toNativeDate(t):null}_fromNativeDate(t){return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}}_toNativeDate(t){const e=new Date(t.year,t.month-1,t.day,12);return e.setFullYear(t.year),e}}yi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:yi,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),yi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:yi}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:yi,decorators:[{type:m.Injectable}]});class vi extends yi{_fromNativeDate(t){return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()}}_toNativeDate(t){const e=new Date(Date.UTC(t.year,t.month-1,t.day));return e.setUTCFullYear(t.year),e}}vi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:vi,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),vi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:vi}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:vi,decorators:[{type:m.Injectable}]});const _i=[rn,an,En,on];class xi{}xi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:xi,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),xi.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:xi,imports:[rn,an,En,on],exports:[rn,an,En,on]}),xi.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:xi,imports:[rn,on]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:xi,decorators:[{type:m.NgModule,args:[{exports:_i,imports:_i}]}]});class wi{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t}}wi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:wi,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),wi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:wi,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:wi,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class Di{}Di.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Di,deps:[],target:m["ɵɵFactoryTarget"].Directive}),Di.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Di,isStandalone:!0,selector:".navbar",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Di,decorators:[{type:m.Directive,args:[{selector:".navbar",standalone:!0}]}]});class Ii{constructor(t,e){this.elementRef=t,this._renderer=e,this._disabled=!1}set disabled(t){this._disabled=""===t||!0===t,this._renderer.setProperty(this.elementRef.nativeElement,"disabled",this._disabled)}get disabled(){return this._disabled}}Ii.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ii,deps:[{token:m.ElementRef},{token:m.Renderer2}],target:m["ɵɵFactoryTarget"].Directive}),Ii.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ii,isStandalone:!0,selector:"[ngbDropdownItem]",inputs:{disabled:"disabled"},host:{properties:{"class.disabled":"disabled",tabIndex:"disabled ? -1 : 0"},classAttribute:"dropdown-item"},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ii,decorators:[{type:m.Directive,args:[{selector:"[ngbDropdownItem]",standalone:!0,host:{class:"dropdown-item","[class.disabled]":"disabled","[tabIndex]":"disabled ? -1 : 0"}}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.Renderer2}]},propDecorators:{disabled:[{type:m.Input}]}});class ki{constructor(t,e){this.dropdown=t,this.placement="bottom",this.isOpen=!1,this.nativeElement=e.nativeElement}}ki.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ki,deps:[{token:(0,m.forwardRef)(()=>Si)},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),ki.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ki,isStandalone:!0,selector:"[ngbDropdownMenu]",host:{listeners:{"keydown.ArrowUp":"dropdown.onKeyDown($event)","keydown.ArrowDown":"dropdown.onKeyDown($event)","keydown.Home":"dropdown.onKeyDown($event)","keydown.End":"dropdown.onKeyDown($event)","keydown.Enter":"dropdown.onKeyDown($event)","keydown.Space":"dropdown.onKeyDown($event)","keydown.Tab":"dropdown.onKeyDown($event)","keydown.Shift.Tab":"dropdown.onKeyDown($event)"},properties:{"class.dropdown-menu":"true","class.show":"dropdown.isOpen()"}},queries:[{propertyName:"menuItems",predicate:Ii}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ki,decorators:[{type:m.Directive,args:[{selector:"[ngbDropdownMenu]",standalone:!0,host:{"[class.dropdown-menu]":"true","[class.show]":"dropdown.isOpen()","(keydown.ArrowUp)":"dropdown.onKeyDown($event)","(keydown.ArrowDown)":"dropdown.onKeyDown($event)","(keydown.Home)":"dropdown.onKeyDown($event)","(keydown.End)":"dropdown.onKeyDown($event)","(keydown.Enter)":"dropdown.onKeyDown($event)","(keydown.Space)":"dropdown.onKeyDown($event)","(keydown.Tab)":"dropdown.onKeyDown($event)","(keydown.Shift.Tab)":"dropdown.onKeyDown($event)"}}]}],ctorParameters:function(){return[{type:Si,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>Si)]}]},{type:m.ElementRef}]},propDecorators:{menuItems:[{type:m.ContentChildren,args:[Ii]}]}});class Ci{constructor(t,e){this.dropdown=t,this.nativeElement=e.nativeElement}}Ci.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ci,deps:[{token:(0,m.forwardRef)(()=>Si)},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),Ci.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ci,isStandalone:!0,selector:"[ngbDropdownAnchor]",host:{properties:{"attr.aria-expanded":"dropdown.isOpen()"},classAttribute:"dropdown-toggle"},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ci,decorators:[{type:m.Directive,args:[{selector:"[ngbDropdownAnchor]",standalone:!0,host:{class:"dropdown-toggle","[attr.aria-expanded]":"dropdown.isOpen()"}}]}],ctorParameters:function(){return[{type:Si,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>Si)]}]},{type:m.ElementRef}]}});class Mi extends Ci{constructor(t,e){super(t,e)}}Mi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Mi,deps:[{token:(0,m.forwardRef)(()=>Si)},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),Mi.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Mi,isStandalone:!0,selector:"[ngbDropdownToggle]",host:{listeners:{click:"dropdown.toggle()","keydown.ArrowUp":"dropdown.onKeyDown($event)","keydown.ArrowDown":"dropdown.onKeyDown($event)","keydown.Home":"dropdown.onKeyDown($event)","keydown.End":"dropdown.onKeyDown($event)","keydown.Tab":"dropdown.onKeyDown($event)","keydown.Shift.Tab":"dropdown.onKeyDown($event)"},properties:{"attr.aria-expanded":"dropdown.isOpen()"},classAttribute:"dropdown-toggle"},providers:[{provide:Ci,useExisting:(0,m.forwardRef)(()=>Mi)}],usesInheritance:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Mi,decorators:[{type:m.Directive,args:[{selector:"[ngbDropdownToggle]",standalone:!0,host:{class:"dropdown-toggle","[attr.aria-expanded]":"dropdown.isOpen()","(click)":"dropdown.toggle()","(keydown.ArrowUp)":"dropdown.onKeyDown($event)","(keydown.ArrowDown)":"dropdown.onKeyDown($event)","(keydown.Home)":"dropdown.onKeyDown($event)","(keydown.End)":"dropdown.onKeyDown($event)","(keydown.Tab)":"dropdown.onKeyDown($event)","(keydown.Shift.Tab)":"dropdown.onKeyDown($event)"},providers:[{provide:Ci,useExisting:(0,m.forwardRef)(()=>Mi)}]}]}],ctorParameters:function(){return[{type:Si,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>Si)]}]},{type:m.ElementRef}]}});class Si{constructor(t,e,n,i,s,a){this._changeDetector=t,this._document=n,this._ngZone=i,this._elementRef=s,this._renderer=a,this._destroyCloseHandlers$=new v.Subject,this._bodyContainer=null,this._open=!1,this.openChange=new m.EventEmitter,this.placement=e.placement,this.popperOptions=e.popperOptions,this.container=e.container,this.autoClose=e.autoClose,this._positioning=kn(),this.display=this._elementRef.nativeElement.closest(".navbar")?"static":"dynamic"}ngAfterContentInit(){this._ngZone.onStable.pipe((0,_.take)(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(t){if(t.container&&this._open&&this._applyContainer(this.container),t.placement&&!t.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container}),this._applyPlacementClasses()),t.dropdownClass){const{currentValue:e,previousValue:n}=t.dropdownClass;this._applyCustomDropdownClass(e,n)}t.autoClose&&this._open&&(this.autoClose=t.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),"dynamic"===this.display&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(Mn([0,2])(t))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),hn(this._ngZone,this._document,this.autoClose,t=>{this.close(),0===t&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){var t;this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(t){const e=t.which,n=this._getMenuElements();let i=-1,s=null;const a=this._isEventFromToggle(t);if(!a&&n.length&&n.forEach((e,n)=>{e.contains(t.target)&&(s=e),e===this._document.activeElement&&(i=n)}),e!==Pe.Space&&e!==Pe.Enter){if(e!==Pe.Tab){if(a||s){if(this.open(),n.length){switch(e){case Pe.ArrowDown:i=Math.min(i+1,n.length-1);break;case Pe.ArrowUp:if(this._isDropup()&&-1===i){i=n.length-1;break}i=Math.max(i-1,0);break;case Pe.Home:i=0;break;case Pe.End:i=n.length-1}n[i].focus()}t.preventDefault()}}else if(t.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===t.target)return void("body"!==this.container||t.shiftKey?t.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const e=this._menu.nativeElement.querySelectorAll(pn);t.shiftKey&&t.target===e[0]?(this._anchor.nativeElement.focus(),t.preventDefault()):t.shiftKey||t.target!==e[e.length-1]||(this._anchor.nativeElement.focus(),this.close())}else(0,v.fromEvent)(t.target,"focusout").pipe((0,_.take)(1)).subscribe(({relatedTarget:t})=>{this._elementRef.nativeElement.contains(t)||this.close()})}}else!s||!0!==this.autoClose&&"inside"!==this.autoClose||(0,v.fromEvent)(s,"click").pipe((0,_.take)(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(t){return this._anchor.nativeElement.contains(t.target)}_getMenuElements(){const t=this._menu;return null==t?[]:t.menuItems.filter(t=>!t.disabled).map(t=>t.elementRef.nativeElement)}_positionMenu(){const t=this._menu;this.isOpen()&&t&&("dynamic"===this.display?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(t){return Array.isArray(t)?t[0]:t.split(" ")[0]}_resetContainer(){const t=this._renderer;if(this._menu){const e=this._elementRef.nativeElement,n=this._menu.nativeElement;t.appendChild(e,n)}this._bodyContainer&&(t.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(t=null){if(this._resetContainer(),"body"===t){const t=this._renderer,e=this._menu.nativeElement,n=this._bodyContainer=this._bodyContainer||t.createElement("div");t.setStyle(n,"position","absolute"),t.setStyle(e,"position","static"),t.setStyle(n,"z-index","1055"),t.appendChild(n,e),t.appendChild(this._document.body,n)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(t,e){const n="body"===this.container?this._bodyContainer:this._elementRef.nativeElement;n&&(e&&this._renderer.removeClass(n,e),t&&this._renderer.addClass(n,t))}_applyPlacementClasses(t){const e=this._menu;if(e){t||(t=this._getFirstPlacement(this.placement));const n=this._renderer,i=this._elementRef.nativeElement;n.removeClass(i,"dropup"),n.removeClass(i,"dropdown");const{nativeElement:s}=e;"static"===this.display?(e.placement=null,n.setAttribute(s,"data-bs-popper","static")):(e.placement=t,n.removeAttribute(s,"data-bs-popper"));const a=-1!==t.search("^top")?"dropup":"dropdown";n.addClass(i,a);const o=this._bodyContainer;o&&(n.removeClass(o,"dropup"),n.removeClass(o,"dropdown"),n.addClass(o,a))}}}Si.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Si,deps:[{token:m.ChangeDetectorRef},{token:wi},{token:b.DOCUMENT},{token:m.NgZone},{token:m.ElementRef},{token:m.Renderer2}],target:m["ɵɵFactoryTarget"].Directive}),Si.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Si,isStandalone:!0,selector:"[ngbDropdown]",inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:["open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},host:{properties:{"class.show":"isOpen()"}},queries:[{propertyName:"_menu",first:!0,predicate:ki,descendants:!0},{propertyName:"_anchor",first:!0,predicate:Ci,descendants:!0}],exportAs:["ngbDropdown"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Si,decorators:[{type:m.Directive,args:[{selector:"[ngbDropdown]",exportAs:"ngbDropdown",standalone:!0,host:{"[class.show]":"isOpen()"}}]}],ctorParameters:function(){return[{type:m.ChangeDetectorRef},{type:wi},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.NgZone},{type:m.ElementRef},{type:m.Renderer2}]},propDecorators:{_menu:[{type:m.ContentChild,args:[ki,{static:!1}]}],_anchor:[{type:m.ContentChild,args:[Ci,{static:!1}]}],autoClose:[{type:m.Input}],dropdownClass:[{type:m.Input}],_open:[{type:m.Input,args:["open"]}],placement:[{type:m.Input}],popperOptions:[{type:m.Input}],container:[{type:m.Input}],display:[{type:m.Input}],openChange:[{type:m.Output}]}});const Ti=[Si,Ci,Mi,ki,Ii];class Oi{}Oi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Oi,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Oi.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Oi,imports:[Si,Ci,Mi,ki,Ii],exports:[Si,Ci,Mi,ki,Ii]}),Oi.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Oi}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Oi,decorators:[{type:m.NgModule,args:[{imports:Ti,exports:Ti}]}]});class Ei{constructor(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}}class Ri{constructor(t,e,n,i,s,a){this._componentType=t,this._injector=e,this._viewContainerRef=n,this._renderer=i,this._ngZone=s,this._applicationRef=a,this._windowRef=null,this._contentRef=null}open(t,e,n=!1){this._windowRef||(this._contentRef=this._getContentRef(t,e),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));const{nativeElement:i}=this._windowRef.location,s=this._ngZone.onStable.pipe((0,_.take)(1),(0,_.mergeMap)(()=>Yt(this._ngZone,i,({classList:t})=>t.add("show"),{animation:n,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:s}}close(t=!1){return this._windowRef?Yt(this._ngZone,this._windowRef.location.nativeElement,({classList:t})=>t.remove("show"),{animation:t,runningTransition:"stop"}).pipe((0,_.tap)(()=>{var t;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),(null===(t=this._contentRef)||void 0===t?void 0:t.viewRef)&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):(0,v.of)(void 0)}_getContentRef(t,e){if(t){if(t instanceof m.TemplateRef){const n=t.createEmbeddedView(e);return this._applicationRef.attachView(n),new Ei([n.rootNodes],n)}return new Ei([[this._renderer.createText(`${t}`)]])}return new Ei([])}}class Pi{constructor(t,e){this._el=t,this._zone=e}ngOnInit(){this._zone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{Yt(this._zone,this._el.nativeElement,(t,e)=>{e&&Bt(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Yt(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}}Pi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Pi,deps:[{token:m.ElementRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),Pi.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Pi,isStandalone:!0,selector:"ngb-modal-backdrop",inputs:{animation:"animation",backdropClass:"backdropClass"},host:{properties:{class:'"modal-backdrop" + (backdropClass ? " " + backdropClass : "")',"class.show":"!animation","class.fade":"animation"},styleAttribute:"z-index: 1055"},ngImport:f,template:"",isInline:!0,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Pi,decorators:[{type:m.Component,args:[{selector:"ngb-modal-backdrop",standalone:!0,encapsulation:m.ViewEncapsulation.None,template:"",host:{"[class]":'"modal-backdrop" + (backdropClass ? " " + backdropClass : "")',"[class.show]":"!animation","[class.fade]":"animation",style:"z-index: 1055"}}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.NgZone}]},propDecorators:{animation:[{type:m.Input}],backdropClass:[{type:m.Input}]}});class Fi{update(t){}close(t){}dismiss(t){}}const Vi=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],Ai=["animation","backdropClass"];class Ni{constructor(t,e,n,i){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=i,this._closed=new v.Subject,this._dismissed=new v.Subject,this._hidden=new v.Subject,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}_applyWindowOptions(t,e){Vi.forEach(n=>{Nt(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){Ai.forEach(n=>{Nt(e[n])&&(t[n]=e[n])})}update(t){this._applyWindowOptions(this._windowCmptRef.instance,t),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,t)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe((0,_.takeUntil)(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe((0,_.takeUntil)(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();jt(e)?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():(0,v.of)(void 0);t.subscribe(()=>{const{nativeElement:t}=this._windowCmptRef.location;t.parentNode.removeChild(t),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:t}=this._backdropCmptRef.location;t.parentNode.removeChild(t),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),(0,v.zip)(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var ji;!function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(ji||(ji={}));class Li{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new v.Subject,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new m.EventEmitter,this.shown=new v.Subject,this.hidden=new v.Subject}get fullscreenClass(){return!0===this.fullscreen?" modal-fullscreen":Ft(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,e={animation:this.animation,runningTransition:"stop"},n=Yt(this._zone,t,()=>t.classList.remove("show"),e),i=Yt(this._zone,this._dialogEl.nativeElement,()=>{},e),s=(0,v.zip)(n,i);return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const t={animation:this.animation,runningTransition:"continue"},e=Yt(this._zone,this._elRef.nativeElement,(t,e)=>{e&&Bt(t),t.classList.add("show")},t),n=Yt(this._zone,this._dialogEl.nativeElement,()=>{},t);(0,v.zip)(e,n).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{(0,v.fromEvent)(t,"keydown").pipe((0,_.takeUntil)(this._closed$),(0,_.filter)(t=>t.which===Pe.Escape)).subscribe(t=>{this.keyboard?requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(ji.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let e=!1;(0,v.fromEvent)(this._dialogEl.nativeElement,"mousedown").pipe((0,_.takeUntil)(this._closed$),(0,_.tap)(()=>e=!1),(0,_.switchMap)(()=>(0,v.fromEvent)(t,"mouseup").pipe((0,_.takeUntil)(this._closed$),(0,_.take)(1))),(0,_.filter)(({target:e})=>t===e)).subscribe(()=>{e=!0}),(0,v.fromEvent)(t,"click").pipe((0,_.takeUntil)(this._closed$)).subscribe(({target:n})=>{t===n&&("static"===this.backdrop?this._bumpBackdrop():!0!==this.backdrop||e||this._zone.run(()=>this.dismiss(ji.BACKDROP_CLICK))),e=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=un(t)[0];(e||n||t).focus()}}_restoreFocus(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&Yt(this._zone,this._elRef.nativeElement,({classList:t})=>(t.add("modal-static"),()=>t.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}Li.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Li,deps:[{token:b.DOCUMENT},{token:m.ElementRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),Li.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Li,isStandalone:!0,selector:"ngb-modal-window",inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},host:{attributes:{role:"dialog",tabindex:"-1"},properties:{class:'"modal d-block" + (windowClass ? " " + windowClass : "")',"class.fade":"animation","attr.aria-modal":"true","attr.aria-labelledby":"ariaLabelledBy","attr.aria-describedby":"ariaDescribedBy"}},viewQueries:[{propertyName:"_dialogEl",first:!0,predicate:["dialog"],descendants:!0,static:!0}],ngImport:f,template:"\n\t\t<div\n\t\t\t#dialog\n\t\t\t[class]=\"\n\t\t\t\t'modal-dialog' +\n\t\t\t\t(size ? ' modal-' + size : '') +\n\t\t\t\t(centered ? ' modal-dialog-centered' : '') +\n\t\t\t\tfullscreenClass +\n\t\t\t\t(scrollable ? ' modal-dialog-scrollable' : '') +\n\t\t\t\t(modalDialogClass ? ' ' + modalDialogClass : '')\n\t\t\t\"\n\t\t\trole=\"document\"\n\t\t>\n\t\t\t<div class=\"modal-content\"><ng-content></ng-content></div>\n\t\t</div>\n\t",isInline:!0,styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Li,decorators:[{type:m.Component,args:[{selector:"ngb-modal-window",standalone:!0,host:{"[class]":'"modal d-block" + (windowClass ? " " + windowClass : "")',"[class.fade]":"animation",role:"dialog",tabindex:"-1","[attr.aria-modal]":"true","[attr.aria-labelledby]":"ariaLabelledBy","[attr.aria-describedby]":"ariaDescribedBy"},template:"\n\t\t<div\n\t\t\t#dialog\n\t\t\t[class]=\"\n\t\t\t\t'modal-dialog' +\n\t\t\t\t(size ? ' modal-' + size : '') +\n\t\t\t\t(centered ? ' modal-dialog-centered' : '') +\n\t\t\t\tfullscreenClass +\n\t\t\t\t(scrollable ? ' modal-dialog-scrollable' : '') +\n\t\t\t\t(modalDialogClass ? ' ' + modalDialogClass : '')\n\t\t\t\"\n\t\t\trole=\"document\"\n\t\t>\n\t\t\t<div class=\"modal-content\"><ng-content></ng-content></div>\n\t\t</div>\n\t",encapsulation:m.ViewEncapsulation.None,styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"]}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.ElementRef},{type:m.NgZone}]},propDecorators:{_dialogEl:[{type:m.ViewChild,args:["dialog",{static:!0}]}],animation:[{type:m.Input}],ariaLabelledBy:[{type:m.Input}],ariaDescribedBy:[{type:m.Input}],backdrop:[{type:m.Input}],centered:[{type:m.Input}],fullscreen:[{type:m.Input}],keyboard:[{type:m.Input}],scrollable:[{type:m.Input}],size:[{type:m.Input}],windowClass:[{type:m.Input}],modalDialogClass:[{type:m.Input}],dismissEvent:[{type:m.Output,args:["dismiss"]}]}});class zi{constructor(t){this._document=t}hide(){const t=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),e=this._document.body,n=e.style,{overflow:i,paddingRight:s}=n;if(t>0){const i=parseFloat(window.getComputedStyle(e).paddingRight);n.paddingRight=`${i+t}px`}return n.overflow="hidden",()=>{t>0&&(n.paddingRight=s),n.overflow=i}}}zi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zi,deps:[{token:b.DOCUMENT}],target:m["ɵɵFactoryTarget"].Injectable}),zi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zi,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zi,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]}]}});class Bi{constructor(t,e,n,i,s,a,o){this._applicationRef=t,this._injector=e,this._environmentInjector=n,this._document=i,this._scrollBar=s,this._rendererFactory=a,this._ngZone=o,this._activeWindowCmptHasChanged=new v.Subject,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new m.EventEmitter,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const t=this._windowCmpts[this._windowCmpts.length-1];gn(this._ngZone,t.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(t.location.nativeElement)}})}_restoreScrollBar(){const t=this._scrollBarRestoreFn;t&&(this._scrollBarRestoreFn=null,t())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(t,e,n){const i=n.container instanceof HTMLElement?n.container:Nt(n.container)?this._document.querySelector(n.container):this._document.body,s=this._rendererFactory.createRenderer(null,null);if(!i)throw new Error(`The specified modal container "${n.container||"body"}" was not found in the DOM.`);this._hideScrollBar();const a=new Fi,o=(t=n.injector||t).get(m.EnvironmentInjector,null)||this._environmentInjector,r=this._getContentRef(t,o,e,a,n);let l=!1!==n.backdrop?this._attachBackdrop(i):void 0,c=this._attachWindowComponent(i,r.nodes),d=new Ni(c,r,l,n.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(c),d.hidden.pipe((0,_.take)(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(s.removeClass(this._document.body,"modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),a.close=t=>{d.close(t)},a.dismiss=t=>{d.dismiss(t)},a.update=t=>{d.update(t)},d.update(n),1===this._modalRefs.length&&s.addClass(this._document.body,"modal-open"),l&&l.instance&&l.changeDetectorRef.detectChanges(),c.changeDetectorRef.detectChanges(),d}get activeInstances(){return this._activeInstances}dismissAll(t){this._modalRefs.forEach(e=>e.dismiss(t))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(t){let e=(0,m.createComponent)(Pi,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(e.hostView),t.appendChild(e.location.nativeElement),e}_attachWindowComponent(t,e){let n=(0,m.createComponent)(Li,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:e});return this._applicationRef.attachView(n.hostView),t.appendChild(n.location.nativeElement),n}_getContentRef(t,e,n,i,s){return n?n instanceof m.TemplateRef?this._createFromTemplateRef(n,i):Ft(n)?this._createFromString(n):this._createFromComponent(t,e,n,i,s):new Ei([])}_createFromTemplateRef(t,e){const n={$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}},i=t.createEmbeddedView(n);return this._applicationRef.attachView(i),new Ei([i.rootNodes],i)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new Ei([[e]])}_createFromComponent(t,e,n,i,s){const a=m.Injector.create({providers:[{provide:Fi,useValue:i}],parent:t}),o=(0,m.createComponent)(n,{environmentInjector:e,elementInjector:a}),r=o.location.nativeElement;return s.scrollable&&r.classList.add("component-host-scrollable"),this._applicationRef.attachView(o.hostView),new Ei([[r]],o.hostView,o)}_setAriaHidden(t){const e=t.parentElement;e&&t!==this._document.body&&(Array.from(e.children).forEach(e=>{e!==t&&"SCRIPT"!==e.nodeName&&(this._ariaHiddenValues.set(e,e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}),this._setAriaHidden(e))}_revertAriaHidden(){this._ariaHiddenValues.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(t){const e=()=>{const e=this._modalRefs.indexOf(t);e>-1&&(this._modalRefs.splice(e,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(t),this._activeInstances.emit(this._modalRefs),t.result.then(e,e)}_registerWindowCmpt(t){this._windowCmpts.push(t),this._activeWindowCmptHasChanged.next(),t.onDestroy(()=>{const e=this._windowCmpts.indexOf(t);e>-1&&(this._windowCmpts.splice(e,1),this._activeWindowCmptHasChanged.next())})}}Bi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Bi,deps:[{token:m.ApplicationRef},{token:m.Injector},{token:m.EnvironmentInjector},{token:b.DOCUMENT},{token:zi},{token:m.RendererFactory2},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Injectable}),Bi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Bi,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Bi,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:m.ApplicationRef},{type:m.Injector},{type:m.EnvironmentInjector},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:zi},{type:m.RendererFactory2},{type:m.NgZone}]}});class $i{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}$i.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$i,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),$i.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$i,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$i,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});class Hi{constructor(t,e,n){this._injector=t,this._modalStack=e,this._config=n}open(t,e={}){const n=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),e);return this._modalStack.open(this._injector,t,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(t){this._modalStack.dismissAll(t)}hasOpenModals(){return this._modalStack.hasOpenModals()}}Hi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hi,deps:[{token:m.Injector},{token:Bi},{token:$i}],target:m["ɵɵFactoryTarget"].Injectable}),Hi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hi,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hi,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:m.Injector},{type:Bi},{type:$i}]}});class Wi{}Wi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Wi,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Wi.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Wi}),Wi.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Wi,providers:[Hi]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Wi,decorators:[{type:m.NgModule,args:[{providers:[Hi]}]}]});class Ui{constructor(t){this._ngbConfig=t,this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Ui.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ui,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),Ui.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ui,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ui,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});const qi=t=>Nt(t)&&""!==t;let Yi=0;class Zi{constructor(t){this.templateRef=t}}Zi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Zi,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),Zi.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Zi,isStandalone:!0,selector:"ng-template[ngbNavContent]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Zi,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbNavContent]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class Ki{constructor(t,e){this.role=t,this.nav=e}}Ki.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ki,deps:[{token:"role",attribute:!0},{token:(0,m.forwardRef)(()=>Xi)}],target:m["ɵɵFactoryTarget"].Directive}),Ki.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ki,isStandalone:!0,selector:"[ngbNavItem]:not(ng-container)",host:{properties:{"attr.role":"role ? role : nav.roles ? 'presentation' : undefined"}},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ki,decorators:[{type:m.Directive,args:[{selector:"[ngbNavItem]:not(ng-container)",standalone:!0,host:{"[attr.role]":"role ? role : nav.roles ? 'presentation' : undefined"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Attribute,args:["role"]}]},{type:Xi,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>Xi)]}]}]}});class Gi{constructor(t,e){this._nav=t,this.elementRef=e,this.disabled=!1,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){Nt(this.domId)||(this.domId="ngb-nav-"+Yi++)}get active(){return this._nav.activeId===this.id}get id(){return qi(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Nt(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}Gi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gi,deps:[{token:(0,m.forwardRef)(()=>Xi)},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),Gi.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Gi,isStandalone:!0,selector:"[ngbNavItem]",inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.nav-item":"true"}},queries:[{propertyName:"contentTpls",predicate:Zi}],exportAs:["ngbNavItem"],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gi,decorators:[{type:m.Directive,args:[{selector:"[ngbNavItem]",exportAs:"ngbNavItem",standalone:!0,host:{"[class.nav-item]":"true"}}]}],ctorParameters:function(){return[{type:Xi,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>Xi)]}]},{type:m.ElementRef}]},propDecorators:{destroyOnHide:[{type:m.Input}],disabled:[{type:m.Input}],domId:[{type:m.Input}],_id:[{type:m.Input,args:["ngbNavItem"]}],shown:[{type:m.Output}],hidden:[{type:m.Output}],contentTpls:[{type:m.ContentChildren,args:[Zi,{descendants:!1}]}]}});class Xi{constructor(t,e,n,i){this.role=t,this._cd=n,this._document=i,this.activeIdChange=new m.EventEmitter,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this.destroy$=new v.Subject,this.navItemChange$=new v.Subject,this.navChange=new m.EventEmitter,this.animation=e.animation,this.destroyOnHide=e.destroyOnHide,this.orientation=e.orientation,this.roles=e.roles,this.keyboard=e.keyboard}click(t){t.disabled||this._updateActiveId(t.id)}onKeyDown(t){if("tablist"!==this.roles||!this.keyboard)return;const e=t.which,n=this.links.filter(t=>!t.navItem.disabled),{length:i}=n;let s=-1;if(n.forEach((t,e)=>{t.elRef.nativeElement===this._document.activeElement&&(s=e)}),i){switch(e){case Pe.ArrowLeft:if("vertical"===this.orientation)return;s=(s-1+i)%i;break;case Pe.ArrowRight:if("vertical"===this.orientation)return;s=(s+1)%i;break;case Pe.ArrowDown:if("horizontal"===this.orientation)return;s=(s+1)%i;break;case Pe.ArrowUp:if("horizontal"===this.orientation)return;s=(s-1+i)%i;break;case Pe.Home:s=0;break;case Pe.End:s=i-1}"changeWithArrows"===this.keyboard&&this.select(n[s].navItem.id),n[s].elRef.nativeElement.focus(),t.preventDefault()}}select(t){this._updateActiveId(t,!1)}ngAfterContentInit(){if(!Nt(this.activeId)){const t=this.items.first?this.items.first.id:null;qi(t)&&(this._updateActiveId(t,!1),this._cd.detectChanges())}this.items.changes.pipe((0,_.takeUntil)(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:t}){t&&!t.firstChange&&this._notifyItemChanged(t.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(t,e=!0){if(this.activeId!==t){let n=!1;e&&this.navChange.emit({activeId:this.activeId,nextId:t,preventDefault:()=>{n=!0}}),n||(this.activeId=t,this.activeIdChange.emit(t),this._notifyItemChanged(t))}}_notifyItemChanged(t){this.navItemChange$.next(this._getItemById(t))}_getItemById(t){return this.items&&this.items.find(e=>e.id===t)||null}}Xi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xi,deps:[{token:"role",attribute:!0},{token:Ui},{token:m.ChangeDetectorRef},{token:b.DOCUMENT}],target:m["ɵɵFactoryTarget"].Directive}),Xi.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Xi,isStandalone:!0,selector:"[ngbNav]",inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},host:{listeners:{"keydown.arrowLeft":"onKeyDown($event)","keydown.arrowRight":"onKeyDown($event)","keydown.arrowDown":"onKeyDown($event)","keydown.arrowUp":"onKeyDown($event)","keydown.Home":"onKeyDown($event)","keydown.End":"onKeyDown($event)"},properties:{"class.nav":"true","class.flex-column":"orientation === 'vertical'","attr.aria-orientation":"orientation === 'vertical' && roles === 'tablist' ? 'vertical' : undefined","attr.role":"role ? role : roles ? 'tablist' : undefined"}},queries:[{propertyName:"items",predicate:Gi},{propertyName:"links",predicate:m.forwardRef(function(){return Ji}),descendants:!0}],exportAs:["ngbNav"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xi,decorators:[{type:m.Directive,args:[{selector:"[ngbNav]",exportAs:"ngbNav",standalone:!0,host:{"[class.nav]":"true","[class.flex-column]":"orientation === 'vertical'","[attr.aria-orientation]":"orientation === 'vertical' && roles === 'tablist' ? 'vertical' : undefined","[attr.role]":"role ? role : roles ? 'tablist' : undefined","(keydown.arrowLeft)":"onKeyDown($event)","(keydown.arrowRight)":"onKeyDown($event)","(keydown.arrowDown)":"onKeyDown($event)","(keydown.arrowUp)":"onKeyDown($event)","(keydown.Home)":"onKeyDown($event)","(keydown.End)":"onKeyDown($event)"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Attribute,args:["role"]}]},{type:Ui},{type:m.ChangeDetectorRef},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]}]},propDecorators:{activeId:[{type:m.Input}],activeIdChange:[{type:m.Output}],animation:[{type:m.Input}],destroyOnHide:[{type:m.Input}],orientation:[{type:m.Input}],roles:[{type:m.Input}],keyboard:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}],items:[{type:m.ContentChildren,args:[Gi]}],links:[{type:m.ContentChildren,args:[(0,m.forwardRef)(()=>Ji),{descendants:!0}]}],navChange:[{type:m.Output}]}});class Ji{constructor(t,e,n,i){this.role=t,this.navItem=e,this.nav=n,this.elRef=i}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}Ji.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ji,deps:[{token:"role",attribute:!0},{token:Gi},{token:Xi},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),Ji.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ji,isStandalone:!0,selector:"[ngbNavLink]",host:{properties:{id:"navItem.domId","class.nav-link":"true","class.nav-item":"hasNavItemClass()","attr.role":"role ? role : nav.roles ? 'tab' : undefined","class.active":"navItem.active","class.disabled":"navItem.disabled","attr.tabindex":"navItem.disabled ? -1 : undefined","attr.aria-controls":"navItem.isPanelInDom() ? navItem.panelDomId : null","attr.aria-selected":"navItem.active","attr.aria-disabled":"navItem.disabled"}},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ji,decorators:[{type:m.Directive,args:[{selector:"[ngbNavLink]",standalone:!0,host:{"[id]":"navItem.domId","[class.nav-link]":"true","[class.nav-item]":"hasNavItemClass()","[attr.role]":"role ? role : nav.roles ? 'tab' : undefined","[class.active]":"navItem.active","[class.disabled]":"navItem.disabled","[attr.tabindex]":"navItem.disabled ? -1 : undefined","[attr.aria-controls]":"navItem.isPanelInDom() ? navItem.panelDomId : null","[attr.aria-selected]":"navItem.active","[attr.aria-disabled]":"navItem.disabled"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Attribute,args:["role"]}]},{type:Gi},{type:Xi},{type:m.ElementRef}]}});class Qi{constructor(t,e){this.navItem=t,this.nav=e}}Qi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qi,deps:[{token:Gi},{token:Xi}],target:m["ɵɵFactoryTarget"].Directive}),Qi.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Qi,isStandalone:!0,selector:"button[ngbNavLink]",host:{attributes:{type:"button"},listeners:{click:"nav.click(navItem)"},properties:{disabled:"navItem.disabled"}},hostDirectives:[{directive:Ji}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qi,decorators:[{type:m.Directive,args:[{selector:"button[ngbNavLink]",standalone:!0,hostDirectives:[Ji],host:{type:"button","[disabled]":"navItem.disabled","(click)":"nav.click(navItem)"}}]}],ctorParameters:function(){return[{type:Gi},{type:Xi}]}});class ts{constructor(t,e){this.navItem=t,this.nav=e}}ts.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ts,deps:[{token:Gi},{token:Xi}],target:m["ɵɵFactoryTarget"].Directive}),ts.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ts,isStandalone:!0,selector:"a[ngbNavLink]",host:{attributes:{href:""},listeners:{click:"nav.click(navItem); $event.preventDefault()"}},hostDirectives:[{directive:Ji}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ts,decorators:[{type:m.Directive,args:[{selector:"a[ngbNavLink]",standalone:!0,hostDirectives:[Ji],host:{href:"","(click)":"nav.click(navItem); $event.preventDefault()"}}]}],ctorParameters:function(){return[{type:Gi},{type:Xi}]}});const es=({classList:t})=>(t.remove("show"),()=>t.remove("active")),ns=(t,e)=>{e&&Bt(t),t.classList.add("show")};class is{constructor(t){this.elRef=t}}is.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:is,deps:[{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),is.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:is,isStandalone:!0,selector:"[ngbNavPane]",inputs:{item:"item",nav:"nav",role:"role"},host:{properties:{id:"item.panelDomId","class.fade":"nav.animation","attr.role":'role ? role : nav.roles ? "tabpanel" : undefined',"attr.aria-labelledby":"item.domId"},classAttribute:"tab-pane"},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:is,decorators:[{type:m.Directive,args:[{selector:"[ngbNavPane]",standalone:!0,host:{"[id]":"item.panelDomId",class:"tab-pane","[class.fade]":"nav.animation","[attr.role]":'role ? role : nav.roles ? "tabpanel" : undefined',"[attr.aria-labelledby]":"item.domId"}}]}],ctorParameters:function(){return[{type:m.ElementRef}]},propDecorators:{item:[{type:m.Input}],nav:[{type:m.Input}],role:[{type:m.Input}]}});class ss{constructor(t,e){this._cd=t,this._ngZone=e,this._activePane=null}isPanelTransitioning(t){var e;return(null===(e=this._activePane)||void 0===e?void 0:e.item)===t}ngAfterViewInit(){var t;this._updateActivePane(),this.nav.navItemChange$.pipe((0,_.takeUntil)(this.nav.destroy$),(0,_.startWith)((null===(t=this._activePane)||void 0===t?void 0:t.item)||null),(0,_.distinctUntilChanged)(),(0,_.skip)(1)).subscribe(t=>{const e={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?Yt(this._ngZone,this._activePane.elRef.nativeElement,es,e).subscribe(()=>{var n;const i=null===(n=this._activePane)||void 0===n?void 0:n.item;this._activePane=this._getPaneForItem(t),this._cd.markForCheck(),this._activePane&&(this._activePane.elRef.nativeElement.classList.add("active"),Yt(this._ngZone,this._activePane.elRef.nativeElement,ns,e).subscribe(()=>{t&&(t.shown.emit(),this.nav.shown.emit(t.id))})),i&&(i.hidden.emit(),this.nav.hidden.emit(i.id))}):this._updateActivePane()})}_updateActivePane(){var t,e;this._activePane=this._getActivePane(),null===(t=this._activePane)||void 0===t||t.elRef.nativeElement.classList.add("show"),null===(e=this._activePane)||void 0===e||e.elRef.nativeElement.classList.add("active")}_getPaneForItem(t){return this._panes&&this._panes.find(e=>e.item===t)||null}_getActivePane(){return this._panes&&this._panes.find(t=>t.item.active)||null}}ss.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ss,deps:[{token:m.ChangeDetectorRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),ss.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ss,isStandalone:!0,selector:"[ngbNavOutlet]",inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},host:{properties:{"class.tab-content":"true"}},viewQueries:[{propertyName:"_panes",predicate:is,descendants:!0}],ngImport:f,template:'\n\t\t<ng-template ngFor let-item [ngForOf]="nav.items">\n\t\t\t<div\n\t\t\t\tngbNavPane\n\t\t\t\t*ngIf="item.isPanelInDom() || isPanelTransitioning(item)"\n\t\t\t\t[item]="item"\n\t\t\t\t[nav]="nav"\n\t\t\t\t[role]="paneRole"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="item.contentTpl?.templateRef || null"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: item.active || isPanelTransitioning(item) }"\n\t\t\t\t></ng-template>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:is,selector:"[ngbNavPane]",inputs:["item","nav","role"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ss,decorators:[{type:m.Component,args:[{selector:"[ngbNavOutlet]",standalone:!0,imports:[is,b.NgFor,b.NgIf,b.NgTemplateOutlet],host:{"[class.tab-content]":"true"},encapsulation:m.ViewEncapsulation.None,changeDetection:m.ChangeDetectionStrategy.OnPush,template:'\n\t\t<ng-template ngFor let-item [ngForOf]="nav.items">\n\t\t\t<div\n\t\t\t\tngbNavPane\n\t\t\t\t*ngIf="item.isPanelInDom() || isPanelTransitioning(item)"\n\t\t\t\t[item]="item"\n\t\t\t\t[nav]="nav"\n\t\t\t\t[role]="paneRole"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="item.contentTpl?.templateRef || null"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: item.active || isPanelTransitioning(item) }"\n\t\t\t\t></ng-template>\n\t\t\t</div>\n\t\t</ng-template>\n\t'}]}],ctorParameters:function(){return[{type:m.ChangeDetectorRef},{type:m.NgZone}]},propDecorators:{_panes:[{type:m.ViewChildren,args:[is]}],paneRole:[{type:m.Input}],nav:[{type:m.Input,args:["ngbNavOutlet"]}]}});const as=[Zi,Xi,Gi,Ki,ts,Qi,Ji,ss,is];class os{}os.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:os,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),os.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:os,imports:[Zi,Xi,Gi,Ki,ts,Qi,Ji,ss,is],exports:[Zi,Xi,Gi,Ki,ts,Qi,Ji,ss,is]}),os.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:os,imports:[ss]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:os,decorators:[{type:m.NgModule,args:[{imports:as,exports:as}]}]});class rs{constructor(){this.disabled=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.ellipses=!0,this.maxSize=0,this.pageSize=10,this.rotate=!1}}rs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:rs,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),rs.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:rs,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:rs,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class ls{constructor(t){this.templateRef=t}}ls.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ls,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),ls.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ls,isStandalone:!0,selector:"ng-template[ngbPaginationEllipsis]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ls,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationEllipsis]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class cs{constructor(t){this.templateRef=t}}cs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:cs,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),cs.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:cs,isStandalone:!0,selector:"ng-template[ngbPaginationFirst]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:cs,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationFirst]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class ds{constructor(t){this.templateRef=t}}ds.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ds,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),ds.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ds,isStandalone:!0,selector:"ng-template[ngbPaginationLast]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ds,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationLast]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class hs{constructor(t){this.templateRef=t}}hs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:hs,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),hs.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:hs,isStandalone:!0,selector:"ng-template[ngbPaginationNext]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:hs,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationNext]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class ps{constructor(t){this.templateRef=t}}ps.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ps,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),ps.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ps,isStandalone:!0,selector:"ng-template[ngbPaginationNumber]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ps,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationNumber]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class us{constructor(t){this.templateRef=t}}us.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:us,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),us.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:us,isStandalone:!0,selector:"ng-template[ngbPaginationPrevious]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:us,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationPrevious]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class gs{constructor(t){this.templateRef=t}}gs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:gs,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),gs.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:gs,isStandalone:!0,selector:"ng-template[ngbPaginationPages]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:gs,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationPages]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class ms{constructor(t){this.pageCount=0,this.pages=[],this.page=1,this.pageChange=new m.EventEmitter(!0),this.disabled=t.disabled,this.boundaryLinks=t.boundaryLinks,this.directionLinks=t.directionLinks,this.ellipses=t.ellipses,this.maxSize=t.maxSize,this.pageSize=t.pageSize,this.rotate=t.rotate,this.size=t.size}hasPrevious(){return this.page>1}hasNext(){return this.page<this.pageCount}nextDisabled(){return!this.hasNext()||this.disabled}previousDisabled(){return!this.hasPrevious()||this.disabled}selectPage(t){this._updatePages(t)}ngOnChanges(t){this._updatePages(this.page)}isEllipsis(t){return-1===t}_applyEllipses(t,e){this.ellipses&&(t>0&&(t>2?this.pages.unshift(-1):2===t&&this.pages.unshift(2),this.pages.unshift(1)),e<this.pageCount&&(e<this.pageCount-2?this.pages.push(-1):e===this.pageCount-2&&this.pages.push(this.pageCount-1),this.pages.push(this.pageCount)))}_applyRotation(){let t=0,e=this.pageCount,n=Math.floor(this.maxSize/2),i=this.maxSize%2==0?n-1:n;return this.page<=n?e=this.maxSize:this.pageCount-this.page<n?t=this.pageCount-this.maxSize:(t=this.page-n-1,e=this.page+i),[t,e]}_applyPagination(){let t=(Math.ceil(this.page/this.maxSize)-1)*this.maxSize;return[t,t+this.maxSize]}_setPageInRange(t){const e=this.page;this.page=Pt(t,this.pageCount,1),this.page!==e&&Vt(this.collectionSize)&&this.pageChange.emit(this.page)}_updatePages(t){this.pageCount=Math.ceil(this.collectionSize/this.pageSize),Vt(this.pageCount)||(this.pageCount=0),this.pages.length=0;for(let t=1;t<=this.pageCount;t++)this.pages.push(t);if(this._setPageInRange(t),this.maxSize>0&&this.pageCount>this.maxSize){let t=0,e=this.pageCount;this.rotate?[t,e]=this._applyRotation():[t,e]=this._applyPagination(),this.pages=this.pages.slice(t,e),this._applyEllipses(t,e)}}}ms.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ms,deps:[{token:rs}],target:m["ɵɵFactoryTarget"].Component}),ms.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ms,isStandalone:!0,selector:"ngb-pagination",inputs:{disabled:"disabled",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",ellipses:"ellipses",rotate:"rotate",collectionSize:"collectionSize",maxSize:"maxSize",page:"page",pageSize:"pageSize",size:"size"},outputs:{pageChange:"pageChange"},host:{attributes:{role:"navigation"}},queries:[{propertyName:"tplEllipsis",first:!0,predicate:ls,descendants:!0},{propertyName:"tplFirst",first:!0,predicate:cs,descendants:!0},{propertyName:"tplLast",first:!0,predicate:ds,descendants:!0},{propertyName:"tplNext",first:!0,predicate:hs,descendants:!0},{propertyName:"tplNumber",first:!0,predicate:ps,descendants:!0},{propertyName:"tplPrevious",first:!0,predicate:us,descendants:!0},{propertyName:"tplPages",first:!0,predicate:gs,descendants:!0}],usesOnChanges:!0,ngImport:f,template:'\n\t\t<ng-template #first><span aria-hidden="true" i18n="@@ngb.pagination.first">««</span></ng-template>\n\t\t<ng-template #previous><span aria-hidden="true" i18n="@@ngb.pagination.previous">«</span></ng-template>\n\t\t<ng-template #next><span aria-hidden="true" i18n="@@ngb.pagination.next">»</span></ng-template>\n\t\t<ng-template #last><span aria-hidden="true" i18n="@@ngb.pagination.last">»»</span></ng-template>\n\t\t<ng-template #ellipsis>...</ng-template>\n\t\t<ng-template #defaultNumber let-page let-currentPage="currentPage">{{ page }}</ng-template>\n\t\t<ng-template #defaultPages let-page let-pages="pages" let-disabled="disabled">\n\t\t\t<li\n\t\t\t\t*ngFor="let pageNumber of pages"\n\t\t\t\tclass="page-item"\n\t\t\t\t[class.active]="pageNumber === page"\n\t\t\t\t[class.disabled]="isEllipsis(pageNumber) || disabled"\n\t\t\t\t[attr.aria-current]="pageNumber === page ? \'page\' : null"\n\t\t\t>\n\t\t\t\t<a *ngIf="isEllipsis(pageNumber)" class="page-link" tabindex="-1" aria-disabled="true">\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplEllipsis?.templateRef || ellipsis"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: true, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t\t<a\n\t\t\t\t\t*ngIf="!isEllipsis(pageNumber)"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageNumber); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="disabled ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="disabled ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNumber?.templateRef || defaultNumber"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: disabled, $implicit: pageNumber, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ng-template>\n\t\t<ul [class]="\'pagination\' + (size ? \' pagination-\' + size : \'\')">\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="First"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.first-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplFirst?.templateRef || first"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Previous"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.previous-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page - 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplPrevious?.templateRef || previous"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled() }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="tplPages?.templateRef || defaultPages"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: page, pages: pages, disabled: disabled }"\n\t\t\t>\n\t\t\t</ng-template>\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Next"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.next-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page + 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNext?.templateRef || next"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Last"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.last-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageCount); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplLast?.templateRef || last"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\t',isInline:!0,dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:m.ChangeDetectionStrategy.OnPush}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ms,decorators:[{type:m.Component,args:[{selector:"ngb-pagination",standalone:!0,imports:[b.NgIf,b.NgFor,b.NgTemplateOutlet],changeDetection:m.ChangeDetectionStrategy.OnPush,host:{role:"navigation"},template:'\n\t\t<ng-template #first><span aria-hidden="true" i18n="@@ngb.pagination.first">««</span></ng-template>\n\t\t<ng-template #previous><span aria-hidden="true" i18n="@@ngb.pagination.previous">«</span></ng-template>\n\t\t<ng-template #next><span aria-hidden="true" i18n="@@ngb.pagination.next">»</span></ng-template>\n\t\t<ng-template #last><span aria-hidden="true" i18n="@@ngb.pagination.last">»»</span></ng-template>\n\t\t<ng-template #ellipsis>...</ng-template>\n\t\t<ng-template #defaultNumber let-page let-currentPage="currentPage">{{ page }}</ng-template>\n\t\t<ng-template #defaultPages let-page let-pages="pages" let-disabled="disabled">\n\t\t\t<li\n\t\t\t\t*ngFor="let pageNumber of pages"\n\t\t\t\tclass="page-item"\n\t\t\t\t[class.active]="pageNumber === page"\n\t\t\t\t[class.disabled]="isEllipsis(pageNumber) || disabled"\n\t\t\t\t[attr.aria-current]="pageNumber === page ? \'page\' : null"\n\t\t\t>\n\t\t\t\t<a *ngIf="isEllipsis(pageNumber)" class="page-link" tabindex="-1" aria-disabled="true">\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplEllipsis?.templateRef || ellipsis"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: true, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t\t<a\n\t\t\t\t\t*ngIf="!isEllipsis(pageNumber)"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageNumber); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="disabled ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="disabled ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNumber?.templateRef || defaultNumber"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: disabled, $implicit: pageNumber, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ng-template>\n\t\t<ul [class]="\'pagination\' + (size ? \' pagination-\' + size : \'\')">\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="First"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.first-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplFirst?.templateRef || first"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Previous"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.previous-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page - 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplPrevious?.templateRef || previous"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled() }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="tplPages?.templateRef || defaultPages"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: page, pages: pages, disabled: disabled }"\n\t\t\t>\n\t\t\t</ng-template>\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Next"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.next-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page + 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNext?.templateRef || next"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Last"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.last-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageCount); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplLast?.templateRef || last"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\t'}]}],ctorParameters:function(){return[{type:rs}]},propDecorators:{tplEllipsis:[{type:m.ContentChild,args:[ls,{static:!1}]}],tplFirst:[{type:m.ContentChild,args:[cs,{static:!1}]}],tplLast:[{type:m.ContentChild,args:[ds,{static:!1}]}],tplNext:[{type:m.ContentChild,args:[hs,{static:!1}]}],tplNumber:[{type:m.ContentChild,args:[ps,{static:!1}]}],tplPrevious:[{type:m.ContentChild,args:[us,{static:!1}]}],tplPages:[{type:m.ContentChild,args:[gs,{static:!1}]}],disabled:[{type:m.Input}],boundaryLinks:[{type:m.Input}],directionLinks:[{type:m.Input}],ellipses:[{type:m.Input}],rotate:[{type:m.Input}],collectionSize:[{type:m.Input}],maxSize:[{type:m.Input}],page:[{type:m.Input}],pageSize:[{type:m.Input}],pageChange:[{type:m.Output}],size:[{type:m.Input}]}});const fs=[ms,ls,cs,ds,hs,ps,us,gs];class bs{}bs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bs,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),bs.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:bs,imports:[ms,ls,cs,ds,hs,ps,us,gs],exports:[ms,ls,cs,ds,hs,ps,us,gs]}),bs.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bs,imports:[ms]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bs,decorators:[{type:m.NgModule,args:[{imports:fs,exports:fs}]}]});class ys{constructor(t,e){this.open=t,this.close=e,e||(this.close=t)}isManual(){return"manual"===this.open||"manual"===this.close}}const vs={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},_s=t=>t>0?(0,_.delay)(t):t=>t;function xs(t,e,n,i,s,a,o=0,r=0){const l=function(t,e=vs){const n=(t||"").trim();if(0===n.length)return[];const i=n.split(/\s+/).map(t=>t.split(":")).map(t=>{let n=e[t[0]]||t;return new ys(n[0],n[1])}),s=i.filter(t=>t.isManual());if(s.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===s.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(n);if(1===l.length&&l[0].isManual())return()=>{};const c=function(t,e,n,i){return new v.Observable(s=>{const a=[],o=()=>s.next(!0),r=()=>s.next(!1),l=()=>s.next(!i());return n.forEach(n=>{n.open===n.close?a.push(t.listen(e,n.open,l)):a.push(t.listen(e,n.open,o),t.listen(e,n.close,r))}),()=>{a.forEach(t=>t())}})}(t,e,l,i).pipe(function(t,e,n){return i=>{let s=null;const a=i.pipe((0,_.map)(t=>({open:t})),(0,_.filter)(t=>{const e=n();return e===t.open||s&&s.open!==e?(s&&s.open!==t.open&&(s=null),!1):(s=t,!0)}),(0,_.share)()),o=a.pipe((0,_.filter)(t=>t.open),_s(t)),r=a.pipe((0,_.filter)(t=>!t.open),_s(e));return(0,v.merge)(o,r).pipe((0,_.filter)(t=>t===s&&(s=null,t.open!==n())),(0,_.map)(t=>t.open))}}(o,r,i)).subscribe(t=>t?s():a());return()=>c.unsubscribe()}class ws{constructor(t){this._ngbConfig=t,this.autoClose=!0,this.placement="auto",this.popperOptions=t=>t,this.triggers="click",this.disablePopover=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ws.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ws,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),ws.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ws,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ws,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});let Ds=0;class Is{isTitleTemplate(){return this.title instanceof m.TemplateRef}}Is.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Is,deps:[],target:m["ɵɵFactoryTarget"].Component}),Is.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Is,isStandalone:!0,selector:"ngb-popover-window",inputs:{animation:"animation",title:"title",id:"id",popoverClass:"popoverClass",context:"context"},host:{attributes:{role:"tooltip"},properties:{class:'"popover" + (popoverClass ? " " + popoverClass : "")',"class.fade":"animation",id:"id"},styleAttribute:"position: absolute;"},ngImport:f,template:' <div class="popover-arrow" data-popper-arrow></div>\n\t\t<h3 class="popover-header" *ngIf="title">\n\t\t\t<ng-template #simpleTitle>{{ title }}</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="isTitleTemplate() ? $any(title) : simpleTitle"\n\t\t\t\t[ngTemplateOutletContext]="context"\n\t\t\t></ng-template>\n\t\t</h3>\n\t\t<div class="popover-body"><ng-content></ng-content></div>',isInline:!0,dependencies:[{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Is,decorators:[{type:m.Component,args:[{selector:"ngb-popover-window",standalone:!0,imports:[b.NgTemplateOutlet,b.NgIf],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{"[class]":'"popover" + (popoverClass ? " " + popoverClass : "")',"[class.fade]":"animation",role:"tooltip","[id]":"id",style:"position: absolute;"},template:' <div class="popover-arrow" data-popper-arrow></div>\n\t\t<h3 class="popover-header" *ngIf="title">\n\t\t\t<ng-template #simpleTitle>{{ title }}</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="isTitleTemplate() ? $any(title) : simpleTitle"\n\t\t\t\t[ngTemplateOutletContext]="context"\n\t\t\t></ng-template>\n\t\t</h3>\n\t\t<div class="popover-body"><ng-content></ng-content></div>'}]}],propDecorators:{animation:[{type:m.Input}],title:[{type:m.Input}],id:[{type:m.Input}],popoverClass:[{type:m.Input}],context:[{type:m.Input}]}});class ks{constructor(t,e,n,i,s,a,o,r,l){this._elementRef=t,this._renderer=e,this._ngZone=a,this._document=o,this._changeDetector=r,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this._ngbPopoverWindowId="ngb-popover-"+Ds++,this._windowRef=null,this.animation=s.animation,this.autoClose=s.autoClose,this.placement=s.placement,this.popperOptions=s.popperOptions,this.triggers=s.triggers,this.container=s.container,this.disablePopover=s.disablePopover,this.popoverClass=s.popoverClass,this.openDelay=s.openDelay,this.closeDelay=s.closeDelay,this._positioning=kn(),this._popupService=new Ri(Is,n,i,e,this._ngZone,l)}_isDisabled(){return!!this.disablePopover||!this.ngbPopover&&!this.popoverTitle}open(t){if(!this._windowRef&&!this._isDisabled()){const{windowRef:e,transition$:n}=this._popupService.open(this.ngbPopover,t,this.animation);this._windowRef=e,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("title",this.popoverTitle),this._windowRef.setInput("context",t),this._windowRef.setInput("popoverClass",this.popoverClass),this._windowRef.setInput("id",this._ngbPopoverWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbPopoverWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-popover",updatePopperOptions:t=>this.popperOptions(Mn([0,8])(t))}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),hn(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),n.subscribe(()=>this.shown.emit())}}close(t=this.animation){this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(t).subscribe(()=>{var t;this._windowRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=xs(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({ngbPopover:t,popoverTitle:e,disablePopover:n,popoverClass:i}){i&&this.isOpen()&&(this._windowRef.instance.popoverClass=i.currentValue),(t||e||n)&&this._isDisabled()&&this.close()}ngOnDestroy(){var t;this.close(!1),null===(t=this._unregisterListenersFn)||void 0===t||t.call(this)}_getPositionTargetElement(){return(Ft(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}ks.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ks,deps:[{token:m.ElementRef},{token:m.Renderer2},{token:m.Injector},{token:m.ViewContainerRef},{token:ws},{token:m.NgZone},{token:b.DOCUMENT},{token:m.ChangeDetectorRef},{token:m.ApplicationRef}],target:m["ɵɵFactoryTarget"].Directive}),ks.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ks,isStandalone:!0,selector:"[ngbPopover]",inputs:{animation:"animation",autoClose:"autoClose",ngbPopover:"ngbPopover",popoverTitle:"popoverTitle",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disablePopover:"disablePopover",popoverClass:"popoverClass",openDelay:"openDelay",closeDelay:"closeDelay"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbPopover"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ks,decorators:[{type:m.Directive,args:[{selector:"[ngbPopover]",exportAs:"ngbPopover",standalone:!0}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.Renderer2},{type:m.Injector},{type:m.ViewContainerRef},{type:ws},{type:m.NgZone},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.ChangeDetectorRef},{type:m.ApplicationRef}]},propDecorators:{animation:[{type:m.Input}],autoClose:[{type:m.Input}],ngbPopover:[{type:m.Input}],popoverTitle:[{type:m.Input}],placement:[{type:m.Input}],popperOptions:[{type:m.Input}],triggers:[{type:m.Input}],positionTarget:[{type:m.Input}],container:[{type:m.Input}],disablePopover:[{type:m.Input}],popoverClass:[{type:m.Input}],openDelay:[{type:m.Input}],closeDelay:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});class Cs{}Cs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cs,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Cs.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Cs,imports:[ks],exports:[ks]}),Cs.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cs}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cs,decorators:[{type:m.NgModule,args:[{imports:[ks],exports:[ks]}]}]});class Ms{constructor(){this.max=100,this.animated=!1,this.ariaLabel="progress bar",this.striped=!1,this.showValue=!1}}Ms.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ms,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Ms.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ms,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ms,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class Ss{constructor(t){this.value=0,this.max=t.max,this.animated=t.animated,this.ariaLabel=t.ariaLabel,this.striped=t.striped,this.textType=t.textType,this.type=t.type,this.showValue=t.showValue,this.height=t.height}set max(t){this._max=!Vt(t)||t<=0?100:t}get max(){return this._max}getValue(){return Pt(this.value,this.max)}getPercentValue(){return 100*this.getValue()/this.max}}Ss.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ss,deps:[{token:Ms}],target:m["ɵɵFactoryTarget"].Component}),Ss.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Ss,isStandalone:!0,selector:"ngb-progressbar",inputs:{max:"max",animated:"animated",ariaLabel:"ariaLabel",striped:"striped",showValue:"showValue",textType:"textType",type:"type",value:"value",height:"height"},host:{attributes:{role:"progressbar","aria-valuemin":"0"},properties:{"attr.aria-valuenow":"getValue()","attr.aria-valuemax":"max","attr.aria-label":"ariaLabel","style.height":"this.height"},classAttribute:"progress"},ngImport:f,template:'\n\t\t<div\n\t\t\tclass="progress-bar{{ type ? (textType ? \' bg-\' + type : \' text-bg-\' + type) : \'\' }}{{\n\t\t\t\ttextType ? \' text-\' + textType : \'\'\n\t\t\t}}"\n\t\t\t[class.progress-bar-animated]="animated"\n\t\t\t[class.progress-bar-striped]="striped"\n\t\t\t[style.width.%]="getPercentValue()"\n\t\t>\n\t\t\t<span *ngIf="showValue" i18n="@@ngb.progressbar.value">{{ getValue() / max | percent }}</span\n\t\t\t><ng-content></ng-content>\n\t\t</div>\n\t',isInline:!0,dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"pipe",type:b.PercentPipe,name:"percent"}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ss,decorators:[{type:m.Component,args:[{selector:"ngb-progressbar",standalone:!0,imports:[b.NgIf,b.PercentPipe],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{class:"progress",role:"progressbar","[attr.aria-valuenow]":"getValue()","aria-valuemin":"0","[attr.aria-valuemax]":"max","[attr.aria-label]":"ariaLabel"},template:'\n\t\t<div\n\t\t\tclass="progress-bar{{ type ? (textType ? \' bg-\' + type : \' text-bg-\' + type) : \'\' }}{{\n\t\t\t\ttextType ? \' text-\' + textType : \'\'\n\t\t\t}}"\n\t\t\t[class.progress-bar-animated]="animated"\n\t\t\t[class.progress-bar-striped]="striped"\n\t\t\t[style.width.%]="getPercentValue()"\n\t\t>\n\t\t\t<span *ngIf="showValue" i18n="@@ngb.progressbar.value">{{ getValue() / max | percent }}</span\n\t\t\t><ng-content></ng-content>\n\t\t</div>\n\t'}]}],ctorParameters:function(){return[{type:Ms}]},propDecorators:{max:[{type:m.Input}],animated:[{type:m.Input}],ariaLabel:[{type:m.Input}],striped:[{type:m.Input}],showValue:[{type:m.Input}],textType:[{type:m.Input}],type:[{type:m.Input}],value:[{type:m.Input}],height:[{type:m.Input},{type:m.HostBinding,args:["style.height"]}]}});class Ts{}Ts.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ts,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Ts.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Ts,imports:[Ss],exports:[Ss]}),Ts.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ts,imports:[Ss]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ts,decorators:[{type:m.NgModule,args:[{imports:[Ss],exports:[Ss]}]}]});class Os{constructor(){this.max=10,this.readonly=!1,this.resettable=!1,this.tabindex=0}}Os.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Os,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Os.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Os,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Os,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class Es{constructor(t,e){this._changeDetectorRef=e,this.contexts=[],this.disabled=!1,this.hover=new m.EventEmitter,this.leave=new m.EventEmitter,this.rateChange=new m.EventEmitter(!0),this.onChange=t=>{},this.onTouched=()=>{},this.max=t.max,this.readonly=t.readonly,this.tabindex=t.tabindex}ariaValueText(t,e){return`${t} out of ${e}`}isInteractive(){return!this.readonly&&!this.disabled}enter(t){this.isInteractive()&&this._updateState(t),this.hover.emit(t)}handleBlur(){this.onTouched()}handleClick(t){this.isInteractive()&&this.update(this.resettable&&this.rate===t?0:t)}handleKeyDown(t){switch(t.which){case Pe.ArrowDown:case Pe.ArrowLeft:this.update(this.rate-1);break;case Pe.ArrowUp:case Pe.ArrowRight:this.update(this.rate+1);break;case Pe.Home:this.update(0);break;case Pe.End:this.update(this.max);break;default:return}t.preventDefault()}ngOnChanges(t){t.rate&&this.update(this.rate),t.max&&this._updateMax()}ngOnInit(){this._setupContexts(),this._updateState(this.rate)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}reset(){this.leave.emit(this.nextRate),this._updateState(this.rate)}setDisabledState(t){this.disabled=t}update(t,e=!0){const n=Pt(t,this.max,0);this.isInteractive()&&this.rate!==n&&(this.rate=n,this.rateChange.emit(this.rate)),e&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)}writeValue(t){this.update(t,!1),this._changeDetectorRef.markForCheck()}_updateState(t){this.nextRate=t,this.contexts.forEach((e,n)=>e.fill=Math.round(100*Pt(t-n,1,0)))}_updateMax(){this.max>0&&(this._setupContexts(),this.update(this.rate))}_setupContexts(){this.contexts=Array.from({length:this.max},(t,e)=>({fill:0,index:e}))}}Es.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Es,deps:[{token:Os},{token:m.ChangeDetectorRef}],target:m["ɵɵFactoryTarget"].Component}),Es.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Es,isStandalone:!0,selector:"ngb-rating",inputs:{max:"max",rate:"rate",readonly:"readonly",resettable:"resettable",starTemplate:"starTemplate",tabindex:"tabindex",ariaValueText:"ariaValueText"},outputs:{hover:"hover",leave:"leave",rateChange:"rateChange"},host:{attributes:{role:"slider","aria-valuemin":"0"},listeners:{blur:"handleBlur()",keydown:"handleKeyDown($event)",mouseleave:"reset()"},properties:{tabindex:"disabled ? -1 : tabindex","attr.aria-valuemax":"max","attr.aria-valuenow":"nextRate","attr.aria-valuetext":"ariaValueText(nextRate, max)","attr.aria-disabled":"readonly ? true : null"},classAttribute:"d-inline-flex"},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>Es),multi:!0}],queries:[{propertyName:"starTemplateFromContent",first:!0,predicate:m.TemplateRef,descendants:!0}],usesOnChanges:!0,ngImport:f,template:'\n\t\t<ng-template #t let-fill="fill">{{ fill === 100 ? \'★\' : \'☆\' }}</ng-template>\n\t\t<ng-template ngFor [ngForOf]="contexts" let-index="index">\n\t\t\t<span class="visually-hidden">({{ index < nextRate ? \'*\' : \' \' }})</span>\n\t\t\t<span\n\t\t\t\t(mouseenter)="enter(index + 1)"\n\t\t\t\t(click)="handleClick(index + 1)"\n\t\t\t\t[style.cursor]="isInteractive() ? \'pointer\' : \'default\'"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="starTemplate || starTemplateFromContent || t"\n\t\t\t\t\t[ngTemplateOutletContext]="contexts[index]"\n\t\t\t\t>\n\t\t\t\t</ng-template>\n\t\t\t</span>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Es,decorators:[{type:m.Component,args:[{selector:"ngb-rating",standalone:!0,imports:[b.NgFor,b.NgTemplateOutlet],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{class:"d-inline-flex","[tabindex]":"disabled ? -1 : tabindex",role:"slider","aria-valuemin":"0","[attr.aria-valuemax]":"max","[attr.aria-valuenow]":"nextRate","[attr.aria-valuetext]":"ariaValueText(nextRate, max)","[attr.aria-disabled]":"readonly ? true : null","(blur)":"handleBlur()","(keydown)":"handleKeyDown($event)","(mouseleave)":"reset()"},template:'\n\t\t<ng-template #t let-fill="fill">{{ fill === 100 ? \'★\' : \'☆\' }}</ng-template>\n\t\t<ng-template ngFor [ngForOf]="contexts" let-index="index">\n\t\t\t<span class="visually-hidden">({{ index < nextRate ? \'*\' : \' \' }})</span>\n\t\t\t<span\n\t\t\t\t(mouseenter)="enter(index + 1)"\n\t\t\t\t(click)="handleClick(index + 1)"\n\t\t\t\t[style.cursor]="isInteractive() ? \'pointer\' : \'default\'"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="starTemplate || starTemplateFromContent || t"\n\t\t\t\t\t[ngTemplateOutletContext]="contexts[index]"\n\t\t\t\t>\n\t\t\t\t</ng-template>\n\t\t\t</span>\n\t\t</ng-template>\n\t',providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>Es),multi:!0}]}]}],ctorParameters:function(){return[{type:Os},{type:m.ChangeDetectorRef}]},propDecorators:{max:[{type:m.Input}],rate:[{type:m.Input}],readonly:[{type:m.Input}],resettable:[{type:m.Input}],starTemplate:[{type:m.Input}],starTemplateFromContent:[{type:m.ContentChild,args:[m.TemplateRef,{static:!1}]}],tabindex:[{type:m.Input}],ariaValueText:[{type:m.Input}],hover:[{type:m.Output}],leave:[{type:m.Output}],rateChange:[{type:m.Output}]}});class Rs{}Rs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rs,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Rs.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Rs,imports:[Es],exports:[Es]}),Rs.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rs,imports:[Es]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rs,decorators:[{type:m.NgModule,args:[{imports:[Es],exports:[Es]}]}]});class Ps{constructor(t,e,n){this.hour=Et(t),this.minute=Et(e),this.second=Et(n)}changeHour(t=1){this.updateHour((isNaN(this.hour)?0:this.hour)+t)}updateHour(t){Vt(t)?this.hour=(t<0?24+t:t)%24:this.hour=NaN}changeMinute(t=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+t)}updateMinute(t){Vt(t)?(this.minute=t%60<0?60+t%60:t%60,this.changeHour(Math.floor(t/60))):this.minute=NaN}changeSecond(t=1){this.updateSecond((isNaN(this.second)?0:this.second)+t)}updateSecond(t){Vt(t)?(this.second=t<0?60+t%60:t%60,this.changeMinute(Math.floor(t/60))):this.second=NaN}isValid(t=!0){return Vt(this.hour)&&Vt(this.minute)&&(!t||Vt(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}class Fs{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}}function Vs(){return new Ns}Fs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fs,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Fs.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fs,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fs,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class As{}As.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:As,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),As.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:As,providedIn:"root",useFactory:Vs}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:As,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:Vs}]}]});class Ns extends As{fromModel(t){return t&&At(t.hour)&&At(t.minute)?{hour:t.hour,minute:t.minute,second:At(t.second)?t.second:null}:null}toModel(t){return t&&At(t.hour)&&At(t.minute)?{hour:t.hour,minute:t.minute,second:At(t.second)?t.second:null}:null}}function js(t){return new zs(t)}Ns.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ns,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Ns.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ns}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ns,decorators:[{type:m.Injectable}]});class Ls{}Ls.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ls,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Ls.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ls,providedIn:"root",useFactory:js,deps:[{token:m.LOCALE_ID}]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ls,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:js,deps:[m.LOCALE_ID]}]}]});class zs extends Ls{constructor(t){super(),this._periods=(0,b.getLocaleDayPeriods)(t,b.FormStyle.Standalone,b.TranslationWidth.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}}zs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zs,deps:[{token:m.LOCALE_ID}],target:m["ɵɵFactoryTarget"].Injectable}),zs.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zs}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zs,decorators:[{type:m.Injectable}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[m.LOCALE_ID]}]}]}});const Bs=/[^0-9]/g;class $s{constructor(t,e,n,i){this._config=t,this._ngbTimeAdapter=e,this._cd=n,this.i18n=i,this.onChange=t=>{},this.onTouched=()=>{},this.meridian=t.meridian,this.spinners=t.spinners,this.seconds=t.seconds,this.hourStep=t.hourStep,this.minuteStep=t.minuteStep,this.secondStep=t.secondStep,this.disabled=t.disabled,this.readonlyInputs=t.readonlyInputs,this.size=t.size}set hourStep(t){this._hourStep=At(t)?t:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(t){this._minuteStep=At(t)?t:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(t){this._secondStep=At(t)?t:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(t){const e=this._ngbTimeAdapter.fromModel(t);this.model=e?new Ps(e.hour,e.minute,e.second):new Ps,this.seconds||e&&Vt(e.second)||(this.model.second=0),this._cd.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}changeHour(t){var e;null===(e=this.model)||void 0===e||e.changeHour(t),this.propagateModelChange()}changeMinute(t){var e;null===(e=this.model)||void 0===e||e.changeMinute(t),this.propagateModelChange()}changeSecond(t){var e;null===(e=this.model)||void 0===e||e.changeSecond(t),this.propagateModelChange()}updateHour(t){var e,n;const i=!!this.model&&this.model.hour>=12,s=Et(t);this.meridian&&(i&&s<12||!i&&12===s)?null===(e=this.model)||void 0===e||e.updateHour(s+12):null===(n=this.model)||void 0===n||n.updateHour(s),this.propagateModelChange()}updateMinute(t){var e;null===(e=this.model)||void 0===e||e.updateMinute(Et(t)),this.propagateModelChange()}updateSecond(t){var e;null===(e=this.model)||void 0===e||e.updateSecond(Et(t)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(t){t.value=t.value.replace(Bs,"")}formatHour(t){return Vt(t)?this.meridian?Lt(t%12==0?12:t%12):Lt(t%24):Lt(NaN)}formatMinSec(t){return Lt(Vt(t)?t:NaN)}handleBlur(){this.onTouched()}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(t){t.seconds&&!this.seconds&&this.model&&!Vt(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(t=!0){var e;t&&this.onTouched(),(null===(e=this.model)||void 0===e?void 0:e.isValid(this.seconds))?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}}$s.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$s,deps:[{token:Fs},{token:As},{token:m.ChangeDetectorRef},{token:Ls}],target:m["ɵɵFactoryTarget"].Component}),$s.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:$s,isStandalone:!0,selector:"ngb-timepicker",inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>$s),multi:!0}],exportAs:["ngbTimepicker"],usesOnChanges:!0,ngImport:f,template:'\n\t\t<fieldset [disabled]="disabled" [class.disabled]="disabled">\n\t\t\t<div class="ngb-tp">\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-hour">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-hours">Increment hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="HH"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.HH"\n\t\t\t\t\t\t[value]="formatHour(model?.hour)"\n\t\t\t\t\t\t(change)="updateHour($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Hours"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.hours"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeHour(hourStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeHour(-hourStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(-hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-hours">Decrement hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ngb-tp-spacer">:</div>\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-minute">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-minutes">Increment minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="MM"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.MM"\n\t\t\t\t\t\t[value]="formatMinSec(model?.minute)"\n\t\t\t\t\t\t(change)="updateMinute($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Minutes"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.minutes"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeMinute(minuteStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeMinute(-minuteStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(-minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-minutes">Decrement minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-spacer">:</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-input-container ngb-tp-second">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-seconds">Increment seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="SS"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.SS"\n\t\t\t\t\t\t[value]="formatMinSec(model?.second)"\n\t\t\t\t\t\t(change)="updateSecond($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Seconds"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.seconds"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeSecond(secondStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeSecond(-secondStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(-secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-seconds">Decrement seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-spacer"></div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-meridian">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="btn btn-outline-primary"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t(click)="toggleMeridian()"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-container *ngIf="model && model.hour >= 12; else am" i18n="@@ngb.timepicker.PM">{{\n\t\t\t\t\t\t\ti18n.getAfternoonPeriod()\n\t\t\t\t\t\t}}</ng-container>\n\t\t\t\t\t\t<ng-template #am i18n="@@ngb.timepicker.AM">{{ i18n.getMorningPeriod() }}</ng-template>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t',isInline:!0,styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n'],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$s,decorators:[{type:m.Component,args:[{exportAs:"ngbTimepicker",selector:"ngb-timepicker",standalone:!0,imports:[b.NgIf],encapsulation:m.ViewEncapsulation.None,template:'\n\t\t<fieldset [disabled]="disabled" [class.disabled]="disabled">\n\t\t\t<div class="ngb-tp">\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-hour">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-hours">Increment hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="HH"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.HH"\n\t\t\t\t\t\t[value]="formatHour(model?.hour)"\n\t\t\t\t\t\t(change)="updateHour($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Hours"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.hours"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeHour(hourStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeHour(-hourStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(-hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-hours">Decrement hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ngb-tp-spacer">:</div>\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-minute">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-minutes">Increment minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="MM"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.MM"\n\t\t\t\t\t\t[value]="formatMinSec(model?.minute)"\n\t\t\t\t\t\t(change)="updateMinute($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Minutes"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.minutes"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeMinute(minuteStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeMinute(-minuteStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(-minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-minutes">Decrement minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-spacer">:</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-input-container ngb-tp-second">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-seconds">Increment seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="SS"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.SS"\n\t\t\t\t\t\t[value]="formatMinSec(model?.second)"\n\t\t\t\t\t\t(change)="updateSecond($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Seconds"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.seconds"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeSecond(secondStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeSecond(-secondStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(-secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-seconds">Decrement seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-spacer"></div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-meridian">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="btn btn-outline-primary"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t(click)="toggleMeridian()"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-container *ngIf="model && model.hour >= 12; else am" i18n="@@ngb.timepicker.PM">{{\n\t\t\t\t\t\t\ti18n.getAfternoonPeriod()\n\t\t\t\t\t\t}}</ng-container>\n\t\t\t\t\t\t<ng-template #am i18n="@@ngb.timepicker.AM">{{ i18n.getMorningPeriod() }}</ng-template>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t',providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>$s),multi:!0}],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n']}]}],ctorParameters:function(){return[{type:Fs},{type:As},{type:m.ChangeDetectorRef},{type:Ls}]},propDecorators:{meridian:[{type:m.Input}],spinners:[{type:m.Input}],seconds:[{type:m.Input}],hourStep:[{type:m.Input}],minuteStep:[{type:m.Input}],secondStep:[{type:m.Input}],readonlyInputs:[{type:m.Input}],size:[{type:m.Input}]}});class Hs{}Hs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hs,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Hs.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Hs,imports:[$s],exports:[$s]}),Hs.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hs,imports:[$s]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hs,decorators:[{type:m.NgModule,args:[{imports:[$s],exports:[$s]}]}]});const Ws=(t,e)=>{const{classList:n}=t;if(e)return n.add("fade"),Bt(t),n.add("show","showing"),()=>{n.remove("showing")};n.add("show")},Us=({classList:t})=>(t.add("showing"),()=>{t.remove("show","showing")});class qs{constructor(t){this._ngbConfig=t,this.autohide=!0,this.delay=5e3,this.ariaLive="polite"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}qs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:qs,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),qs.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:qs,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:qs,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});class Ys{}Ys.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ys,deps:[],target:m["ɵɵFactoryTarget"].Directive}),Ys.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ys,isStandalone:!0,selector:"[ngbToastHeader]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ys,decorators:[{type:m.Directive,args:[{selector:"[ngbToastHeader]",standalone:!0}]}]});class Zs{constructor(t,e,n,i){this.ariaLive=t,this._zone=n,this._element=i,this.contentHeaderTpl=null,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,null==this.ariaLive&&(this.ariaLive=e.ariaLive),this.delay=e.delay,this.autohide=e.autohide,this.animation=e.animation}ngAfterContentInit(){this._zone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{this._init(),this.show()})}ngOnChanges(t){"autohide"in t&&(this._clearTimeout(),this._init())}hide(){this._clearTimeout();const t=Yt(this._zone,this._element.nativeElement,Us,{animation:this.animation,runningTransition:"stop"});return t.subscribe(()=>{this.hidden.emit()}),t}show(){const t=Yt(this._zone,this._element.nativeElement,Ws,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>{this.shown.emit()}),t}_init(){this.autohide&&!this._timeoutID&&(this._timeoutID=setTimeout(()=>this.hide(),this.delay))}_clearTimeout(){this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null)}}Zs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Zs,deps:[{token:"aria-live",attribute:!0},{token:qs},{token:m.NgZone},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Component}),Zs.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Zs,isStandalone:!0,selector:"ngb-toast",inputs:{animation:"animation",delay:"delay",autohide:"autohide",header:"header"},outputs:{shown:"shown",hidden:"hidden"},host:{attributes:{role:"alert","aria-atomic":"true"},properties:{"attr.aria-live":"ariaLive","class.fade":"animation"},classAttribute:"toast"},queries:[{propertyName:"contentHeaderTpl",first:!0,predicate:Ys,descendants:!0,read:m.TemplateRef,static:!0}],exportAs:["ngbToast"],usesOnChanges:!0,ngImport:f,template:'\n\t\t<ng-template #headerTpl>\n\t\t\t<strong class="me-auto">{{ header }}</strong>\n\t\t</ng-template>\n\t\t<ng-template [ngIf]="contentHeaderTpl || header">\n\t\t\t<div class="toast-header">\n\t\t\t\t<ng-template [ngTemplateOutlet]="contentHeaderTpl || headerTpl"></ng-template>\n\t\t\t\t<button\n\t\t\t\t\ttype="button"\n\t\t\t\t\tclass="btn-close"\n\t\t\t\t\taria-label="Close"\n\t\t\t\t\ti18n-aria-label="@@ngb.toast.close-aria"\n\t\t\t\t\t(click)="hide()"\n\t\t\t\t>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<div class="toast-body">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t',isInline:!0,styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Zs,decorators:[{type:m.Component,args:[{selector:"ngb-toast",exportAs:"ngbToast",standalone:!0,imports:[b.NgIf,b.NgTemplateOutlet],encapsulation:m.ViewEncapsulation.None,host:{role:"alert","[attr.aria-live]":"ariaLive","aria-atomic":"true",class:"toast","[class.fade]":"animation"},template:'\n\t\t<ng-template #headerTpl>\n\t\t\t<strong class="me-auto">{{ header }}</strong>\n\t\t</ng-template>\n\t\t<ng-template [ngIf]="contentHeaderTpl || header">\n\t\t\t<div class="toast-header">\n\t\t\t\t<ng-template [ngTemplateOutlet]="contentHeaderTpl || headerTpl"></ng-template>\n\t\t\t\t<button\n\t\t\t\t\ttype="button"\n\t\t\t\t\tclass="btn-close"\n\t\t\t\t\taria-label="Close"\n\t\t\t\t\ti18n-aria-label="@@ngb.toast.close-aria"\n\t\t\t\t\t(click)="hide()"\n\t\t\t\t>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<div class="toast-body">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t',styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"]}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Attribute,args:["aria-live"]}]},{type:qs},{type:m.NgZone},{type:m.ElementRef}]},propDecorators:{animation:[{type:m.Input}],delay:[{type:m.Input}],autohide:[{type:m.Input}],header:[{type:m.Input}],contentHeaderTpl:[{type:m.ContentChild,args:[Ys,{read:m.TemplateRef,static:!0}]}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});class Ks{}Ks.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ks,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Ks.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Ks,imports:[Zs,Ys],exports:[Zs,Ys]}),Ks.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ks,imports:[Zs]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ks,decorators:[{type:m.NgModule,args:[{imports:[Zs,Ys],exports:[Zs,Ys]}]}]});class Gs{constructor(t){this._ngbConfig=t,this.autoClose=!0,this.placement="auto",this.popperOptions=t=>t,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Gs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gs,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),Gs.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gs,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gs,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});let Xs=0;class Js{}Js.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Js,deps:[],target:m["ɵɵFactoryTarget"].Component}),Js.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Js,isStandalone:!0,selector:"ngb-tooltip-window",inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},host:{attributes:{role:"tooltip"},properties:{class:'"tooltip" + (tooltipClass ? " " + tooltipClass : "")',"class.fade":"animation",id:"id"},styleAttribute:"position: absolute;"},ngImport:f,template:'<div class="tooltip-arrow" data-popper-arrow></div\n\t\t><div class="tooltip-inner"><ng-content></ng-content></div>',isInline:!0,changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Js,decorators:[{type:m.Component,args:[{selector:"ngb-tooltip-window",standalone:!0,changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{"[class]":'"tooltip" + (tooltipClass ? " " + tooltipClass : "")',"[class.fade]":"animation",role:"tooltip","[id]":"id",style:"position: absolute;"},template:'<div class="tooltip-arrow" data-popper-arrow></div\n\t\t><div class="tooltip-inner"><ng-content></ng-content></div>'}]}],propDecorators:{animation:[{type:m.Input}],id:[{type:m.Input}],tooltipClass:[{type:m.Input}]}});class Qs{constructor(t,e,n,i,s,a,o,r,l){this._elementRef=t,this._renderer=e,this._ngZone=a,this._document=o,this._changeDetector=r,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this._ngbTooltipWindowId="ngb-tooltip-"+Xs++,this._windowRef=null,this.animation=s.animation,this.autoClose=s.autoClose,this.placement=s.placement,this.popperOptions=s.popperOptions,this.triggers=s.triggers,this.container=s.container,this.disableTooltip=s.disableTooltip,this.tooltipClass=s.tooltipClass,this.openDelay=s.openDelay,this.closeDelay=s.closeDelay,this._popupService=new Ri(Js,n,i,e,this._ngZone,l),this._positioning=kn()}set ngbTooltip(t){this._ngbTooltip=t,!t&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(t){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:e,transition$:n}=this._popupService.open(this._ngbTooltip,t,this.animation);this._windowRef=e,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-tooltip",updatePopperOptions:t=>this.popperOptions(t)}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),hn(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),n.subscribe(()=>this.shown.emit())}}close(t=this.animation){null!=this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(t).subscribe(()=>{var t;this._windowRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=xs(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:t}){t&&this.isOpen()&&(this._windowRef.instance.tooltipClass=t.currentValue)}ngOnDestroy(){var t;this.close(!1),null===(t=this._unregisterListenersFn)||void 0===t||t.call(this)}_getPositionTargetElement(){return(Ft(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}Qs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qs,deps:[{token:m.ElementRef},{token:m.Renderer2},{token:m.Injector},{token:m.ViewContainerRef},{token:Gs},{token:m.NgZone},{token:b.DOCUMENT},{token:m.ChangeDetectorRef},{token:m.ApplicationRef}],target:m["ɵɵFactoryTarget"].Directive}),Qs.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Qs,isStandalone:!0,selector:"[ngbTooltip]",inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qs,decorators:[{type:m.Directive,args:[{selector:"[ngbTooltip]",standalone:!0,exportAs:"ngbTooltip"}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.Renderer2},{type:m.Injector},{type:m.ViewContainerRef},{type:Gs},{type:m.NgZone},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.ChangeDetectorRef},{type:m.ApplicationRef}]},propDecorators:{animation:[{type:m.Input}],autoClose:[{type:m.Input}],placement:[{type:m.Input}],popperOptions:[{type:m.Input}],triggers:[{type:m.Input}],positionTarget:[{type:m.Input}],container:[{type:m.Input}],disableTooltip:[{type:m.Input}],tooltipClass:[{type:m.Input}],openDelay:[{type:m.Input}],closeDelay:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}],ngbTooltip:[{type:m.Input}]}});class ta{}ta.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ta,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),ta.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:ta,imports:[Qs],exports:[Qs]}),ta.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ta}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ta,decorators:[{type:m.NgModule,args:[{imports:[Qs],exports:[Qs]}]}]});class ea{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(t){this.accentSensitive||String.prototype.normalize||(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);const e=Rt(this.result),n=Array.isArray(this.term)?this.term:[this.term],i=t=>this.accentSensitive?t:$t(t),s=n.map(t=>i(Rt(t)).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")).filter(t=>t),a=this.accentSensitive?e:$t(e),o=s.length?a.split(new RegExp(`(${s.join("|")})`,"gmi")):[e];if(this.accentSensitive)this.parts=o;else{let t=0;this.parts=o.map(n=>e.substring(t,t+=n.length))}}}ea.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ea,deps:[],target:m["ɵɵFactoryTarget"].Component}),ea.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ea,isStandalone:!0,selector:"ngb-highlight",inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},usesOnChanges:!0,ngImport:f,template:'<ng-template ngFor [ngForOf]="parts" let-part let-isOdd="odd"><span *ngIf="isOdd; else even" [class]="highlightClass">{{part}}</span><ng-template #even>{{part}}</ng-template></ng-template>',isInline:!0,styles:[".ngb-highlight{font-weight:700}\n"],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ea,decorators:[{type:m.Component,args:[{selector:"ngb-highlight",standalone:!0,imports:[b.NgIf,b.NgFor],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,template:'<ng-template ngFor [ngForOf]="parts" let-part let-isOdd="odd"><span *ngIf="isOdd; else even" [class]="highlightClass">{{part}}</span><ng-template #even>{{part}}</ng-template></ng-template>',styles:[".ngb-highlight{font-weight:700}\n"]}]}],propDecorators:{highlightClass:[{type:m.Input}],result:[{type:m.Input}],term:[{type:m.Input}],accentSensitive:[{type:m.Input}]}});class na{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=Rt,this.selectEvent=new m.EventEmitter,this.activeChangeEvent=new m.EventEmitter}hasActive(){return this.activeIdx>-1&&this.activeIdx<this.results.length}getActive(){return this.results[this.activeIdx]}markActive(t){this.activeIdx=t,this._activeChanged()}next(){this.activeIdx===this.results.length-1?this.activeIdx=this.focusFirst?(this.activeIdx+1)%this.results.length:-1:this.activeIdx++,this._activeChanged()}prev(){this.activeIdx<0?this.activeIdx=this.results.length-1:0===this.activeIdx?this.activeIdx=this.focusFirst?this.results.length-1:-1:this.activeIdx--,this._activeChanged()}resetActive(){this.activeIdx=this.focusFirst?0:-1,this._activeChanged()}select(t){this.selectEvent.emit(t)}ngOnInit(){this.resetActive()}_activeChanged(){this.activeChangeEvent.emit(this.activeIdx>=0?this.id+"-"+this.activeIdx:void 0)}}na.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:na,deps:[],target:m["ɵɵFactoryTarget"].Component}),na.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:na,isStandalone:!0,selector:"ngb-typeahead-window",inputs:{id:"id",focusFirst:"focusFirst",results:"results",term:"term",formatter:"formatter",resultTemplate:"resultTemplate",popupClass:"popupClass"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},host:{attributes:{role:"listbox"},listeners:{mousedown:"$event.preventDefault()"},properties:{class:'"dropdown-menu show" + (popupClass ? " " + popupClass : "")',id:"id"}},exportAs:["ngbTypeaheadWindow"],ngImport:f,template:'\n\t\t<ng-template #rt let-result="result" let-term="term" let-formatter="formatter">\n\t\t\t<ngb-highlight [result]="formatter(result)" [term]="term"></ngb-highlight>\n\t\t</ng-template>\n\t\t<ng-template ngFor [ngForOf]="results" let-result let-idx="index">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="dropdown-item"\n\t\t\t\trole="option"\n\t\t\t\t[id]="id + \'-\' + idx"\n\t\t\t\t[class.active]="idx === activeIdx"\n\t\t\t\t(mouseenter)="markActive(idx)"\n\t\t\t\t(click)="select(result)"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="resultTemplate || rt"\n\t\t\t\t\t[ngTemplateOutletContext]="{ result: result, term: term, formatter: formatter }"\n\t\t\t\t></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"component",type:ea,selector:"ngb-highlight",inputs:["highlightClass","result","term","accentSensitive"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:na,decorators:[{type:m.Component,args:[{selector:"ngb-typeahead-window",exportAs:"ngbTypeaheadWindow",standalone:!0,imports:[ea,b.NgFor,b.NgTemplateOutlet],encapsulation:m.ViewEncapsulation.None,host:{"(mousedown)":"$event.preventDefault()","[class]":'"dropdown-menu show" + (popupClass ? " " + popupClass : "")',role:"listbox","[id]":"id"},template:'\n\t\t<ng-template #rt let-result="result" let-term="term" let-formatter="formatter">\n\t\t\t<ngb-highlight [result]="formatter(result)" [term]="term"></ngb-highlight>\n\t\t</ng-template>\n\t\t<ng-template ngFor [ngForOf]="results" let-result let-idx="index">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="dropdown-item"\n\t\t\t\trole="option"\n\t\t\t\t[id]="id + \'-\' + idx"\n\t\t\t\t[class.active]="idx === activeIdx"\n\t\t\t\t(mouseenter)="markActive(idx)"\n\t\t\t\t(click)="select(result)"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="resultTemplate || rt"\n\t\t\t\t\t[ngTemplateOutletContext]="{ result: result, term: term, formatter: formatter }"\n\t\t\t\t></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t'}]}],propDecorators:{id:[{type:m.Input}],focusFirst:[{type:m.Input}],results:[{type:m.Input}],term:[{type:m.Input}],formatter:[{type:m.Input}],resultTemplate:[{type:m.Input}],popupClass:[{type:m.Input}],selectEvent:[{type:m.Output,args:["select"]}],activeChangeEvent:[{type:m.Output,args:["activeChange"]}]}});class ia{constructor(){this.editable=!0,this.focusFirst=!0,this.selectOnExact=!1,this.showHint=!1,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t}}ia.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ia,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),ia.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ia,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ia,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});const sa=new m.InjectionToken("live announcer delay",{providedIn:"root",factory:function(){return 100}});function aa(t,e=!1){let n=t.body.querySelector("#ngb-live");return null==n&&e&&(n=t.createElement("div"),n.setAttribute("id","ngb-live"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),n.classList.add("visually-hidden"),t.body.appendChild(n)),n}class oa{constructor(t,e){this._document=t,this._delay=e}ngOnDestroy(){const t=aa(this._document);t&&t.parentElement.removeChild(t)}say(t){const e=aa(this._document,!0),n=this._delay;if(null!=e){e.textContent="";const i=()=>e.textContent=t;null===n?i():setTimeout(i,n)}}}oa.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:oa,deps:[{token:b.DOCUMENT},{token:sa}],target:m["ɵɵFactoryTarget"].Injectable}),oa.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:oa,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:oa,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:void 0,decorators:[{type:m.Inject,args:[sa]}]}]}});let ra=0;class la{constructor(t,e,n,i,s,a,o,r,l,c,d){this._elementRef=t,this._renderer=n,this._live=o,this._document=r,this._ngZone=l,this._changeDetector=c,this._subscription=null,this._closed$=new v.Subject,this._inputValueBackup=null,this._inputValueForSelectOnExact=null,this._windowRef=null,this.autocomplete="off",this.placement="bottom-start",this.selectItem=new m.EventEmitter,this.activeDescendant=null,this.popupId="ngb-typeahead-"+ra++,this._onTouched=()=>{},this._onChange=t=>{},this.container=s.container,this.editable=s.editable,this.focusFirst=s.focusFirst,this.selectOnExact=s.selectOnExact,this.showHint=s.showHint,this.placement=s.placement,this.popperOptions=s.popperOptions,this._valueChanges=(0,v.fromEvent)(t.nativeElement,"input").pipe((0,_.map)(t=>t.target.value)),this._resubscribeTypeahead=new v.BehaviorSubject(null),this._popupService=new Ri(na,i,e,n,this._ngZone,d),this._positioning=kn()}ngOnInit(){this._subscribeToUserInput()}ngOnChanges({ngbTypeahead:t}){t&&!t.firstChange&&(this._unsubscribeFromUserInput(),this._subscribeToUserInput())}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput()}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}writeValue(t){this._writeInputValue(this._formatItemForInput(t)),this.showHint&&(this._inputValueBackup=t)}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead.next(null),this._closePopup(),this.showHint&&null!==this._inputValueBackup&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return null!=this._windowRef}handleBlur(){this._resubscribeTypeahead.next(null),this._onTouched()}handleKeyDown(t){if(this.isPopupOpen())switch(t.which){case Pe.ArrowDown:t.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case Pe.ArrowUp:t.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case Pe.Enter:case Pe.Tab:{const e=this._windowRef.instance.getActive();Nt(e)&&(t.preventDefault(),t.stopPropagation(),this._selectResult(e)),this._closePopup();break}}}_openPopup(){if(!this.isPopupOpen()){this._inputValueBackup=this._elementRef.nativeElement.value;const{windowRef:t}=this._popupService.open();this._windowRef=t,this._windowRef.setInput("id",this.popupId),this._windowRef.setInput("popupClass",this.popupClass),this._windowRef.instance.selectEvent.subscribe(t=>this._selectResultClosePopup(t)),this._windowRef.instance.activeChangeEvent.subscribe(t=>this.activeDescendant=t),"body"===this.container&&(this._renderer.setStyle(this._windowRef.location.nativeElement,"z-index","1055"),this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement)),this._changeDetector.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._windowRef&&(this._positioning.createPopper({hostElement:this._elementRef.nativeElement,targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(Mn([0,2])(t))}),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update()))}),hn(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._elementRef.nativeElement,this._windowRef.location.nativeElement])}}_closePopup(){this._popupService.close().subscribe(()=>{var t;this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._closed$.next(),this._windowRef=null,this.activeDescendant=null})}_selectResult(t){let e=!1;this.selectItem.emit({item:t,preventDefault:()=>{e=!0}}),this._resubscribeTypeahead.next(null),e||(this.writeValue(t),this._onChange(t))}_selectResultClosePopup(t){this._selectResult(t),this._closePopup()}_showHint(){var t;if(this.showHint&&(null===(t=this._windowRef)||void 0===t?void 0:t.instance.hasActive())&&null!=this._inputValueBackup){const t=this._inputValueBackup.toLowerCase(),e=this._formatItemForInput(this._windowRef.instance.getActive());t===e.substring(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+e.substring(this._inputValueBackup.length)),this._elementRef.nativeElement.setSelectionRange.apply(this._elementRef.nativeElement,[this._inputValueBackup.length,e.length])):this._writeInputValue(e)}}_formatItemForInput(t){return null!=t&&this.inputFormatter?this.inputFormatter(t):Rt(t)}_writeInputValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",Rt(t))}_subscribeToUserInput(){const t=this._valueChanges.pipe((0,_.tap)(t=>{this._inputValueBackup=this.showHint?t:null,this._inputValueForSelectOnExact=this.selectOnExact?t:null,this._onChange(this.editable?t:void 0)}),this.ngbTypeahead?this.ngbTypeahead:()=>(0,v.of)([]));this._subscription=this._resubscribeTypeahead.pipe((0,_.switchMap)(()=>t)).subscribe(t=>{t&&0!==t.length?this.selectOnExact&&1===t.length&&this._formatItemForInput(t[0])===this._inputValueForSelectOnExact?(this._selectResult(t[0]),this._closePopup()):(this._openPopup(),this._windowRef.instance.focusFirst=this.focusFirst,this._windowRef.instance.results=t,this._windowRef.instance.term=this._elementRef.nativeElement.value,this.resultFormatter&&(this._windowRef.instance.formatter=this.resultFormatter),this.resultTemplate&&(this._windowRef.instance.resultTemplate=this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint()):this._closePopup();const e=t?t.length:0;this._live.say(0===e?"No results available":`${e} result${1===e?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}}la.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:la,deps:[{token:m.ElementRef},{token:m.ViewContainerRef},{token:m.Renderer2},{token:m.Injector},{token:ia},{token:m.NgZone},{token:oa},{token:b.DOCUMENT},{token:m.NgZone},{token:m.ChangeDetectorRef},{token:m.ApplicationRef}],target:m["ɵɵFactoryTarget"].Directive}),la.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:la,isStandalone:!0,selector:"input[ngbTypeahead]",inputs:{autocomplete:"autocomplete",container:"container",editable:"editable",focusFirst:"focusFirst",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate",selectOnExact:"selectOnExact",showHint:"showHint",placement:"placement",popperOptions:"popperOptions",popupClass:"popupClass"},outputs:{selectItem:"selectItem"},host:{attributes:{autocapitalize:"off",autocorrect:"off",role:"combobox"},listeners:{blur:"handleBlur()",keydown:"handleKeyDown($event)"},properties:{"class.open":"isPopupOpen()",autocomplete:"autocomplete","attr.aria-autocomplete":'showHint ? "both" : "list"',"attr.aria-activedescendant":"activeDescendant","attr.aria-owns":"isPopupOpen() ? popupId : null","attr.aria-expanded":"isPopupOpen()"}},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>la),multi:!0}],exportAs:["ngbTypeahead"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:la,decorators:[{type:m.Directive,args:[{selector:"input[ngbTypeahead]",exportAs:"ngbTypeahead",standalone:!0,host:{"(blur)":"handleBlur()","[class.open]":"isPopupOpen()","(keydown)":"handleKeyDown($event)","[autocomplete]":"autocomplete",autocapitalize:"off",autocorrect:"off",role:"combobox","[attr.aria-autocomplete]":'showHint ? "both" : "list"',"[attr.aria-activedescendant]":"activeDescendant","[attr.aria-owns]":"isPopupOpen() ? popupId : null","[attr.aria-expanded]":"isPopupOpen()"},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>la),multi:!0}]}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.ViewContainerRef},{type:m.Renderer2},{type:m.Injector},{type:ia},{type:m.NgZone},{type:oa},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.NgZone},{type:m.ChangeDetectorRef},{type:m.ApplicationRef}]},propDecorators:{autocomplete:[{type:m.Input}],container:[{type:m.Input}],editable:[{type:m.Input}],focusFirst:[{type:m.Input}],inputFormatter:[{type:m.Input}],ngbTypeahead:[{type:m.Input}],resultFormatter:[{type:m.Input}],resultTemplate:[{type:m.Input}],selectOnExact:[{type:m.Input}],showHint:[{type:m.Input}],placement:[{type:m.Input}],popperOptions:[{type:m.Input}],popupClass:[{type:m.Input}],selectItem:[{type:m.Output}]}});class ca{}ca.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ca,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),ca.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:ca,imports:[ea,la],exports:[ea,la]}),ca.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ca,imports:[ea]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ca,decorators:[{type:m.NgModule,args:[{imports:[ea,la],exports:[ea,la]}]}]});class da{close(t){}dismiss(t){}}class ha{constructor(t,e,n,i){this._panelCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=i,this._closed=new v.Subject,this._dismissed=new v.Subject,this._hidden=new v.Subject,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),n&&n.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe((0,_.takeUntil)(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe((0,_.takeUntil)(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._panelCmptRef.instance.shown.asObservable()}close(t){this._panelCmptRef&&(this._closed.next(t),this._resolve(t),this._removeOffcanvasElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeOffcanvasElements()}dismiss(t){if(this._panelCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();jt(e)?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeOffcanvasElements(){const t=this._panelCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():(0,v.of)(void 0);t.subscribe(()=>{const{nativeElement:t}=this._panelCmptRef.location;t.parentNode.removeChild(t),this._panelCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._panelCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:t}=this._backdropCmptRef.location;t.parentNode.removeChild(t),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),(0,v.zip)(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var pa;!function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(pa||(pa={}));class ua{constructor(t,e){this._el=t,this._zone=e,this.dismissEvent=new m.EventEmitter}ngOnInit(){this._zone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{Yt(this._zone,this._el.nativeElement,(t,e)=>{e&&Bt(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Yt(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}dismiss(){this.static||this.dismissEvent.emit(pa.BACKDROP_CLICK)}}ua.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ua,deps:[{token:m.ElementRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),ua.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ua,isStandalone:!0,selector:"ngb-offcanvas-backdrop",inputs:{animation:"animation",backdropClass:"backdropClass",static:"static"},outputs:{dismissEvent:"dismiss"},host:{listeners:{mousedown:"dismiss()"},properties:{class:'"offcanvas-backdrop" + (backdropClass ? " " + backdropClass : "")',"class.show":"!animation","class.fade":"animation"}},ngImport:f,template:"",isInline:!0,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ua,decorators:[{type:m.Component,args:[{selector:"ngb-offcanvas-backdrop",standalone:!0,encapsulation:m.ViewEncapsulation.None,template:"",host:{"[class]":'"offcanvas-backdrop" + (backdropClass ? " " + backdropClass : "")',"[class.show]":"!animation","[class.fade]":"animation","(mousedown)":"dismiss()"}}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.NgZone}]},propDecorators:{animation:[{type:m.Input}],backdropClass:[{type:m.Input}],static:[{type:m.Input}],dismissEvent:[{type:m.Output,args:["dismiss"]}]}});class ga{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new v.Subject,this._elWithFocus=null,this.keyboard=!0,this.position="start",this.dismissEvent=new m.EventEmitter,this.shown=new v.Subject,this.hidden=new v.Subject}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,e={animation:this.animation,runningTransition:"stop"},n=Yt(this._zone,this._elRef.nativeElement,e=>(t.classList.remove("showing"),t.classList.add("hiding"),()=>t.classList.remove("show","hiding")),e);return n.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),n}_show(){const t={animation:this.animation,runningTransition:"continue"};Yt(this._zone,this._elRef.nativeElement,(t,e)=>(e&&Bt(t),t.classList.add("show","showing"),()=>t.classList.remove("showing")),t).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{(0,v.fromEvent)(t,"keydown").pipe((0,_.takeUntil)(this._closed$),(0,_.filter)(t=>t.which===Pe.Escape)).subscribe(t=>{this.keyboard&&requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(pa.ESC))})})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=un(t)[0];(e||n||t).focus()}}_restoreFocus(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}}ga.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ga,deps:[{token:b.DOCUMENT},{token:m.ElementRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),ga.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ga,isStandalone:!0,selector:"ngb-offcanvas-panel",inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",keyboard:"keyboard",panelClass:"panelClass",position:"position"},outputs:{dismissEvent:"dismiss"},host:{attributes:{role:"dialog",tabindex:"-1"},properties:{class:'"offcanvas offcanvas-" + position + (panelClass ? " " + panelClass : "")',"attr.aria-modal":"true","attr.aria-labelledby":"ariaLabelledBy","attr.aria-describedby":"ariaDescribedBy"}},ngImport:f,template:"<ng-content></ng-content>",isInline:!0,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ga,decorators:[{type:m.Component,args:[{selector:"ngb-offcanvas-panel",standalone:!0,template:"<ng-content></ng-content>",encapsulation:m.ViewEncapsulation.None,host:{"[class]":'"offcanvas offcanvas-" + position + (panelClass ? " " + panelClass : "")',role:"dialog",tabindex:"-1","[attr.aria-modal]":"true","[attr.aria-labelledby]":"ariaLabelledBy","[attr.aria-describedby]":"ariaDescribedBy"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.ElementRef},{type:m.NgZone}]},propDecorators:{animation:[{type:m.Input}],ariaLabelledBy:[{type:m.Input}],ariaDescribedBy:[{type:m.Input}],keyboard:[{type:m.Input}],panelClass:[{type:m.Input}],position:[{type:m.Input}],dismissEvent:[{type:m.Output,args:["dismiss"]}]}});class ma{constructor(t,e,n,i,s){this._applicationRef=t,this._injector=e,this._document=n,this._scrollBar=i,this._ngZone=s,this._activePanelCmptHasChanged=new v.Subject,this._scrollBarRestoreFn=null,this._backdropAttributes=["animation","backdropClass"],this._panelAttributes=["animation","ariaDescribedBy","ariaLabelledBy","keyboard","panelClass","position"],this._activeInstance=new m.EventEmitter,this._activePanelCmptHasChanged.subscribe(()=>{this._panelCmpt&&gn(this._ngZone,this._panelCmpt.location.nativeElement,this._activePanelCmptHasChanged)})}_restoreScrollBar(){const t=this._scrollBarRestoreFn;t&&(this._scrollBarRestoreFn=null,t())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(t,e,n){const i=n.container instanceof HTMLElement?n.container:Nt(n.container)?this._document.querySelector(n.container):this._document.body;if(!i)throw new Error(`The specified offcanvas container "${n.container||"body"}" was not found in the DOM.`);n.scroll||this._hideScrollBar();const s=new da,a=this._getContentRef(n.injector||t,e,s);let o=!1!==n.backdrop?this._attachBackdrop(i):void 0,r=this._attachWindowComponent(i,a.nodes),l=new ha(r,a,o,n.beforeDismiss);return this._registerOffcanvasRef(l),this._registerPanelCmpt(r),l.hidden.pipe((0,_.finalize)(()=>this._restoreScrollBar())).subscribe(),s.close=t=>{l.close(t)},s.dismiss=t=>{l.dismiss(t)},this._applyPanelOptions(r.instance,n),o&&o.instance&&(this._applyBackdropOptions(o.instance,n),o.changeDetectorRef.detectChanges()),r.changeDetectorRef.detectChanges(),l}get activeInstance(){return this._activeInstance}dismiss(t){var e;null===(e=this._offcanvasRef)||void 0===e||e.dismiss(t)}hasOpenOffcanvas(){return!!this._offcanvasRef}_attachBackdrop(t){let e=(0,m.createComponent)(ua,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(e.hostView),t.appendChild(e.location.nativeElement),e}_attachWindowComponent(t,e){let n=(0,m.createComponent)(ga,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:e});return this._applicationRef.attachView(n.hostView),t.appendChild(n.location.nativeElement),n}_applyPanelOptions(t,e){this._panelAttributes.forEach(n=>{Nt(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){this._backdropAttributes.forEach(n=>{Nt(e[n])&&(t[n]=e[n])}),t.static="static"===e.backdrop}_getContentRef(t,e,n){return e?e instanceof m.TemplateRef?this._createFromTemplateRef(e,n):Ft(e)?this._createFromString(e):this._createFromComponent(t,e,n):new Ei([])}_createFromTemplateRef(t,e){const n={$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}},i=t.createEmbeddedView(n);return this._applicationRef.attachView(i),new Ei([i.rootNodes],i)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new Ei([[e]])}_createFromComponent(t,e,n){const i=m.Injector.create({providers:[{provide:da,useValue:n}],parent:t}),s=(0,m.createComponent)(e,{environmentInjector:this._applicationRef.injector,elementInjector:i}),a=s.location.nativeElement;return this._applicationRef.attachView(s.hostView),new Ei([[a]],s.hostView,s)}_registerOffcanvasRef(t){const e=()=>{this._offcanvasRef=void 0,this._activeInstance.emit(this._offcanvasRef)};this._offcanvasRef=t,this._activeInstance.emit(this._offcanvasRef),t.result.then(e,e)}_registerPanelCmpt(t){this._panelCmpt=t,this._activePanelCmptHasChanged.next(),t.onDestroy(()=>{this._panelCmpt=void 0,this._activePanelCmptHasChanged.next()})}}ma.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ma,deps:[{token:m.ApplicationRef},{token:m.Injector},{token:b.DOCUMENT},{token:zi},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Injectable}),ma.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ma,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ma,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:m.ApplicationRef},{type:m.Injector},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:zi},{type:m.NgZone}]}});class fa{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.keyboard=!0,this.position="start",this.scroll=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}fa.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fa,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),fa.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fa,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fa,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});class ba{constructor(t,e,n){this._injector=t,this._offcanvasStack=e,this._config=n}open(t,e={}){const n=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),e);return this._offcanvasStack.open(this._injector,t,n)}get activeInstance(){return this._offcanvasStack.activeInstance}dismiss(t){this._offcanvasStack.dismiss(t)}hasOpenOffcanvas(){return this._offcanvasStack.hasOpenOffcanvas()}}ba.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ba,deps:[{token:m.Injector},{token:ma},{token:fa}],target:m["ɵɵFactoryTarget"].Injectable}),ba.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ba,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ba,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:m.Injector},{type:ma},{type:fa}]}});class ya{}ya.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ya,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),ya.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:ya}),ya.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ya}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ya,decorators:[{type:m.NgModule,args:[{}]}]});const va=[fe,_e,Fe,Ve,xi,Oi,Wi,os,ya,bs,Cs,Ts,Rs,Hs,Ks,ta,ca];class _a{}_a.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_a,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),_a.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:_a,imports:[fe,_e,Fe,Ve,xi,Oi,Wi,os,ya,bs,Cs,Ts,Rs,Hs,Ks,ta,ca],exports:[fe,_e,Fe,Ve,xi,Oi,Wi,os,ya,bs,Cs,Ts,Rs,Hs,Ks,ta,ca]}),_a.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_a,imports:[va,fe,_e,Fe,Ve,xi,Oi,Wi,os,ya,bs,Cs,Ts,Rs,Hs,Ks,ta,ca]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_a,decorators:[{type:m.NgModule,args:[{imports:va,exports:va}]}]});var xa=h(650),wa=h.n(xa),Da=h(700);function Ia(t){return t+.5|0}const ka=(t,e,n)=>Math.max(Math.min(t,n),e);function Ca(t){return ka(Ia(2.55*t),0,255)}function Ma(t){return ka(Ia(255*t),0,255)}function Sa(t){return ka(Ia(t/2.55)/100,0,1)}function Ta(t){return ka(Ia(100*t),0,100)}const Oa={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ea=[..."0123456789ABCDEF"],Ra=t=>Ea[15&t],Pa=t=>Ea[(240&t)>>4]+Ea[15&t],Fa=t=>(240&t)>>4==(15&t);const Va=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Aa(t,e,n){const i=e*Math.min(n,1-n),s=(e,s=(e+t/30)%12)=>n-i*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function Na(t,e,n){const i=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function ja(t,e,n){const i=Aa(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)i[s]*=1-e-n,i[s]+=e;return i}function La(t){const e=t.r/255,n=t.g/255,i=t.b/255,s=Math.max(e,n,i),a=Math.min(e,n,i),o=(s+a)/2;let r,l,c;return s!==a&&(c=s-a,l=o>.5?c/(2-s-a):c/(s+a),r=function(t,e,n,i,s){return t===s?(e-n)/i+(e<n?6:0):e===s?(n-t)/i+2:(t-e)/i+4}(e,n,i,c,s),r=60*r+.5),[0|r,l||0,o]}function za(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(Ma)}function Ba(t,e,n){return za(Aa,t,e,n)}function $a(t){return(t%360+360)%360}const Ha={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Wa={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Ua;const qa=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Ya=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Za=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Ka(t,e,n){if(t){let i=La(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=Ba(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Ga(t,e){return t?Object.assign(e||{},t):t}function Xa(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Ma(t[3]))):(e=Ga(t,{r:0,g:0,b:0,a:1})).a=Ma(e.a),e}function Ja(t){return"r"===t.charAt(0)?function(t){const e=qa.exec(t);let n,i,s,a=255;if(e){if(e[7]!==n){const t=+e[7];a=e[8]?Ca(t):ka(255*t,0,255)}return n=+e[1],i=+e[3],s=+e[5],n=255&(e[2]?Ca(n):ka(n,0,255)),i=255&(e[4]?Ca(i):ka(i,0,255)),s=255&(e[6]?Ca(s):ka(s,0,255)),{r:n,g:i,b:s,a}}}(t):function(t){const e=Va.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?Ca(+e[5]):Ma(+e[5]));const s=$a(+e[2]),a=+e[3]/100,o=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return za(ja,t,e,n)}(s,a,o):"hsv"===e[1]?function(t,e,n){return za(Na,t,e,n)}(s,a,o):Ba(s,a,o),{r:n[0],g:n[1],b:n[2],a:i}}(t)}class Qa{constructor(t){if(t instanceof Qa)return t;const e=typeof t;let n;var i,s,a;"object"===e?n=Xa(t):"string"===e&&(a=(i=t).length,"#"===i[0]&&(4===a||5===a?s={r:255&17*Oa[i[1]],g:255&17*Oa[i[2]],b:255&17*Oa[i[3]],a:5===a?17*Oa[i[4]]:255}:7!==a&&9!==a||(s={r:Oa[i[1]]<<4|Oa[i[2]],g:Oa[i[3]]<<4|Oa[i[4]],b:Oa[i[5]]<<4|Oa[i[6]],a:9===a?Oa[i[7]]<<4|Oa[i[8]]:255})),n=s||function(t){Ua||(Ua=function(){const t={},e=Object.keys(Wa),n=Object.keys(Ha);let i,s,a,o,r;for(i=0;i<e.length;i++){for(o=r=e[i],s=0;s<n.length;s++)a=n[s],r=r.replace(a,Ha[a]);a=parseInt(Wa[o],16),t[r]=[a>>16&255,a>>8&255,255&a]}return t}(),Ua.transparent=[0,0,0,0]);const e=Ua[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||Ja(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Ga(this._rgb);return t&&(t.a=Sa(t.a)),t}set rgb(t){this._rgb=Xa(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Sa(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>Fa(t.r)&&Fa(t.g)&&Fa(t.b)&&Fa(t.a))(t)?Ra:Pa,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=La(t),n=e[0],i=Ta(e[1]),s=Ta(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${Sa(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let s;const a=e===s?.5:e,o=2*a-1,r=n.a-i.a,l=((o*r===-1?o:(o+r)/(1+o*r))+1)/2;s=1-l,n.r=255&l*n.r+s*i.r+.5,n.g=255&l*n.g+s*i.g+.5,n.b=255&l*n.b+s*i.b+.5,n.a=a*n.a+(1-a)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const i=Za(Sa(t.r)),s=Za(Sa(t.g)),a=Za(Sa(t.b));return{r:Ma(Ya(i+n*(Za(Sa(e.r))-i))),g:Ma(Ya(s+n*(Za(Sa(e.g))-s))),b:Ma(Ya(a+n*(Za(Sa(e.b))-a))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Qa(this.rgb)}alpha(t){return this._rgb.a=Ma(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Ia(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ka(this._rgb,2,t),this}darken(t){return Ka(this._rgb,2,-t),this}saturate(t){return Ka(this._rgb,1,t),this}desaturate(t){return Ka(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=La(t);n[0]=$a(n[0]+e),n=Ba(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function to(){}const eo=(()=>{let t=0;return()=>t++})();function no(t){return null==t}function io(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function so(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function ao(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function oo(t,e){return ao(t)?t:e}function ro(t,e){return void 0===t?e:t}const lo=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function co(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function ho(t,e,n,i){let s,a,o;if(io(t))if(a=t.length,i)for(s=a-1;s>=0;s--)e.call(n,t[s],s);else for(s=0;s<a;s++)e.call(n,t[s],s);else if(so(t))for(o=Object.keys(t),a=o.length,s=0;s<a;s++)e.call(n,t[o[s]],o[s])}function po(t,e){let n,i,s,a;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(s=t[n],a=e[n],s.datasetIndex!==a.datasetIndex||s.index!==a.index)return!1;return!0}function uo(t){if(io(t))return t.map(uo);if(so(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let s=0;for(;s<i;++s)e[n[s]]=uo(t[n[s]]);return e}return t}function go(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function mo(t,e,n,i){if(!go(t))return;const s=e[t],a=n[t];so(s)&&so(a)?fo(s,a,i):e[t]=uo(a)}function fo(t,e,n){const i=io(e)?e:[e],s=i.length;if(!so(t))return t;const a=(n=n||{}).merger||mo;let o;for(let e=0;e<s;++e){if(o=i[e],!so(o))continue;const s=Object.keys(o);for(let e=0,i=s.length;e<i;++e)a(s[e],t,o,n)}return t}function bo(t,e){return fo(t,e,{merger:yo})}function yo(t,e,n){if(!go(t))return;const i=e[t],s=n[t];so(i)&&so(s)?bo(i,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=uo(s))}const vo={"":t=>t,x:t=>t.x,y:t=>t.y};function _o(t,e){const n=vo[e]||(vo[e]=function(t){const e=function(t){const e=t.split("."),n=[];let i="";for(const t of e)i+=t,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function xo(t){return t.charAt(0).toUpperCase()+t.slice(1)}const wo=t=>void 0!==t,Do=t=>"function"==typeof t,Io=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0},ko=Math.PI,Co=2*ko,Mo=Co+ko,So=Number.POSITIVE_INFINITY,To=ko/180,Oo=ko/2,Eo=ko/4,Ro=2*ko/3,Po=Math.log10,Fo=Math.sign;function Vo(t,e,n){return Math.abs(t-e)<n}function Ao(t){const e=Math.round(t);t=Vo(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Po(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function No(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function jo(t,e,n){let i,s,a;for(i=0,s=t.length;i<s;i++)a=t[i][n],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function Lo(t){return t*(ko/180)}function zo(t){return t*(180/ko)}function Bo(t){if(!ao(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function $o(t,e){const n=e.x-t.x,i=e.y-t.y,s=Math.sqrt(n*n+i*i);let a=Math.atan2(i,n);return a<-.5*ko&&(a+=Co),{angle:a,distance:s}}function Ho(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Wo(t,e){return(t-e+Mo)%Co-ko}function Uo(t){return(t%Co+Co)%Co}function qo(t,e,n,i){const s=Uo(t),a=Uo(e),o=Uo(n),r=Uo(a-s),l=Uo(o-s),c=Uo(s-a),d=Uo(s-o);return s===a||s===o||i&&a===o||r>l&&c<d}function Yo(t,e,n){return Math.max(e,Math.min(n,t))}function Zo(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function Ko(t,e,n){n=n||(n=>t[n]<e);let i,s=t.length-1,a=0;for(;s-a>1;)i=a+s>>1,n(i)?a=i:s=i;return{lo:a,hi:s}}const Go=(t,e,n,i)=>Ko(t,n,i?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),Xo=(t,e,n)=>Ko(t,n,i=>t[i][e]>=n),Jo=["push","pop","shift","splice","unshift"];function Qo(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(e);-1!==s&&i.splice(s,1),i.length>0||(Jo.forEach(e=>{delete t[e]}),delete t._chartjs)}function tr(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const er="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function nr(t,e){let n=[],i=!1;return function(...s){n=s,i||(i=!0,er.call(window,()=>{i=!1,t.apply(e,n)}))}}const ir=t=>"start"===t?"left":"end"===t?"right":"center",sr=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function ar(t,e,n){const i=e.length;let s=0,a=i;if(t._sorted){const{iScale:o,vScale:r,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=o.axis,{min:h,max:p,minDefined:u,maxDefined:g}=o.getUserBounds();if(u){if(s=Math.min(Go(l,d,h).lo,n?i:Go(e,d,o.getPixelForValue(h)).lo),c){const t=l.slice(0,s+1).reverse().findIndex(t=>!no(t[r.axis]));s-=Math.max(0,t)}s=Yo(s,0,i-1)}if(g){let t=Math.max(Go(l,o.axis,p,!0).hi+1,n?0:Go(e,d,o.getPixelForValue(p),!0).hi+1);if(c){const e=l.slice(t-1).findIndex(t=>!no(t[r.axis]));t+=Math.max(0,e)}a=Yo(t,s,i)-s}else a=i-s}return{start:s,count:a}}function or(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,s={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=s,!0;const a=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),a}const rr=t=>0===t||1===t,lr=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*Co/n),cr=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Co/n)+1,dr={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Oo),easeOutSine:t=>Math.sin(t*Oo),easeInOutSine:t=>-.5*(Math.cos(ko*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>rr(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>rr(t)?t:lr(t,.075,.3),easeOutElastic:t=>rr(t)?t:cr(t,.075,.3),easeInOutElastic(t){const e=.1125;return rr(t)?t:t<.5?.5*lr(2*t,e,.45):.5+.5*cr(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-dr.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*dr.easeInBounce(2*t):.5*dr.easeOutBounce(2*t-1)+.5};function hr(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function pr(t){return hr(t)?t:new Qa(t)}function ur(t){return hr(t)?t:new Qa(t).saturate(.5).darken(.1).hexString()}const gr=["x","y","borderWidth","radius","tension"],mr=["color","borderColor","backgroundColor"],fr=new Map;function br(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=fr.get(n);return i||(i=new Intl.NumberFormat(t,e),fr.set(n,i)),i}(e,n).format(t)}const yr={values:t=>io(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let s,a=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),a=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}(t,n)}const o=Po(Math.abs(a)),r=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),br(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(Po(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?yr.numeric.call(this,t,e,n):""}};var vr={formatters:yr};const _r=Object.create(null),xr=Object.create(null);function wr(t,e){if(!e)return t;const n=e.split(".");for(let e=0,i=n.length;e<i;++e){const i=n[e];t=t[i]||(t[i]=Object.create(null))}return t}function Dr(t,e,n){return"string"==typeof e?fo(wr(t,e),n):fo(wr(t,""),e)}class Ir{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>ur(e.backgroundColor),this.hoverBorderColor=(t,e)=>ur(e.borderColor),this.hoverColor=(t,e)=>ur(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Dr(this,t,e)}get(t){return wr(this,t)}describe(t,e){return Dr(xr,t,e)}override(t,e){return Dr(_r,t,e)}route(t,e,n,i){const s=wr(this,t),a=wr(this,n),o="_"+e;Object.defineProperties(s,{[o]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=a[i];return so(t)?Object.assign({},e,t):ro(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach(t=>t(this))}}var kr=new Ir({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:mr},numbers:{type:"number",properties:gr}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:vr.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Cr(t,e,n,i,s){let a=e[s];return a||(a=e[s]=t.measureText(s).width,n.push(s)),a>i&&(i=a),i}function Mr(t,e,n,i){let s=(i=i||{}).data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},a=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let o=0;const r=n.length;let l,c,d,h,p;for(l=0;l<r;l++)if(h=n[l],null==h||io(h)){if(io(h))for(c=0,d=h.length;c<d;c++)p=h[c],null==p||io(p)||(o=Cr(t,s,a,o,p))}else o=Cr(t,s,a,o,h);t.restore();const u=a.length/2;if(u>n.length){for(l=0;l<u;l++)delete s[a[l]];a.splice(0,u)}return o}function Sr(t,e,n){const i=t.currentDevicePixelRatio,s=0!==n?Math.max(n/2,.5):0;return Math.round((e-s)*i)/i+s}function Tr(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Or(t,e,n,i){Er(t,e,n,i,null)}function Er(t,e,n,i,s){let a,o,r,l,c,d,h,p;const u=e.pointStyle,g=e.rotation,m=e.radius;let f=(g||0)*To;if(u&&"object"==typeof u&&(a=u.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return t.save(),t.translate(n,i),t.rotate(f),t.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),void t.restore();if(!(isNaN(m)||m<=0)){switch(t.beginPath(),u){default:s?t.ellipse(n,i,s/2,m,0,0,Co):t.arc(n,i,m,0,Co),t.closePath();break;case"triangle":d=s?s/2:m,t.moveTo(n+Math.sin(f)*d,i-Math.cos(f)*m),f+=Ro,t.lineTo(n+Math.sin(f)*d,i-Math.cos(f)*m),f+=Ro,t.lineTo(n+Math.sin(f)*d,i-Math.cos(f)*m),t.closePath();break;case"rectRounded":c=.516*m,l=m-c,o=Math.cos(f+Eo)*l,h=Math.cos(f+Eo)*(s?s/2-c:l),r=Math.sin(f+Eo)*l,p=Math.sin(f+Eo)*(s?s/2-c:l),t.arc(n-h,i-r,c,f-ko,f-Oo),t.arc(n+p,i-o,c,f-Oo,f),t.arc(n+h,i+r,c,f,f+Oo),t.arc(n-p,i+o,c,f+Oo,f+ko),t.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,d=s?s/2:l,t.rect(n-d,i-l,2*d,2*l);break}f+=Eo;case"rectRot":h=Math.cos(f)*(s?s/2:m),o=Math.cos(f)*m,r=Math.sin(f)*m,p=Math.sin(f)*(s?s/2:m),t.moveTo(n-h,i-r),t.lineTo(n+p,i-o),t.lineTo(n+h,i+r),t.lineTo(n-p,i+o),t.closePath();break;case"crossRot":f+=Eo;case"cross":h=Math.cos(f)*(s?s/2:m),o=Math.cos(f)*m,r=Math.sin(f)*m,p=Math.sin(f)*(s?s/2:m),t.moveTo(n-h,i-r),t.lineTo(n+h,i+r),t.moveTo(n+p,i-o),t.lineTo(n-p,i+o);break;case"star":h=Math.cos(f)*(s?s/2:m),o=Math.cos(f)*m,r=Math.sin(f)*m,p=Math.sin(f)*(s?s/2:m),t.moveTo(n-h,i-r),t.lineTo(n+h,i+r),t.moveTo(n+p,i-o),t.lineTo(n-p,i+o),f+=Eo,h=Math.cos(f)*(s?s/2:m),o=Math.cos(f)*m,r=Math.sin(f)*m,p=Math.sin(f)*(s?s/2:m),t.moveTo(n-h,i-r),t.lineTo(n+h,i+r),t.moveTo(n+p,i-o),t.lineTo(n-p,i+o);break;case"line":o=s?s/2:Math.cos(f)*m,r=Math.sin(f)*m,t.moveTo(n-o,i-r),t.lineTo(n+o,i+r);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(f)*(s?s/2:m),i+Math.sin(f)*m);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Rr(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Pr(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Fr(t){t.restore()}function Vr(t,e,n,i,s){if(!e)return t.lineTo(n.x,n.y);if("middle"===s){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else"after"===s!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Ar(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function Nr(t,e,n,i,s){if(s.strikethrough||s.underline){const a=t.measureText(i),o=e-a.actualBoundingBoxLeft,r=e+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,d=s.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(o,d),t.lineTo(r,d),t.stroke()}}function jr(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Lr(t,e,n,i,s,a={}){const o=io(e)?e:[e],r=a.strokeWidth>0&&""!==a.strokeColor;let l,c;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),no(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,a),l=0;l<o.length;++l)c=o[l],a.backdrop&&jr(t,a.backdrop),r&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),no(a.strokeWidth)||(t.lineWidth=a.strokeWidth),t.strokeText(c,n,i,a.maxWidth)),t.fillText(c,n,i,a.maxWidth),Nr(t,n,i,c,a),i+=Number(s.lineHeight);t.restore()}function zr(t,e){const{x:n,y:i,w:s,h:a,radius:o}=e;t.arc(n+o.topLeft,i+o.topLeft,o.topLeft,1.5*ko,ko,!0),t.lineTo(n,i+a-o.bottomLeft),t.arc(n+o.bottomLeft,i+a-o.bottomLeft,o.bottomLeft,ko,Oo,!0),t.lineTo(n+s-o.bottomRight,i+a),t.arc(n+s-o.bottomRight,i+a-o.bottomRight,o.bottomRight,Oo,0,!0),t.lineTo(n+s,i+o.topRight),t.arc(n+s-o.topRight,i+o.topRight,o.topRight,0,-Oo,!0),t.lineTo(n+o.topLeft,i)}const Br=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,$r=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Hr(t,e){const n=(""+t).match(Br);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}const Wr=t=>+t||0;function Ur(t,e){const n={},i=so(e),s=i?Object.keys(e):e,a=so(t)?i?n=>ro(t[n],t[e[n]]):e=>t[e]:()=>t;for(const t of s)n[t]=Wr(a(t));return n}function qr(t){return Ur(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Yr(t){return Ur(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Zr(t){const e=qr(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Kr(t,e){t=t||{},e=e||kr.font;let n=ro(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let i=ro(t.style,e.style);i&&!(""+i).match($r)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:ro(t.family,e.family),lineHeight:Hr(ro(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:ro(t.weight,e.weight),string:""};return s.string=function(t){return!t||no(t.size)||no(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function Gr(t,e,n,i){let s,a,o,r=!0;for(s=0,a=t.length;s<a;++s)if(o=t[s],void 0!==o&&(void 0!==e&&"function"==typeof o&&(o=o(e),r=!1),void 0!==n&&io(o)&&(o=o[n%o.length],r=!1),void 0!==o))return i&&!r&&(i.cacheable=!1),o}function Xr(t,e){return Object.assign(Object.create(t),e)}function Jr(t,e=[""],n,i,s=()=>t[0]){const a=n||t;void 0===i&&(i=cl("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:i,_getTarget:s,override:n=>Jr([n,...t],e,a,i)};return new Proxy(o,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>il(n,i,()=>function(t,e,n,i){let s;for(const a of e)if(s=cl(el(a,t),n),void 0!==s)return nl(t,s)?rl(n,i,t,s):s}(i,e,t,n)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>dl(t).includes(e),ownKeys:t=>dl(t),set(t,e,n){const i=t._storage||(t._storage=s());return t[e]=i[e]=n,delete t._keys,!0}})}function Qr(t,e,n,i){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:tl(t,i),setContext:e=>Qr(t,e,n,i),override:s=>Qr(t.override(s),e,n,i)};return new Proxy(s,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>il(t,e,()=>function(t,e,n){const{_proxy:i,_context:s,_subProxy:a,_descriptors:o}=t;let r=i[e];return Do(r)&&o.isScriptable(e)&&(r=function(t,e,n,i){const{_proxy:s,_context:a,_subProxy:o,_stack:r}=n;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let l=e(a,o||i);return r.delete(t),nl(t,l)&&(l=rl(s._scopes,s,t,l)),l}(e,r,t,n)),io(r)&&r.length&&(r=function(t,e,n,i){const{_proxy:s,_context:a,_subProxy:o,_descriptors:r}=n;if(void 0!==a.index&&i(t))return e[a.index%e.length];if(so(e[0])){const n=e,i=s._scopes.filter(t=>t!==n);e=[];for(const l of n){const n=rl(i,s,t,l);e.push(Qr(n,a,o&&o[t],r))}}return e}(e,r,t,o.isIndexable)),nl(e,r)&&(r=Qr(r,s,a&&a[e],o)),r}(t,e,n)),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function tl(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:n,indexable:i,isScriptable:Do(n)?n:()=>n,isIndexable:Do(i)?i:()=>i}}const el=(t,e)=>t?t+xo(e):e,nl=(t,e)=>so(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function il(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const i=n();return t[e]=i,i}function sl(t,e,n){return Do(t)?t(e,n):t}const al=(t,e)=>!0===t?e:"string"==typeof t?_o(e,t):void 0;function ol(t,e,n,i,s){for(const a of e){const e=al(n,a);if(e){t.add(e);const a=sl(e._fallback,n,s);if(void 0!==a&&a!==n&&a!==i)return a}else if(!1===e&&void 0!==i&&n!==i)return null}return!1}function rl(t,e,n,i){const s=e._rootScopes,a=sl(e._fallback,n,i),o=[...t,...s],r=new Set;r.add(i);let l=ll(r,o,n,a||n,i);return null!==l&&(void 0===a||a===n||(l=ll(r,o,a,l,i),null!==l))&&Jr(Array.from(r),[""],s,a,()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const s=i[e];return io(s)&&so(n)?n:s||{}}(e,n,i))}function ll(t,e,n,i,s){for(;n;)n=ol(t,e,n,i,s);return n}function cl(t,e){for(const n of e){if(!n)continue;const e=n[t];if(void 0!==e)return e}}function dl(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function hl(t,e,n,i){const{iScale:s}=t,{key:a="r"}=this._parsing,o=new Array(i);let r,l,c,d;for(r=0,l=i;r<l;++r)c=r+n,d=e[c],o[r]={r:s.parse(_o(d,a),c)};return o}const pl=Number.EPSILON||1e-14,ul=(t,e)=>e<t.length&&!t[e].skip&&t[e],gl=t=>"x"===t?"y":"x";function ml(t,e,n,i){const s=t.skip?e:t,a=e,o=n.skip?e:n,r=Ho(a,s),l=Ho(o,a);let c=r/(r+l),d=l/(r+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const h=i*c,p=i*d;return{previous:{x:a.x-h*(o.x-s.x),y:a.y-h*(o.y-s.y)},next:{x:a.x+p*(o.x-s.x),y:a.y+p*(o.y-s.y)}}}function fl(t,e,n){return Math.max(Math.min(t,n),e)}function bl(t,e,n,i,s){let a,o,r,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const n=gl(e),i=t.length,s=Array(i).fill(0),a=Array(i);let o,r,l,c=ul(t,0);for(o=0;o<i;++o)if(r=l,l=c,c=ul(t,o+1),l){if(c){const t=c[e]-l[e];s[o]=0!==t?(c[n]-l[n])/t:0}a[o]=r?c?Fo(s[o-1])!==Fo(s[o])?0:(s[o-1]+s[o])/2:s[o-1]:s[o]}!function(t,e,n){const i=t.length;let s,a,o,r,l,c=ul(t,0);for(let d=0;d<i-1;++d)l=c,c=ul(t,d+1),l&&c&&(Vo(e[d],0,pl)?n[d]=n[d+1]=0:(s=n[d]/e[d],a=n[d+1]/e[d],r=Math.pow(s,2)+Math.pow(a,2),r<=9||(o=3/Math.sqrt(r),n[d]=s*o*e[d],n[d+1]=a*o*e[d])))}(t,s,a),function(t,e,n="x"){const i=gl(n),s=t.length;let a,o,r,l=ul(t,0);for(let c=0;c<s;++c){if(o=r,r=l,l=ul(t,c+1),!r)continue;const s=r[n],d=r[i];o&&(a=(s-o[n])/3,r[`cp1${n}`]=s-a,r[`cp1${i}`]=d-a*e[c]),l&&(a=(l[n]-s)/3,r[`cp2${n}`]=s+a,r[`cp2${i}`]=d+a*e[c])}}(t,a,e)}(t,s);else{let n=i?t[t.length-1]:t[0];for(a=0,o=t.length;a<o;++a)r=t[a],l=ml(n,r,t[Math.min(a+1,o-(i?0:1))%o],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,n=r}e.capBezierPoints&&function(t,e){let n,i,s,a,o,r=Rr(t[0],e);for(n=0,i=t.length;n<i;++n)o=a,a=r,r=n<i-1&&Rr(t[n+1],e),a&&(s=t[n],o&&(s.cp1x=fl(s.cp1x,e.left,e.right),s.cp1y=fl(s.cp1y,e.top,e.bottom)),r&&(s.cp2x=fl(s.cp2x,e.left,e.right),s.cp2y=fl(s.cp2y,e.top,e.bottom)))}(t,n)}function yl(){return"undefined"!=typeof window&&"undefined"!=typeof document}function vl(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function _l(t,e,n){let i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}const xl=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),wl=["top","right","bottom","left"];function Dl(t,e,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const a=wl[s];i[a]=parseFloat(t[e+"-"+a+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function Il(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,s=xl(n),a="border-box"===s.boxSizing,o=Dl(s,"padding"),r=Dl(s,"border","width"),{x:l,y:c,box:d}=function(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:s,offsetY:a}=i;let o,r,l=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(s,a,t.target))o=s,r=a;else{const t=e.getBoundingClientRect();o=i.clientX-t.left,r=i.clientY-t.top,l=!0}return{x:o,y:r,box:l}}(t,n),h=o.left+(d&&r.left),p=o.top+(d&&r.top);let{width:u,height:g}=e;return a&&(u-=o.width+r.width,g-=o.height+r.height),{x:Math.round((l-h)/u*n.width/i),y:Math.round((c-p)/g*n.height/i)}}const kl=t=>Math.round(10*t)/10;function Cl(t,e,n){const i=e||1,s=kl(t.height*i),a=kl(t.width*i);t.height=kl(t.height),t.width=kl(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||o.height!==s||o.width!==a)&&(t.currentDevicePixelRatio=i,o.height=s,o.width=a,t.ctx.setTransform(i,0,0,i,0,0),!0)}const Ml=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};yl()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Sl(t,e){const n=function(t,e){return xl(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Tl(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Ol(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function El(t,e,n,i){const s={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},o=Tl(t,s,n),r=Tl(s,a,n),l=Tl(a,e,n),c=Tl(o,r,n),d=Tl(r,l,n);return Tl(c,d,n)}function Rl(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Pl(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function Fl(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Vl(t){return"angle"===t?{between:qo,compare:Wo,normalize:Uo}:{between:Zo,compare:(t,e)=>t-e,normalize:t=>t}}function Al({start:t,end:e,count:n,loop:i,style:s}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0,style:s}}function Nl(t,e,n){if(!n)return[t];const{property:i,start:s,end:a}=n,o=e.length,{compare:r,between:l,normalize:c}=Vl(i),{start:d,end:h,loop:p,style:u}=function(t,e,n){const{property:i,start:s,end:a}=n,{between:o,normalize:r}=Vl(i),l=e.length;let c,d,{start:h,end:p,loop:u}=t;if(u){for(h+=l,p+=l,c=0,d=l;c<d&&o(r(e[h%l][i]),s,a);++c)h--,p--;h%=l,p%=l}return p<h&&(p+=l),{start:h,end:p,loop:u,style:t.style}}(t,e,n),g=[];let m,f,b,y=!1,v=null;const _=()=>y||l(s,b,m)&&0!==r(s,b),x=()=>!y||0===r(a,m)||l(a,b,m);for(let t=d,n=d;t<=h;++t)f=e[t%o],f.skip||(m=c(f[i]),m!==b&&(y=l(m,s,a),null===v&&_()&&(v=0===r(m,s)?t:n),null!==v&&x()&&(g.push(Al({start:v,end:t,loop:p,count:o,style:u})),v=null),n=t,b=m));return null!==v&&g.push(Al({start:v,end:h,loop:p,count:o,style:u})),g}function jl(t,e){const n=[],i=t.segments;for(let s=0;s<i.length;s++){const a=Nl(i[s],t.points,e);a.length&&n.push(...a)}return n}function Ll(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function zl(t,e){if(!e)return!1;const n=[],i=function(t,e){return hr(e)?(n.includes(e)||n.push(e),n.indexOf(e)):e};return JSON.stringify(t,i)!==JSON.stringify(e,i)}function Bl(t,e,n){return t.options.clip?t[n]:e[n]}function $l(t,e){const n=e._clip;if(n.disabled)return!1;const i=function(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:Bl(n,e,"left"),right:Bl(n,e,"right"),top:Bl(i,e,"top"),bottom:Bl(i,e,"bottom")}:e}(e,t.chartArea);return{left:!1===n.left?0:i.left-(!0===n.left?0:n.left),right:!1===n.right?t.width:i.right+(!0===n.right?0:n.right),top:!1===n.top?0:i.top-(!0===n.top?0:n.top),bottom:!1===n.bottom?t.height:i.bottom+(!0===n.bottom?0:n.bottom)}}class Hl{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const s=e.listeners[i],a=e.duration;s.forEach(i=>i({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(n-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=er.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,o=s.length-1,r=!1;for(;o>=0;--o)a=s[o],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),r=!0):(s[o]=s[s.length-1],s.pop());r&&(i.draw(),this._notify(i,n,t,"progress")),s.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=s.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Wl=new Hl;const Ul="transparent",ql={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const i=pr(t||Ul),s=i.valid&&pr(e||Ul);return s&&s.valid?s.mix(i,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Yl{constructor(t,e,n,i){const s=e[n];i=Gr([t.to,i,s,t.from]);const a=Gr([t.from,s,i]);this._active=!0,this._fn=t.fn||ql[t.type||typeof a],this._easing=dr[t.easing]||dr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const i=this._target[this._prop],s=n-this._start,a=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Gr([t.to,e,i,t.from]),this._from=Gr([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,s=this._from,a=this._loop,o=this._to;let r;if(this._active=s!==o&&(a||e<n),!this._active)return this._target[i]=o,void this._notify(!0);e<0?this._target[i]=s:(r=e/n%2,r=a&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[i]=this._fn(s,o,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let t=0;t<n.length;t++)n[t][e]()}}class Zl{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!so(t))return;const e=Object.keys(kr.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!so(s))return;const a={};for(const t of e)a[t]=s[t];(io(s.properties)&&s.properties||[i]).forEach(t=>{t!==i&&n.has(t)||n.set(t,a)})})}_animateOptions(t,e){const n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(n)return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;t.options=e}(t,n);if(!i)return[];const s=this._createAnimations(i,n);return n.$shared&&function(t,e){const n=[],i=Object.keys(e);for(let e=0;e<i.length;e++){const s=t[i[e]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}(t.options.$animations,n).then(()=>{t.options=n},()=>{}),s}_createAnimations(t,e){const n=this._properties,i=[],s=t.$animations||(t.$animations={}),a=Object.keys(e),o=Date.now();let r;for(r=a.length-1;r>=0;--r){const l=a[r];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(t,e));continue}const c=e[l];let d=s[l];const h=n.get(l);if(d){if(h&&d.active()){d.update(h,c,o);continue}d.cancel()}h&&h.duration?(s[l]=d=new Yl(h,t,l,c),i.push(d)):t[l]=c}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(Wl.add(this._chart,n),!0):void 0}}function Kl(t,e){const n=t&&t.options||{},i=n.reverse,s=void 0===n.min?e:0,a=void 0===n.max?e:0;return{start:i?a:s,end:i?s:a}}function Gl(t,e){const n=[],i=t._getSortedDatasetMetas(e);let s,a;for(s=0,a=i.length;s<a;++s)n.push(i[s].index);return n}function Xl(t,e,n,i={}){const s=t.keys,a="single"===i.mode;let o,r,l,c;if(null===e)return;let d=!1;for(o=0,r=s.length;o<r;++o){if(l=+s[o],l===n){if(d=!0,i.all)continue;break}c=t.values[l],ao(c)&&(a||0===e||Fo(e)===Fo(c))&&(e+=c)}return d||i.all?e:0}function Jl(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function Ql(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function tc(t,e,n,i){for(const s of e.getMatchingVisibleMetas(i).reverse()){const e=t[s.index];if(n&&e>0||!n&&e<0)return s.index}return null}function ec(t,e){const{chart:n,_cachedMeta:i}=t,s=n._stacks||(n._stacks={}),{iScale:a,vScale:o,index:r}=i,l=a.axis,c=o.axis,d=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(a,o,i),h=e.length;let p;for(let t=0;t<h;++t){const n=e[t],{[l]:a,[c]:h}=n;p=(n._stacks||(n._stacks={}))[c]=Ql(s,d,a),p[r]=h,p._top=tc(p,o,!0,i.type),p._bottom=tc(p,o,!1,i.type),(p._visualValues||(p._visualValues={}))[r]=h}}function nc(t,e){const n=t.scales;return Object.keys(n).filter(t=>n[t].axis===e).shift()}function ic(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n],void 0!==e[i]._visualValues&&void 0!==e[i]._visualValues[n]&&delete e[i]._visualValues[n]}}}const sc=t=>"reset"===t||"none"===t,ac=(t,e)=>e?t:Object.assign({},t);class oc{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Jl(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ic(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),i=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,s=e.xAxisID=ro(n.xAxisID,nc(t,"x")),a=e.yAxisID=ro(n.yAxisID,nc(t,"y")),o=e.rAxisID=ro(n.rAxisID,nc(t,"r")),r=e.indexAxis,l=e.iAxisID=i(r,s,a,o),c=e.vAxisID=i(r,a,s,o);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Qo(this._data,this),t._stacked&&ic(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(so(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:n,vScale:i}=e,s="x"===n.axis?"x":"y",a="x"===i.axis?"x":"y",o=Object.keys(t),r=new Array(o.length);let l,c,d;for(l=0,c=o.length;l<c;++l)d=o[l],r[l]={[s]:d,[a]:t[d]};return r}(e,t)}else if(n!==e){if(n){Qo(n,this);const t=this._cachedMeta;ic(t),t._parsed=[]}e&&Object.isExtensible(e)&&((i=e)._chartjs?i._chartjs.listeners.push(this):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),Jo.forEach(t=>{const e="_onData"+xo(t),n=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...t){const s=n.apply(this,t);return i._chartjs.listeners.forEach(n=>{"function"==typeof n[e]&&n[e](...t)}),s}})}))),this._syncList=[],this._data=e}var i}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const s=e._stacked;e._stacked=Jl(e.vScale,e),e.stack!==n.stack&&(i=!0,ic(e),e.stack=n.stack),this._resyncElements(t),(i||s!==e._stacked)&&(ec(this,e._parsed),e._stacked=Jl(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:i}=this,{iScale:s,_stacked:a}=n,o=s.axis;let r,l,c,d=0===t&&e===i.length||n._sorted,h=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=i,n._sorted=!0,c=i;else{c=io(i[t])?this.parseArrayData(n,i,t,e):so(i[t])?this.parseObjectData(n,i,t,e):this.parsePrimitiveData(n,i,t,e);const s=()=>null===l[o]||h&&l[o]<h[o];for(r=0;r<e;++r)n._parsed[r+t]=l=c[r],d&&(s()&&(d=!1),h=l);n._sorted=d}a&&ec(this,c)}parsePrimitiveData(t,e,n,i){const{iScale:s,vScale:a}=t,o=s.axis,r=a.axis,l=s.getLabels(),c=s===a,d=new Array(i);let h,p,u;for(h=0,p=i;h<p;++h)u=h+n,d[h]={[o]:c||s.parse(l[u],u),[r]:a.parse(e[u],u)};return d}parseArrayData(t,e,n,i){const{xScale:s,yScale:a}=t,o=new Array(i);let r,l,c,d;for(r=0,l=i;r<l;++r)c=r+n,d=e[c],o[r]={x:s.parse(d[0],c),y:a.parse(d[1],c)};return o}parseObjectData(t,e,n,i){const{xScale:s,yScale:a}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,l=new Array(i);let c,d,h,p;for(c=0,d=i;c<d;++c)h=c+n,p=e[h],l[c]={x:s.parse(_o(p,o),h),y:a.parse(_o(p,r),h)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const i=this.chart,s=this._cachedMeta,a=e[t.axis];return Xl({keys:Gl(i,!0),values:e._stacks[t.axis]._visualValues},a,s.index,{mode:n})}updateRangeFromParsed(t,e,n,i){const s=n[e.axis];let a=null===s?NaN:s;const o=i&&n._stacks[e.axis];i&&o&&(i.values=o,a=Xl(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const n=this._cachedMeta,i=n._parsed,s=n._sorted&&t===n.iScale,a=i.length,o=this._getOtherScale(t),r=((t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Gl(n,!0),values:null})(e,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(t){const{min:e,max:n,minDefined:i,maxDefined:s}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}(o);let h,p;function u(){p=i[h];const e=p[o.axis];return!ao(p[t.axis])||c>e||d<e}for(h=0;h<a&&(u()||(this.updateRangeFromParsed(l,t,p,r),!s));++h);if(s)for(h=a-1;h>=0;--h)if(!u()){this.updateRangeFromParsed(l,t,p,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let i,s,a;for(i=0,s=e.length;i<s;++i)a=e[i][t.axis],ao(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,i=e.vScale,s=this.getParsed(t);return{label:n?""+n.getLabelForValue(s[n.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,n,i,s;return so(t)?(e=t.top,n=t.right,i=t.bottom,s=t.left):e=n=i=s=t,{top:e,right:n,bottom:i,left:s,disabled:!1===t}}(ro(this.options.clip,function(t,e,n){if(!1===n)return!1;const i=Kl(t,n),s=Kl(e,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,i=n.data||[],s=e.chartArea,a=[],o=this._drawStart||0,r=this._drawCount||i.length-o,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(t,s,o,r),c=o;c<o+r;++c){const e=i[c];e.hidden||(e.active&&l?a.push(e):e.draw(t,s))}for(c=0;c<a.length;++c)a[c].draw(t,s)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,n){return Xr(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=function(t,e){return Xr(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=n,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const i="active"===e,s=this._cachedDataOpts,a=t+"-"+e,o=s[a],r=this.enableOptionSharing&&wo(n);if(o)return ac(o,r);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],h=l.getOptionScopes(this.getDataset(),c),p=Object.keys(kr.elements[t]),u=l.resolveNamedOptions(h,p,()=>this.getContext(n,i,e),d);return u.$shared&&(u.$shared=r,s[a]=Object.freeze(ac(u,r))),u}_resolveAnimations(t,e,n){const i=this.chart,s=this._cachedDataOpts,a=`animation-${e}`,o=s[a];if(o)return o;let r;if(!1!==i.options.animation){const i=this.chart.config,s=i.datasetAnimationScopeKeys(this._type,e),a=i.getOptionScopes(this.getDataset(),s);r=i.createResolver(a,this.getContext(t,n,e))}const l=new Zl(i,r&&r.animations);return r&&r._cacheable&&(s[a]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||sc(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,s=this.getSharedOptions(n),a=this.includeOptions(e,s)||s!==i;return this.updateSharedOptions(s,e,n),{sharedOptions:s,includeOptions:a}}updateElement(t,e,n,i){sc(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!sc(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const s=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[t,e,n]of this._syncList)this[t](e,n);this._syncList=[];const i=n.length,s=e.length,a=Math.min(s,i);a&&this.parse(0,a),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,e,n=!0){const i=this._cachedMeta,s=i.data,a=t+e;let o;const r=t=>{for(t.length+=e,o=t.length-1;o>=a;o--)t[o]=t[o-e]};for(r(s),o=t;o<a;++o)s[o]=new this.dataElementType;this._parsing&&r(i._parsed),this.parse(t,e),n&&this.updateElements(s,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,e);n._stacked&&ic(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,i]=t;this[e](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function rc(t){const e=t.iScale,n=function(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let i=[];for(let e=0,s=n.length;e<s;e++)i=i.concat(n[e].controller.getAllParsedValues(t));t._cache.$bar=tr(i.sort((t,e)=>t-e))}return t._cache.$bar}(e,t.type);let i,s,a,o,r=e._length;const l=()=>{32767!==a&&-32768!==a&&(wo(o)&&(r=Math.min(r,Math.abs(a-o)||r)),o=a)};for(i=0,s=n.length;i<s;++i)a=e.getPixelForValue(n[i]),l();for(o=void 0,i=0,s=e.ticks.length;i<s;++i)a=e.getPixelForTick(i),l();return r}function lc(t,e,n,i){return io(t)?function(t,e,n,i){const s=n.parse(t[0],i),a=n.parse(t[1],i),o=Math.min(s,a),r=Math.max(s,a);let l=o,c=r;Math.abs(o)>Math.abs(r)&&(l=r,c=o),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:a,min:o,max:r}}(t,e,n,i):e[n.axis]=n.parse(t,i),e}function cc(t,e,n,i){const s=t.iScale,a=t.vScale,o=s.getLabels(),r=s===a,l=[];let c,d,h,p;for(c=n,d=n+i;c<d;++c)p=e[c],h={},h[s.axis]=r||s.parse(o[c],c),l.push(lc(p,h,a,c));return l}function dc(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function hc(t,e,n,i){let s=e.borderSkipped;const a={};if(!s)return void(t.borderSkipped=a);if(!0===s)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:o,end:r,reverse:l,top:c,bottom:d}=function(t){let e,n,i,s,a;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(s="end",a="start"):(s="start",a="end"),{start:n,end:i,reverse:e,top:s,bottom:a}}(t);"middle"===s&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?s=c:(n._bottom||0)===i?s=d:(a[pc(d,o,r,l)]=!0,s=c)),a[pc(s,o,r,l)]=!0,t.borderSkipped=a}function pc(t,e,n,i){var s,a,o;return i?(o=n,t=uc(t=(s=t)===(a=e)?o:s===o?a:s,n,e)):t=uc(t,e,n),t}function uc(t,e,n){return"start"===t?e:"end"===t?n:t}function gc(t,{inflateAmount:e},n){t.inflateAmount="auto"===e?1===n?.33:0:e}class mc extends oc{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:n,textAlign:i,color:s,useBorderRadius:a,borderRadius:o}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((e,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.getDataVisibility(r),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:i,pointStyle:n,borderRadius:a&&(o||l.borderRadius),index:r}}):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,i=this._cachedMeta;if(!1===this._parsing)i._parsed=n;else{let s,a,o=t=>+n[t];if(so(n[t])){const{key:t="value"}=this._parsing;o=e=>+_o(n[e],t)}for(s=t,a=t+e;s<a;++s)i._parsed[s]=o(s)}}_getRotation(){return Lo(this.options.rotation-90)}_getCircumference(){return Lo(this.options.circumference)}_getRotationExtents(){let t=Co,e=-Co;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const i=this.chart.getDatasetMeta(n).controller,s=i._getRotation(),a=i._getCircumference();t=Math.min(t,s),e=Math.max(e,s+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,i=this._cachedMeta,s=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,o=Math.max((Math.min(n.width,n.height)-a)/2,0),r=Math.min((c=o,"string"==typeof(l=this.options.cutout)&&l.endsWith("%")?parseFloat(l)/100:+l/c),1);var l,c;const d=this._getRingWeight(this.index),{circumference:h,rotation:p}=this._getRotationExtents(),{ratioX:u,ratioY:g,offsetX:m,offsetY:f}=function(t,e,n){let i=1,s=1,a=0,o=0;if(e<Co){const r=t,l=r+e,c=Math.cos(r),d=Math.sin(r),h=Math.cos(l),p=Math.sin(l),u=(t,e,i)=>qo(t,r,l,!0)?1:Math.max(e,e*n,i,i*n),g=(t,e,i)=>qo(t,r,l,!0)?-1:Math.min(e,e*n,i,i*n),m=u(0,c,h),f=u(Oo,d,p),b=g(ko,c,h),y=g(ko+Oo,d,p);i=(m-b)/2,s=(f-y)/2,a=-(m+b)/2,o=-(f+y)/2}return{ratioX:i,ratioY:s,offsetX:a,offsetY:o}}(p,h,r),b=(n.width-a)/u,y=(n.height-a)/g,v=Math.max(Math.min(b,y)/2,0),_=lo(this.options.radius,v),x=(_-Math.max(_*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*_,this.offsetY=f*_,i.total=this.calculateTotal(),this.outerRadius=_-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*d,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const n=this.options,i=this._cachedMeta,s=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===i._parsed[t]||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*s/Co)}updateElements(t,e,n,i){const s="reset"===i,a=this.chart,o=a.chartArea,r=a.options.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,d=s&&r.animateScale,h=d?0:this.innerRadius,p=d?0:this.outerRadius,{sharedOptions:u,includeOptions:g}=this._getSharedOptions(e,i);let m,f=this._getRotation();for(m=0;m<e;++m)f+=this._circumference(m,s);for(m=e;m<e+n;++m){const e=this._circumference(m,s),n=t[m],a={x:l+this.offsetX,y:c+this.offsetY,startAngle:f,endAngle:f+e,circumference:e,outerRadius:p,innerRadius:h};g&&(a.options=u||this.resolveDataElementOptions(m,n.active?"active":i)),f+=e,this.updateElement(n,m,a,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n,i=0;for(n=0;n<e.length;n++){const s=t._parsed[n];null===s||isNaN(s)||!this.chart.getDataVisibility(n)||e[n].hidden||(i+=Math.abs(s))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?Co*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=br(e._parsed[t],n.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,s,a,o,r;if(!t)for(i=0,s=n.data.datasets.length;i<s;++i)if(n.isDatasetVisible(i)){a=n.getDatasetMeta(i),t=a.data,o=a.controller;break}if(!t)return 0;for(i=0,s=t.length;i<s;++i)r=o.resolveDataElementOptions(i),"inner"!==r.borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,i=t.length;n<i;++n){const t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(ro(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class fc extends oc{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:i}}=t.legend.options;return e.labels.map((e,s)=>{const a=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=br(e._parsed[t].r,n.options.locale);return{label:i[t]||"",value:s}}parseObjectData(t,e,n,i){return hl.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,n)=>{const i=this.getParsed(n).r;!isNaN(i)&&this.chart.getDataVisibility(n)&&(i<e.min&&(e.min=i),i>e.max&&(e.max=i))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(i/2,0),a=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,n,i){const s="reset"===i,a=this.chart,o=a.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,c=r.yCenter,d=r.getIndexAngle(0)-.5*ko;let h,p=d;const u=360/this.countVisibleElements();for(h=0;h<e;++h)p+=this._computeAngle(h,i,u);for(h=e;h<e+n;h++){const e=t[h];let n=p,g=p+this._computeAngle(h,i,u),m=a.getDataVisibility(h)?r.getDistanceFromCenterForValue(this.getParsed(h).r):0;p=g,s&&(o.animateScale&&(m=0),o.animateRotate&&(n=g=d));const f={x:l,y:c,innerRadius:0,outerRadius:m,startAngle:n,endAngle:g,options:this.resolveDataElementOptions(h,e.active?"active":i)};this.updateElement(e,h,f,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((t,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?Lo(this.resolveDataElementOptions(t,e).angle||n):0}}var bc=Object.freeze({__proto__:null,BarController:class extends oc{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,n,i){return cc(t,e,n,i)}parseArrayData(t,e,n,i){return cc(t,e,n,i)}parseObjectData(t,e,n,i){const{iScale:s,vScale:a}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,l="x"===s.axis?o:r,c="x"===a.axis?o:r,d=[];let h,p,u,g;for(h=n,p=n+i;h<p;++h)g=e[h],u={},u[s.axis]=s.parse(_o(g,l),h),d.push(lc(_o(g,c),u,a,h));return d}updateRangeFromParsed(t,e,n,i){super.updateRangeFromParsed(t,e,n,i);const s=n._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:i}=e,s=this.getParsed(t),a=s._custom,o=dc(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+n.getLabelForValue(s[n.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,i){const s="reset"===i,{index:a,_cachedMeta:{vScale:o}}=this,r=o.getBasePixel(),l=o.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(e,i);for(let p=e;p<e+n;p++){const e=this.getParsed(p),n=s||no(e[o.axis])?{base:r,head:r}:this._calculateBarValuePixels(p),u=this._calculateBarIndexPixels(p,c),g=(e._stacks||{})[o.axis],m={horizontal:l,base:n.base,enableBorderRadius:!g||dc(e._custom)||a===g._top||a===g._bottom,x:l?n.head:u.center,y:l?u.center:n.head,height:l?u.size:Math.abs(n.size),width:l?Math.abs(n.size):u.size};h&&(m.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const f=m.options||t[p].options;hc(m,f,g,a),gc(m,f,c.ratio),this.updateElement(t[p],p,m,i)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),s=n.options.stacked,a=[],o=this._cachedMeta.controller.getParsed(e),r=o&&o[n.axis],l=t=>{const e=t._parsed.find(t=>t[n.axis]===r),i=e&&e[t.vScale.axis];if(no(i)||isNaN(i))return!0};for(const n of i)if((void 0===e||!l(n))&&((!1===s||-1===a.indexOf(n.stack)||void 0===s&&void 0===n.stack)&&a.push(n.stack),n.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const n of this.chart.data.datasets)t[ro("x"===this.chart.options.indexAxis?n.xAxisID:n.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,n){const i=this._getStacks(t,n),s=void 0!==e?i.indexOf(e):-1;return-1===s?i.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,i=[];let s,a;for(s=0,a=e.data.length;s<a;++s)i.push(n.getPixelForValue(this.getParsed(s)[n.axis],s));const o=t.barThickness;return{min:o||rc(e),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n,index:i},options:{base:s,minBarLength:a}}=this,o=s||0,r=this.getParsed(t),l=r._custom,c=dc(l);let d,h,p=r[e.axis],u=0,g=n?this.applyStack(e,r,n):p;g!==p&&(u=g-p,g=p),c&&(p=l.barStart,g=l.barEnd-l.barStart,0!==p&&Fo(p)!==Fo(l.barEnd)&&(u=0),u+=p);const m=no(s)||c?u:s;let f=e.getPixelForValue(m);if(d=this.chart.getDataVisibility(t)?e.getPixelForValue(u+g):f,h=d-f,Math.abs(h)<a){h=function(t,e,n){return 0!==t?Fo(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}(h,e,o)*a,p===o&&(f-=h/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1),l=Math.min(t,s),u=Math.max(t,s);f=Math.max(Math.min(f,u),l),d=f+h,n&&!c&&(r._stacks[e.axis]._visualValues[i]=e.getValueForPixel(d)-e.getValueForPixel(f))}if(f===e.getPixelForValue(o)){const t=Fo(h)*e.getLineWidthForValue(o)/2;f+=t,h-=t}return{size:h,base:f,head:d,center:d+h/2}}_calculateBarIndexPixels(t,e){const n=e.scale,i=this.options,s=i.skipNull,a=ro(i.maxBarThickness,1/0);let o,r;const l=this._getAxisCount();if(e.grouped){const n=s?this._getStackCount(t):e.stackCount,c="flex"===i.barThickness?function(t,e,n,i){const s=e.pixels,a=s[t];let o=t>0?s[t-1]:null,r=t<s.length-1?s[t+1]:null;const l=n.categoryPercentage;null===o&&(o=a-(null===r?e.end-e.start:r-a)),null===r&&(r=a+a-o);const c=a-(a-Math.min(o,r))/2*l;return{chunk:Math.abs(r-o)/2*l/i,ratio:n.barPercentage,start:c}}(t,e,i,n*l):function(t,e,n,i){const s=n.barThickness;let a,o;return no(s)?(a=e.min*n.categoryPercentage,o=n.barPercentage):(a=s*i,o=1),{chunk:a/i,ratio:o,start:e.pixels[t]-a/2}}(t,e,i,n*l),d="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(ro(d,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0)+h;o=c.start+c.chunk*p+c.chunk/2,r=Math.min(a,c.chunk*c.ratio)}else o=n.getPixelForValue(this.getParsed(t)[n.axis],t),r=Math.min(a,e.min*e.ratio);return{base:o-r/2,head:o+r/2,center:o,size:r}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,i=n.length;let s=0;for(;s<i;++s)null===this.getParsed(s)[e.axis]||n[s].hidden||n[s].draw(this._ctx)}},BubbleController:class extends oc{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,i){const s=super.parsePrimitiveData(t,e,n,i);for(let t=0;t<s.length;t++)s[t]._custom=this.resolveDataElementOptions(t+n).radius;return s}parseArrayData(t,e,n,i){const s=super.parseArrayData(t,e,n,i);for(let t=0;t<s.length;t++){const i=e[n+t];s[t]._custom=ro(i[2],this.resolveDataElementOptions(t+n).radius)}return s}parseObjectData(t,e,n,i){const s=super.parseObjectData(t,e,n,i);for(let t=0;t<s.length;t++){const i=e[n+t];s[t]._custom=ro(i&&i.r&&+i.r,this.resolveDataElementOptions(t+n).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:s}=e,a=this.getParsed(t),o=i.getLabelForValue(a.x),r=s.getLabelForValue(a.y),l=a._custom;return{label:n[t]||"",value:"("+o+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,i){const s="reset"===i,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,i),c=a.axis,d=o.axis;for(let h=e;h<e+n;h++){const e=t[h],n=!s&&this.getParsed(h),p={},u=p[c]=s?a.getPixelForDecimal(.5):a.getPixelForValue(n[c]),g=p[d]=s?o.getBasePixel():o.getPixelForValue(n[d]);p.skip=isNaN(u)||isNaN(g),l&&(p.options=r||this.resolveDataElementOptions(h,e.active?"active":i),s&&(p.options.radius=0)),this.updateElement(e,h,p,i)}}resolveDataElementOptions(t,e){const n=this.getParsed(t);let i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return"active"!==e&&(i.radius=0),i.radius+=ro(n&&n._custom,s),i}},DoughnutController:mc,LineController:class extends oc{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:i=[],_dataset:s}=e,a=this.chart._animationsDisabled;let{start:o,count:r}=ar(e,i,a);this._drawStart=o,this._drawCount=r,or(e)&&(o=0,r=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!s._decimated,n.points=i;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:l},t),this.updateElements(i,o,r,t)}updateElements(t,e,n,i){const s="reset"===i,{iScale:a,vScale:o,_stacked:r,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,i),h=a.axis,p=o.axis,{spanGaps:u,segment:g}=this.options,m=No(u)?u:Number.POSITIVE_INFINITY,f=this.chart._animationsDisabled||s||"none"===i,b=e+n,y=t.length;let v=e>0&&this.getParsed(e-1);for(let n=0;n<y;++n){const u=t[n],y=f?u:{};if(n<e||n>=b){y.skip=!0;continue}const _=this.getParsed(n),x=no(_[p]),w=y[h]=a.getPixelForValue(_[h],n),D=y[p]=s||x?o.getBasePixel():o.getPixelForValue(r?this.applyStack(o,_,r):_[p],n);y.skip=isNaN(w)||isNaN(D)||x,y.stop=n>0&&Math.abs(_[h]-v[h])>m,g&&(y.parsed=_,y.raw=l.data[n]),d&&(y.options=c||this.resolveDataElementOptions(n,u.active?"active":i)),f||this.updateElement(u,n,y,i),v=_}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PieController:class extends mc{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:fc,RadarController:class extends oc{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,i){return hl.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta,n=e.dataset,i=e.data||[],s=e.iScale.getLabels();if(n.points=i,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:e};this.updateElement(n,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,n,i){const s=this._cachedMeta.rScale,a="reset"===i;for(let o=e;o<e+n;o++){const e=t[o],n=this.resolveDataElementOptions(o,e.active?"active":i),r=s.getPointPositionForValue(o,this.getParsed(o).r),l=a?s.xCenter:r.x,c=a?s.yCenter:r.y,d={x:l,y:c,angle:r.angle,skip:isNaN(l)||isNaN(c),options:n};this.updateElement(e,o,d,i)}}},ScatterController:class extends oc{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:s}=e,a=this.getParsed(t),o=i.getLabelForValue(a.x),r=s.getLabelForValue(a.y);return{label:n[t]||"",value:"("+o+", "+r+")"}}update(t){const e=this._cachedMeta,{data:n=[]}=e,i=this.chart._animationsDisabled;let{start:s,count:a}=ar(e,n,i);if(this._drawStart=s,this._drawCount=a,or(e)&&(s=0,a=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:a}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!a._decimated,s.points=n;const o=this.resolveDatasetElementOptions(t);o.segment=this.options.segment,this.updateElement(s,void 0,{animated:!i,options:o},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,s,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,i){const s="reset"===i,{iScale:a,vScale:o,_stacked:r,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,i),d=this.getSharedOptions(c),h=this.includeOptions(i,d),p=a.axis,u=o.axis,{spanGaps:g,segment:m}=this.options,f=No(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||s||"none"===i;let y=e>0&&this.getParsed(e-1);for(let c=e;c<e+n;++c){const e=t[c],n=this.getParsed(c),g=b?e:{},v=no(n[u]),_=g[p]=a.getPixelForValue(n[p],c),x=g[u]=s||v?o.getBasePixel():o.getPixelForValue(r?this.applyStack(o,n,r):n[u],c);g.skip=isNaN(_)||isNaN(x)||v,g.stop=c>0&&Math.abs(n[p]-y[p])>f,m&&(g.parsed=n,g.raw=l.data[c]),h&&(g.options=d||this.resolveDataElementOptions(c,e.active?"active":i)),b||this.updateElement(e,c,g,i),y=n}this.updateSharedOptions(d,i,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}const n=t.dataset,i=n.options&&n.options.borderWidth||0;if(!e.length)return i;const s=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,s,a)/2}}});function yc(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class vc{static override(t){Object.assign(vc.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return yc()}parse(){return yc()}format(){return yc()}add(){return yc()}diff(){return yc()}startOf(){return yc()}endOf(){return yc()}}var _c=vc;function xc(t,e,n,i){const{controller:s,data:a,_sorted:o}=t,r=s._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(r&&e===r.axis&&"r"!==e&&o&&a.length){const o=r._reversePixels?Xo:Go;if(!i){const i=o(a,e,n);if(l){const{vScale:e}=s._cachedMeta,{_parsed:n}=t,a=n.slice(0,i.lo+1).reverse().findIndex(t=>!no(t[e.axis]));i.lo-=Math.max(0,a);const o=n.slice(i.hi).findIndex(t=>!no(t[e.axis]));i.hi+=Math.max(0,o)}return i}if(s._sharedOptions){const t=a[0],i="function"==typeof t.getRange&&t.getRange(e);if(i){const t=o(a,e,n-i),s=o(a,e,n+i);return{lo:t.lo,hi:s.hi}}}}return{lo:0,hi:a.length-1}}function wc(t,e,n,i,s){const a=t.getSortedVisibleDatasetMetas(),o=n[e];for(let t=0,n=a.length;t<n;++t){const{index:n,data:r}=a[t],{lo:l,hi:c}=xc(a[t],e,o,s);for(let t=l;t<=c;++t){const e=r[t];e.skip||i(e,n,t)}}}function Dc(t,e,n,i,s){const a=[];return s||t.isPointInArea(e)?(wc(t,n,e,function(n,o,r){(s||Rr(n,t.chartArea,0))&&n.inRange(e.x,e.y,i)&&a.push({element:n,datasetIndex:o,index:r})},!0),a):a}function Ic(t,e,n,i,s,a){return a||t.isPointInArea(e)?"r"!==n||i?function(t,e,n,i,s,a){let o=[];const r=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){const s=e?Math.abs(t.x-i.x):0,a=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(a,2))}}(n);let l=Number.POSITIVE_INFINITY;return wc(t,n,e,function(n,c,d){const h=n.inRange(e.x,e.y,s);if(i&&!h)return;const p=n.getCenterPoint(s);if(!a&&!t.isPointInArea(p)&&!h)return;const u=r(e,p);u<l?(o=[{element:n,datasetIndex:c,index:d}],l=u):u===l&&o.push({element:n,datasetIndex:c,index:d})}),o}(t,e,n,i,s,a):function(t,e,n,i){let s=[];return wc(t,n,e,function(t,n,a){const{startAngle:o,endAngle:r}=t.getProps(["startAngle","endAngle"],i),{angle:l}=$o(t,{x:e.x,y:e.y});qo(l,o,r)&&s.push({element:t,datasetIndex:n,index:a})}),s}(t,e,n,s):[]}function kc(t,e,n,i,s){const a=[],o="x"===n?"inXRange":"inYRange";let r=!1;return wc(t,n,e,(t,i,l)=>{t[o]&&t[o](e[n],s)&&(a.push({element:t,datasetIndex:i,index:l}),r=r||t.inRange(e.x,e.y,s))}),i&&!r?[]:a}var Cc={evaluateInteractionItems:wc,modes:{index(t,e,n,i){const s=Il(e,t),a=n.axis||"x",o=n.includeInvisible||!1,r=n.intersect?Dc(t,s,a,i,o):Ic(t,s,a,!1,i,o),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=r[0].index,n=t.data[e];n&&!n.skip&&l.push({element:n,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,n,i){const s=Il(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;let r=n.intersect?Dc(t,s,a,i,o):Ic(t,s,a,!1,i,o);if(r.length>0){const e=r[0].datasetIndex,n=t.getDatasetMeta(e).data;r=[];for(let t=0;t<n.length;++t)r.push({element:n[t],datasetIndex:e,index:t})}return r},point:(t,e,n,i)=>Dc(t,Il(e,t),n.axis||"xy",i,n.includeInvisible||!1),nearest(t,e,n,i){const s=Il(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;return Ic(t,s,a,n.intersect,i,o)},x:(t,e,n,i)=>kc(t,Il(e,t),"x",n.intersect,i),y:(t,e,n,i)=>kc(t,Il(e,t),"y",n.intersect,i)}};const Mc=["left","top","right","bottom"];function Sc(t,e){return t.filter(t=>t.pos===e)}function Tc(t,e){return t.filter(t=>-1===Mc.indexOf(t.pos)&&t.box.axis===e)}function Oc(t,e){return t.sort((t,n)=>{const i=e?n:t,s=e?t:n;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function Ec(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function Rc(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Pc(t,e,n,i){const{pos:s,box:a}=n,o=t.maxPadding;if(!so(s)){n.size&&(t[s]-=n.size);const e=i[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?a.height:a.width),n.size=e.size/e.count,t[s]+=n.size}a.getPadding&&Rc(o,a.getPadding());const r=Math.max(0,e.outerWidth-Ec(o,t,"left","right")),l=Math.max(0,e.outerHeight-Ec(o,t,"top","bottom")),c=r!==t.w,d=l!==t.h;return t.w=r,t.h=l,n.horizontal?{same:c,other:d}:{same:d,other:c}}function Fc(t,e){const n=e.maxPadding;return function(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{i[t]=Math.max(e[t],n[t])}),i}(t?["left","right"]:["top","bottom"])}function Vc(t,e,n,i){const s=[];let a,o,r,l,c,d;for(a=0,o=t.length,c=0;a<o;++a){r=t[a],l=r.box,l.update(r.width||e.w,r.height||e.h,Fc(r.horizontal,e));const{same:o,other:h}=Pc(e,n,r,i);c|=o&&s.length,d=d||h,l.fullSize||s.push(r)}return c&&Vc(s,e,n,i)||d}function Ac(t,e,n,i,s){t.top=n,t.left=e,t.right=e+i,t.bottom=n+s,t.width=i,t.height=s}function Nc(t,e,n,i){const s=n.padding;let{x:a,y:o}=e;for(const r of t){const t=r.box,l=i[r.stack]||{count:1,placed:0,weight:1},c=r.stackWeight/l.weight||1;if(r.horizontal){const i=e.w*c,a=l.size||t.height;wo(l.start)&&(o=l.start),t.fullSize?Ac(t,s.left,o,n.outerWidth-s.right-s.left,a):Ac(t,e.left+l.placed,o,i,a),l.start=o,l.placed+=i,o=t.bottom}else{const i=e.h*c,o=l.size||t.width;wo(l.start)&&(a=l.start),t.fullSize?Ac(t,a,s.top,o,n.outerHeight-s.bottom-s.top):Ac(t,a,e.top+l.placed,o,i),l.start=a,l.placed+=i,a=t.right}}e.x=a,e.y=o}var jc={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const s=Zr(t.options.layout.padding),a=Math.max(e-s.width,0),o=Math.max(n-s.height,0),r=function(t){const e=function(t){const e=[];let n,i,s,a,o,r;for(n=0,i=(t||[]).length;n<i;++n)s=t[n],({position:a,options:{stack:o,stackWeight:r=1}}=s),e.push({index:n,box:s,pos:a,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&a+o,stackWeight:r});return e}(t),n=Oc(e.filter(t=>t.box.fullSize),!0),i=Oc(Sc(e,"left"),!0),s=Oc(Sc(e,"right")),a=Oc(Sc(e,"top"),!0),o=Oc(Sc(e,"bottom")),r=Tc(e,"x"),l=Tc(e,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:s.concat(l).concat(o).concat(r),chartArea:Sc(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:a.concat(o).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;ho(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const d=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,h=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/d,hBoxMaxHeight:o/2}),p=Object.assign({},s);Rc(p,Zr(i));const u=Object.assign({maxPadding:p,w:a,h:o,x:s.left,y:s.top},s),g=function(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:i,stackWeight:s}=n;if(!t||!Mc.includes(i))continue;const a=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=s}return e}(t),{vBoxMaxWidth:i,hBoxMaxHeight:s}=e;let a,o,r;for(a=0,o=t.length;a<o;++a){r=t[a];const{fullSize:o}=r.box,l=n[r.stack],c=l&&r.stackWeight/l.weight;r.horizontal?(r.width=c?c*i:o&&e.availableWidth,r.height=s):(r.width=i,r.height=c?c*s:o&&e.availableHeight)}return n}(l.concat(c),h);Vc(r.fullSize,u,h,g),Vc(l,u,h,g),Vc(c,u,h,g)&&Vc(l,u,h,g),function(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(u),Nc(r.leftAndTop,u,h,g),u.x+=u.w,u.y+=u.h,Nc(r.rightAndBottom,u,h,g),t.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h,height:u.h,width:u.w},ho(r.chartArea,e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(u.w,u.h,{left:0,top:0,right:0,bottom:0})})}};class Lc{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class zc extends Lc{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Bc="$chartjs",$c={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Hc=t=>null===t||""===t,Wc=!!Ml&&{passive:!0};function Uc(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Wc)}function qc(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Yc(t,e,n){const i=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||qc(n.addedNodes,i),e=e&&!qc(n.removedNodes,i);e&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Zc(t,e,n){const i=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||qc(n.removedNodes,i),e=e&&!qc(n.addedNodes,i);e&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Kc=new Map;let Gc=0;function Xc(){const t=window.devicePixelRatio;t!==Gc&&(Gc=t,Kc.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Jc(t,e,n){const i=t.canvas,s=i&&vl(i);if(!s)return;const a=nr((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()},window),o=new ResizeObserver(t=>{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||a(n,i)});return o.observe(s),function(t,e){Kc.size||window.addEventListener("resize",Xc),Kc.set(t,e)}(t,a),o}function Qc(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){Kc.delete(t),Kc.size||window.removeEventListener("resize",Xc)}(t)}function td(t,e,n){const i=t.canvas,s=nr(e=>{null!==t.ctx&&n(function(t,e){const n=$c[t.type]||t.type,{x:i,y:s}=Il(t,e);return{type:n,chart:e,native:t,x:void 0!==i?i:null,y:void 0!==s?s:null}}(e,t))},t);return function(t,e,n){t&&t.addEventListener(e,n,Wc)}(i,e,s),s}class ed extends Lc{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[Bc]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Hc(s)){const e=Sl(t,"width");void 0!==e&&(t.width=e)}if(Hc(i))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Sl(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[Bc])return!1;const n=e[Bc].initial;["height","width"].forEach(t=>{const i=n[t];no(i)?e.removeAttribute(t):e.setAttribute(t,i)});const i=n.style||{};return Object.keys(i).forEach(t=>{e.style[t]=i[t]}),e.width=e.width,delete e[Bc],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),s={attach:Yc,detach:Zc,resize:Jc}[e]||td;i[e]=s(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];i&&(({attach:Qc,detach:Qc,resize:Qc}[e]||Uc)(t,e,i),n[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,i){return function(t,e,n,i){const s=xl(t),a=Dl(s,"margin"),o=_l(s.maxWidth,t,"clientWidth")||So,r=_l(s.maxHeight,t,"clientHeight")||So,l=function(t,e,n){let i,s;if(void 0===e||void 0===n){const a=t&&vl(t);if(a){const t=a.getBoundingClientRect(),o=xl(a),r=Dl(o,"border","width"),l=Dl(o,"padding");e=t.width-l.width-r.width,n=t.height-l.height-r.height,i=_l(o.maxWidth,a,"clientWidth"),s=_l(o.maxHeight,a,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||So,maxHeight:s||So}}(t,e,n);let{width:c,height:d}=l;if("content-box"===s.boxSizing){const t=Dl(s,"border","width"),e=Dl(s,"padding");c-=e.width+t.width,d-=e.height+t.height}return c=Math.max(0,c-a.width),d=Math.max(0,i?c/i:d-a.height),c=kl(Math.min(c,o,l.maxWidth)),d=kl(Math.min(d,r,l.maxHeight)),c&&!d&&(d=kl(c/2)),(void 0!==e||void 0!==n)&&i&&l.height&&d>l.height&&(d=l.height,c=kl(Math.floor(d*i))),{width:c,height:d}}(t,e,n,i)}isAttached(t){const e=t&&vl(t);return!(!e||!e.isConnected)}}class nd{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return No(this.x)&&No(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach(t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]}),i}}function id(t,e,n,i,s){const a=ro(i,0),o=Math.min(ro(s,t.length),t.length);let r,l,c,d=0;for(n=Math.ceil(n),s&&(r=s-i,n=r/Math.floor(r/n)),c=a;c<0;)d++,c=Math.round(a+d*n);for(l=Math.max(a,0);l<o;l++)l===c&&(e.push(t[l]),d++,c=Math.round(a+d*n))}const sd=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,ad=(t,e)=>Math.min(e||t,t);function od(t,e){const n=[],i=t.length/e,s=t.length;let a=0;for(;a<s;a+=i)n.push(t[Math.floor(a)]);return n}function rd(t,e,n){const i=t.ticks.length,s=Math.min(e,i-1),a=t._startPixel,o=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(s);if(!(n&&(l=1===i?Math.max(c-a,o-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(s-1))/2,c+=s<e?l:-l,c<a-r||c>o+r)))return c}function ld(t){return t.drawTicks?t.tickLength:0}function cd(t,e){if(!t.display)return 0;const n=Kr(t.font,e),i=Zr(t.padding);return(io(t.text)?t.text.length:1)*n.lineHeight+i.height}function dd(t,e,n){let i=ir(t);return(n&&"right"!==e||!n&&"right"===e)&&(i=(t=>"left"===t?"right":"right"===t?"left":t)(i)),i}class hd extends nd{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:i}=this;return t=oo(t,Number.POSITIVE_INFINITY),e=oo(e,Number.NEGATIVE_INFINITY),n=oo(n,Number.POSITIVE_INFINITY),i=oo(i,Number.NEGATIVE_INFINITY),{min:oo(t,n),max:oo(e,i),minDefined:ao(t),maxDefined:ao(e)}}getMinMax(t){let e,{min:n,max:i,minDefined:s,maxDefined:a}=this.getUserBounds();if(s&&a)return{min:n,max:i};const o=this.getMatchingVisibleMetas();for(let r=0,l=o.length;r<l;++r)e=o[r].controller.getMinMax(this,t),s||(n=Math.min(n,e.min)),a||(i=Math.max(i,e.max));return n=a&&n>i?i:n,i=s&&n>i?n:i,{min:oo(n,oo(i,n)),max:oo(i,oo(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){co(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:i,grace:s,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,n){const{min:i,max:s}=t,a=lo(e,(s-i)/2),o=(t,e)=>n&&0===t?0:t+e;return{min:o(i,-Math.abs(a)),max:o(s,a)}}(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=o<this.ticks.length;this._convertTicksToLabels(r?od(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=function(t,e){const n=t.options.ticks,i=function(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),s=t._maxLength/n;return Math.floor(Math.min(i,s))}(t),s=Math.min(n.maxTicksLimit||i,i),a=n.major.enabled?function(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}(e):[],o=a.length,r=a[0],l=a[o-1],c=[];if(o>s)return function(t,e,n,i){let s,a=0,o=n[0];for(i=Math.ceil(i),s=0;s<t.length;s++)s===o&&(e.push(t[s]),a++,o=n[a*i])}(e,c,a,o/s),c;const d=function(t,e,n){const i=function(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}(t),s=e.length/n;if(!i)return Math.max(s,1);const a=function(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i===0&&(e.push(i),e.push(t/i));return n===(0|n)&&e.push(n),e.sort((t,e)=>t-e).pop(),e}(i);for(let t=0,e=a.length-1;t<e;t++){const e=a[t];if(e>s)return e}return Math.max(s,1)}(a,e,s);if(o>0){let t,n;const i=o>1?Math.round((l-r)/(o-1)):null;for(id(e,c,d,no(i)?0:r-i,r),t=0,n=o-1;t<n;t++)id(e,c,d,a[t],a[t+1]);return id(e,c,d,l,no(i)?e.length:l+i),c}return id(e,c,d),c}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),r&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){co(this.options.afterUpdate,[this])}beforeSetDimensions(){co(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){co(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),co(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){co(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,i,s;for(n=0,i=t.length;n<i;n++)s=t[n],s.label=co(e.callback,[s.value,n,t],this)}afterTickToLabelConversion(){co(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){co(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=ad(this.ticks.length,t.ticks.maxTicksLimit),i=e.minRotation||0,s=e.maxRotation;let a,o,r,l=i;if(!this._isVisible()||!e.display||i>=s||n<=1||!this.isHorizontal())return void(this.labelRotation=i);const c=this._getLabelSizes(),d=c.widest.width,h=c.highest.height,p=Yo(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/n:p/(n-1),d+6>a&&(a=p/(n-(t.offset?.5:1)),o=this.maxHeight-ld(t.grid)-e.padding-cd(t.title,this.chart.options.font),r=Math.sqrt(d*d+h*h),l=zo(Math.min(Math.asin(Yo((c.highest.height+6)/a,-1,1)),Math.asin(Yo(o/r,-1,1))-Math.asin(Yo(h/r,-1,1)))),l=Math.max(i,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){co(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){co(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:i,grid:s}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){const a=cd(i,e.options.font);if(o?(t.width=this.maxWidth,t.height=ld(s)+a):(t.height=this.maxHeight,t.width=ld(s)+a),n.display&&this.ticks.length){const{first:e,last:i,widest:s,highest:a}=this._getLabelSizes(),r=2*n.padding,l=Lo(this.labelRotation),c=Math.cos(l),d=Math.sin(l);if(o){const e=n.mirror?0:d*s.width+c*a.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=n.mirror?0:c*s.width+d*a.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,i,d,c)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:s,padding:a},position:o}=this.options,r=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;r?l?(d=i*t.width,h=n*e.height):(d=n*t.height,h=i*e.width):"start"===s?h=e.width:"end"===s?d=t.width:"inner"!==s&&(d=t.width/2,h=e.width/2),this.paddingLeft=Math.max((d-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((h-c+a)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===s?(n=0,i=t.height):"end"===s&&(n=e.height,i=0),this.paddingTop=n+a,this.paddingBottom=i+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){co(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)no(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=od(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:i,_longestTextCache:s}=this,a=[],o=[],r=Math.floor(e/ad(e,n));let l,c,d,h,p,u,g,m,f,b,y,v=0,_=0;for(l=0;l<e;l+=r){if(h=t[l].label,p=this._resolveTickFontOptions(l),i.font=u=p.string,g=s[u]=s[u]||{data:{},gc:[]},m=p.lineHeight,f=b=0,no(h)||io(h)){if(io(h))for(c=0,d=h.length;c<d;++c)y=h[c],no(y)||io(y)||(f=Cr(i,g.data,g.gc,f,y),b+=m)}else f=Cr(i,g.data,g.gc,f,h),b=m;a.push(f),o.push(b),v=Math.max(f,v),_=Math.max(b,_)}!function(t,e){ho(t,t=>{const n=t.gc,i=n.length/2;let s;if(i>e){for(s=0;s<i;++s)delete t.data[n[s]];n.splice(0,i)}})}(s,e);const x=a.indexOf(v),w=o.indexOf(_),D=t=>({width:a[t]||0,height:o[t]||0});return{first:D(0),last:D(e-1),widest:D(x),highest:D(w),widths:a,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Yo(this._alignToPixels?Sr(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=function(t,e,n){return Xr(t,{tick:n,index:e,type:"tick"})}(this.getContext(),t,n))}return this.$context||(this.$context=Xr(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=Lo(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),s=this._getLabelSizes(),a=t.autoSkipPadding||0,o=s?s.widest.width+a:0,r=s?s.highest.height+a:0;return this.isHorizontal()?r*n>o*i?o/n:r/i:r*i<o*n?r/n:o/i}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,i=this.options,{grid:s,position:a,border:o}=i,r=s.offset,l=this.isHorizontal(),c=this.ticks.length+(r?1:0),d=ld(s),h=[],p=o.setContext(this.getContext()),u=p.display?p.width:0,g=u/2,m=function(t){return Sr(n,t,u)};let f,b,y,v,_,x,w,D,I,k,C,M;if("top"===a)f=m(this.bottom),x=this.bottom-d,D=f-g,k=m(t.top)+g,M=t.bottom;else if("bottom"===a)f=m(this.top),k=t.top,M=m(t.bottom)-g,x=f+g,D=this.top+d;else if("left"===a)f=m(this.right),_=this.right-d,w=f-g,I=m(t.left)+g,C=t.right;else if("right"===a)f=m(this.left),I=t.left,C=m(t.right)-g,_=f+g,w=this.left+d;else if("x"===e){if("center"===a)f=m((t.top+t.bottom)/2+.5);else if(so(a)){const t=Object.keys(a)[0],e=a[t];f=m(this.chart.scales[t].getPixelForValue(e))}k=t.top,M=t.bottom,x=f+g,D=x+d}else if("y"===e){if("center"===a)f=m((t.left+t.right)/2);else if(so(a)){const t=Object.keys(a)[0],e=a[t];f=m(this.chart.scales[t].getPixelForValue(e))}_=f-g,w=_-d,I=t.left,C=t.right}const S=ro(i.ticks.maxTicksLimit,c),T=Math.max(1,Math.ceil(c/S));for(b=0;b<c;b+=T){const t=this.getContext(b),e=s.setContext(t),i=o.setContext(t),a=e.lineWidth,c=e.color,d=i.dash||[],p=i.dashOffset,u=e.tickWidth,g=e.tickColor,m=e.tickBorderDash||[],f=e.tickBorderDashOffset;y=rd(this,b,r),void 0!==y&&(v=Sr(n,y,a),l?_=w=I=C=v:x=D=k=M=v,h.push({tx1:_,ty1:x,tx2:w,ty2:D,x1:I,y1:k,x2:C,y2:M,width:a,color:c,borderDash:d,borderDashOffset:p,tickWidth:u,tickColor:g,tickBorderDash:m,tickBorderDashOffset:f}))}return this._ticksLength=c,this._borderValue=f,h}_computeLabelItems(t){const e=this.axis,n=this.options,{position:i,ticks:s}=n,a=this.isHorizontal(),o=this.ticks,{align:r,crossAlign:l,padding:c,mirror:d}=s,h=ld(n.grid),p=h+c,u=d?-c:p,g=-Lo(this.labelRotation),m=[];let f,b,y,v,_,x,w,D,I,k,C,M,S="middle";if("top"===i)x=this.bottom-u,w=this._getXAxisLabelAlignment();else if("bottom"===i)x=this.top+u,w=this._getXAxisLabelAlignment();else if("left"===i){const t=this._getYAxisLabelAlignment(h);w=t.textAlign,_=t.x}else if("right"===i){const t=this._getYAxisLabelAlignment(h);w=t.textAlign,_=t.x}else if("x"===e){if("center"===i)x=(t.top+t.bottom)/2+p;else if(so(i)){const t=Object.keys(i)[0],e=i[t];x=this.chart.scales[t].getPixelForValue(e)+p}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===i)_=(t.left+t.right)/2-p;else if(so(i)){const t=Object.keys(i)[0],e=i[t];_=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(h).textAlign}"y"===e&&("start"===r?S="top":"end"===r&&(S="bottom"));const T=this._getLabelSizes();for(f=0,b=o.length;f<b;++f){y=o[f],v=y.label;const t=s.setContext(this.getContext(f));D=this.getPixelForTick(f)+s.labelOffset,I=this._resolveTickFontOptions(f),k=I.lineHeight,C=io(v)?v.length:1;const e=C/2,n=t.color,r=t.textStrokeColor,c=t.textStrokeWidth;let h,p=w;if(a?(_=D,"inner"===w&&(p=f===b-1?this.options.reverse?"left":"right":0===f?this.options.reverse?"right":"left":"center"),M="top"===i?"near"===l||0!==g?-C*k+k/2:"center"===l?-T.highest.height/2-e*k+k:-T.highest.height+k/2:"near"===l||0!==g?k/2:"center"===l?T.highest.height/2-e*k:T.highest.height-C*k,d&&(M*=-1),0===g||t.showLabelBackdrop||(_+=k/2*Math.sin(g))):(x=D,M=(1-C)*k/2),t.showLabelBackdrop){const e=Zr(t.backdropPadding),n=T.heights[f],i=T.widths[f];let s=M-e.top,a=0-e.left;switch(S){case"middle":s-=n/2;break;case"bottom":s-=n}switch(w){case"center":a-=i/2;break;case"right":a-=i;break;case"inner":f===b-1?a-=i:f>0&&(a-=i/2)}h={left:a,top:s,width:i+e.width,height:n+e.height,color:t.backdropColor}}m.push({label:v,font:I,textOffset:M,options:{rotation:g,color:n,strokeColor:r,strokeWidth:c,textAlign:p,textBaseline:S,translation:[_,x],backdrop:h}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Lo(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:s}}=this.options,a=t+s,o=this._getLabelSizes().widest.width;let r,l;return"left"===e?i?(l=this.right+s,"near"===n?r="left":"center"===n?(r="center",l+=o/2):(r="right",l+=o)):(l=this.right-a,"near"===n?r="right":"center"===n?(r="center",l-=o/2):(r="left",l=this.left)):"right"===e?i?(l=this.left+s,"near"===n?r="right":"center"===n?(r="center",l-=o/2):(r="left",l-=o)):(l=this.left+a,"near"===n?r="left":"center"===n?(r="center",l+=o/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:s,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,s,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(e=>e.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,a;const o=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(s=0,a=i.length;s<a;++s){const t=i[s];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:i}}=this,s=n.setContext(this.getContext()),a=n.display?s.width:0;if(!a)return;const o=i.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let l,c,d,h;this.isHorizontal()?(l=Sr(t,this.left,a)-a/2,c=Sr(t,this.right,o)+o/2,d=h=r):(d=Sr(t,this.top,a)-a/2,h=Sr(t,this.bottom,o)+o/2,l=c=r),e.save(),e.lineWidth=s.width,e.strokeStyle=s.color,e.beginPath(),e.moveTo(l,d),e.lineTo(c,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,n=this._computeLabelArea();n&&Pr(e,n);const i=this.getLabelItems(t);for(const t of i){const n=t.options,i=t.font;Lr(e,t.label,0,t.textOffset,i,n)}n&&Fr(e)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:i}}=this;if(!n.display)return;const s=Kr(n.font),a=Zr(n.padding),o=n.align;let r=s.lineHeight/2;"bottom"===e||"center"===e||so(e)?(r+=a.bottom,io(n.text)&&(r+=s.lineHeight*(n.text.length-1))):r+=a.top;const{titleX:l,titleY:c,maxWidth:d,rotation:h}=function(t,e,n,i){const{top:s,left:a,bottom:o,right:r,chart:l}=t,{chartArea:c,scales:d}=l;let h,p,u,g=0;const m=o-s,f=r-a;if(t.isHorizontal()){if(p=sr(i,a,r),so(n)){const t=Object.keys(n)[0],i=n[t];u=d[t].getPixelForValue(i)+m-e}else u="center"===n?(c.bottom+c.top)/2+m-e:sd(t,n,e);h=r-a}else{if(so(n)){const t=Object.keys(n)[0],i=n[t];p=d[t].getPixelForValue(i)-f+e}else p="center"===n?(c.left+c.right)/2-f+e:sd(t,n,e);u=sr(i,o,s),g="left"===n?-Oo:Oo}return{titleX:p,titleY:u,maxWidth:h,rotation:g}}(this,r,e,o);Lr(t,n.text,0,0,s,{color:n.color,maxWidth:d,rotation:h,textAlign:dd(o,e,i),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=ro(t.grid&&t.grid.z,-1),i=ro(t.border&&t.border.z,0);return this._isVisible()&&this.draw===hd.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let s,a;for(s=0,a=e.length;s<a;++s){const a=e[s];a[n]!==this.id||t&&a.type!==t||i.push(a)}return i}_resolveTickFontOptions(t){return Kr(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class pd{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(e)&&(n=this.register(e));const i=this.items,s=t.id,a=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,function(t,e,n){const i=fo(Object.create(null),[n?kr.get(n):{},kr.get(e),t.defaults]);kr.set(e,i),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(n=>{const i=n.split("."),s=i.pop(),a=[t].concat(i).join("."),o=e[n].split("."),r=o.pop(),l=o.join(".");kr.route(a,s,l,r)})}(e,t.defaultRoutes),t.descriptors&&kr.describe(e,t.descriptors)}(t,a,n),this.override&&kr.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,i=this.scope;n in e&&delete e[n],i&&n in kr[i]&&(delete kr[i][n],this.override&&delete _r[n])}}class ud{constructor(){this.controllers=new pd(oc,"datasets",!0),this.elements=new pd(nd,"elements"),this.plugins=new pd(Object,"plugins"),this.scales=new pd(hd,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(e=>{const i=n||this._getRegistryForType(e);n||i.isForType(e)||i===this.plugins&&e.id?this._exec(t,i,e):ho(e,e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)})})}_exec(t,e,n){const i=xo(t);co(n["before"+i],[],n),e[t](n),co(n["after"+i],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const i=e.get(t);if(void 0===i)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var gd=new ud;class md{constructor(){this._init=void 0}notify(t,e,n,i){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const s=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(s,t,e,n);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),a}_notify(t,e,n,i){i=i||{};for(const s of t){const t=s.plugin;if(!1===co(t[n],[e,i,s.options],t)&&i.cancelable)return!1}return!0}invalidate(){no(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,i=ro(n.options&&n.options.plugins,{}),s=function(t){const e={},n=[],i=Object.keys(gd.plugins.items);for(let t=0;t<i.length;t++)n.push(gd.getPlugin(i[t]));const s=t.plugins||[];for(let t=0;t<s.length;t++){const i=s[t];-1===n.indexOf(i)&&(n.push(i),e[i.id]=!0)}return{plugins:n,localIds:e}}(n);return!1!==i||e?function(t,{plugins:e,localIds:n},i,s){const a=[],o=t.getContext();for(const r of e){const e=r.id,l=fd(i[e],s);null!==l&&a.push({plugin:r,options:bd(t.config,{plugin:r,local:n[e]},l,o)})}return a}(t,s,i,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,i=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function fd(t,e){return e||!1!==t?!0===t?{}:t:null}function bd(t,{plugin:e,local:n},i,s){const a=t.pluginScopeKeys(e),o=t.getOptionScopes(i,a);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function yd(t,e){const n=kr.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function vd(t){if("x"===t||"y"===t||"r"===t)return t}function _d(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function xd(t,...e){if(vd(t))return t;for(const n of e){const e=n.axis||_d(n.position)||t.length>1&&vd(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function wd(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function Dd(t){const e=t.options||(t.options={});e.plugins=ro(e.plugins,{}),e.scales=function(t,e){const n=_r[t.type]||{scales:{}},i=e.scales||{},s=yd(t.type,e),a=Object.create(null);return Object.keys(i).forEach(e=>{const o=i[e];if(!so(o))return console.error(`Invalid scale configuration for scale: ${e}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=xd(e,o,function(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(n.length)return wd(t,"x",n[0])||wd(t,"y",n[0])}return{}}(e,t),kr.scales[o.type]),l=function(t,e){return t===e?"_index_":"_value_"}(r,s),c=n.scales||{};a[e]=bo(Object.create(null),[{axis:r},o,c[r],c[l]])}),t.data.datasets.forEach(n=>{const s=n.type||t.type,o=n.indexAxis||yd(s,e),r=(_r[s]||{}).scales||{};Object.keys(r).forEach(t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,o),s=n[e+"AxisID"]||e;a[s]=a[s]||Object.create(null),bo(a[s],[{axis:e},i[s],r[t]])})}),Object.keys(a).forEach(t=>{const e=a[t];bo(e,[kr.scales[e.type],kr.scale])}),a}(t,e)}function Id(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const kd=new Map,Cd=new Set;function Md(t,e){let n=kd.get(t);return n||(n=e(),kd.set(t,n),Cd.add(n)),n}const Sd=(t,e,n)=>{const i=_o(e,n);void 0!==i&&t.add(i)};class Td{constructor(t){this._config=function(t){return(t=t||{}).data=Id(t.data),Dd(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Id(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Dd(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Md(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Md(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Md(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return Md(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:i,type:s}=this,a=this._cachedScopes(t,n),o=a.get(e);if(o)return o;const r=new Set;e.forEach(e=>{t&&(r.add(t),e.forEach(e=>Sd(r,t,e))),e.forEach(t=>Sd(r,i,t)),e.forEach(t=>Sd(r,_r[s]||{},t)),e.forEach(t=>Sd(r,kr,t)),e.forEach(t=>Sd(r,xr,t))});const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Cd.has(e)&&a.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,_r[e]||{},kr.datasets[e]||{},{type:e},kr,xr]}resolveNamedOptions(t,e,n,i=[""]){const s={$shared:!0},{resolver:a,subPrefixes:o}=Od(this._resolverCache,t,i);let r=a;(function(t,e){const{isScriptable:n,isIndexable:i}=tl(t);for(const s of e){const e=n(s),a=i(s),o=(a||e)&&t[s];if(e&&(Do(o)||Ed(o))||a&&io(o))return!0}return!1})(a,e)&&(s.$shared=!1,r=Qr(a,n=Do(n)?n():n,this.createResolver(t,n,o)));for(const t of e)s[t]=r[t];return s}createResolver(t,e,n=[""],i){const{resolver:s}=Od(this._resolverCache,t,n);return so(e)?Qr(s,e,void 0,i):s}}function Od(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const s=n.join();let a=i.get(s);return a||(a={resolver:Jr(e,n),subPrefixes:n.filter(t=>!t.toLowerCase().includes("hover"))},i.set(s,a)),a}const Ed=t=>so(t)&&Object.getOwnPropertyNames(t).some(e=>Do(t[e])),Rd=["top","bottom","left","right","chartArea"];function Pd(t,e){return"top"===t||"bottom"===t||-1===Rd.indexOf(t)&&"x"===e}function Fd(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function Vd(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),co(n&&n.onComplete,[t],e)}function Ad(t){const e=t.chart,n=e.options.animation;co(n&&n.onProgress,[t],e)}function Nd(t){return yl()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const jd={},Ld=t=>{const e=Nd(t);return Object.values(jd).filter(t=>t.canvas===e).pop()};function zd(t,e,n){const i=Object.keys(t);for(const s of i){const i=+s;if(i>=e){const a=t[s];delete t[s],(n>0||i>e)&&(t[i+n]=a)}}}class Bd{static defaults=kr;static instances=jd;static overrides=_r;static registry=gd;static version="4.5.1";static getChart=Ld;static register(...t){gd.add(...t),$d()}static unregister(...t){gd.remove(...t),$d()}constructor(t,e){const n=this.config=new Td(e),i=Nd(t),s=Ld(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!yl()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?zc:ed}(i)),this.platform.updateConfig(n);const o=this.platform.acquireContext(i,a.aspectRatio),r=o&&o.canvas,l=r&&r.height,c=r&&r.width;this.id=eo(),this.ctx=o,this.canvas=r,this.width=c,this.height=l,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new md,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}(t=>this.update(t),a.resizeDelay||0),this._dataChanges=[],jd[this.id]=this,o&&r?(Wl.listen(this,"complete",Vd),Wl.listen(this,"progress",Ad),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:i,_aspectRatio:s}=this;return no(t)?e&&s?s:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return gd}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Cl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Tr(this.canvas,this.ctx),this}stop(){return Wl.stop(this),this}resize(t,e){Wl.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,i=this.canvas,s=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,e,s),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Cl(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),co(n.onResize,[this,a],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){ho(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,i=Object.keys(n).reduce((t,e)=>(t[e]=!1,t),{});let s=[];e&&(s=s.concat(Object.keys(e).map(t=>{const n=e[t],i=xd(t,n),s="r"===i,a="x"===i;return{options:n,dposition:s?"chartArea":a?"bottom":"left",dtype:s?"radialLinear":a?"category":"linear"}}))),ho(s,e=>{const s=e.options,a=s.id,o=xd(a,s),r=ro(s.type,e.dtype);void 0!==s.position&&Pd(s.position,o)===Pd(e.dposition)||(s.position=e.dposition),i[a]=!0;let l=null;a in n&&n[a].type===r?l=n[a]:(l=new(gd.getScale(r))({id:a,type:r,ctx:this.ctx,chart:this}),n[l.id]=l),l.init(s,t)}),ho(i,(t,e)=>{t||delete n[e]}),ho(n,t=>{jc.configure(this,t,t.options),jc.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((t,e)=>t.index-e.index),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(Fd("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,n)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=e.length;n<i;n++){const i=e[n];let s=this.getDatasetMeta(n);const a=i.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(n),s=this.getDatasetMeta(n)),s.type=a,s.indexAxis=i.indexAxis||yd(a,this.options),s.order=i.order||0,s.index=n,s.label=""+i.label,s.visible=this.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const e=gd.getController(a),{datasetElementType:i,dataElementType:o}=kr.datasets[a];Object.assign(e,{dataElementType:gd.getElement(o),datasetElementType:i&&gd.getElement(i)}),s.controller=new e(this,n),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){ho(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),n=!i&&-1===s.indexOf(e);e.buildOrUpdateElements(n),a=Math.max(+e.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),i||ho(s,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Fd("z","_idx"));const{_active:o,_lastEvent:r}=this;r?this._eventHandler(r,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){ho(this.scales,t=>{jc.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);Io(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:s}of e)zd(t,i,"_removeElements"===n?-s:s)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),i=n(0);for(let t=1;t<e;t++)if(!Io(i,n(t)))return;return Array.from(i).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;jc.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],ho(this.boxes,t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Do(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",i)&&(n.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Wl.has(this)?this.attached&&!Wl.running(this)&&Wl.start(this):(this.draw(),Vd({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let i,s;for(i=0,s=e.length;i<s;++i){const s=e[i];t&&!s.visible||n.push(s)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n={meta:t,index:t.index,cancelable:!0},i=$l(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(i&&Pr(e,i),t.controller.draw(),i&&Fr(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return Rr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const s=Cc.modes[e];return"function"==typeof s?s(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter(t=>t&&t._dataset===e).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=Xr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const i=n?"show":"hide",s=this.getDatasetMeta(t),a=s.controller._resolveAnimations(void 0,i);wo(e)?(s.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),a.update(s,{visible:n}),this.update(e=>e.datasetIndex===t?i:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Wl.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Tr(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete jd[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};ho(this.options.events,t=>n(t,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let a;const o=()=>{i("attach",o),this.attached=!0,this.resize(),n("resize",s),n("detach",a)};a=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),n("attach",o)},e.isAttached(this.canvas)?o():a()}unbindEvents(){ho(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},ho(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let s,a,o,r;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),o=0,r=t.length;o<r;++o){a=t[o];const e=a&&this.getDatasetMeta(a.datasetIndex).controller;e&&e[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:t,index:e})=>{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}});!po(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,n){const i=this.options.hover,s=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),a=s(e,t),o=n?t:s(t,e);a.length&&this.updateHoverStyle(a,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;const s=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(s||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:i=[],options:s}=this,a=e,o=this._getActiveElements(t,i,n,a),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}(t,this._lastEvent,n,r);n&&(this._lastEvent=null,co(s.onHover,[t,o,this],this),r&&co(s.onClick,[t,o,this],this));const c=!po(o,i);return(c||e)&&(this._active=o,this._updateHoverStyles(o,i,e)),this._lastEvent=l,c}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}}function $d(){return ho(Bd.instances,t=>t._plugins.invalidate())}function Hd(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Wd(t,e,n,i,s,a){const{x:o,y:r,startAngle:l,pixelMargin:c,innerRadius:d}=e,h=Math.max(e.outerRadius+i+n-c,0),p=d>0?d+i+n+c:0;let u=0;const g=s-l;if(i){const t=((d>0?d-i:0)+(h>0?h-i:0))/2;u=(g-(0!==t?g*t/(t+i):g))/2}const m=(g-Math.max(.001,g*h-n/ko)/h)/2,f=l+m+u,b=s-m-u,{outerStart:y,outerEnd:v,innerStart:_,innerEnd:x}=function(t,e,n,i){const s=Ur(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),a=(n-e)/2,o=Math.min(a,i*e/2),r=t=>{const e=(n-Math.min(a,t))*i/2;return Yo(t,0,Math.min(a,e))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:Yo(s.innerStart,0,o),innerEnd:Yo(s.innerEnd,0,o)}}(e,p,h,b-f),w=h-y,D=h-v,I=f+y/w,k=b-v/D,C=p+_,M=p+x,S=f+_/C,T=b-x/M;if(t.beginPath(),a){const e=(I+k)/2;if(t.arc(o,r,h,I,e),t.arc(o,r,h,e,k),v>0){const e=Hd(D,k,o,r);t.arc(e.x,e.y,v,k,b+Oo)}const n=Hd(M,b,o,r);if(t.lineTo(n.x,n.y),x>0){const e=Hd(M,T,o,r);t.arc(e.x,e.y,x,b+Oo,T+Math.PI)}const i=(b-x/p+(f+_/p))/2;if(t.arc(o,r,p,b-x/p,i,!0),t.arc(o,r,p,i,f+_/p,!0),_>0){const e=Hd(C,S,o,r);t.arc(e.x,e.y,_,S+Math.PI,f-Oo)}const s=Hd(w,f,o,r);if(t.lineTo(s.x,s.y),y>0){const e=Hd(w,I,o,r);t.arc(e.x,e.y,y,f-Oo,I)}}else{t.moveTo(o,r);const e=Math.cos(I)*h+o,n=Math.sin(I)*h+r;t.lineTo(e,n);const i=Math.cos(k)*h+o,s=Math.sin(k)*h+r;t.lineTo(i,s)}t.closePath()}function Ud(t,e,n=e){t.lineCap=ro(n.borderCapStyle,e.borderCapStyle),t.setLineDash(ro(n.borderDash,e.borderDash)),t.lineDashOffset=ro(n.borderDashOffset,e.borderDashOffset),t.lineJoin=ro(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=ro(n.borderWidth,e.borderWidth),t.strokeStyle=ro(n.borderColor,e.borderColor)}function qd(t,e,n){t.lineTo(n.x,n.y)}function Yd(t,e,n={}){const i=t.length,{start:s=0,end:a=i-1}=n,{start:o,end:r}=e,l=Math.max(s,o),c=Math.min(a,r),d=s<o&&a<o||s>r&&a>r;return{count:i,start:l,loop:e.loop,ilen:c<l&&!d?i+c-l:c-l}}function Zd(t,e,n,i){const{points:s,options:a}=e,{count:o,start:r,loop:l,ilen:c}=Yd(s,n,i),d=function(t){return t.stepped?Vr:t.tension||"monotone"===t.cubicInterpolationMode?Ar:qd}(a);let h,p,u,{move:g=!0,reverse:m}=i||{};for(h=0;h<=c;++h)p=s[(r+(m?c-h:h))%o],p.skip||(g?(t.moveTo(p.x,p.y),g=!1):d(t,u,p,m,a.stepped),u=p);return l&&(p=s[(r+(m?c:0))%o],d(t,u,p,m,a.stepped)),!!l}function Kd(t,e,n,i){const s=e.points,{count:a,start:o,ilen:r}=Yd(s,n,i),{move:l=!0,reverse:c}=i||{};let d,h,p,u,g,m,f=0,b=0;const y=t=>(o+(c?r-t:t))%a,v=()=>{u!==g&&(t.lineTo(f,g),t.lineTo(f,u),t.lineTo(f,m))};for(l&&(h=s[y(0)],t.moveTo(h.x,h.y)),d=0;d<=r;++d){if(h=s[y(d)],h.skip)continue;const e=h.x,n=h.y,i=0|e;i===p?(n<u?u=n:n>g&&(g=n),f=(b*f+e)/++b):(v(),t.lineTo(e,n),p=i,b=0,u=g=n),m=n}v()}function Gd(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n?Zd:Kd}const Xd="function"==typeof Path2D;class Jd extends nd{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;bl(this._points,n,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const n=t.points,i=t.options.spanGaps,s=n.length;if(!s)return[];const a=!!t._loop,{start:o,end:r}=function(t,e,n,i){let s=0,a=e-1;if(n&&!i)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,n&&(a+=s);a>s&&t[a%e].skip;)a--;return a%=e,{start:s,end:a}}(n,s,a,i);return function(t,e,n,i){return i&&i.setContext&&n?function(t,e,n,i){const s=t._chart.getContext(),a=Ll(t.options),{_datasetIndex:o,options:{spanGaps:r}}=t,l=n.length,c=[];let d=a,h=e[0].start,p=h;function u(t,e,i,s){const a=r?-1:1;if(t!==e){for(t+=l;n[t%l].skip;)t-=a;for(;n[e%l].skip;)e+=a;t%l!==e%l&&(c.push({start:t%l,end:e%l,loop:i,style:s}),d=s,h=e%l)}}for(const t of e){h=r?h:t.start;let e,a=n[h%l];for(p=h+1;p<=t.end;p++){const r=n[p%l];e=Ll(i.setContext(Xr(s,{type:"segment",p0:a,p1:r,p0DataIndex:(p-1)%l,p1DataIndex:p%l,datasetIndex:o}))),zl(e,d)&&u(h,p-1,t.loop,d),a=r,d=e}h<p-1&&u(h,p-1,t.loop,d)}return c}(t,e,n,i):e}(t,!0===i?[{start:o,end:r,loop:a}]:function(t,e,n,i){const s=t.length,a=[];let o,r=e,l=t[e];for(o=e+1;o<=n;++o){const n=t[o%s];n.skip||n.stop?l.skip||(i=!1,a.push({start:e%s,end:(o-1)%s,loop:i}),e=r=n.stop?o:null):(r=o,l.skip&&(e=o)),l=n}return null!==r&&a.push({start:e%s,end:r%s,loop:i}),a}(n,o,r<o?r+s:r,!!t._fullLoop&&0===o&&r===s-1),n,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,i=t[e],s=this.points,a=jl(this,{property:e,start:i,end:i});if(!a.length)return;const o=[],r=function(t){return t.stepped?Ol:t.tension||"monotone"===t.cubicInterpolationMode?El:Tl}(n);let l,c;for(l=0,c=a.length;l<c;++l){const{start:c,end:d}=a[l],h=s[c],p=s[d];if(h===p){o.push(h);continue}const u=r(h,p,Math.abs((i-h[e])/(p[e]-h[e])),n.stepped);u[e]=t[e],o.push(u)}return 1===o.length?o[0]:o}pathSegment(t,e,n){return Gd(this)(t,this,e,n)}path(t,e,n){const i=this.segments,s=Gd(this);let a=this._loop;e=e||0,n=n||this.points.length-e;for(const o of i)a&=s(t,this,o,{start:e,end:e+n-1});return!!a}draw(t,e,n,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),function(t,e,n,i){Xd&&!e.options.segment?function(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),Ud(t,e.options),t.stroke(s)}(t,e,n,i):function(t,e,n,i){const{segments:s,options:a}=e,o=Gd(e);for(const r of s)Ud(t,a,r.style),t.beginPath(),o(t,e,r,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}(t,e,n,i)}(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Qd(t,e,n,i){const s=t.options,{[n]:a}=t.getProps([n],i);return Math.abs(e-a)<s.radius+s.hitRadius}function th(t,e){const{x:n,y:i,base:s,width:a,height:o}=t.getProps(["x","y","base","width","height"],e);let r,l,c,d,h;return t.horizontal?(h=o/2,r=Math.min(n,s),l=Math.max(n,s),c=i-h,d=i+h):(h=a/2,r=n-h,l=n+h,c=Math.min(i,s),d=Math.max(i,s)),{left:r,top:c,right:l,bottom:d}}function eh(t,e,n,i){return t?0:Yo(e,n,i)}function nh(t,e,n,i){const s=null===e,a=null===n,o=t&&!(s&&a)&&th(t,i);return o&&(s||Zo(e,o.left,o.right))&&(a||Zo(n,o.top,o.bottom))}function ih(t,e){t.rect(e.x,e.y,e.w,e.h)}function sh(t,e,n={}){const i=t.x!==n.x?-e:0,s=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-i,o=(t.y+t.h!==n.y+n.h?e:0)-s;return{x:t.x+i,y:t.y+s,w:t.w+a,h:t.h+o,radius:t.radius}}var ah=Object.freeze({__proto__:null,ArcElement:class extends nd{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.getProps(["x","y"],n),{angle:s,distance:a}=$o(i,{x:t,y:e}),{startAngle:o,endAngle:r,innerRadius:l,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),h=(this.options.spacing+this.options.borderWidth)/2,p=ro(d,r-o),u=qo(s,o,r)&&o!==r,g=p>=Co||u,m=Zo(a,l+h,c+h);return g&&m}getCenterPoint(t){const{x:e,y:n,startAngle:i,endAngle:s,innerRadius:a,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,c=(i+s)/2,d=(a+o+l+r)/2;return{x:e+Math.cos(c)*d,y:n+Math.sin(c)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:n}=this,i=(e.offset||0)/4,s=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=n>Co?Math.floor(n/Co):0,0===n||this.innerRadius<0||this.outerRadius<0)return;t.save();const o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*i,Math.sin(o)*i);const r=i*(1-Math.sin(Math.min(ko,n||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,n,i,s){const{fullCircles:a,startAngle:o,circumference:r}=e;let l=e.endAngle;if(a){Wd(t,e,n,i,l,s);for(let e=0;e<a;++e)t.fill();isNaN(r)||(l=o+(r%Co||Co))}Wd(t,e,n,i,l,s),t.fill()}(t,this,r,s,a),function(t,e,n,i,s){const{fullCircles:a,startAngle:o,circumference:r,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:h,borderDashOffset:p,borderRadius:u}=l,g="inner"===l.borderAlign;if(!c)return;t.setLineDash(h||[]),t.lineDashOffset=p,g?(t.lineWidth=2*c,t.lineJoin=d||"round"):(t.lineWidth=c,t.lineJoin=d||"bevel");let m=e.endAngle;if(a){Wd(t,e,n,i,m,s);for(let e=0;e<a;++e)t.stroke();isNaN(r)||(m=o+(r%Co||Co))}g&&function(t,e,n){const{startAngle:i,pixelMargin:s,x:a,y:o,outerRadius:r,innerRadius:l}=e;let c=s/r;t.beginPath(),t.arc(a,o,r,i-c,n+c),l>s?(c=s/l,t.arc(a,o,l,n+c,i-c,!0)):t.arc(a,o,s,n+Oo,i-Oo),t.closePath(),t.clip()}(t,e,m),l.selfJoin&&m-o>=ko&&0===u&&"miter"!==d&&function(t,e,n){const{startAngle:i,x:s,y:a,outerRadius:o,innerRadius:r,options:l}=e,{borderWidth:c,borderJoinStyle:d}=l,h=Math.min(c/o,Uo(i-n));if(t.beginPath(),t.arc(s,a,o-c/2,i+h/2,n-h/2),r>0){const e=Math.min(c/r,Uo(i-n));t.arc(s,a,r+c/2,n-e/2,i+e/2,!0)}else{const e=Math.min(c/2,o*Uo(i-n));if("round"===d)t.arc(s,a,e,n-ko/2,i+ko/2,!0);else if("bevel"===d){const o=2*e*e,r=-o*Math.cos(n+ko/2)+s,l=-o*Math.sin(n+ko/2)+a,c=o*Math.cos(i+ko/2)+s,d=o*Math.sin(i+ko/2)+a;t.lineTo(r,l),t.lineTo(c,d)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,m),a||(Wd(t,e,n,i,m,s),t.stroke())}(t,this,r,s,a),t.restore()}},BarElement:class extends nd{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:i}}=this,{inner:s,outer:a}=function(t){const e=th(t),n=e.right-e.left,i=e.bottom-e.top,s=function(t,e,n){const i=t.options.borderWidth,s=t.borderSkipped,a=qr(i);return{t:eh(s.top,a.top,0,n),r:eh(s.right,a.right,0,e),b:eh(s.bottom,a.bottom,0,n),l:eh(s.left,a.left,0,e)}}(t,n/2,i/2),a=function(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,a=Yr(s),o=Math.min(e,n),r=t.borderSkipped,l=i||so(s);return{topLeft:eh(!l||r.top||r.left,a.topLeft,0,o),topRight:eh(!l||r.top||r.right,a.topRight,0,o),bottomLeft:eh(!l||r.bottom||r.left,a.bottomLeft,0,o),bottomRight:eh(!l||r.bottom||r.right,a.bottomRight,0,o)}}(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:a},inner:{x:e.left+s.l,y:e.top+s.t,w:n-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,a.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(s.b,s.r))}}}}(this),o=(r=a.radius).topLeft||r.topRight||r.bottomLeft||r.bottomRight?zr:ih;var r;t.save(),a.w===s.w&&a.h===s.h||(t.beginPath(),o(t,sh(a,e,s)),t.clip(),o(t,sh(s,-e,a)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),o(t,sh(s,e)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,e,n){return nh(this,t,e,n)}inXRange(t,e){return nh(this,t,null,e)}inYRange(t,e){return nh(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+i)/2:e,y:s?n:(n+i)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},LineElement:Jd,PointElement:class extends nd{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.options,{x:s,y:a}=this.getProps(["x","y"],n);return Math.pow(t-s,2)+Math.pow(e-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return Qd(this,t,"x",e)}inYRange(t,e){return Qd(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const n=this.options;this.skip||n.radius<.1||!Rr(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,Or(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}});const oh=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],rh=oh.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function lh(t){return oh[t%oh.length]}function ch(t){return rh[t%rh.length]}function dh(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var hh={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:i},options:s}=t.config,{elements:a}=s,o=dh(i)||(r=s)&&(r.borderColor||r.backgroundColor)||a&&dh(a)||"rgba(0,0,0,0.1)"!==kr.borderColor||"rgba(0,0,0,0.1)"!==kr.backgroundColor;var r;if(!n.forceOverride&&o)return;const l=function(t){let e=0;return(n,i)=>{const s=t.getDatasetMeta(i).controller;s instanceof mc?e=function(t,e){return t.backgroundColor=t.data.map(()=>lh(e++)),e}(n,e):s instanceof fc?e=function(t,e){return t.backgroundColor=t.data.map(()=>ch(e++)),e}(n,e):s&&(e=function(t,e){return t.borderColor=lh(e),t.backgroundColor=ch(e),++e}(n,e))}}(t);i.forEach(l)}};function ph(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function uh(t){t.data.datasets.forEach(t=>{ph(t)})}var gh={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled)return void uh(t);const i=t.width;t.data.datasets.forEach((e,s)=>{const{_data:a,indexAxis:o}=e,r=t.getDatasetMeta(s),l=a||e.data;if("y"===Gr([o,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let d,{start:h,count:p}=function(t,e){const n=e.length;let i,s=0;const{iScale:a}=t,{min:o,max:r,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(s=Yo(Go(e,a.axis,o).lo,0,n-1)),i=c?Yo(Go(e,a.axis,r).hi+1,s,n)-s:n-s,{start:s,count:i}}(r,l);if(p<=(n.threshold||4*i))ph(e);else{switch(no(a)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),n.algorithm){case"lttb":d=function(t,e,n,i,s){const a=s.samples||i;if(a>=n)return t.slice(e,e+n);const o=[],r=(n-2)/(a-2);let l=0;const c=e+n-1;let d,h,p,u,g,m=e;for(o[l++]=t[m],d=0;d<a-2;d++){let i,s=0,a=0;const c=Math.floor((d+1)*r)+1+e,f=Math.min(Math.floor((d+2)*r)+1,n)+e,b=f-c;for(i=c;i<f;i++)s+=t[i].x,a+=t[i].y;s/=b,a/=b;const y=Math.floor(d*r)+1+e,v=Math.min(Math.floor((d+1)*r)+1,n)+e,{x:_,y:x}=t[m];for(p=u=-1,i=y;i<v;i++)u=.5*Math.abs((_-s)*(t[i].y-x)-(_-t[i].x)*(a-x)),u>p&&(p=u,h=t[i],g=i);o[l++]=h,m=g}return o[l++]=t[c],o}(l,h,p,i,n);break;case"min-max":d=function(t,e,n,i){let s,a,o,r,l,c,d,h,p,u,g=0,m=0;const f=[],b=e+n-1,y=t[e].x,v=t[b].x-y;for(s=e;s<e+n;++s){a=t[s],o=(a.x-y)/v*i,r=a.y;const e=0|o;if(e===l)r<p?(p=r,c=s):r>u&&(u=r,d=s),g=(m*g+a.x)/++m;else{const n=s-1;if(!no(c)&&!no(d)){const e=Math.min(c,d),i=Math.max(c,d);e!==h&&e!==n&&f.push({...t[e],x:g}),i!==h&&i!==n&&f.push({...t[i],x:g})}s>0&&n!==h&&f.push(t[n]),f.push(a),l=e,m=0,p=u=r,c=d=h=s}}return f}(l,h,p,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}e._decimated=d}})},destroy(t){uh(t)}};function mh(t,e,n,i){if(i)return;let s=e[t],a=n[t];return"angle"===t&&(s=Uo(s),a=Uo(a)),{property:t,start:s,end:a}}function fh(t,e,n){for(;e>t;e--){const t=n[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function bh(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function yh(t,e){let n=[],i=!1;return io(t)?(i=!0,n=t):n=function(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,a=[];return e.segments.forEach(({start:t,end:e})=>{e=fh(t,e,s);const o=s[t],r=s[e];null!==i?(a.push({x:o.x,y:i}),a.push({x:r.x,y:i})):null!==n&&(a.push({x:n,y:o.y}),a.push({x:n,y:r.y}))}),a}(t,e),n.length?new Jd({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function vh(t){return t&&!1!==t.fill}function _h(t,e,n){let i=t[e].fill;const s=[e];let a;if(!n)return i;for(;!1!==i&&-1===s.indexOf(i);){if(!ao(i))return i;if(a=t[i],!a)return!1;if(a.visible)return i;s.push(i),i=a.fill}return!1}function xh(t,e,n){const i=function(t){const e=t.options,n=e.fill;let i=ro(n&&n.target,n);return void 0===i&&(i=!!e.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}(t);if(so(i))return!isNaN(i.value)&&i;let s=parseFloat(i);return ao(s)&&Math.floor(s)===s?function(t,e,n,i){return"-"!==t&&"+"!==t||(n=e+n),!(n===e||n<0||n>=i)&&n}(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function wh(t,e,n){const i=[];for(let s=0;s<n.length;s++){const a=n[s],{first:o,last:r,point:l}=Dh(a,e,"x");if(!(!l||o&&r))if(o)i.unshift(l);else if(t.push(l),!r)break}t.push(...i)}function Dh(t,e,n){const i=t.interpolate(e,n);if(!i)return{};const s=i[n],a=t.segments,o=t.points;let r=!1,l=!1;for(let t=0;t<a.length;t++){const e=a[t],i=o[e.start][n],c=o[e.end][n];if(Zo(s,i,c)){r=s===i,l=s===c;break}}return{first:r,last:l,point:i}}class Ih{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){const{x:i,y:s,radius:a}=this;return e=e||{start:0,end:Co},t.arc(i,s,a,e.end,e.start,!0),!n.bounds}interpolate(t){const{x:e,y:n,radius:i}=this,s=t.angle;return{x:e+Math.cos(s)*i,y:n+Math.sin(s)*i,angle:s}}}function kh(t,e,n){const i=function(t){const{chart:e,fill:n,line:i}=t;if(ao(n))return function(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}(e,n);if("stack"===n)return function(t){const{scale:e,index:n,line:i}=t,s=[],a=i.segments,o=i.points,r=function(t,e){const n=[],i=t.getMatchingVisibleMetas("line");for(let t=0;t<i.length;t++){const s=i[t];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}(e,n);r.push(yh({x:null,y:e.bottom},i));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)wh(s,o[t],r)}return new Jd({points:s,options:{}})}(t);if("shape"===n)return!0;const s=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:n}=t,i=e.options,s=e.getLabels().length,a=i.reverse?e.max:e.min,o=function(t,e,n){let i;return i="start"===t?n:"end"===t?e.options.reverse?e.min:e.max:so(t)?t.value:e.getBaseValue(),i}(n,e,a),r=[];if(i.grid.circular){const t=e.getPointPositionForValue(0,a);return new Ih({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(o)})}for(let t=0;t<s;++t)r.push(e.getPointPositionForValue(t,o));return r}(t):function(t){const{scale:e={},fill:n}=t,i=function(t,e){let n=null;return"start"===t?n=e.bottom:"end"===t?n=e.top:so(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}(n,e);if(ao(i)){const t=e.isHorizontal();return{x:t?i:null,y:t?null:i}}return null}(t)}(t);return s instanceof Ih?s:yh(s,i)}(e),{chart:s,index:a,line:o,scale:r,axis:l}=e,c=o.options,d=c.fill,h=c.backgroundColor,{above:p=h,below:u=h}=d||{},g=s.getDatasetMeta(a),m=$l(s,g);i&&o.points.length&&(Pr(t,n),function(t,e){const{line:n,target:i,above:s,below:a,area:o,scale:r,clip:l}=e,c=n._loop?"angle":e.axis;t.save();let d=a;a!==s&&("x"===c?(Ch(t,i,o.top),Sh(t,{line:n,target:i,color:s,scale:r,property:c,clip:l}),t.restore(),t.save(),Ch(t,i,o.bottom)):"y"===c&&(Mh(t,i,o.left),Sh(t,{line:n,target:i,color:a,scale:r,property:c,clip:l}),t.restore(),t.save(),Mh(t,i,o.right),d=s)),Sh(t,{line:n,target:i,color:d,scale:r,property:c,clip:l}),t.restore()}(t,{line:o,target:i,above:p,below:u,area:n,scale:r,axis:l,clip:m}),Fr(t))}function Ch(t,e,n){const{segments:i,points:s}=e;let a=!0,o=!1;t.beginPath();for(const r of i){const{start:i,end:l}=r,c=s[i],d=s[fh(i,l,s)];a?(t.moveTo(c.x,c.y),a=!1):(t.lineTo(c.x,n),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,r,{move:o}),o?t.closePath():t.lineTo(d.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Mh(t,e,n){const{segments:i,points:s}=e;let a=!0,o=!1;t.beginPath();for(const r of i){const{start:i,end:l}=r,c=s[i],d=s[fh(i,l,s)];a?(t.moveTo(c.x,c.y),a=!1):(t.lineTo(n,c.y),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,r,{move:o}),o?t.closePath():t.lineTo(n,d.y)}t.lineTo(n,e.first().y),t.closePath(),t.clip()}function Sh(t,e){const{line:n,target:i,property:s,color:a,scale:o,clip:r}=e,l=function(t,e,n){const i=t.segments,s=t.points,a=e.points,o=[];for(const t of i){let{start:i,end:r}=t;r=fh(i,r,s);const l=mh(n,s[i],s[r],t.loop);if(!e.segments){o.push({source:t,target:l,start:s[i],end:s[r]});continue}const c=jl(e,l);for(const e of c){const i=mh(n,a[e.start],a[e.end],e.loop),r=Nl(t,s,i);for(const t of r)o.push({source:t,target:e,start:{[n]:bh(l,i,"start",Math.max)},end:{[n]:bh(l,i,"end",Math.min)}})}}return o}(n,i,s);for(const{source:e,target:c,start:d,end:h}of l){const{style:{backgroundColor:l=a}={}}=e,p=!0!==i;t.save(),t.fillStyle=l,Th(t,o,r,p&&mh(s,d,h)),t.beginPath();const u=!!n.pathSegment(t,e);let g;if(p){u?t.closePath():Oh(t,i,h,s);const e=!!i.pathSegment(t,c,{move:u,reverse:!0});g=u&&e,g||Oh(t,i,d,s)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function Th(t,e,n,i){const s=e.chart.chartArea,{property:a,start:o,end:r}=i||{};if("x"===a||"y"===a){let e,i,l,c;"x"===a?(e=o,i=s.top,l=r,c=s.bottom):(e=s.left,i=o,l=s.right,c=r),t.beginPath(),n&&(e=Math.max(e,n.left),l=Math.min(l,n.right),i=Math.max(i,n.top),c=Math.min(c,n.bottom)),t.rect(e,i,l-e,c-i),t.clip()}}function Oh(t,e,n,i){const s=e.interpolate(n,i);s&&t.lineTo(s.x,s.y)}var Eh={id:"filler",afterDatasetsUpdate(t,e,n){const i=(t.data.datasets||[]).length,s=[];let a,o,r,l;for(o=0;o<i;++o)a=t.getDatasetMeta(o),r=a.dataset,l=null,r&&r.options&&r instanceof Jd&&(l={visible:t.isDatasetVisible(o),index:o,fill:xh(r,o,i),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:r}),a.$filler=l,s.push(l);for(o=0;o<i;++o)l=s[o],l&&!1!==l.fill&&(l.fill=_h(s,o,n.propagate))},beforeDraw(t,e,n){const i="beforeDraw"===n.drawTime,s=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let e=s.length-1;e>=0;--e){const n=s[e].$filler;n&&(n.line.updateControlPoints(a,n.axis),i&&n.fill&&kh(t.ctx,n,a))}},beforeDatasetsDraw(t,e,n){if("beforeDatasetsDraw"!==n.drawTime)return;const i=t.getSortedVisibleDatasetMetas();for(let e=i.length-1;e>=0;--e){const n=i[e].$filler;vh(n)&&kh(t.ctx,n,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;vh(i)&&"beforeDatasetDraw"===n.drawTime&&kh(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Rh=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}};class Ph extends nd{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=co(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,n)=>t.sort(e,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,i=Kr(n.font),s=i.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:r}=Rh(n,s);let l,c;e.font=i.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,s,o,r)+10):(c=this.maxHeight,l=this._fitCols(a,i,o,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:s,maxWidth:a,options:{labels:{padding:o}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],c=i+o;let d=t;s.textAlign="left",s.textBaseline="middle";let h=-1,p=-c;return this.legendItems.forEach((t,u)=>{const g=n+e/2+s.measureText(t.text).width;(0===u||l[l.length-1]+g+2*o>a)&&(d+=c,l[l.length-(u>0?0:1)]=0,p+=c,h++),r[u]={left:0,top:p,row:h,width:g,height:i},l[l.length-1]+=g+o}),d}_fitCols(t,e,n,i){const{ctx:s,maxHeight:a,options:{labels:{padding:o}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-t;let d=o,h=0,p=0,u=0,g=0;return this.legendItems.forEach((t,a)=>{const{itemWidth:m,itemHeight:f}=function(t,e,n,i,s){const a=function(t,e,n,i){let s=t.text;return s&&"string"!=typeof s&&(s=s.reduce((t,e)=>t.length>e.length?t:e)),e+n.size/2+i.measureText(s).width}(i,t,e,n),o=function(t,e,n){let i=t;return"string"!=typeof e.text&&(i=Fh(e,n)),i}(s,i,e.lineHeight);return{itemWidth:a,itemHeight:o}}(n,e,s,t,i);a>0&&p+f+2*o>c&&(d+=h+o,l.push({width:h,height:p}),u+=h+o,g++,h=p=0),r[a]={left:u,top:p,col:g,width:m,height:f},h=Math.max(h,m),p+=f+o}),d+=h,l.push({width:h,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:i},rtl:s}}=this,a=Rl(s,this.left,this.width);if(this.isHorizontal()){let s=0,o=sr(n,this.left+i,this.right-this.lineWidths[s]);for(const r of e)s!==r.row&&(s=r.row,o=sr(n,this.left+i,this.right-this.lineWidths[s])),r.top+=this.top+t+i,r.left=a.leftForLtr(a.x(o),r.width),o+=r.width+i}else{let s=0,o=sr(n,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const r of e)r.col!==s&&(s=r.col,o=sr(n,this.top+t+i,this.bottom-this.columnSizes[s].height)),r.top=o,r.left+=this.left+i,r.left=a.leftForLtr(a.x(r.left),r.width),o+=r.height+i}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Pr(t,this),this._draw(),Fr(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:i}=this,{align:s,labels:a}=t,o=kr.color,r=Rl(t.rtl,this.left,this.width),l=Kr(a.font),{padding:c}=a,d=l.size,h=d/2;let p;this.drawTitle(),i.textAlign=r.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=l.string;const{boxWidth:u,boxHeight:g,itemHeight:m}=Rh(a,d),f=this.isHorizontal(),b=this._computeTitleHeight();p=f?{x:sr(s,this.left+c,this.right-n[0]),y:this.top+c+b,line:0}:{x:this.left+c,y:sr(s,this.top+b+c,this.bottom-e[0].height),line:0},Pl(this.ctx,t.textDirection);const y=m+c;this.legendItems.forEach((v,_)=>{i.strokeStyle=v.fontColor,i.fillStyle=v.fontColor;const x=i.measureText(v.text).width,w=r.textAlign(v.textAlign||(v.textAlign=a.textAlign)),D=u+h+x;let I=p.x,k=p.y;if(r.setWidth(this.width),f?_>0&&I+D+c>this.right&&(k=p.y+=y,p.line++,I=p.x=sr(s,this.left+c,this.right-n[p.line])):_>0&&k+y>this.bottom&&(I=p.x=I+e[p.line].width+c,p.line++,k=p.y=sr(s,this.top+b+c,this.bottom-e[p.line].height)),function(t,e,n){if(isNaN(u)||u<=0||isNaN(g)||g<0)return;i.save();const s=ro(n.lineWidth,1);if(i.fillStyle=ro(n.fillStyle,o),i.lineCap=ro(n.lineCap,"butt"),i.lineDashOffset=ro(n.lineDashOffset,0),i.lineJoin=ro(n.lineJoin,"miter"),i.lineWidth=s,i.strokeStyle=ro(n.strokeStyle,o),i.setLineDash(ro(n.lineDash,[])),a.usePointStyle){const o={radius:g*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:s},l=r.xPlus(t,u/2);Er(i,o,l,e+h,a.pointStyleWidth&&u)}else{const a=e+Math.max((d-g)/2,0),o=r.leftForLtr(t,u),l=Yr(n.borderRadius);i.beginPath(),Object.values(l).some(t=>0!==t)?zr(i,{x:o,y:a,w:u,h:g,radius:l}):i.rect(o,a,u,g),i.fill(),0!==s&&i.stroke()}i.restore()}(r.x(I),k,v),I=((t,e,n,i)=>t===(i?"left":"right")?n:"center"===t?(e+n)/2:e)(w,I+u+h,f?I+D:this.right,t.rtl),function(t,e,n){Lr(i,n.text,t,e+m/2,l,{strikethrough:n.hidden,textAlign:r.textAlign(n.textAlign)})}(r.x(I),k,v),f)p.x+=D+c;else if("string"!=typeof v.text){const t=l.lineHeight;p.y+=Fh(v,t)+c}else p.y+=y}),Fl(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=Kr(e.font),i=Zr(e.padding);if(!e.display)return;const s=Rl(t.rtl,this.left,this.width),a=this.ctx,o=e.position,r=n.size/2,l=i.top+r;let c,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+l,d=sr(t.align,d,this.right-h);else{const e=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);c=l+sr(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const p=sr(o,d,d+h);a.textAlign=s.textAlign(ir(o)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=n.string,Lr(a,e.text,p,c,n)}_computeTitleHeight(){const t=this.options.title,e=Kr(t.font),n=Zr(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,i,s;if(Zo(t,this.left,this.right)&&Zo(e,this.top,this.bottom))for(s=this.legendHitBoxes,n=0;n<s.length;++n)if(i=s[n],Zo(t,i.left,i.left+i.width)&&Zo(e,i.top,i.top+i.height))return this.legendItems[n];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const a=this._hoveredItem,o=(s=n,null!==(i=a)&&null!==s&&i.datasetIndex===s.datasetIndex&&i.index===s.index);a&&!o&&co(e.onLeave,[t,a,this],this),this._hoveredItem=n,n&&!o&&co(e.onHover,[t,n,this],this)}else n&&co(e.onClick,[t,n,this],this);var i,s}}function Fh(t,e){return e*(t.text?t.text.length:0)}var Vh={id:"legend",_element:Ph,start(t,e,n){const i=t.legend=new Ph({ctx:t.ctx,options:n,chart:t});jc.configure(t,i,n),jc.addBox(t,i)},stop(t){jc.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;jc.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),e.hidden=!0):(s.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:a,useBorderRadius:o,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{const l=t.controller.getStyle(n?0:void 0),c=Zr(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:i||l.pointStyle,rotation:l.rotation,textAlign:s||l.textAlign,borderRadius:o&&(r||l.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Ah extends nd{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const i=io(n.text)?n.text.length:1;this._padding=Zr(n.padding);const s=i*Kr(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:i,right:s,options:a}=this,o=a.align;let r,l,c,d=0;return this.isHorizontal()?(l=sr(o,n,s),c=e+t,r=s-n):("left"===a.position?(l=n+t,c=sr(o,i,e),d=-.5*ko):(l=s-t,c=sr(o,e,i),d=.5*ko),r=i-e),{titleX:l,titleY:c,maxWidth:r,rotation:d}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=Kr(e.font),i=n.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:o,rotation:r}=this._drawArgs(i);Lr(t,e.text,0,0,n,{color:e.color,maxWidth:o,rotation:r,textAlign:ir(e.align),textBaseline:"middle",translation:[s,a]})}}var Nh={id:"title",_element:Ah,start(t,e,n){!function(t,e){const n=new Ah({ctx:t.ctx,options:e,chart:t});jc.configure(t,n,e),jc.addBox(t,n),t.titleBlock=n}(t,n)},stop(t){const e=t.titleBlock;jc.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;jc.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const jh=new WeakMap;var Lh={id:"subtitle",start(t,e,n){const i=new Ah({ctx:t.ctx,options:n,chart:t});jc.configure(t,i,n),jc.addBox(t,i),jh.set(t,i)},stop(t){jc.removeBox(t,jh.get(t)),jh.delete(t)},beforeUpdate(t,e,n){const i=jh.get(t);jc.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const zh={average(t){if(!t.length)return!1;let e,n,i=new Set,s=0,a=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();i.add(t.x),s+=t.y,++a}}return 0!==a&&0!==i.size&&{x:[...i].reduce((t,e)=>t+e)/i.size,y:s/a}},nearest(t,e){if(!t.length)return!1;let n,i,s,a=e.x,o=e.y,r=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){const i=t[n].element;if(i&&i.hasValue()){const t=Ho(e,i.getCenterPoint());t<r&&(r=t,s=i)}}if(s){const t=s.tooltipPosition();a=t.x,o=t.y}return{x:a,y:o}}};function Bh(t,e){return e&&(io(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function $h(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Hh(t,e){const{element:n,datasetIndex:i,index:s}=e,a=t.getDatasetMeta(i).controller,{label:o,value:r}=a.getLabelAndValue(s);return{chart:t,label:o,parsed:a.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:r,dataset:a.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function Wh(t,e){const n=t.chart.ctx,{body:i,footer:s,title:a}=t,{boxWidth:o,boxHeight:r}=e,l=Kr(e.bodyFont),c=Kr(e.titleFont),d=Kr(e.footerFont),h=a.length,p=s.length,u=i.length,g=Zr(e.padding);let m=g.height,f=0,b=i.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);b+=t.beforeBody.length+t.afterBody.length,h&&(m+=h*c.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),b&&(m+=u*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(b-u)*l.lineHeight+(b-1)*e.bodySpacing),p&&(m+=e.footerMarginTop+p*d.lineHeight+(p-1)*e.footerSpacing);let y=0;const v=function(t){f=Math.max(f,n.measureText(t).width+y)};return n.save(),n.font=c.string,ho(t.title,v),n.font=l.string,ho(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?o+2+e.boxPadding:0,ho(i,t=>{ho(t.before,v),ho(t.lines,v),ho(t.after,v)}),y=0,n.font=d.string,ho(t.footer,v),n.restore(),f+=g.width,{width:f,height:m}}function Uh(t,e,n,i){const{x:s,width:a}=n,{width:o,chartArea:{left:r,right:l}}=t;let c="center";return"center"===i?c=s<=(r+l)/2?"left":"right":s<=a/2?c="left":s>=o-a/2&&(c="right"),function(t,e,n,i){const{x:s,width:a}=i,o=n.caretSize+n.caretPadding;return"left"===t&&s+a+o>e.width||"right"===t&&s-a-o<0||void 0}(c,t,e,n)&&(c="center"),c}function qh(t,e,n){const i=n.yAlign||e.yAlign||function(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||Uh(t,e,n,i),yAlign:i}}function Yh(t,e,n,i){const{caretSize:s,caretPadding:a,cornerRadius:o}=t,{xAlign:r,yAlign:l}=n,c=s+a,{topLeft:d,topRight:h,bottomLeft:p,bottomRight:u}=Yr(o);let g=function(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}(e,r);const m=function(t,e,n){let{y:i,height:s}=t;return"top"===e?i+=n:i-="bottom"===e?s+n:s/2,i}(e,l,c);return"center"===l?"left"===r?g+=c:"right"===r&&(g-=c):"left"===r?g-=Math.max(d,p)+s:"right"===r&&(g+=Math.max(h,u)+s),{x:Yo(g,0,i.width-e.width),y:Yo(m,0,i.height-e.height)}}function Zh(t,e,n){const i=Zr(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function Kh(t){return Bh([],$h(t))}function Gh(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Xh={beforeTitle:to,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:to,beforeBody:to,beforeLabel:to,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return no(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:to,afterBody:to,beforeFooter:to,footer:to,afterFooter:to};function Jh(t,e,n,i){const s=t[e].call(n,i);return void 0===s?Xh[e].call(n,i):s}class Qh extends nd{static positioners=zh;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&e.options.animation&&n.animations,s=new Zl(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Xr(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"}))}getTitle(t,e){const{callbacks:n}=e,i=Jh(n,"beforeTitle",this,t),s=Jh(n,"title",this,t),a=Jh(n,"afterTitle",this,t);let o=[];return o=Bh(o,$h(i)),o=Bh(o,$h(s)),o=Bh(o,$h(a)),o}getBeforeBody(t,e){return Kh(Jh(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,i=[];return ho(t,t=>{const e={before:[],lines:[],after:[]},s=Gh(n,t);Bh(e.before,$h(Jh(s,"beforeLabel",this,t))),Bh(e.lines,Jh(s,"label",this,t)),Bh(e.after,$h(Jh(s,"afterLabel",this,t))),i.push(e)}),i}getAfterBody(t,e){return Kh(Jh(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,i=Jh(n,"beforeFooter",this,t),s=Jh(n,"footer",this,t),a=Jh(n,"afterFooter",this,t);let o=[];return o=Bh(o,$h(i)),o=Bh(o,$h(s)),o=Bh(o,$h(a)),o}_createItems(t){const e=this._active,n=this.chart.data,i=[],s=[],a=[];let o,r,l=[];for(o=0,r=e.length;o<r;++o)l.push(Hh(this.chart,e[o]));return t.filter&&(l=l.filter((e,i,s)=>t.filter(e,i,s,n))),t.itemSort&&(l=l.sort((e,i)=>t.itemSort(e,i,n))),ho(l,e=>{const n=Gh(t.callbacks,e);i.push(Jh(n,"labelColor",this,e)),s.push(Jh(n,"labelPointStyle",this,e)),a.push(Jh(n,"labelTextColor",this,e))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=a,this.dataPoints=l,l}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let s,a=[];if(i.length){const t=zh[n.position].call(this,i,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const e=this._size=Wh(this,n),o=Object.assign({},t,e),r=qh(this.chart,n,o),l=Yh(n,o,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=a,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const s=this.getCaretPosition(t,n,i);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,n){const{xAlign:i,yAlign:s}=this,{caretSize:a,cornerRadius:o}=n,{topLeft:r,topRight:l,bottomLeft:c,bottomRight:d}=Yr(o),{x:h,y:p}=t,{width:u,height:g}=e;let m,f,b,y,v,_;return"center"===s?(v=p+g/2,"left"===i?(m=h,f=m-a,y=v+a,_=v-a):(m=h+u,f=m+a,y=v-a,_=v+a),b=m):(f="left"===i?h+Math.max(r,c)+a:"right"===i?h+u-Math.max(l,d)-a:this.caretX,"top"===s?(y=p,v=y-a,m=f-a,b=f+a):(y=p+g,v=y+a,m=f+a,b=f-a),_=y),{x1:m,x2:f,x3:b,y1:y,y2:v,y3:_}}drawTitle(t,e,n){const i=this.title,s=i.length;let a,o,r;if(s){const l=Rl(n.rtl,this.x,this.width);for(t.x=Zh(this,n.titleAlign,n),e.textAlign=l.textAlign(n.titleAlign),e.textBaseline="middle",a=Kr(n.titleFont),o=n.titleSpacing,e.fillStyle=n.titleColor,e.font=a.string,r=0;r<s;++r)e.fillText(i[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+o,r+1===s&&(t.y+=n.titleMarginBottom-o)}}_drawColorBox(t,e,n,i,s){const a=this.labelColors[n],o=this.labelPointStyles[n],{boxHeight:r,boxWidth:l}=s,c=Kr(s.bodyFont),d=Zh(this,"left",s),h=i.x(d),p=r<c.lineHeight?(c.lineHeight-r)/2:0,u=e.y+p;if(s.usePointStyle){const e={radius:Math.min(l,r)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},n=i.leftForLtr(h,l)+l/2,c=u+r/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Or(t,e,n,c),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Or(t,e,n,c)}else{t.lineWidth=so(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=i.leftForLtr(h,l),n=i.leftForLtr(i.xPlus(h,1),l-2),o=Yr(a.borderRadius);Object.values(o).some(t=>0!==t)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,zr(t,{x:e,y:u,w:l,h:r,radius:o}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),zr(t,{x:n,y:u+1,w:l-2,h:r-2,radius:o}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,u,l,r),t.strokeRect(e,u,l,r),t.fillStyle=a.backgroundColor,t.fillRect(n,u+1,l-2,r-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:i}=this,{bodySpacing:s,bodyAlign:a,displayColors:o,boxHeight:r,boxWidth:l,boxPadding:c}=n,d=Kr(n.bodyFont);let h=d.lineHeight,p=0;const u=Rl(n.rtl,this.x,this.width),g=function(n){e.fillText(n,u.x(t.x+p),t.y+h/2),t.y+=h+s},m=u.textAlign(a);let f,b,y,v,_,x,w;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Zh(this,m,n),e.fillStyle=n.bodyColor,ho(this.beforeBody,g),p=o&&"right"!==m?"center"===a?l/2+c:l+2+c:0,v=0,x=i.length;v<x;++v){for(f=i[v],b=this.labelTextColors[v],e.fillStyle=b,ho(f.before,g),y=f.lines,o&&y.length&&(this._drawColorBox(e,t,v,u,n),h=Math.max(d.lineHeight,r)),_=0,w=y.length;_<w;++_)g(y[_]),h=d.lineHeight;ho(f.after,g)}p=0,h=d.lineHeight,ho(this.afterBody,g),t.y-=s}drawFooter(t,e,n){const i=this.footer,s=i.length;let a,o;if(s){const r=Rl(n.rtl,this.x,this.width);for(t.x=Zh(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=r.textAlign(n.footerAlign),e.textBaseline="middle",a=Kr(n.footerFont),e.fillStyle=n.footerColor,e.font=a.string,o=0;o<s;++o)e.fillText(i[o],r.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+n.footerSpacing}}drawBackground(t,e,n,i){const{xAlign:s,yAlign:a}=this,{x:o,y:r}=t,{width:l,height:c}=n,{topLeft:d,topRight:h,bottomLeft:p,bottomRight:u}=Yr(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(o+d,r),"top"===a&&this.drawCaret(t,e,n,i),e.lineTo(o+l-h,r),e.quadraticCurveTo(o+l,r,o+l,r+h),"center"===a&&"right"===s&&this.drawCaret(t,e,n,i),e.lineTo(o+l,r+c-u),e.quadraticCurveTo(o+l,r+c,o+l-u,r+c),"bottom"===a&&this.drawCaret(t,e,n,i),e.lineTo(o+p,r+c),e.quadraticCurveTo(o,r+c,o,r+c-p),"center"===a&&"left"===s&&this.drawCaret(t,e,n,i),e.lineTo(o,r+d),e.quadraticCurveTo(o,r,o+d,r),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,s=n&&n.y;if(i||s){const n=zh[t.position].call(this,this._active,this._eventPosition);if(!n)return;const a=this._size=Wh(this,t),o=Object.assign({},n,this._size),r=qh(e,t,o),l=Yh(t,o,r,e);i._to===l.x&&s._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=Zr(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=n,this.drawBackground(s,t,i,e),Pl(t,e.textDirection),s.y+=a.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),Fl(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,i=t.map(({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}),s=!po(n,i),a=this._positionChanged(i,e);(s||a)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],a=this._getActiveElements(t,s,e,n),o=this._positionChanged(a,t),r=e||!po(a,s)||o;return r&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,n,i){const s=this.options;if("mouseout"===t.type)return[];if(!i)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));const a=this.chart.getElementsAtEventForMode(t,s.mode,s,n);return s.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:n,caretY:i,options:s}=this,a=zh[s.position].call(this,t,e);return!1!==a&&(n!==a.x||i!==a.y)}}var tp={id:"tooltip",_element:Qh,positioners:zh,afterInit(t,e,n){n&&(t.tooltip=new Qh({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Xh},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},ep=Object.freeze({__proto__:null,Colors:hh,Decimation:gh,Filler:Eh,Legend:Vh,SubTitle:Lh,Title:Nh,Tooltip:tp});function np(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function ip(t,e,{horizontal:n,minRotation:i}){const s=Lo(i),a=(n?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/a,o)}class sp extends hd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return no(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this;const a=t=>i=e?i:t,o=t=>s=n?s:t;if(t){const t=Fo(i),e=Fo(s);t<0&&e<0?o(0):t>0&&e>0&&a(0)}if(i===s){let e=0===s?1:Math.abs(.05*s);o(s+e),t||a(i-e)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i=function(t,e){const n=[],{bounds:i,step:s,min:a,max:o,precision:r,count:l,maxTicks:c,maxDigits:d,includeBounds:h}=t,p=s||1,u=c-1,{min:g,max:m}=e,f=!no(a),b=!no(o),y=!no(l),v=(m-g)/(d+1);let _,x,w,D,I=Ao((m-g)/u/p)*p;if(I<1e-14&&!f&&!b)return[{value:g},{value:m}];D=Math.ceil(m/I)-Math.floor(g/I),D>u&&(I=Ao(D*I/u/p)*p),no(r)||(_=Math.pow(10,r),I=Math.ceil(I*_)/_),"ticks"===i?(x=Math.floor(g/I)*I,w=Math.ceil(m/I)*I):(x=g,w=m),f&&b&&s&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((o-a)/s,I/1e3)?(D=Math.round(Math.min((o-a)/I,c)),I=(o-a)/D,x=a,w=o):y?(x=f?a:x,w=b?o:w,D=l-1,I=(w-x)/D):(D=(w-x)/I,D=Vo(D,Math.round(D),I/1e3)?Math.round(D):Math.ceil(D));const k=Math.max(Bo(I),Bo(x));_=Math.pow(10,no(r)?k:r),x=Math.round(x*_)/_,w=Math.round(w*_)/_;let C=0;for(f&&(h&&x!==a?(n.push({value:a}),x<a&&C++,Vo(Math.round((x+C*I)*_)/_,a,ip(a,v,t))&&C++):x<a&&C++);C<D;++C){const t=Math.round((x+C*I)*_)/_;if(b&&t>o)break;n.push({value:t})}return b&&h&&w!==o?n.length&&Vo(n[n.length-1].value,o,ip(o,v,t))?n[n.length-1].value=o:n.push({value:o}):b&&w!==o||n.push({value:w}),n}({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&jo(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return br(t,this.chart.options.locale,this.options.ticks.format)}}class ap extends sp{static id="linear";static defaults={ticks:{callback:vr.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ao(t)?t:0,this.max=ao(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=Lo(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const op=t=>Math.floor(Po(t)),rp=(t,e)=>Math.pow(10,op(t)+e);function lp(t){return 1===t/Math.pow(10,op(t))}function cp(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}class dp extends hd{static id="logarithmic";static defaults={ticks:{callback:vr.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=sp.prototype.parse.apply(this,[t,e]);if(0!==n)return ao(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ao(t)?Math.max(0,t):null,this.max=ao(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ao(this._userMin)&&(this.min=t===rp(this.min,0)?rp(this.min,-1):rp(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,i=this.max;const s=e=>n=t?n:e,a=t=>i=e?i:t;n===i&&(n<=0?(s(1),a(10)):(s(rp(n,-1)),a(rp(i,1)))),n<=0&&s(rp(i,-1)),i<=0&&a(rp(n,1)),this.min=n,this.max=i}buildTicks(){const t=this.options,e=function(t,{min:e,max:n}){e=oo(t.min,e);const i=[],s=op(e);let a=function(t,e){let n=op(e-t);for(;cp(t,e,n)>10;)n++;for(;cp(t,e,n)<10;)n--;return Math.min(n,op(t))}(e,n),o=a<0?Math.pow(10,Math.abs(a)):1;const r=Math.pow(10,a),l=s>a?Math.pow(10,s):0,c=Math.round((e-l)*o)/o,d=Math.floor((e-l)/r/10)*r*10;let h=Math.floor((c-d)/Math.pow(10,a)),p=oo(t.min,Math.round((l+d+h*Math.pow(10,a))*o)/o);for(;p<n;)i.push({value:p,major:lp(p),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,o=a>=0?1:o),p=Math.round((l+d+h*Math.pow(10,a))*o)/o;const u=oo(t.max,p);return i.push({value:u,major:lp(u),significand:h}),i}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&jo(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":br(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Po(t),this._valueRange=Po(this.max)-Po(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Po(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function hp(t){const e=t.ticks;if(e.display&&t.display){const t=Zr(e.backdropPadding);return ro(e.font&&e.font.size,kr.font.size)+t.height}return 0}function pp(t,e,n){return n=io(n)?n:[n],{w:Mr(t,e.string,n),h:n.length*e.lineHeight}}function up(t,e,n,i,s){return t===i||t===s?{start:e-n/2,end:e+n/2}:t<i||t>s?{start:e-n,end:e}:{start:e,end:e+n}}function gp(t,e,n,i,s){const a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let r=0,l=0;i.start<e.l?(r=(e.l-i.start)/a,t.l=Math.min(t.l,e.l-r)):i.end>e.r&&(r=(i.end-e.r)/a,t.r=Math.max(t.r,e.r+r)),s.start<e.t?(l=(e.t-s.start)/o,t.t=Math.min(t.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function mp(t,e,n){const i=t.drawingArea,{extra:s,additionalAngle:a,padding:o,size:r}=n,l=t.getPointPosition(e,i+s+o,a),c=Math.round(zo(Uo(l.angle+Oo))),d=function(t,e,n){return 90===n||270===n?t-=e/2:(n>270||n<90)&&(t-=e),t}(l.y,r.h,c),h=function(t){return 0===t||180===t?"center":t<180?"left":"right"}(c),p=(u=l.x,g=r.w,"right"===(m=h)?u-=g:"center"===m&&(u-=g/2),u);var u,g,m;return{visible:!0,x:l.x,y:d,textAlign:h,left:p,top:d,right:p+r.w,bottom:d+r.h}}function fp(t,e){if(!e)return!0;const{left:n,top:i,right:s,bottom:a}=t;return!(Rr({x:n,y:i},e)||Rr({x:n,y:a},e)||Rr({x:s,y:i},e)||Rr({x:s,y:a},e))}function bp(t,e,n){const{left:i,top:s,right:a,bottom:o}=n,{backdropColor:r}=e;if(!no(r)){const n=Yr(e.borderRadius),l=Zr(e.backdropPadding);t.fillStyle=r;const c=i-l.left,d=s-l.top,h=a-i+l.width,p=o-s+l.height;Object.values(n).some(t=>0!==t)?(t.beginPath(),zr(t,{x:c,y:d,w:h,h:p,radius:n}),t.fill()):t.fillRect(c,d,h,p)}}function yp(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,Co);else{let n=t.getPointPosition(0,e);s.moveTo(n.x,n.y);for(let a=1;a<i;a++)n=t.getPointPosition(a,e),s.lineTo(n.x,n.y)}}class vp extends sp{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:vr.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Zr(hp(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=ao(t)&&!isNaN(t)?t:0,this.max=ao(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/hp(this.options))}generateTickLabels(t){sp.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{const n=co(this.options.pointLabels.callback,[t,e],this);return n||0===n?n:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],s=[],a=t._pointLabels.length,o=t.options.pointLabels,r=o.centerPointLabels?ko/a:0;for(let l=0;l<a;l++){const a=o.setContext(t.getPointLabelContext(l));s[l]=a.padding;const c=t.getPointPosition(l,t.drawingArea+s[l],r),d=Kr(a.font),h=pp(t.ctx,d,t._pointLabels[l]);i[l]=h;const p=Uo(t.getIndexAngle(l)+r),u=Math.round(zo(p));gp(n,e,p,up(u,c.x,h.w,0,180),up(u,c.y,h.h,90,270))}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=function(t,e,n){const i=[],s=t._pointLabels.length,a=t.options,{centerPointLabels:o,display:r}=a.pointLabels,l={extra:hp(a)/2,additionalAngle:o?ko/s:0};let c;for(let a=0;a<s;a++){l.padding=n[a],l.size=e[a];const s=mp(t,a,l);i.push(s),"auto"===r&&(s.visible=fp(s,c),s.visible&&(c=s))}return i}(t,i,s)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,i))}getIndexAngle(t){return Uo(t*(Co/(this._pointLabels.length||1))+Lo(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(no(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(no(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return function(t,e,n){return Xr(t,{label:n,index:e,type:"pointLabel"})}(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const i=this.getIndexAngle(t)-Oo+n;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:i,bottom:s}=this._pointLabelItems[t];return{left:e,top:n,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),yp(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:i,border:s}=e,a=this._pointLabels.length;let o,r,l;if(e.pointLabels.display&&function(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let s=e-1;s>=0;s--){const e=t._pointLabelItems[s];if(!e.visible)continue;const a=i.setContext(t.getPointLabelContext(s));bp(n,a,e);const o=Kr(a.font),{x:r,y:l,textAlign:c}=e;Lr(n,t._pointLabels[s],r,l+o.lineHeight/2,o,{color:a.color,textAlign:c,textBaseline:"middle"})}}(this,a),i.display&&this.ticks.forEach((t,e)=>{if(0!==e||0===e&&this.min<0){r=this.getDistanceFromCenterForValue(t.value);const n=this.getContext(e),o=i.setContext(n),l=s.setContext(n);!function(t,e,n,i,s){const a=t.ctx,o=e.circular,{color:r,lineWidth:l}=e;!o&&!i||!r||!l||n<0||(a.save(),a.strokeStyle=r,a.lineWidth=l,a.setLineDash(s.dash||[]),a.lineDashOffset=s.dashOffset,a.beginPath(),yp(t,n,o,i),a.closePath(),a.stroke(),a.restore())}(this,o,r,a,l)}}),n.display){for(t.save(),o=a-1;o>=0;o--){const i=n.setContext(this.getPointLabelContext(o)),{color:s,lineWidth:a}=i;a&&s&&(t.lineWidth=a,t.strokeStyle=s,t.setLineDash(i.borderDash),t.lineDashOffset=i.borderDashOffset,r=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(o,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const i=this.getIndexAngle(0);let s,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((i,o)=>{if(0===o&&this.min>=0&&!e.reverse)return;const r=n.setContext(this.getContext(o)),l=Kr(r.font);if(s=this.getDistanceFromCenterForValue(this.ticks[o].value),r.showLabelBackdrop){t.font=l.string,a=t.measureText(i.label).width,t.fillStyle=r.backdropColor;const e=Zr(r.backdropPadding);t.fillRect(-a/2-e.left,-s-l.size/2-e.top,a+e.width,l.size+e.height)}Lr(t,i.label,0,-s,l,{color:r.color,strokeColor:r.textStrokeColor,strokeWidth:r.textStrokeWidth})}),t.restore()}drawTitle(){}}const _p={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},xp=Object.keys(_p);function wp(t,e){return t-e}function Dp(t,e){if(no(e))return null;const n=t._adapter,{parser:i,round:s,isoWeekday:a}=t._parseOpts;let o=e;return"function"==typeof i&&(o=i(o)),ao(o)||(o="string"==typeof i?n.parse(o,i):n.parse(o)),null===o?null:(s&&(o="week"!==s||!No(a)&&!0!==a?n.startOf(o,s):n.startOf(o,"isoWeek",a)),+o)}function Ip(t,e,n,i){const s=xp.length;for(let a=xp.indexOf(t);a<s-1;++a){const t=_p[xp[a]],s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((n-e)/(s*t.size))<=i)return xp[a]}return xp[s-1]}function kp(t,e,n){if(n){if(n.length){const{lo:i,hi:s}=Ko(n,e);t[n[i]>=e?n[i]:n[s]]=!0}}else t[e]=!0}function Cp(t,e,n){const i=[],s={},a=e.length;let o,r;for(o=0;o<a;++o)r=e[o],s[r]=o,i.push({value:r,major:!1});return 0!==a&&n?function(t,e,n,i){const s=t._adapter,a=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,l;for(r=a;r<=o;r=+s.add(r,1,i))l=n[r],l>=0&&(e[l].major=!0);return e}(t,i,s,n):i}class Mp extends hd{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const n=t.time||(t.time={}),i=this._adapter=new _c(t.adapters.date);i.init(e),bo(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Dp(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:i,max:s,minDefined:a,maxDefined:o}=this.getUserBounds();function r(t){a||isNaN(t.min)||(i=Math.min(i,t.min)),o||isNaN(t.max)||(s=Math.max(s,t.max))}a&&o||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),i=ao(i)&&!isNaN(i)?i:+e.startOf(Date.now(),n),s=ao(s)&&!isNaN(s)?s:+e.endOf(Date.now(),n)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,i="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,a=function(t,e,n){let i=0,s=t.length;for(;i<s&&t[i]<e;)i++;for(;s>i&&t[s-1]>n;)s--;return i>0||s<t.length?t.slice(i,s):t}(i,s,this.max);return this._unit=e.unit||(n.autoSkip?Ip(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):function(t,e,n,i,s){for(let a=xp.length-1;a>=xp.indexOf(n);a--){const n=xp[a];if(_p[n].common&&t._adapter.diff(s,i,n)>=e-1)return n}return xp[n?xp.indexOf(n):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(t){for(let e=xp.indexOf(t)+1,n=xp.length;e<n;++e)if(_p[xp[e]].common)return xp[e]}(this._unit):void 0,this.initOffsets(i),t.reverse&&a.reverse(),Cp(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e,n,i=0,s=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),i=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,n=this.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;i=Yo(i,0,a),s=Yo(s,0,a),this._offsets={start:i,end:s,factor:1/(i+1+s)}}_generate(){const t=this._adapter,e=this.min,n=this.max,i=this.options,s=i.time,a=s.unit||Ip(s.minUnit,e,n,this._getLabelCapacity(e)),o=ro(i.ticks.stepSize,1),r="week"===a&&s.isoWeekday,l=No(r)||!0===r,c={};let d,h,p=e;if(l&&(p=+t.startOf(p,"isoWeek",r)),p=+t.startOf(p,l?"day":a),t.diff(n,e,a)>1e5*o)throw new Error(e+" and "+n+" are too far apart with stepSize of "+o+" "+a);const u="data"===i.ticks.source&&this.getDataTimestamps();for(d=p,h=0;d<n;d=+t.add(d,o,a),h++)kp(c,d,u);return d!==n&&"ticks"!==i.bounds&&1!==h||kp(c,d,u),Object.keys(c).sort(wp).map(t=>+t)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,i=this._unit,s=e||n[i];return this._adapter.format(t,s)}_tickFormatFunction(t,e,n,i){const s=this.options,a=s.ticks.callback;if(a)return co(a,[t,e,n],this);const o=s.time.displayFormats,r=this._unit,l=this._majorUnit,c=r&&o[r],d=l&&o[l],h=n[e],p=l&&d&&h&&h.major;return this._adapter.format(t,i||(p?d:c))}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e<n;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,i=Lo(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(i),a=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:n*s+o*a,h:n*a+o*s}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,s=this._tickFormatFunction(t,0,Cp(this,[t],this._majorUnit),i),a=this._getLabelSize(s),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;t<e;++t)n=n.concat(i[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const i=this.getLabels();for(e=0,n=i.length;e<n;++e)t.push(Dp(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return tr(t.sort(wp))}}function Sp(t,e,n){let i,s,a,o,r=0,l=t.length-1;n?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=Go(t,"pos",e)),({pos:i,time:a}=t[r]),({pos:s,time:o}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=Go(t,"time",e)),({time:i,pos:a}=t[r]),({time:s,pos:o}=t[l]));const c=s-i;return c?a+(o-a)*(e-i)/c:a}var Tp=Object.freeze({__proto__:null,CategoryScale:class extends hd{static id="category";static defaults={ticks:{callback:np}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:i}of e)t[n]===i&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(no(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:Yo(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:function(t,e,n,i){const s=t.indexOf(e);return-1===s?((t,e,n,i)=>("string"==typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,i):s!==t.lastIndexOf(e)?n:s}(n,t,ro(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,i=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=t;n<=e;n++)i.push({value:n});return i}getLabelForValue(t){return np.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:ap,LogarithmicScale:dp,RadialLinearScale:vp,TimeScale:Mp,TimeSeriesScale:class extends Mp{static id="timeseries";static defaults=Mp.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Sp(e,this.min),this._tableRange=Sp(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,i=[],s=[];let a,o,r,l,c;for(a=0,o=t.length;a<o;++a)l=t[a],l>=e&&l<=n&&i.push(l);if(i.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(a=0,o=i.length;a<o;++a)c=i[a+1],r=i[a-1],l=i[a],Math.round((c+r)/2)!==l&&s.push({time:l,pos:a/(o-1)});return s}_generate(){const t=this.min,e=this.max;let n=super.getDataTimestamps();return n.includes(t)&&n.length||n.splice(0,0,t),n.includes(e)&&1!==n.length||n.push(e),n.sort((t,e)=>t-e)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return t=e.length&&n.length?this.normalize(e.concat(n)):e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Sp(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return Sp(this._table,n*this._tableRange+this._minPos,!0)}}});const Op=[bc,ah,ep,Tp],Ep=function(t,e){return t===e||t!=t&&e!=e},Rp=function(t,e){for(var n=t.length;n--;)if(Ep(t[n][0],e))return n;return-1};var Pp=Array.prototype.splice;function Fp(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Fp.prototype.clear=function(){this.__data__=[],this.size=0},Fp.prototype.delete=function(t){var e=this.__data__,n=Rp(e,t);return!(n<0||(n==e.length-1?e.pop():Pp.call(e,n,1),--this.size,0))},Fp.prototype.get=function(t){var e=this.__data__,n=Rp(e,t);return n<0?void 0:e[n][1]},Fp.prototype.has=function(t){return Rp(this.__data__,t)>-1},Fp.prototype.set=function(t,e){var n=this.__data__,i=Rp(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};const Vp=Fp,Ap="object"==typeof global&&global&&global.Object===Object&&global;var Np="object"==typeof self&&self&&self.Object===Object&&self;const jp=Ap||Np||Function("return this")(),Lp=jp.Symbol;var zp=Object.prototype,Bp=zp.hasOwnProperty,$p=zp.toString,Hp=Lp?Lp.toStringTag:void 0;var Wp=Object.prototype.toString;var Up=Lp?Lp.toStringTag:void 0;const qp=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Up&&Up in Object(t)?function(t){var e=Bp.call(t,Hp),n=t[Hp];try{t[Hp]=void 0;var i=!0}catch(t){}var s=$p.call(t);return i&&(e?t[Hp]=n:delete t[Hp]),s}(t):function(t){return Wp.call(t)}(t)},Yp=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Zp=function(t){if(!Yp(t))return!1;var e=qp(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Kp=jp["__core-js_shared__"];var Gp=function(){var t=/[^.]+$/.exec(Kp&&Kp.keys&&Kp.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var Xp=Function.prototype.toString;var Jp=/^\[object .+?Constructor\]$/,Qp=Function.prototype,tu=Object.prototype,eu=Qp.toString,nu=tu.hasOwnProperty,iu=RegExp("^"+eu.call(nu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const su=function(t){return!(!Yp(t)||(e=t,Gp&&Gp in e))&&(Zp(t)?iu:Jp).test(function(t){if(null!=t){try{return Xp.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e},au=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return su(n)?n:void 0},ou=au(jp,"Map"),ru=au(Object,"create");var lu=Object.prototype.hasOwnProperty;var cu=Object.prototype.hasOwnProperty;function du(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}du.prototype.clear=function(){this.__data__=ru?ru(null):{},this.size=0},du.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},du.prototype.get=function(t){var e=this.__data__;if(ru){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return lu.call(e,t)?e[t]:void 0},du.prototype.has=function(t){var e=this.__data__;return ru?void 0!==e[t]:cu.call(e,t)},du.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ru&&void 0===e?"__lodash_hash_undefined__":e,this};const hu=du,pu=function(t,e){var n,i,s=t.__data__;return("string"==(i=typeof(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?s["string"==typeof e?"string":"hash"]:s.map};function uu(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}uu.prototype.clear=function(){this.size=0,this.__data__={hash:new hu,map:new(ou||Vp),string:new hu}},uu.prototype.delete=function(t){var e=pu(this,t).delete(t);return this.size-=e?1:0,e},uu.prototype.get=function(t){return pu(this,t).get(t)},uu.prototype.has=function(t){return pu(this,t).has(t)},uu.prototype.set=function(t,e){var n=pu(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};const gu=uu;function mu(t){var e=this.__data__=new Vp(t);this.size=e.size}mu.prototype.clear=function(){this.__data__=new Vp,this.size=0},mu.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},mu.prototype.get=function(t){return this.__data__.get(t)},mu.prototype.has=function(t){return this.__data__.has(t)},mu.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Vp){var i=n.__data__;if(!ou||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new gu(i)}return n.set(t,e),this.size=n.size,this};const fu=mu,bu=function(){try{var t=au(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),yu=function(t,e,n){"__proto__"==e&&bu?bu(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},vu=function(t,e,n){(void 0!==n&&!Ep(t[e],n)||void 0===n&&!(e in t))&&yu(t,e,n)},_u=function(t,e,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var r=a[xu?o:++i];if(!1===e(s[r],r,s))break}return t};var xu,wu="object"==typeof exports&&exports&&!exports.nodeType&&exports,Du=wu&&"object"==typeof module&&module&&!module.nodeType&&module,Iu=Du&&Du.exports===wu?jp.Buffer:void 0,ku=Iu?Iu.allocUnsafe:void 0;const Cu=jp.Uint8Array,Mu=function(t,e){var n,i,s=e?(n=t.buffer,i=new n.constructor(n.byteLength),new Cu(i).set(new Cu(n)),i):t.buffer;return new t.constructor(s,t.byteOffset,t.length)};var Su=Object.create;const Tu=function(){function t(){}return function(e){if(!Yp(e))return{};if(Su)return Su(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),Ou=(Eu=Object.getPrototypeOf,Ru=Object,function(t){return Eu(Ru(t))});var Eu,Ru,Pu=Object.prototype;const Fu=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Pu)},Vu=function(t){return null!=t&&"object"==typeof t},Au=function(t){return Vu(t)&&"[object Arguments]"==qp(t)};var Nu=Object.prototype,ju=Nu.hasOwnProperty,Lu=Nu.propertyIsEnumerable;const zu=Au(function(){return arguments}())?Au:function(t){return Vu(t)&&ju.call(t,"callee")&&!Lu.call(t,"callee")},Bu=Array.isArray,$u=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Hu=function(t){return null!=t&&$u(t.length)&&!Zp(t)};var Wu="object"==typeof exports&&exports&&!exports.nodeType&&exports,Uu=Wu&&"object"==typeof module&&module&&!module.nodeType&&module,qu=Uu&&Uu.exports===Wu?jp.Buffer:void 0;const Yu=(qu?qu.isBuffer:void 0)||function(){return!1};var Zu=Function.prototype,Ku=Object.prototype,Gu=Zu.toString,Xu=Ku.hasOwnProperty,Ju=Gu.call(Object);var Qu={};Qu["[object Float32Array]"]=Qu["[object Float64Array]"]=Qu["[object Int8Array]"]=Qu["[object Int16Array]"]=Qu["[object Int32Array]"]=Qu["[object Uint8Array]"]=Qu["[object Uint8ClampedArray]"]=Qu["[object Uint16Array]"]=Qu["[object Uint32Array]"]=!0,Qu["[object Arguments]"]=Qu["[object Array]"]=Qu["[object ArrayBuffer]"]=Qu["[object Boolean]"]=Qu["[object DataView]"]=Qu["[object Date]"]=Qu["[object Error]"]=Qu["[object Function]"]=Qu["[object Map]"]=Qu["[object Number]"]=Qu["[object Object]"]=Qu["[object RegExp]"]=Qu["[object Set]"]=Qu["[object String]"]=Qu["[object WeakMap]"]=!1;var tg="object"==typeof exports&&exports&&!exports.nodeType&&exports,eg=tg&&"object"==typeof module&&module&&!module.nodeType&&module,ng=eg&&eg.exports===tg&&Ap.process,ig=function(){try{return eg&&eg.require&&eg.require("util").types||ng&&ng.binding&&ng.binding("util")}catch(t){}}(),sg=ig&&ig.isTypedArray;const ag=sg?function(t){return function(e){return t(e)}}(sg):function(t){return Vu(t)&&$u(t.length)&&!!Qu[qp(t)]},og=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var rg=Object.prototype.hasOwnProperty;const lg=function(t,e,n){var i=t[e];rg.call(t,e)&&Ep(i,n)&&(void 0!==n||e in t)||yu(t,e,n)};var cg=/^(?:0|[1-9]\d*)$/;const dg=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&cg.test(t))&&t>-1&&t%1==0&&t<e};var hg=Object.prototype.hasOwnProperty;const pg=function(t,e){var n=Bu(t),i=!n&&zu(t),s=!n&&!i&&Yu(t),a=!n&&!i&&!s&&ag(t),o=n||i||s||a,r=o?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],l=r.length;for(var c in t)!e&&!hg.call(t,c)||o&&("length"==c||s&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||dg(c,l))||r.push(c);return r};var ug=Object.prototype.hasOwnProperty;const gg=function(t){if(!Yp(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Fu(t),n=[];for(var i in t)("constructor"!=i||!e&&ug.call(t,i))&&n.push(i);return n},mg=function(t){return Hu(t)?pg(t,!0):gg(t)},fg=function(t){return function(t,e,n,i){var s=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var r=e[a],l=i?i(n[r],t[r],r,n,t):void 0;void 0===l&&(l=t[r]),s?yu(n,r,l):lg(n,r,l)}return n}(t,mg(t))},bg=function(t,e,n,i,s,a,o){var r,l=og(t,n),c=og(e,n),d=o.get(c);if(d)vu(t,n,d);else{var h=a?a(l,c,n+"",t,e,o):void 0,p=void 0===h;if(p){var u=Bu(c),g=!u&&Yu(c),m=!u&&!g&&ag(c);h=c,u||g||m?Bu(l)?h=l:Vu(r=l)&&Hu(r)?h=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}(l):g?(p=!1,h=function(t,e){if(e)return t.slice();var n=t.length,i=ku?ku(n):new t.constructor(n);return t.copy(i),i}(c,!0)):m?(p=!1,h=Mu(c,!0)):h=[]:function(t){if(!Vu(t)||"[object Object]"!=qp(t))return!1;var e=Ou(t);if(null===e)return!0;var n=Xu.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Gu.call(n)==Ju}(c)||zu(c)?(h=l,zu(l)?h=fg(l):Yp(l)&&!Zp(l)||(h=function(t){return"function"!=typeof t.constructor||Fu(t)?{}:Tu(Ou(t))}(c))):p=!1}p&&(o.set(c,h),s(h,c,i,a,o),o.delete(c)),vu(t,n,h)}},yg=function t(e,n,i,s,a){e!==n&&_u(n,function(o,r){if(a||(a=new fu),Yp(o))bg(e,n,r,i,t,s,a);else{var l=s?s(og(e,r),o,r+"",e,n,a):void 0;void 0===l&&(l=o),vu(e,r,l)}},mg)},vg=function(t){return t};var _g=Math.max;const xg=bu?function(t,e){return bu(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:vg;var wg=Date.now;const Dg=function(t){var e=0,n=0;return function(){var i=wg(),s=16-(i-n);if(n=i,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(xg),Ig=function(t,e){return Dg(function(t,e,n){return e=_g(void 0===e?t.length-1:e,0),function(){for(var i=arguments,s=-1,a=_g(i.length-e,0),o=Array(a);++s<a;)o[s]=i[e+s];s=-1;for(var r=Array(e+1);++s<e;)r[s]=i[s];return r[e]=n(o),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,r)}}(t,e,vg),t+"")},kg=(Cg=function(t,e,n){yg(t,e,n)},Ig(function(t,e){var n=-1,i=e.length,s=i>1?e[i-1]:void 0,a=i>2?e[2]:void 0;for(s=Cg.length>3&&"function"==typeof s?(i--,s):void 0,a&&function(t,e,n){if(!Yp(n))return!1;var i=typeof e;return!!("number"==i?Hu(n)&&dg(e,n.length):"string"==i&&e in n)&&Ep(n[e],t)}(e[0],e[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var o=e[n];o&&Cg(t,o,n,s)}return t}));var Cg;class Mg{constructor(){this.colorschemesOptions=new v.BehaviorSubject(void 0)}setColorschemesOptions(t){this.pColorschemesOptions=t,this.colorschemesOptions.next(t)}getColorschemesOptions(){return this.pColorschemesOptions}}Mg.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Mg,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Mg.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Mg,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Mg,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[]}});class Sg{constructor(t,e,n){this.zone=e,this.themeService=n,this.type="bar",this.plugins=[],this.chartClick=new m.EventEmitter,this.chartHover=new m.EventEmitter,this.subs=[],this.themeOverrides={},this.ctx=t.nativeElement.getContext("2d"),this.subs.push(this.themeService.colorschemesOptions.pipe((0,_.distinctUntilChanged)()).subscribe(t=>this.themeChanged(t)))}ngOnChanges(t){const e=["type"],n=Object.getOwnPropertyNames(t);if(n.some(t=>e.includes(t))||n.every(e=>t[e].isFirstChange()))this.render();else{const t=this.getChartConfiguration();this.chart&&(Object.assign(this.chart.config.data,t.data),this.chart.config.plugins&&Object.assign(this.chart.config.plugins,t.plugins),this.chart.config.options&&Object.assign(this.chart.config.options,t.options)),this.update()}}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(t=>t.unsubscribe())}render(){return this.chart&&this.chart.destroy(),this.zone.runOutsideAngular(()=>this.chart=new Bd(this.ctx,this.getChartConfiguration()))}update(t){this.chart&&this.zone.runOutsideAngular(()=>{var e;return null===(e=this.chart)||void 0===e?void 0:e.update(t)})}hideDataset(t,e){this.chart&&(this.chart.getDatasetMeta(t).hidden=e,this.update())}isDatasetHidden(t){var e,n;return null===(n=null===(e=this.chart)||void 0===e?void 0:e.getDatasetMeta(t))||void 0===n?void 0:n.hidden}toBase64Image(){var t;return null===(t=this.chart)||void 0===t?void 0:t.toBase64Image()}themeChanged(t){this.themeOverrides=t,this.chart&&(this.chart.config.options&&Object.assign(this.chart.config.options,this.getChartOptions()),this.update())}getChartOptions(){return kg({onHover:(t,e)=>{var n;(this.chartHover.observed||(null===(n=this.chartHover.observers)||void 0===n?void 0:n.length))&&this.zone.run(()=>this.chartHover.emit({event:t,active:e}))},onClick:(t,e)=>{var n;(this.chartClick.observed||(null===(n=this.chartClick.observers)||void 0===n?void 0:n.length))&&this.zone.run(()=>this.chartClick.emit({event:t,active:e}))}},this.themeOverrides,this.options,{plugins:{legend:{display:this.legend}}})}getChartConfiguration(){return{type:this.type,data:this.getChartData(),options:this.getChartOptions(),plugins:this.plugins}}getChartData(){return this.data?this.data:{labels:this.labels||[],datasets:this.datasets||[]}}}Sg.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Sg,deps:[{token:m.ElementRef},{token:m.NgZone},{token:Mg}],target:m["ɵɵFactoryTarget"].Directive}),Sg.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"14.2.12",type:Sg,selector:"canvas[baseChart]",inputs:{type:"type",legend:"legend",data:"data",options:"options",plugins:"plugins",labels:"labels",datasets:"datasets"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Sg,decorators:[{type:m.Directive,args:[{selector:"canvas[baseChart]",exportAs:"base-chart"}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.NgZone},{type:Mg}]},propDecorators:{type:[{type:m.Input}],legend:[{type:m.Input}],data:[{type:m.Input}],options:[{type:m.Input}],plugins:[{type:m.Input}],labels:[{type:m.Input}],datasets:[{type:m.Input}],chartClick:[{type:m.Output}],chartHover:[{type:m.Output}]}});const Tg=[[255,99,132],[54,162,235],[255,206,86],[231,233,237],[75,192,192],[151,187,205],[220,220,220],[247,70,74],[70,191,189],[253,180,92],[148,159,177],[77,83,96]],Og={plugins:{colors:{enabled:!1}},datasets:{line:{backgroundColor:t=>Eg(Pg(t.datasetIndex),.4),borderColor:t=>Eg(Pg(t.datasetIndex),1),pointBackgroundColor:t=>Eg(Pg(t.datasetIndex),1),pointBorderColor:"#fff"},bar:{backgroundColor:t=>Eg(Pg(t.datasetIndex),.6),borderColor:t=>Eg(Pg(t.datasetIndex),1)},get radar(){return this.line},doughnut:{backgroundColor:t=>Eg(Pg(t.dataIndex),.6),borderColor:"#fff"},get pie(){return this.doughnut},polarArea:{backgroundColor:t=>Eg(Pg(t.dataIndex),.6),borderColor:t=>Eg(Pg(t.dataIndex),1)},get bubble(){return this.doughnut},get scatter(){return this.doughnut},get area(){return this.polarArea}}};function Eg(t,e){return"rgba("+t.concat(e).join(",")+")"}function Rg(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Pg(t=0){return Tg[t]||[Rg(0,255),Rg(0,255),Rg(0,255)]}class Fg{constructor(){this.generateColors=!0}}Fg.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Fg,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Fg.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Fg,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Fg,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]}),Bd.register(...Op);class Vg{constructor(t){(null==t?void 0:t.plugins)&&Bd.register(...null==t?void 0:t.plugins);const e=kg((null==t?void 0:t.generateColors)?Og:{},(null==t?void 0:t.defaults)||{});kr.set(e)}static forRoot(t){return{ngModule:Vg,providers:[{provide:Fg,useValue:t}]}}}Vg.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Vg,deps:[{token:Fg,optional:!0}],target:m["ɵɵFactoryTarget"].NgModule}),Vg.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"14.2.12",ngImport:f,type:Vg,declarations:[Sg],exports:[Sg]}),Vg.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Vg}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Vg,decorators:[{type:m.NgModule,args:[{imports:[],declarations:[Sg],exports:[Sg]}]}],ctorParameters:function(){return[{type:Fg,decorators:[{type:m.Optional}]}]}});let Ag=class extends xa.ConfigProvider{constructor(){super(...arguments),this.defaults={plugin:{serverStats:{enabled:!0,displayMode:"bottomBar",location:{x:null,y:null},style:{background:"rgba(20, 20, 20, 0.90)",size:100,layout:"vertical"},customMetrics:[]}}}}};Ag=u([(0,m.Injectable)()],Ag);const Ng={"zh-CN":{"Server Stats":"服务器状态",Appearance:"外观","Display Mode":"显示模式","Floating Panel":"浮动面板","Bottom Bar":"底部栏","Layout Direction":"排列方向",Vertical:"纵向",Horizontal:"横向","Background Color":"背景颜色",Opacity:"不透明度","Chart Size":"图表大小","Panel Position":"面板位置","Reset Position":"重置位置","Show Server Stats":"显示服务器状态",CPU:"CPU",RAM:"内存",DISK:"磁盘",NET:"网络","Reset Panel Position":"重置面板位置",Reset:"重置","Vertical or Horizontal layout":"纵向或横向排列","Background color and opacity":"背景颜色与不透明度","Unit: px":"单位:像素","Reset to default position":"重置回默认位置",Layout:"布局","Choose between floating panel or bottom bar":"选择浮动面板或底部栏","Custom Metrics":"自定义指标","Define custom shell commands to fetch data. The command must output a single value (number or text).":"定义自定义 Shell 命令来获取数据。命令必须输出单个值(数字或文本)。","Add New Metric":"添加新指标","Edit Metric":"编辑指标",Label:"标签",Type:"类型","Progress Bar":"进度条","Text Value":"文本值",Color:"颜色","Max Value":"最大值",Suffix:"后缀","Command (Shell)":"Shell 命令",Add:"添加",Save:"保存",Cancel:"取消","No custom metrics defined.":"未定义自定义指标。","Preset Library":"预设库","Fetch from GitHub":"从 GitHub 拉取","Load Presets":"加载预设","Loading...":"加载中...","Add to my metrics":"添加到我的指标","Preset added":"预设已添加","Failed to load presets":"加载预设失败","No presets found":"未找到预设","Import commonly used metrics from the community":"从社区导入常用指标配置","I want to submit my own preset":"我想提交我的预设"}};let jg=class{constructor(t){this.config=t,this.baseStatsCommand='export LC_ALL=C; PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin; OS=$(uname -s 2>/dev/null || echo "Linux"); if [ "$OS" = "Darwin" ]; then cpu=$(ps -A -o %cpu | awk \'{s+=$1} END {print s}\' 2>/dev/null || echo "0"); mem=$(ps -A -o %mem | awk \'{s+=$1} END {print s}\' 2>/dev/null || echo "0"); disk=$(df -h / 2>/dev/null | awk \'NR==2{print $5}\' | sed \'s/%//\' || echo "0"); echo "TABBY-STATS-START $cpu 0 0 $mem $disk"; else stats=$( (grep \'cpu \' /proc/stat; awk \'NR>2 {r+=$2; t+=$10} END{print r, t}\' /proc/net/dev; sleep 1; grep \'cpu \' /proc/stat; awk \'NR>2 {r+=$2; t+=$10} END{print r, t}\' /proc/net/dev) 2>/dev/null | awk \'NR==1 {t1=$2+$3+$4+$5+$6+$7+$8; i1=$5} NR==2 {rx1=$1; tx1=$2} NR==3 {t2=$2+$3+$4+$5+$6+$7+$8; i2=$5} NR==4 {rx2=$1; tx2=$2} END { dt=t2-t1; di=i2-i1; cpu=(dt<=0)?0:(dt-di)/dt*100; rx=rx2-rx1; tx=tx2-tx1; printf "%.1f %.0f %.0f", cpu, rx, tx }\' ); mem=$(free 2>/dev/null | awk \'NR==2{printf "%.2f", $3*100/$2 }\'); disk=$(df -h / 2>/dev/null | awk \'NR==2{print $5}\' | sed \'s/%//\'); if [ -z "$stats" ]; then stats="0 0 0"; fi; if [ -z "$mem" ]; then mem="0"; fi; if [ -z "$disk" ]; then disk="0"; fi; echo "TABBY-STATS-START $stats $mem $disk"; fi',this.isFetching=!1}async fetchStats(t){if(!t||this.isFetching)return null;this.isFetching=!0;try{const e=t.ssh&&t.ssh.ssh?t.ssh.ssh:null;if(!e||"function"!=typeof e.openSessionChannel)return this.isFetching=!1,null;const n=this.config.store.plugin.serverStats.customMetrics||[];let i=this.baseStatsCommand;n.length>0&&(i+='; echo "TABBY-STATS-CUSTOM-START"; ',i+=n.map(t=>`( ${t.command} ) || echo "Err"`).join('; echo "TABBY-STATS-NEXT"; ')),i+='; echo " TABBY-STATS-END"',i=i.replace(/\n/g," "),i=`/bin/sh -c '${i.replace(/'/g,"'\\''")}'`;const s=await this.exec(e,i);if(!s)return this.isFetching=!1,null;const a={},o=s.match(/TABBY-STATS-START\s+([\d\.]+)\s+([\d\.]+)\s+([\d\.]+)\s+([\d\.]+)\s+([\d\.]+)/);if(o&&o.length>=6&&(a.cpu=parseFloat(o[1])||0,a.netRx=parseFloat(o[2])||0,a.netTx=parseFloat(o[3])||0,a.mem=parseFloat(o[4])||0,a.disk=parseFloat(o[5])||0),n.length>0&&s.includes("TABBY-STATS-CUSTOM-START")){const t=s.split("TABBY-STATS-CUSTOM-START")[1].split("TABBY-STATS-END")[0].split("TABBY-STATS-NEXT").map(t=>t.trim());a.custom=n.map((e,n)=>({id:e.id,value:t[n]||"-"}))}return this.isFetching=!1,a}catch(t){this.isFetching=!1}return null}async exec(t,e){const n=new Promise((t,e)=>setTimeout(()=>e(new Error("Stats: Timeout")),5e3));return Promise.race([(async()=>{let n=null;try{const e=await t.openSessionChannel();n=await t.activateChannel(e)}catch(t){throw t}return new Promise((t,i)=>{let s="",a=!1,o=null;const r=new TextDecoder("utf-8"),l=()=>{if(o&&o.unsubscribe(),n)try{n.close()}catch(t){}};if(!n.data$)return l(),void i(new Error("Channel has no data$ observable"));o=n.data$.subscribe(e=>(e=>{let n="";n="string"==typeof e?e:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?r.decode(e,{stream:!0}):e.toString(),s+=n,!a&&s.includes("TABBY-STATS-END")&&(a=!0,l(),t(s))})(e),t=>console.error("Stats: Data Stream Error",t)),"function"==typeof n.requestExec?n.requestExec(e).catch(t=>{l(),i(t)}):"function"==typeof n.exec?n.exec(e).catch(t=>{l(),i(t)}):(l(),i(new Error("Channel has no requestExec or exec method")))})})(),n])}};var Lg;jg=u([(0,m.Injectable)({providedIn:"root"}),g("design:paramtypes",[xa.ConfigService])],jg);let zg=class extends xa.ToolbarButtonProvider{constructor(t,e){super(),this.config=t,this.translate=e}provide(){return[{icon:h(943),title:this.translate.instant("Show Server Stats"),click:()=>{this.config.store.plugin||(this.config.store.plugin={}),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={});const t=this.config.store.plugin.serverStats.enabled;this.config.store.plugin.serverStats.enabled=!t,this.config.save();const e=window.serverStatsFloating,n=window.serverStatsBottomBar;e&&e.forceUpdate(),n&&n.forceUpdate()}}]}};zg=u([(0,m.Injectable)(),g("design:paramtypes",[xa.ConfigService,"function"==typeof(Lg=void 0!==xa.TranslateService&&xa.TranslateService)?Lg:Object])],zg);let Bg=class{constructor(t,e,n,i,s){this.statsService=t,this.config=e,this.app=n,this.cdr=i,this.zone=s,this.visible=!1,this.currentStats={cpu:0,mem:0,disk:0,netRx:0,netTx:0,custom:[]},this.customMetrics=[],this.customChartsData=[],this.isDragging=!1,this.dragOffset={x:0,y:0},this.dragDimensions={width:0,height:0},this.pos={x:null,y:null},this.styleConfig={background:"rgba(20, 20, 20, 0.90)",size:100,layout:"vertical"},this.timerId=null,this.tabSubscription=null,this.doughnutChartType="doughnut",this.chartOptions={responsive:!0,maintainAspectRatio:!1,cutout:"75%",plugins:{legend:{display:!1},tooltip:{enabled:!1}},animation:{duration:0},events:[]},this.cpuData=this.createChartData("#e74c3c"),this.memData=this.createChartData("#f1c40f"),this.diskData=this.createChartData("#3498db"),window.serverStatsFloating=this}createChartData(t){return{labels:["Used","Free"],datasets:[{data:[0,100],backgroundColor:[t,"rgba(255,255,255,0.1)"],borderWidth:0}]}}ngOnInit(){this.loadConfig(),this.config.ready$.subscribe(()=>{this.loadConfig(),setTimeout(()=>this.checkAndFetch(),100)}),this.config.changed$.subscribe(()=>this.loadConfig()),this.tabSubscription=this.app.activeTabChange.subscribe(()=>{this.checkAndFetch()}),setTimeout(()=>this.checkAndFetch(),100),this.zone.runOutsideAngular(()=>{this.timerId=window.setInterval(()=>{this.zone.run(()=>{this.checkAndFetch()})},3e3)})}loadConfig(){var t;const e=(null===(t=this.config.store.plugin)||void 0===t?void 0:t.serverStats)||{};e.location?this.pos={x:e.location.x,y:e.location.y}:this.pos={x:null,y:null},e.style&&(this.styleConfig=Object.assign(Object.assign({},this.styleConfig),e.style)),this.customMetrics=e.customMetrics||[],this.customChartsData=this.customMetrics.map(t=>this.createChartData(t.color||"#00ff00")),setTimeout(()=>this.adjustPositionToViewport(),100),this.cdr.detectChanges()}formatSpeed(t){if(0===t)return"0 B/s";const e=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,e)).toFixed(1))+" "+["B/s","K/s","M/s","G/s"][e]}startDrag(t){if(0!==t.button)return;this.isDragging=!0;const e=t.currentTarget.getBoundingClientRect();this.dragDimensions.width=e.width,this.dragDimensions.height=e.height,this.dragOffset.x=t.clientX-e.left,this.dragOffset.y=t.clientY-e.top,t.preventDefault()}onMouseMove(t){if(!this.isDragging)return;let e=t.clientX-this.dragOffset.x,n=t.clientY-this.dragOffset.y;const i=window.innerWidth-this.dragDimensions.width,s=window.innerHeight-this.dragDimensions.height;this.pos.x=Math.min(Math.max(0,e),i),this.pos.y=Math.min(Math.max(0,n),s)}onMouseUp(){this.isDragging&&(this.isDragging=!1,this.adjustPositionToViewport(),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={}),this.config.store.plugin.serverStats.location||(this.config.store.plugin.serverStats.location={}),this.config.store.plugin.serverStats.location.x=this.pos.x,this.config.store.plugin.serverStats.location.y=this.pos.y,this.config.save())}adjustPositionToViewport(){var t,e;if(null===this.pos.x||null===this.pos.y)return;const n=(null===(e=null===(t=this._elementRef)||void 0===t?void 0:t.nativeElement)||void 0===e?void 0:e.getBoundingClientRect)?this._elementRef.nativeElement.getBoundingClientRect():{width:4*this.styleConfig.size+60,height:this.styleConfig.size},i=10,s=window.innerWidth-n.width-i,a=window.innerHeight-n.height-i;let o=this.pos.x,r=this.pos.y;o<i&&(o=i),o>s&&(o=s),r<i&&(r=i),r>a&&(r=a),o===this.pos.x&&r===this.pos.y||(this.pos.x=o,this.pos.y=r,this.cdr.detectChanges())}onWindowResize(){this.adjustPositionToViewport()}forceUpdate(){this.checkAndFetch()}async checkAndFetch(){var t,e,n,i;const s=null===(e=null===(t=this.config.store.plugin)||void 0===t?void 0:t.serverStats)||void 0===e?void 0:e.enabled;if("floatingPanel"!==((null===(i=null===(n=this.config.store.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.displayMode)||"bottomBar"))return void(this.visible&&(this.visible=!1,this.cdr.detectChanges()));let a=this.app.activeTab;if(!s||!a)return void(this.visible&&(this.visible=!1,this.cdr.detectChanges()));a.focusedTab&&(a=a.focusedTab);const o=a.session;if(o)try{const t=await this.statsService.fetchStats(o);if(t)return this.visible=!0,this.updateCharts(t),void this.cdr.detectChanges()}catch(t){}this.visible&&(this.visible=!1,this.cdr.detectChanges())}getCustomValue(t){return this.currentStats.custom&&this.currentStats.custom[t]?this.currentStats.custom[t].value:"-"}updateCharts(t){this.currentStats=t,this.cpuData.datasets[0].data=[t.cpu,100-t.cpu],this.memData.datasets[0].data=[t.mem,100-t.mem],this.diskData.datasets[0].data=[t.disk,100-t.disk],this.cpuData=Object.assign({},this.cpuData),this.memData=Object.assign({},this.memData),this.diskData=Object.assign({},this.diskData),t.custom&&Array.isArray(t.custom)&&t.custom.forEach((t,e)=>{const n=this.customMetrics[e];if(n&&"progress"===n.type&&this.customChartsData[e]){const i=parseFloat(t.value)||0,s=n.maxValue||100,a=Math.max(0,s-i);this.customChartsData[e].datasets[0].data=[i,a],this.customChartsData[e]=Object.assign({},this.customChartsData[e])}}),this.charts&&this.charts.forEach(t=>t.update())}ngOnDestroy(){this.timerId&&clearInterval(this.timerId),this.tabSubscription&&this.tabSubscription.unsubscribe()}};u([(0,m.ViewChildren)(Sg),g("design:type",m.QueryList)],Bg.prototype,"charts",void 0),u([(0,m.HostListener)("document:mousemove",["$event"]),g("design:type",Function),g("design:paramtypes",[MouseEvent]),g("design:returntype",void 0)],Bg.prototype,"onMouseMove",null),u([(0,m.HostListener)("document:mouseup"),g("design:type",Function),g("design:paramtypes",[]),g("design:returntype",void 0)],Bg.prototype,"onMouseUp",null),u([(0,m.HostListener)("window:resize"),g("design:type",Function),g("design:paramtypes",[]),g("design:returntype",void 0)],Bg.prototype,"onWindowResize",null),Bg=u([(0,m.Component)({selector:"server-stats-floating-panel",template:'\n <div class="stats-container" \n *ngIf="visible"\n (mousedown)="startDrag($event)"\n [style.top.px]="pos.y" \n [style.left.px]="pos.x"\n [style.right]="pos.x !== null ? \'auto\' : null"\n [style.background]="styleConfig.background"\n [style.flex-direction]="styleConfig.layout === \'horizontal\' ? \'row\' : \'column\'">\n \n \x3c!-- 基础指标 --\x3e\n <div class="chart-wrapper" \n [style.width.px]="styleConfig.size" \n [style.height.px]="styleConfig.size">\n <div class="chart-label">{{ \'CPU\' | translate }}</div>\n <canvas baseChart [data]="cpuData" [options]="chartOptions" [type]="doughnutChartType"></canvas>\n <div class="chart-value">{{currentStats.cpu | number:\'1.0-0\'}}%</div>\n </div>\n\n <div class="chart-wrapper" \n [style.width.px]="styleConfig.size" \n [style.height.px]="styleConfig.size">\n <div class="chart-label">{{ \'RAM\' | translate }}</div>\n <canvas baseChart [data]="memData" [options]="chartOptions" [type]="doughnutChartType"></canvas>\n <div class="chart-value">{{currentStats.mem | number:\'1.0-0\'}}%</div>\n </div>\n\n <div class="chart-wrapper" \n [style.width.px]="styleConfig.size" \n [style.height.px]="styleConfig.size">\n <div class="chart-label">{{ \'DISK\' | translate }}</div>\n <canvas baseChart [data]="diskData" [options]="chartOptions" [type]="doughnutChartType"></canvas>\n <div class="chart-value">{{currentStats.disk | number:\'1.0-0\'}}%</div>\n </div>\n\n \x3c!-- 自定义指标 --\x3e\n <ng-container *ngFor="let metric of customMetrics; let i = index">\n <div class="chart-wrapper" \n [style.width.px]="styleConfig.size" \n [style.height.px]="styleConfig.size">\n <div class="chart-label">{{ metric.label }}</div>\n \n <ng-container *ngIf="metric.type === \'progress\'">\n <canvas baseChart [data]="customChartsData[i]" [options]="chartOptions" [type]="doughnutChartType"></canvas>\n <div class="chart-value">{{ getCustomValue(i) }}</div>\n </ng-container>\n\n <ng-container *ngIf="metric.type === \'text\'">\n <div class="text-value-container" [style.color]="metric.color || \'#fff\'">\n {{ getCustomValue(i) }}<span class="unit">{{ metric.suffix }}</span>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n \x3c!-- 网络流量 --\x3e\n <div class="chart-wrapper" \n [style.width.px]="styleConfig.size" \n [style.height.px]="styleConfig.size">\n <div class="chart-label">{{ \'NET\' | translate }}</div>\n <div class="net-container">\n <div class="net-row download">\n <span>↓</span> {{ formatSpeed(currentStats.netRx) }}\n </div>\n <div class="net-row upload">\n <span>↑</span> {{ formatSpeed(currentStats.netTx) }}\n </div>\n </div>\n </div>\n </div>\n ',styles:["\n :host { display: block; position: absolute; z-index: 99999; }\n .stats-container {\n position: fixed;\n top: 100px; \n right: 20px; \n z-index: 10000; \n backdrop-filter: blur(12px);\n padding: 0px 10px 0px 10px;\n display: flex; \n gap: 15px;\n border-radius: 8px;\n border: 1px solid rgba(255,255,255,0.2);\n box-shadow: 0 10px 30px rgba(0,0,0,0.5);\n min-width: 100px;\n color: white;\n cursor: move;\n user-select: none;\n }\n .chart-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; container-type: inline-size; }\n \n .chart-label { font-size: 12cqw; font-weight: bold; margin-bottom: 2cqw; color: #aaa; pointer-events: none; margin-top: 5cqw }\n .chart-value { position: absolute; top: calc(50% + 10cqw); left: 50%; transform: translate(-50%, -50%); font-size: 25cqw; font-family: monospace; pointer-events: none; color: #fff; font-weight: bold; text-shadow: 0 1px 2px black; }\n \n .net-container { \n height: 100%; width: 100%; \n display: flex; flex-direction: column; justify-content: center; align-items: center; \n font-family: monospace; font-weight: bold;\n }\n .net-row { font-size: 13cqw; white-space: nowrap; }\n .net-row span { display: inline-block; width: 8cqw; }\n .download { color: #2ecc71; margin-bottom: 2cqw; }\n .upload { color: #e74c3c; }\n \n .text-value-container {\n position: absolute;\n top: calc(50% + 5cqw); left: 50%;\n transform: translate(-50%, -50%);\n font-size: 20cqw;\n font-family: monospace;\n font-weight: bold;\n text-align: center;\n width: 100%;\n text-shadow: 0 1px 2px black;\n }\n .unit { font-size: 0.5em; margin-left: 2px; opacity: 0.8; }\n \n canvas { max-width: calc(100% - 32cqw); max-height: calc(100% - 32cqw); pointer-events: none; }\n "]}),g("design:paramtypes",[jg,xa.ConfigService,xa.AppService,m.ChangeDetectorRef,m.NgZone])],Bg);let $g=class{constructor(t,e,n,i,s){this.statsService=t,this.config=e,this.app=n,this.cdr=i,this.zone=s,this.visible=!1,this.loading=!0,this.currentStats={cpu:0,mem:0,disk:0,netRx:0,netTx:0,custom:[]},this.customMetrics=[],this.styleConfig={background:"rgba(20, 20, 20, 0.85)"},this.timerId=null,this.tabSubscription=null,window.serverStatsBottomBar=this}getCpuColor(){const t=this.currentStats.cpu;return t<50?"#2ecc71":t<80?"#f1c40f":"#e74c3c"}getMemColor(){const t=this.currentStats.mem;return t<50?"#2ecc71":t<80?"#f1c40f":"#e74c3c"}getDiskColor(){const t=this.currentStats.disk;return t<50?"#2ecc71":t<80?"#3498db":"#e74c3c"}getCustomValue(t){return this.currentStats.custom&&this.currentStats.custom[t]?this.currentStats.custom[t].value:"-"}getCustomProgress(t){const e=this.getCustomValue(t),n=parseFloat(e);if(isNaN(n))return 0;const i=this.customMetrics[t].maxValue||100;return Math.min(100,Math.max(0,n/i*100))}ngOnInit(){this.loadConfig(),this.config.ready$.subscribe(()=>{this.loadConfig(),setTimeout(()=>this.checkAndFetch(),100)}),this.config.changed$.subscribe(()=>this.loadConfig()),this.tabSubscription=this.app.activeTabChange.subscribe(()=>{this.checkAndFetch()}),setTimeout(()=>this.checkAndFetch(),100),this.zone.runOutsideAngular(()=>{this.timerId=window.setInterval(()=>{this.zone.run(()=>{this.checkAndFetch()})},3e3)})}loadConfig(){var t;const e=(null===(t=this.config.store.plugin)||void 0===t?void 0:t.serverStats)||{};e.style&&(this.styleConfig=Object.assign(Object.assign({},this.styleConfig),e.style)),this.customMetrics=e.customMetrics||[],this.cdr.detectChanges()}formatSpeed(t){if(0===t)return"0 B/s";const e=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,e)).toFixed(1))+" "+["B/s","K/s","M/s","G/s"][e]}forceUpdate(){this.checkAndFetch()}async checkAndFetch(){var t,e,n,i;const s=null===(e=null===(t=this.config.store.plugin)||void 0===t?void 0:t.serverStats)||void 0===e?void 0:e.enabled;if("bottomBar"!==((null===(i=null===(n=this.config.store.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.displayMode)||"bottomBar"))return void(this.visible&&(this.visible=!1,this.loading=!0,this.cdr.detectChanges()));let a=this.app.activeTab;if(!s||!a)return void(this.visible&&(this.visible=!1,this.loading=!0,this.cdr.detectChanges()));a.focusedTab&&(a=a.focusedTab);const o=a.session;if(o){this.visible||(this.visible=!0,this.loading=!0,this.cdr.detectChanges());try{const t=await this.statsService.fetchStats(o);this.loading=!1,t&&(this.updateStats(t),this.currentStats=t),this.cdr.detectChanges()}catch(t){this.loading=!1,this.cdr.detectChanges()}}else this.visible&&(this.visible=!1,this.loading=!0,this.cdr.detectChanges())}updateStats(t){this.currentStats=t}ngOnDestroy(){this.timerId&&clearInterval(this.timerId),this.tabSubscription&&this.tabSubscription.unsubscribe()}};var Hg;$g=u([(0,m.Component)({selector:"server-stats-bottom-bar",template:'\n <div class="stats-container" \n *ngIf="visible"\n [style.background]="styleConfig.background">\n <div class="stat-section" *ngIf="loading">\n <div class="loading-text">Loading...</div>\n </div>\n \n <ng-container *ngIf="!loading">\n <div class="stat-section">\n <div class="stat-label">{{ \'CPU\' | translate }}</div>\n <div class="stat-content">\n <div class="progress-bar-container">\n <div class="progress-bar" [style.width.%]="currentStats.cpu" [style.background-color]="getCpuColor()"></div>\n </div>\n <div class="stat-value">{{currentStats.cpu | number:\'1.0-0\'}}%</div>\n </div>\n </div>\n <div class="stat-separator"></div>\n\n <div class="stat-section">\n <div class="stat-label">{{ \'RAM\' | translate }}</div>\n <div class="stat-content">\n <div class="progress-bar-container">\n <div class="progress-bar" [style.width.%]="currentStats.mem" [style.background-color]="getMemColor()"></div>\n </div>\n <div class="stat-value">{{currentStats.mem | number:\'1.0-0\'}}%</div>\n </div>\n </div>\n <div class="stat-separator"></div>\n\n <div class="stat-section">\n <div class="stat-label">{{ \'DISK\' | translate }}</div>\n <div class="stat-content">\n <div class="progress-bar-container">\n <div class="progress-bar" [style.width.%]="currentStats.disk" [style.background-color]="getDiskColor()"></div>\n </div>\n <div class="stat-value">{{currentStats.disk | number:\'1.0-0\'}}%</div>\n </div>\n </div>\n\n <ng-container *ngFor="let metric of customMetrics; let i = index">\n <div class="stat-separator"></div>\n <div class="stat-section">\n <div class="stat-label">{{ metric.label }}</div>\n \n <div class="stat-content" *ngIf="metric.type === \'progress\'">\n <div class="progress-bar-container">\n <div class="progress-bar" \n [style.width.%]="getCustomProgress(i)" \n [style.background-color]="metric.color || \'#3498db\'"></div>\n </div>\n <div class="stat-value">{{ getCustomValue(i) }}</div>\n </div>\n\n <div class="stat-content" *ngIf="metric.type === \'text\'">\n <div class="stat-value" [style.color]="metric.color || \'inherit\'">\n {{ getCustomValue(i) }} {{ metric.suffix }}\n </div>\n </div>\n </div>\n </ng-container>\n\n <div class="stat-separator"></div>\n\n <div class="stat-section net-section">\n <div class="stat-label">{{ \'NET\' | translate }}</div>\n <div class="net-container">\n <div class="net-row download">\n <span>↓</span> <span class="net-value">{{ formatSpeed(currentStats.netRx) }}</span>\n </div>\n <div class="net-row upload">\n <span>↑</span> <span class="net-value">{{ formatSpeed(currentStats.netTx) }}</span>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n ',styles:["\n :host { display: block; position: absolute; bottom: 0; left: 0; right: 0; z-index: 100; width: 100%; }\n .stats-container {\n position: absolute; bottom: 0; left: 0; right: 0; width: 100%; z-index: 10000; \n backdrop-filter: blur(8px); padding: 4px 12px; display: flex; gap: 12px;\n justify-content: flex-start; align-items: center; border-top: 1px solid rgba(255,255,255,0.15);\n min-height: 28px; max-height: 28px; color: rgba(255,255,255,0.9); user-select: none; font-size: 11px;\n }\n .stat-section { display: flex; align-items: center; gap: 6px; }\n .stat-label { font-weight: 500; color: rgba(255,255,255,0.7); font-size: 12px; line-height: 1; min-width: 24px; }\n .stat-content { display: flex; align-items: center; gap: 6px; }\n .progress-bar-container { height: 6px; background-color: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; width: 50px; }\n .progress-bar { height: 100%; transition: width 0.3s ease, background-color 0.3s ease; border-radius: 3px; }\n .stat-value { font-family: monospace; font-size: 12px; color: rgba(255,255,255,0.9); line-height: 1; white-space: nowrap; text-align: left; }\n .stat-separator { width: 1px; height: 16px; background-color: rgba(255,255,255,0.2); margin: 0 2px; }\n .net-section { min-width: 100px; margin-left: auto; }\n .net-container { display: flex; flex-direction: row; gap: 8px; font-family: monospace; font-size: 10px; align-items: center; }\n .net-row { white-space: nowrap; display: flex; align-items: center; gap: 3px; line-height: 1; }\n .net-value { display: inline-block; min-width: 40px; text-align: left; }\n .download { color: #2ecc71; }\n .upload { color: #e74c3c; }\n .loading-text { color: rgba(255,255,255,0.6); font-size: 10px; font-style: italic; }\n "]}),g("design:paramtypes",[jg,xa.ConfigService,xa.AppService,m.ChangeDetectorRef,m.NgZone])],$g);let Wg=class{constructor(t,e){this.platform=t,this.config=e,this.defaultMetric={type:"progress",color:"#00ff00",maxValue:100,suffix:""},this.currentMetric=Object.assign({},this.defaultMetric),this.editingIndex=-1,this.draggedIndex=null,this.isDragging=!1,this.presets=[],this.loadingPresets=!1,this.fetchError=!1}get customMetrics(){return this.config.store.plugin.serverStats.customMetrics||[]}async fetchPresets(){this.loadingPresets=!0,this.fetchError=!1,this.presets=[];try{const t=await fetch("https://raw.githubusercontent.com/kasuganosoras/tabby-server-stats/main/presets.json");if(!t.ok)throw new Error("Network response was not ok");const e=await t.json();if(!Array.isArray(e))throw new Error("Invalid format");this.presets=e}catch(t){console.error("Failed to fetch presets:",t),this.fetchError=!0}finally{this.loadingPresets=!1}}addPreset(t){this.config.store.plugin.serverStats.customMetrics||(this.config.store.plugin.serverStats.customMetrics=[]);const e={id:Date.now().toString()+Math.random().toString().slice(2,5),label:t.label||"New",command:t.command||"",type:t.type||"text",color:t.color||"#00ff00",maxValue:t.maxValue||100,suffix:t.suffix||""};this.config.store.plugin.serverStats.customMetrics.push(e),this.save()}editMetric(t){this.editingIndex=t,this.currentMetric=JSON.parse(JSON.stringify(this.customMetrics[t]))}cancelEdit(){this.editingIndex=-1,this.currentMetric=Object.assign({},this.defaultMetric)}saveMetric(){if(!this.currentMetric.label||!this.currentMetric.command)return;this.config.store.plugin.serverStats.customMetrics||(this.config.store.plugin.serverStats.customMetrics=[]);const t={id:this.currentMetric.id||Date.now().toString(),label:this.currentMetric.label,command:this.currentMetric.command,type:this.currentMetric.type||"text",color:this.currentMetric.color,maxValue:this.currentMetric.maxValue,suffix:this.currentMetric.suffix};-1===this.editingIndex?this.config.store.plugin.serverStats.customMetrics.push(t):(this.config.store.plugin.serverStats.customMetrics[this.editingIndex]=t,this.editingIndex=-1),this.save(),this.currentMetric=Object.assign({},this.defaultMetric)}removeMetric(t){confirm("Are you sure you want to delete this metric?")&&(this.config.store.plugin.serverStats.customMetrics.splice(t,1),this.save(),this.editingIndex===t&&this.cancelEdit())}onDragStart(t){this.draggedIndex=t}onDragOver(t,e){t.preventDefault()}onDrop(t){if(this.isDragging=!1,null===this.draggedIndex||this.draggedIndex===t)return;const e=this.customMetrics,n=e[this.draggedIndex];e.splice(this.draggedIndex,1),e.splice(t,0,n),this.config.store.plugin.serverStats.customMetrics=[...e],this.save(),this.draggedIndex=null}get hexColor(){const t=this.config.store.plugin.serverStats.style.background;if(!t)return"#141414";if(t.startsWith("rgba")){const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(e)return`#${parseInt(e[1]).toString(16).padStart(2,"0")}${parseInt(e[2]).toString(16).padStart(2,"0")}${parseInt(e[3]).toString(16).padStart(2,"0")}`}return t.startsWith("#")?t.substring(0,7):"#141414"}get opacity(){const t=this.config.store.plugin.serverStats.style.background;if(!t)return.9;if(t.startsWith("rgba")){const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(e&&e[4])return parseFloat(e[4])}return 1}setHexColor(t){const e=this.opacity;this.updateColor(t,e)}setOpacity(t){const e=this.hexColor;this.updateColor(e,t)}openGitHubLink(){this.platform.openExternal("https://github.com/kasuganosoras/tabby-server-stats")}updateColor(t,e){const n=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16),s=parseInt(t.slice(5,7),16);this.config.store.plugin.serverStats.style.background=`rgba(${n}, ${i}, ${s}, ${e})`,this.save()}save(){this.config.save()}};Wg=u([(0,m.Component)({template:'\n <h3 translate>Server Stats</h3>\n \n \x3c!-- 显示模式选择 --\x3e\n <div class="form-line">\n <div class="header">\n <div class="title" translate>Display Mode</div>\n <div class="description" translate>Choose between floating panel or bottom bar</div>\n </div>\n <div class="btn-group">\n <input type="radio" class="btn-check" name="displayMode" id="displayModeFloating" \n autocomplete="off" value="floatingPanel"\n [(ngModel)]="config.store.plugin.serverStats.displayMode" \n (ngModelChange)="save()">\n <label class="btn btn-secondary" for="displayModeFloating" translate>Floating Panel</label>\n <input type="radio" class="btn-check" name="displayMode" id="displayModeBottom" \n autocomplete="off" value="bottomBar"\n [(ngModel)]="config.store.plugin.serverStats.displayMode" \n (ngModelChange)="save()">\n <label class="btn btn-secondary" for="displayModeBottom" translate>Bottom Bar</label>\n </div>\n </div>\n\n \x3c!-- 样式配置 --\x3e\n <div class="form-line">\n <div class="header">\n <div class="title" translate>Background Color</div>\n <div class="description" translate>Background color and opacity</div>\n </div>\n <div class="d-flex align-items-center">\n <input type="color" class="form-control form-control-color me-3" \n style="width: 60px;"\n [ngModel]="hexColor" \n (ngModelChange)="setHexColor($event)">\n <span class="text-muted me-2" translate>Opacity</span>\n <input type="range" class="form-range me-2" style="width: 100px" min="0" max="1" step="0.01"\n [ngModel]="opacity" \n (ngModelChange)="setOpacity($event)">\n </div>\n </div>\n\n <div class="separator"></div>\n\n \x3c!-- 预设库区域 --\x3e\n <div class="mt-4 mb-3">\n <div class="d-flex justify-content-between align-items-center mb-2">\n <h4 class="mb-0" translate>Preset Library</h4>\n <button class="btn btn-info btn-sm text-white" (click)="fetchPresets()" [disabled]="loadingPresets">\n <i class="fas fa-cloud-download-alt me-1"></i>\n <span *ngIf="!loadingPresets" translate>Fetch from GitHub</span>\n <span *ngIf="loadingPresets" translate>Loading...</span>\n </button>\n </div>\n <div class="text-muted" style="font-size: 13px;" translate>\n Import commonly used metrics from the community\n </div>\n\n \x3c!-- 预设列表 --\x3e\n <div style="overflow-x: auto; width: 100%;">\n <div class="list-group mt-3 mb-2" *ngIf="presets.length > 0" style="min-width: 450px">\n <div class="list-group-item d-flex align-items-center justify-content-between" *ngFor="let p of presets">\n <div class="d-flex align-items-center" style="width: 90%">\n <span class="badge me-3" [style.background-color]="p.color || \'#666\'">\n {{ (p.type === \'progress\' ? \'Progress Bar\' : \'Text Value\') | translate }}\n </span>\n <div>\n <strong>{{ p.label }}</strong>\n <div class="text-muted" style="font-size: 12px; font-family: monospace;">{{ p.command }}</div>\n </div>\n </div>\n <button class="btn btn-sm btn-success text-white white-space-nowrap add-preset-btn" (click)="addPreset(p)" title="{{ \'Add to my metrics\' | translate }}">\n <i class="fas fa-plus"></i> <span translate>Add</span>\n </button>\n </div>\n </div>\n <div class="text-muted" style="font-size: 13px;" translate>\n <a class="submit-own-preset-btn" href="javascript:void(0);" (click)="openGitHubLink()">{{ \'I want to submit my own preset\' | translate }} <i class="fas fa-external-link-alt"></i></a>\n </div>\n </div>\n <div class="alert alert-warning mt-2" *ngIf="fetchError">\n {{ \'Failed to load presets\' | translate }}\n </div>\n </div>\n\n <div class="separator"></div>\n\n \x3c!-- 自定义指标管理区域 --\x3e\n <div class="mt-4 mb-3">\n <h4 translate>Custom Metrics</h4>\n <div class="text-muted mb-2" style="font-size: 13px;" translate>\n Define custom shell commands to fetch data. The command must output a single value (number or text).\n </div>\n </div>\n\n <div class="list-group mb-3">\n <div class="list-group-item d-flex align-items-center justify-content-between user-select-none custom-metric-item" \n *ngFor="let metric of customMetrics; let i = index"\n draggable="true"\n (dragstart)="onDragStart(i)"\n (dragover)="onDragOver($event, i)"\n (drop)="onDrop(i)"\n [class.opacity-50]="draggedIndex === i && !isDragging"\n style="cursor: grab;">\n \n <div class="d-flex align-items-center" style="flex: 1">\n <i class="fas fa-grip-vertical text-muted me-3" style="cursor: grab"></i>\n \n <span class="badge me-3" [style.background-color]="metric.color || \'#666\'">\n {{ (metric.type === \'progress\' ? \'Progress Bar\' : \'Text Value\') | translate }}\n </span>\n <div>\n <strong>{{ metric.label }}</strong>\n <div class="text-muted" style="font-size: 12px; font-family: monospace;">{{ metric.command }}</div>\n </div>\n </div>\n\n <div class="btn-group">\n <button class="btn btn-sm btn-outline-secondary" (click)="editMetric(i)" title="Edit">\n <i class="fas fa-pen"></i>\n </button>\n <button class="btn btn-sm btn-outline-danger" (click)="removeMetric(i)" title="Remove">\n <i class="fas fa-trash"></i>\n </button>\n </div>\n </div>\n \n <div class="list-group-item text-center text-muted" *ngIf="customMetrics.length === 0" translate>\n No custom metrics defined.\n </div>\n </div>\n\n <div class="card p-3 border">\n <h5 class="mb-3">{{ (editingIndex === -1 ? \'Add New Metric\' : \'Edit Metric\') | translate }}</h5>\n <div class="row g-2">\n <div class="col-md-3">\n <label class="form-label" translate>Label</label>\n <input type="text" class="form-control form-control-sm" [(ngModel)]="currentMetric.label" placeholder="e.g. GPU">\n </div>\n <div class="col-md-3">\n <label class="form-label" translate>Type</label>\n <select class="form-select form-select-sm" [(ngModel)]="currentMetric.type">\n <option value="progress" translate>Progress Bar</option>\n <option value="text" translate>Text Value</option>\n </select>\n </div>\n <div class="col-md-2">\n <label class="form-label" translate>Color</label>\n <input type="color" class="form-control form-control-color form-control-sm w-100" [(ngModel)]="currentMetric.color">\n </div>\n <div class="col-md-2" *ngIf="currentMetric.type === \'progress\'">\n <label class="form-label" translate>Max Value</label>\n <input type="number" class="form-control form-control-sm" [(ngModel)]="currentMetric.maxValue">\n </div>\n <div class="col-md-2" *ngIf="currentMetric.type === \'text\'">\n <label class="form-label" translate>Suffix</label>\n <input type="text" class="form-control form-control-sm" [(ngModel)]="currentMetric.suffix" placeholder="e.g. °C">\n </div>\n <div class="col-md-12">\n <label class="form-label" translate>Command (Shell)</label>\n <div class="input-group input-group-sm">\n <input type="text" class="form-control" [(ngModel)]="currentMetric.command" placeholder="echo 50">\n </div>\n </div>\n <div class="col-md-12 mt-3 text-end">\n <button class="btn btn-secondary btn-sm me-2" *ngIf="editingIndex !== -1" (click)="cancelEdit()" translate>\n Cancel\n </button>\n <button class="btn btn-primary btn-sm text-white" (click)="saveMetric()" [disabled]="!currentMetric.label || !currentMetric.command">\n <i class="fas" [class.fa-plus]="editingIndex === -1" [class.fa-save]="editingIndex !== -1"></i>\n \n {{ (editingIndex === -1 ? \'Add\' : \'Save\') | translate }}\n </button>\n </div>\n </div>\n </div>\n ',styles:["\n .param-input { width: 80px; text-align: right; }\n .user-select-none { user-select: none; }\n .opacity-50 { opacity: 0.5; }\n .separator { height: 1px; background: rgba(0,0,0,0.1); margin: 20px 0; }\n .white-space-nowrap { white-space: nowrap; }\n .add-preset-btn { width: 12%; justify-content: center; }\n .submit-own-preset-btn { color: #00ffc8ff; text-decoration: none; }\n .submit-own-preset-btn:hover { color: #00daaaff; text-decoration: underline; }\n .custom-metric-item { border: 1px solid rgba(100, 100, 100, 0.1); cursor: move; }\n :host-context(.theme-dark) .separator { background: rgba(255,255,255,0.1); }\n "]}),g("design:paramtypes",[xa.PlatformService,xa.ConfigService])],Wg);let Ug=class extends Da.SettingsTabProvider{constructor(t){super(),this.translate=t,this.id="server-stats",this.icon="fas fa-server",this.title=this.translate.instant("Server Stats"),setTimeout(()=>this.setTitle(this.translate.instant("Server Stats")),10)}setTitle(t){this.title=t}getComponentType(){return Wg}};var qg;Ug=u([(0,m.Injectable)(),g("design:paramtypes",["function"==typeof(Hg=void 0!==xa.TranslateService&&xa.TranslateService)?Hg:Object])],Ug);let Yg=class{constructor(t,e,n,i,s,a){this.floatingRef=null,this.bottomBarRef=null,this.floatingElem=null,this.bottomBarElem=null,e.ready$.subscribe(()=>{setTimeout(()=>{for(const[t,e]of Object.entries(Ng))a.setTranslation(t,e,!0)},1e3)});const o=t=>{if(this.destroyComponents(),"floatingPanel"===t){const t=n.resolveComponentFactory(Bg);this.floatingRef=t.create(s),i.attachView(this.floatingRef.hostView),this.floatingElem=this.floatingRef.hostView.rootNodes[0],document.body.appendChild(this.floatingElem),window.serverStatsFloating=this.floatingRef.instance,this.floatingRef.changeDetectorRef.detectChanges(),setTimeout(()=>this.floatingRef.instance.checkAndFetch(),100)}else{const t=n.resolveComponentFactory($g);this.bottomBarRef=t.create(s),i.attachView(this.bottomBarRef.hostView),this.bottomBarElem=this.bottomBarRef.hostView.rootNodes[0];const e=document.querySelector("app-root > div > .content");e?e.appendChild(this.bottomBarElem):document.body.appendChild(this.bottomBarElem),window.serverStatsBottomBar=this.bottomBarRef.instance,this.bottomBarRef.changeDetectorRef.detectChanges(),setTimeout(()=>this.bottomBarRef.instance.checkAndFetch(),100)}},r=()=>{var t,n;return(null===(n=null===(t=e.store.plugin)||void 0===t?void 0:t.serverStats)||void 0===n?void 0:n.displayMode)||"bottomBar"};e.ready$.subscribe(()=>{setTimeout(()=>{o(r())},500)}),e.changed$.subscribe(()=>{const t=r();(this.floatingRef?"floatingPanel":this.bottomBarRef?"bottomBar":null)!==t&&o(t)})}destroyComponents(){this.floatingRef&&(this.floatingRef.destroy(),this.floatingElem&&this.floatingElem.parentNode&&this.floatingElem.parentNode.removeChild(this.floatingElem),this.floatingRef=null,this.floatingElem=null,delete window.serverStatsFloating),this.bottomBarRef&&(this.bottomBarRef.destroy(),this.bottomBarElem&&this.bottomBarElem.parentNode&&this.bottomBarElem.parentNode.removeChild(this.bottomBarElem),this.bottomBarRef=null,this.bottomBarElem=null,delete window.serverStatsBottomBar)}};Yg=u([(0,m.NgModule)({imports:[b.CommonModule,y.FormsModule,Vg,wa(),_a],declarations:[Bg,$g,Wg],entryComponents:[Bg,$g,Wg],providers:[{provide:xa.ConfigProvider,useClass:Ag,multi:!0},{provide:xa.ToolbarButtonProvider,useClass:zg,multi:!0},{provide:Da.SettingsTabProvider,useClass:Ug,multi:!0},jg]}),g("design:paramtypes",[xa.AppService,xa.ConfigService,m.ComponentFactoryResolver,m.ApplicationRef,m.Injector,"function"==typeof(qg=void 0!==xa.TranslateService&&xa.TranslateService)?qg:Object])],Yg);const Zg=Yg;return p})());
|
|
2
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("tabby-core"),require("tabby-settings"));else if("function"==typeof define&&define.amd)define(["@angular/core","@angular/common","@angular/forms","rxjs","rxjs/operators","tabby-core","tabby-settings"],e);else{var n="object"==typeof exports?e(require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("tabby-core"),require("tabby-settings")):e(t["@angular/core"],t["@angular/common"],t["@angular/forms"],t.rxjs,t["rxjs/operators"],t["tabby-core"],t["tabby-settings"]);for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(this,(t,e,n,i,s,a,o)=>(()=>{"use strict";var r,l,c={182:t=>{t.exports=n},358:t=>{t.exports=e},439:t=>{t.exports=s},650:t=>{t.exports=a},700:t=>{t.exports=o},860:e=>{e.exports=t},943:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\r\n <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>\r\n</svg>'},961:t=>{t.exports=i}},d={};function h(t){var e=d[t];if(void 0!==e)return e.exports;var n=d[t]={exports:{}};return c[t](n,n.exports,h),n.exports}h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},l=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,h.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var n=Object.create(null);h.r(n);var i={};r=r||[null,l({}),l([]),l(l)];for(var s=2&e&&t;("object"==typeof s||"function"==typeof s)&&!~r.indexOf(s);s=l(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>t[e]);return i.default=()=>t,h.d(n,i),n},h.d=(t,e)=>{for(var n in e)h.o(e,n)&&!h.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),h.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var p={};function u(t,e,n,i){var s,a=arguments.length,o=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(o=(a<3?s(o):a>3?s(e,n,o):s(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}function g(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}h.r(p),h.d(p,{default:()=>Kg}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var m=h(860),f=h.t(m,2),b=h(358),y=h(182),v=h(961),_=h(439),x={left:"right",right:"left",bottom:"top",top:"bottom"};function w(t){return t.replace(/left|right|bottom|top/g,function(t){return x[t]})}function D(t){return t.split("-")[0]}var I={start:"end",end:"start"};function k(t){return t.replace(/start|end/g,function(t){return I[t]})}var C="top",M="bottom",S="right",T="left",O="auto",E=[C,M,S,T],R="start",P="end",F="viewport",V="popper",A=E.reduce(function(t,e){return t.concat([e+"-"+R,e+"-"+P])},[]),N=[].concat(E,[O]).reduce(function(t,e){return t.concat([e,e+"-"+R,e+"-"+P])},[]),j=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function L(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function z(t){return t instanceof L(t).Element||t instanceof Element}function B(t){return t instanceof L(t).HTMLElement||t instanceof HTMLElement}function $(t){return"undefined"!=typeof ShadowRoot&&(t instanceof L(t).ShadowRoot||t instanceof ShadowRoot)}function H(t){return((z(t)?t.ownerDocument:t.document)||window.document).documentElement}var W=Math.max,U=Math.min,q=Math.round;function Y(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Z(){return!/^((?!chrome|android).)*safari/i.test(Y())}function K(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),s=1,a=1;e&&B(t)&&(s=t.offsetWidth>0&&q(i.width)/t.offsetWidth||1,a=t.offsetHeight>0&&q(i.height)/t.offsetHeight||1);var o=(z(t)?L(t):window).visualViewport,r=!Z()&&n,l=(i.left+(r&&o?o.offsetLeft:0))/s,c=(i.top+(r&&o?o.offsetTop:0))/a,d=i.width/s,h=i.height/a;return{width:d,height:h,top:c,right:l+d,bottom:c+h,left:l,x:l,y:c}}function G(t){var e=L(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function X(t){return K(H(t)).left+G(t).scrollLeft}function J(t){return L(t).getComputedStyle(t)}function Q(t){return t?(t.nodeName||"").toLowerCase():null}function tt(t){return"html"===Q(t)?t:t.assignedSlot||t.parentNode||($(t)?t.host:null)||H(t)}function et(t){var e=J(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function nt(t){return["html","body","#document"].indexOf(Q(t))>=0?t.ownerDocument.body:B(t)&&et(t)?t:nt(tt(t))}function it(t,e){var n;void 0===e&&(e=[]);var i=nt(t),s=i===(null==(n=t.ownerDocument)?void 0:n.body),a=L(i),o=s?[a].concat(a.visualViewport||[],et(i)?i:[]):i,r=e.concat(o);return s?r:r.concat(it(tt(o)))}function st(t){return["table","td","th"].indexOf(Q(t))>=0}function at(t){return B(t)&&"fixed"!==J(t).position?t.offsetParent:null}function ot(t){for(var e=L(t),n=at(t);n&&st(n)&&"static"===J(n).position;)n=at(n);return n&&("html"===Q(n)||"body"===Q(n)&&"static"===J(n).position)?e:n||function(t){var e=/firefox/i.test(Y());if(/Trident/i.test(Y())&&B(t)&&"fixed"===J(t).position)return null;var n=tt(t);for($(n)&&(n=n.host);B(n)&&["html","body"].indexOf(Q(n))<0;){var i=J(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function rt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&$(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function lt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ct(t,e,n){return e===F?lt(function(t,e){var n=L(t),i=H(t),s=n.visualViewport,a=i.clientWidth,o=i.clientHeight,r=0,l=0;if(s){a=s.width,o=s.height;var c=Z();(c||!c&&"fixed"===e)&&(r=s.offsetLeft,l=s.offsetTop)}return{width:a,height:o,x:r+X(t),y:l}}(t,n)):z(e)?function(t,e){var n=K(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):lt(function(t){var e,n=H(t),i=G(t),s=null==(e=t.ownerDocument)?void 0:e.body,a=W(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=W(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),r=-i.scrollLeft+X(t),l=-i.scrollTop;return"rtl"===J(s||n).direction&&(r+=W(n.clientWidth,s?s.clientWidth:0)-a),{width:a,height:o,x:r,y:l}}(H(t)))}function dt(t){return t.split("-")[1]}function ht(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function pt(t){var e,n=t.reference,i=t.element,s=t.placement,a=s?D(s):null,o=s?dt(s):null,r=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(a){case C:e={x:r,y:n.y-i.height};break;case M:e={x:r,y:n.y+n.height};break;case S:e={x:n.x+n.width,y:l};break;case T:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=a?ht(a):null;if(null!=c){var d="y"===c?"height":"width";switch(o){case R:e[c]=e[c]-(n[d]/2-i[d]/2);break;case P:e[c]=e[c]+(n[d]/2-i[d]/2)}}return e}function ut(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function gt(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function mt(t,e){void 0===e&&(e={});var n=e,i=n.placement,s=void 0===i?t.placement:i,a=n.strategy,o=void 0===a?t.strategy:a,r=n.boundary,l=void 0===r?"clippingParents":r,c=n.rootBoundary,d=void 0===c?F:c,h=n.elementContext,p=void 0===h?V:h,u=n.altBoundary,g=void 0!==u&&u,m=n.padding,f=void 0===m?0:m,b=ut("number"!=typeof f?f:gt(f,E)),y=p===V?"reference":V,v=t.rects.popper,_=t.elements[g?y:p],x=function(t,e,n,i){var s="clippingParents"===e?function(t){var e=it(tt(t)),n=["absolute","fixed"].indexOf(J(t).position)>=0&&B(t)?ot(t):t;return z(n)?e.filter(function(t){return z(t)&&rt(t,n)&&"body"!==Q(t)}):[]}(t):[].concat(e),a=[].concat(s,[n]),o=a[0],r=a.reduce(function(e,n){var s=ct(t,n,i);return e.top=W(s.top,e.top),e.right=U(s.right,e.right),e.bottom=U(s.bottom,e.bottom),e.left=W(s.left,e.left),e},ct(t,o,i));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}(z(_)?_:_.contextElement||H(t.elements.popper),l,d,o),w=K(t.elements.reference),D=pt({reference:w,element:v,strategy:"absolute",placement:s}),I=lt(Object.assign({},v,D)),k=p===V?I:w,T={top:x.top-k.top+b.top,bottom:k.bottom-x.bottom+b.bottom,left:x.left-k.left+b.left,right:k.right-x.right+b.right},O=t.modifiersData.offset;if(p===V&&O){var R=O[s];Object.keys(T).forEach(function(t){var e=[S,M].indexOf(t)>=0?1:-1,n=[C,M].indexOf(t)>=0?"y":"x";T[t]+=R[n]*e})}return T}const ft={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=n.mainAxis,a=void 0===s||s,o=n.altAxis,r=void 0===o||o,l=n.fallbackPlacements,c=n.padding,d=n.boundary,h=n.rootBoundary,p=n.altBoundary,u=n.flipVariations,g=void 0===u||u,m=n.allowedAutoPlacements,f=e.options.placement,b=D(f),y=l||(b!==f&&g?function(t){if(D(t)===O)return[];var e=w(t);return[k(t),e,k(e)]}(f):[w(f)]),v=[f].concat(y).reduce(function(t,n){return t.concat(D(n)===O?function(t,e){void 0===e&&(e={});var n=e,i=n.placement,s=n.boundary,a=n.rootBoundary,o=n.padding,r=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?N:l,d=dt(i),h=d?r?A:A.filter(function(t){return dt(t)===d}):E,p=h.filter(function(t){return c.indexOf(t)>=0});0===p.length&&(p=h);var u=p.reduce(function(e,n){return e[n]=mt(t,{placement:n,boundary:s,rootBoundary:a,padding:o})[D(n)],e},{});return Object.keys(u).sort(function(t,e){return u[t]-u[e]})}(e,{placement:n,boundary:d,rootBoundary:h,padding:c,flipVariations:g,allowedAutoPlacements:m}):n)},[]),_=e.rects.reference,x=e.rects.popper,I=new Map,P=!0,F=v[0],V=0;V<v.length;V++){var j=v[V],L=D(j),z=dt(j)===R,B=[C,M].indexOf(L)>=0,$=B?"width":"height",H=mt(e,{placement:j,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),W=B?z?S:T:z?M:C;_[$]>x[$]&&(W=w(W));var U=w(W),q=[];if(a&&q.push(H[L]<=0),r&&q.push(H[W]<=0,H[U]<=0),q.every(function(t){return t})){F=j,P=!1;break}I.set(j,q)}if(P)for(var Y=function(t){var e=v.find(function(e){var n=I.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return F=e,"break"},Z=g?3:1;Z>0&&"break"!==Y(Z);Z--);e.placement!==F&&(e.modifiersData[i]._skip=!0,e.placement=F,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return W(t,U(e,n))}function yt(t){var e=K(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}const vt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,s=n.mainAxis,a=void 0===s||s,o=n.altAxis,r=void 0!==o&&o,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,h=n.padding,p=n.tether,u=void 0===p||p,g=n.tetherOffset,m=void 0===g?0:g,f=mt(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),b=D(e.placement),y=dt(e.placement),v=!y,_=ht(b),x="x"===_?"y":"x",w=e.modifiersData.popperOffsets,I=e.rects.reference,k=e.rects.popper,O="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,E="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(w){if(a){var V,A="y"===_?C:T,N="y"===_?M:S,j="y"===_?"height":"width",L=w[_],z=L+f[A],B=L-f[N],$=u?-k[j]/2:0,H=y===R?I[j]:k[j],q=y===R?-k[j]:-I[j],Y=e.elements.arrow,Z=u&&Y?yt(Y):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=K[A],X=K[N],J=bt(0,I[j],Z[j]),Q=v?I[j]/2-$-J-G-E.mainAxis:H-J-G-E.mainAxis,tt=v?-I[j]/2+$+J+X+E.mainAxis:q+J+X+E.mainAxis,et=e.elements.arrow&&ot(e.elements.arrow),nt=et?"y"===_?et.clientTop||0:et.clientLeft||0:0,it=null!=(V=null==P?void 0:P[_])?V:0,st=L+tt-it,at=bt(u?U(z,L+Q-it-nt):z,L,u?W(B,st):B);w[_]=at,F[_]=at-L}if(r){var rt,lt="x"===_?C:T,ct="x"===_?M:S,pt=w[x],ut="y"===x?"height":"width",gt=pt+f[lt],ft=pt-f[ct],vt=-1!==[C,T].indexOf(b),_t=null!=(rt=null==P?void 0:P[x])?rt:0,xt=vt?gt:pt-I[ut]-k[ut]-_t+E.altAxis,wt=vt?pt+I[ut]+k[ut]-_t-E.altAxis:ft,Dt=u&&vt?function(t,e,n){var i=bt(t,e,n);return i>n?n:i}(xt,pt,wt):bt(u?xt:gt,pt,u?wt:ft);w[x]=Dt,F[x]=Dt-pt}e.modifiersData[i]=F}},requiresIfExists:["offset"]},_t={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,s=t.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,r=D(n.placement),l=ht(r),c=[T,S].indexOf(r)>=0?"height":"width";if(a&&o){var d=function(t,e){return ut("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:gt(t,E))}(s.padding,n),h=yt(a),p="y"===l?C:T,u="y"===l?M:S,g=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],m=o[l]-n.rects.reference[l],f=ot(a),b=f?"y"===l?f.clientHeight||0:f.clientWidth||0:0,y=g/2-m/2,v=d[p],_=b-h[c]-d[u],x=b/2-h[c]/2+y,w=bt(v,x,_),I=l;n.modifiersData[i]=((e={})[I]=w,e.centerOffset=w-x,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&rt(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function xt(t,e,n){void 0===n&&(n=!1);var i,s,a=B(e),o=B(e)&&function(t){var e=t.getBoundingClientRect(),n=q(e.width)/t.offsetWidth||1,i=q(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),r=H(e),l=K(t,o,n),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(a||!a&&!n)&&(("body"!==Q(e)||et(r))&&(c=(i=e)!==L(i)&&B(i)?{scrollLeft:(s=i).scrollLeft,scrollTop:s.scrollTop}:G(i)),B(e)?((d=K(e,!0)).x+=e.clientLeft,d.y+=e.clientTop):r&&(d.x=X(r))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function wt(t){var e=new Map,n=new Set,i=[];function s(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&s(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||s(t)}),i}var Dt={placement:"bottom",modifiers:[],strategy:"absolute"};function It(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function kt(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,i=void 0===n?[]:n,s=e.defaultOptions,a=void 0===s?Dt:s;return function(t,e,n){void 0===n&&(n=a);var s,o,r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Dt,a),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,d={state:r,setOptions:function(n){var s="function"==typeof n?n(r.options):n;h(),r.options=Object.assign({},a,r.options,s),r.scrollParents={reference:z(t)?it(t):t.contextElement?it(t.contextElement):[],popper:it(e)};var o,c,p=function(t){var e=wt(t);return j.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((o=[].concat(i,r.options.modifiers),c=o.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return r.orderedModifiers=p.filter(function(t){return t.enabled}),r.orderedModifiers.forEach(function(t){var e=t.name,n=t.options,i=void 0===n?{}:n,s=t.effect;if("function"==typeof s){var a=s({state:r,name:e,instance:d,options:i});l.push(a||function(){})}}),d.update()},forceUpdate:function(){if(!c){var t=r.elements,e=t.reference,n=t.popper;if(It(e,n)){r.rects={reference:xt(e,ot(n),"fixed"===r.options.strategy),popper:yt(n)},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach(function(t){return r.modifiersData[t.name]=Object.assign({},t.data)});for(var i=0;i<r.orderedModifiers.length;i++)if(!0!==r.reset){var s=r.orderedModifiers[i],a=s.fn,o=s.options,l=void 0===o?{}:o,h=s.name;"function"==typeof a&&(r=a({state:r,options:l,name:h,instance:d})||r)}else r.reset=!1,i=-1}}},update:(s=function(){return new Promise(function(t){d.forceUpdate(),t(r)})},function(){return o||(o=new Promise(function(t){Promise.resolve().then(function(){o=void 0,t(s())})})),o}),destroy:function(){h(),c=!0}};if(!It(t,e))return d;function h(){l.forEach(function(t){return t()}),l=[]}return d.setOptions(n).then(function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)}),d}}var Ct={passive:!0},Mt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function St(t){var e,n=t.popper,i=t.popperRect,s=t.placement,a=t.variation,o=t.offsets,r=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,h=t.isFixed,p=o.x,u=void 0===p?0:p,g=o.y,m=void 0===g?0:g,f="function"==typeof d?d({x:u,y:m}):{x:u,y:m};u=f.x,m=f.y;var b=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),v=T,_=C,x=window;if(c){var w=ot(n),D="clientHeight",I="clientWidth";w===L(n)&&"static"!==J(w=H(n)).position&&"absolute"===r&&(D="scrollHeight",I="scrollWidth"),(s===C||(s===T||s===S)&&a===P)&&(_=M,m-=(h&&w===x&&x.visualViewport?x.visualViewport.height:w[D])-i.height,m*=l?1:-1),s!==T&&(s!==C&&s!==M||a!==P)||(v=S,u-=(h&&w===x&&x.visualViewport?x.visualViewport.width:w[I])-i.width,u*=l?1:-1)}var k,O=Object.assign({position:r},c&&Mt),E=!0===d?function(t,e){var n=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:q(n*s)/s||0,y:q(i*s)/s||0}}({x:u,y:m},L(n)):{x:u,y:m};return u=E.x,m=E.y,l?Object.assign({},O,((k={})[_]=y?"0":"",k[v]=b?"0":"",k.transform=(x.devicePixelRatio||1)<=1?"translate("+u+"px, "+m+"px)":"translate3d("+u+"px, "+m+"px, 0)",k)):Object.assign({},O,((e={})[_]=y?m+"px":"",e[v]=b?u+"px":"",e.transform="",e))}var Tt=kt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,a=void 0===s||s,o=i.resize,r=void 0===o||o,l=L(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&c.forEach(function(t){t.addEventListener("scroll",n.update,Ct)}),r&&l.addEventListener("resize",n.update,Ct),function(){a&&c.forEach(function(t){t.removeEventListener("scroll",n.update,Ct)}),r&&l.removeEventListener("resize",n.update,Ct)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=pt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=void 0===i||i,a=n.adaptive,o=void 0===a||a,r=n.roundOffsets,l=void 0===r||r,c={placement:D(e.placement),variation:dt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,St(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,St(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},s=e.elements[t];B(s)&&Q(s)&&(Object.assign(s.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var i=e.elements[t],s=e.attributes[t]||{},a=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});B(i)&&Q(i)&&(Object.assign(i.style,a),Object.keys(s).forEach(function(t){i.removeAttribute(t)}))})}},requires:["computeStyles"]}]});const Ot={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,s=n.offset,a=void 0===s?[0,0]:s,o=N.reduce(function(t,n){return t[n]=function(t,e,n){var i=D(t),s=[T,C].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,o=a[0],r=a[1];return o=o||0,r=(r||0)*s,[T,S].indexOf(i)>=0?{x:r,y:o}:{x:o,y:r}}(n,e.rects,a),t},{}),r=o[e.placement],l=r.x,c=r.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=o}};function Et(t){return parseInt(`${t}`,10)}function Rt(t){return null!=t?`${t}`:""}function Pt(t,e,n=0){return Math.max(Math.min(t,e),n)}function Ft(t){return"string"==typeof t}function Vt(t){return!isNaN(Et(t))}function At(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function Nt(t){return null!=t}function jt(t){return t&&t.then}function Lt(t){return Vt(t)?`0${t}`.slice(-2):""}function zt(t,e){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(e)>=0}function Bt(t){return(t||document.body).getBoundingClientRect()}function $t(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const Ht={animation:!0,transitionTimerDelayMs:5},Wt=()=>{},{transitionTimerDelayMs:Ut}=Ht,qt=new Map,Yt=(t,e,n,i)=>{let s=i.context||{};const a=qt.get(e);if(a)switch(i.runningTransition){case"continue":return v.EMPTY;case"stop":t.run(()=>a.transition$.complete()),s=Object.assign(a.context,s),qt.delete(e)}const o=n(e,i.animation,s)||Wt;if(!i.animation||"none"===window.getComputedStyle(e).transitionProperty)return t.run(()=>o()),(0,v.of)(void 0).pipe(function(t){return e=>new v.Observable(n=>e.subscribe({next:e=>t.run(()=>n.next(e)),error:e=>t.run(()=>n.error(e)),complete:()=>t.run(()=>n.complete())}))}(t));const r=new v.Subject,l=new v.Subject,c=r.pipe((0,_.endWith)(!0));qt.set(e,{transition$:r,complete:()=>{l.next(),l.complete()},context:s});const d=function(t){const{transitionDelay:e,transitionDuration:n}=window.getComputedStyle(t);return 1e3*(parseFloat(e)+parseFloat(n))}(e);return t.runOutsideAngular(()=>{const n=(0,v.fromEvent)(e,"transitionend").pipe((0,_.takeUntil)(c),(0,_.filter)(({target:t})=>t===e)),i=(0,v.timer)(d+Ut).pipe((0,_.takeUntil)(c));(0,v.race)(i,n,l).pipe((0,_.takeUntil)(c)).subscribe(()=>{qt.delete(e),t.run(()=>{o(),r.next(),r.complete()})})}),r.asObservable()},Zt=(t,e,n)=>{let{direction:i,maxSize:s,dimension:a}=n;const{classList:o}=t;function r(){o.add("collapse"),"show"===i?o.add("show"):o.remove("show")}if(e)return s||(s=function(t,e){if("undefined"==typeof navigator)return"0px";const{classList:n}=t,i=n.contains("show");i||n.add("show"),t.style[e]="";const s=t.getBoundingClientRect()[e]+"px";return i||n.remove("show"),s}(t,a),n.maxSize=s,t.style[a]="show"!==i?s:"0px",o.remove("collapse"),o.remove("collapsing"),o.remove("show"),Bt(t),o.add("collapsing")),t.style[a]="show"===i?s:"0px",()=>{r(),o.remove("collapsing"),t.style[a]=""};r()};class Kt{constructor(){this.animation=Ht.animation}}Kt.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Kt,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Kt.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Kt,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Kt,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class Gt{constructor(t){this._ngbConfig=t,this.closeOthers=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Gt.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gt,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),Gt.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gt,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gt,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});let Xt=0;class Jt{constructor(t){this.templateRef=t}}Jt.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Jt,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),Jt.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Jt,isStandalone:!0,selector:"ng-template[ngbPanelHeader]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Jt,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPanelHeader]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class Qt{constructor(t){this.templateRef=t}}Qt.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qt,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),Qt.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Qt,isStandalone:!0,selector:"ng-template[ngbPanelTitle]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qt,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPanelTitle]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class te{constructor(t){this.templateRef=t}}te.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:te,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),te.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:te,isStandalone:!0,selector:"ng-template[ngbPanelContent]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:te,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPanelContent]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class ee{constructor(){this.disabled=!1,this.id="ngb-panel-"+Xt++,this.isOpen=!1,this.initClassDone=!1,this.transitionRunning=!1,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter}ngAfterContentChecked(){this.titleTpl=this.titleTpls.first,this.headerTpl=this.headerTpls.first,this.contentTpl=this.contentTpls.first}}ee.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ee,deps:[],target:m["ɵɵFactoryTarget"].Directive}),ee.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ee,isStandalone:!0,selector:"ngb-panel",inputs:{disabled:"disabled",id:"id",title:"title",type:"type",cardClass:"cardClass"},outputs:{shown:"shown",hidden:"hidden"},queries:[{propertyName:"titleTpls",predicate:Qt},{propertyName:"headerTpls",predicate:Jt},{propertyName:"contentTpls",predicate:te}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ee,decorators:[{type:m.Directive,args:[{selector:"ngb-panel",standalone:!0}]}],propDecorators:{disabled:[{type:m.Input}],id:[{type:m.Input}],title:[{type:m.Input}],type:[{type:m.Input}],cardClass:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}],titleTpls:[{type:m.ContentChildren,args:[Qt,{descendants:!1}]}],headerTpls:[{type:m.ContentChildren,args:[Jt,{descendants:!1}]}],contentTpls:[{type:m.ContentChildren,args:[te,{descendants:!1}]}]}});class ne{constructor(t){this._El=t,this.ngbRef=new m.EventEmitter}ngOnInit(){this.ngbRef.emit(this._El.nativeElement)}ngOnDestroy(){this.ngbRef.emit(null)}}ne.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ne,deps:[{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),ne.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ne,isStandalone:!0,selector:"[ngbRef]",outputs:{ngbRef:"ngbRef"},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ne,decorators:[{type:m.Directive,args:[{selector:"[ngbRef]",standalone:!0}]}],ctorParameters:function(){return[{type:m.ElementRef}]},propDecorators:{ngbRef:[{type:m.Output}]}});class ie{constructor(t,e){this.accordion=t,this.panel=e}set ngbPanelToggle(t){t&&(this.panel=t)}}ie.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ie,deps:[{token:(0,m.forwardRef)(()=>se)},{token:ee,host:!0,optional:!0}],target:m["ɵɵFactoryTarget"].Directive}),ie.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ie,isStandalone:!0,selector:"button[ngbPanelToggle]",inputs:{ngbPanelToggle:"ngbPanelToggle"},host:{attributes:{type:"button"},listeners:{click:"accordion.toggle(panel.id)"},properties:{disabled:"panel.disabled","class.collapsed":"!panel.isOpen","attr.aria-expanded":"panel.isOpen","attr.aria-controls":"panel.id"}},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ie,decorators:[{type:m.Directive,args:[{selector:"button[ngbPanelToggle]",standalone:!0,host:{type:"button","[disabled]":"panel.disabled","[class.collapsed]":"!panel.isOpen","[attr.aria-expanded]":"panel.isOpen","[attr.aria-controls]":"panel.id","(click)":"accordion.toggle(panel.id)"}}]}],ctorParameters:function(){return[{type:se,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>se)]}]},{type:ee,decorators:[{type:m.Optional},{type:m.Host}]}]},propDecorators:{ngbPanelToggle:[{type:m.Input}]}});class se{constructor(t,e,n){this._ngZone=e,this._changeDetector=n,this.activeIds=[],this.destroyOnHide=!0,this.panelChange=new m.EventEmitter,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this.animation=t.animation,this.type=t.type,this.closeOtherPanels=t.closeOthers}isExpanded(t){return this.activeIds.indexOf(t)>-1}expand(t){this._changeOpenState(this._findPanelById(t),!0)}expandAll(){this.closeOtherPanels?0===this.activeIds.length&&this.panels.length&&this._changeOpenState(this.panels.first,!0):this.panels.forEach(t=>this._changeOpenState(t,!0))}collapse(t){this._changeOpenState(this._findPanelById(t),!1)}collapseAll(){this.panels.forEach(t=>{this._changeOpenState(t,!1)})}toggle(t){const e=this._findPanelById(t);e&&this._changeOpenState(e,!e.isOpen)}ngAfterContentChecked(){Ft(this.activeIds)&&(this.activeIds=this.activeIds.split(/\s*,\s*/)),this.panels.forEach(t=>{t.isOpen=!t.disabled&&this.activeIds.indexOf(t.id)>-1}),this.activeIds.length>1&&this.closeOtherPanels&&(this._closeOthers(this.activeIds[0],!1),this._updateActiveIds()),this._ngZone.onStable.pipe((0,_.take)(1)).subscribe(()=>{this.panels.forEach(t=>{const e=t.panelDiv;e?t.initClassDone||(t.initClassDone=!0,Yt(this._ngZone,e,Zt,{animation:!1,runningTransition:"continue",context:{direction:t.isOpen?"show":"hide",dimension:"height"}})):t.initClassDone=!1})})}_changeOpenState(t,e){if(null!=t&&!t.disabled&&t.isOpen!==e){let n=!1;this.panelChange.emit({panelId:t.id,nextState:e,preventDefault:()=>{n=!0}}),n||(t.isOpen=e,t.transitionRunning=!0,e&&this.closeOtherPanels&&this._closeOthers(t.id),this._updateActiveIds(),this._runTransitions(this.animation))}}_closeOthers(t,e=!0){this.panels.forEach(n=>{n.id!==t&&n.isOpen&&(n.isOpen=!1,n.transitionRunning=e)})}_findPanelById(t){return this.panels.find(e=>e.id===t)||null}_updateActiveIds(){this.activeIds=this.panels.filter(t=>t.isOpen&&!t.disabled).map(t=>t.id)}_runTransitions(t){this._changeDetector.detectChanges(),this.panels.forEach(e=>{if(e.transitionRunning){const n=e.panelDiv;Yt(this._ngZone,n,Zt,{animation:t,runningTransition:"stop",context:{direction:e.isOpen?"show":"hide",dimension:"height"}}).subscribe(()=>{e.transitionRunning=!1;const{id:t}=e;e.isOpen?(e.shown.emit(),this.shown.emit(t)):(e.hidden.emit(),this.hidden.emit(t))})}})}}se.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:se,deps:[{token:Gt},{token:m.NgZone},{token:m.ChangeDetectorRef}],target:m["ɵɵFactoryTarget"].Component}),se.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:se,isStandalone:!0,selector:"ngb-accordion",inputs:{animation:"animation",activeIds:"activeIds",closeOtherPanels:["closeOthers","closeOtherPanels"],destroyOnHide:"destroyOnHide",type:"type"},outputs:{panelChange:"panelChange",shown:"shown",hidden:"hidden"},host:{attributes:{role:"tablist"},properties:{"attr.aria-multiselectable":"!closeOtherPanels"},classAttribute:"accordion"},queries:[{propertyName:"panels",predicate:ee}],exportAs:["ngbAccordion"],ngImport:f,template:'\n\t\t<ng-template #t ngbPanelHeader let-panel>\n\t\t\t<button class="accordion-button" [ngbPanelToggle]="panel">\n\t\t\t\t{{ panel.title }}\n\t\t\t\t<ng-template [ngTemplateOutlet]="panel.titleTpl?.templateRef"></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t\t<ng-template ngFor let-panel [ngForOf]="panels">\n\t\t\t<div [class]="\'accordion-item \' + (panel.cardClass || \'\')">\n\t\t\t\t<div\n\t\t\t\t\trole="tab"\n\t\t\t\t\tid="{{ panel.id }}-header"\n\t\t\t\t\t[class]="\'accordion-header \' + (panel.type ? \'bg-\' + panel.type : type ? \'bg-\' + type : \'\')"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="panel.headerTpl?.templateRef || t"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: panel, opened: panel.isOpen }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tid="{{ panel.id }}"\n\t\t\t\t\t(ngbRef)="panel.panelDiv = $event"\n\t\t\t\t\trole="tabpanel"\n\t\t\t\t\t[attr.aria-labelledby]="panel.id + \'-header\'"\n\t\t\t\t\t*ngIf="!destroyOnHide || panel.isOpen || panel.transitionRunning"\n\t\t\t\t>\n\t\t\t\t\t<div class="accordion-body">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]="panel.contentTpl?.templateRef || null"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:ie,selector:"button[ngbPanelToggle]",inputs:["ngbPanelToggle"]},{kind:"directive",type:ne,selector:"[ngbRef]",outputs:["ngbRef"]},{kind:"directive",type:Jt,selector:"ng-template[ngbPanelHeader]"},{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:se,decorators:[{type:m.Component,args:[{selector:"ngb-accordion",exportAs:"ngbAccordion",standalone:!0,imports:[b.NgFor,b.NgTemplateOutlet,ie,ne,Jt,b.NgIf],encapsulation:m.ViewEncapsulation.None,host:{class:"accordion",role:"tablist","[attr.aria-multiselectable]":"!closeOtherPanels"},template:'\n\t\t<ng-template #t ngbPanelHeader let-panel>\n\t\t\t<button class="accordion-button" [ngbPanelToggle]="panel">\n\t\t\t\t{{ panel.title }}\n\t\t\t\t<ng-template [ngTemplateOutlet]="panel.titleTpl?.templateRef"></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t\t<ng-template ngFor let-panel [ngForOf]="panels">\n\t\t\t<div [class]="\'accordion-item \' + (panel.cardClass || \'\')">\n\t\t\t\t<div\n\t\t\t\t\trole="tab"\n\t\t\t\t\tid="{{ panel.id }}-header"\n\t\t\t\t\t[class]="\'accordion-header \' + (panel.type ? \'bg-\' + panel.type : type ? \'bg-\' + type : \'\')"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="panel.headerTpl?.templateRef || t"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: panel, opened: panel.isOpen }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tid="{{ panel.id }}"\n\t\t\t\t\t(ngbRef)="panel.panelDiv = $event"\n\t\t\t\t\trole="tabpanel"\n\t\t\t\t\t[attr.aria-labelledby]="panel.id + \'-header\'"\n\t\t\t\t\t*ngIf="!destroyOnHide || panel.isOpen || panel.transitionRunning"\n\t\t\t\t>\n\t\t\t\t\t<div class="accordion-body">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]="panel.contentTpl?.templateRef || null"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t'}]}],ctorParameters:function(){return[{type:Gt},{type:m.NgZone},{type:m.ChangeDetectorRef}]},propDecorators:{panels:[{type:m.ContentChildren,args:[ee]}],animation:[{type:m.Input}],activeIds:[{type:m.Input}],closeOtherPanels:[{type:m.Input,args:["closeOthers"]}],destroyOnHide:[{type:m.Input}],type:[{type:m.Input}],panelChange:[{type:m.Output}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});class ae{constructor(t){this._ngbConfig=t,this.horizontal=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ae.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ae,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),ae.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ae,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ae,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});class oe{constructor(t,e,n){this._element=t,this._zone=n,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new m.EventEmitter,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this.animation=e.animation,this.horizontal=e.horizontal}set collapsed(t){this._isCollapsed!==t&&(this._isCollapsed=t,this._afterInit&&this._runTransitionWithEvents(t,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(t=this._isCollapsed){this.collapsed=!t,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(t,e){return Yt(this._zone,this._element.nativeElement,Zt,{animation:e,runningTransition:"stop",context:{direction:t?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(t,e){this._runTransition(t,e).subscribe(()=>{t?this.hidden.emit():this.shown.emit()})}}oe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:oe,deps:[{token:m.ElementRef},{token:ae},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Directive}),oe.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:oe,isStandalone:!0,selector:"[ngbCollapse]",inputs:{animation:"animation",collapsed:["ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},host:{properties:{"class.collapse-horizontal":"horizontal"}},exportAs:["ngbCollapse"],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:oe,decorators:[{type:m.Directive,args:[{selector:"[ngbCollapse]",exportAs:"ngbCollapse",standalone:!0,host:{"[class.collapse-horizontal]":"horizontal"}}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:ae},{type:m.NgZone}]},propDecorators:{animation:[{type:m.Input}],collapsed:[{type:m.Input,args:["ngbCollapse"]}],ngbCollapseChange:[{type:m.Output}],horizontal:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});let re=0;class le{constructor(){this._appRef=(0,m.inject)(m.ApplicationRef),this._element=(0,m.inject)(m.ElementRef).nativeElement,this._item=(0,m.inject)(ue),this._viewRef=null}ngAfterContentChecked(){this._bodyTpl&&(this._item.animatingBodyCollapse||!this._item.destroyOnHide?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef&&(this._appRef.detachView(this._viewRef),this._viewRef.destroy(),this._viewRef=null)}_createViewIfNotExists(){if(!this._viewRef){this._viewRef=this._bodyTpl.createEmbeddedView(null),this._viewRef.detectChanges(),this._appRef.attachView(this._viewRef);for(const t of this._viewRef.rootNodes)this._element.appendChild(t)}}}le.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:le,deps:[],target:m["ɵɵFactoryTarget"].Directive}),le.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:le,isStandalone:!0,selector:"[ngbAccordionBody]",host:{properties:{"class.accordion-body":"true"}},queries:[{propertyName:"_bodyTpl",first:!0,predicate:m.TemplateRef,descendants:!0,static:!0}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:le,decorators:[{type:m.Directive,args:[{selector:"[ngbAccordionBody]",standalone:!0,host:{"[class.accordion-body]":"true"}}]}],propDecorators:{_bodyTpl:[{type:m.ContentChild,args:[m.TemplateRef,{static:!0}]}]}});class ce{constructor(t,e){this.item=t,this.ngbCollapse=e}}ce.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ce,deps:[{token:(0,m.forwardRef)(()=>ue)},{token:oe}],target:m["ɵɵFactoryTarget"].Directive}),ce.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ce,isStandalone:!0,selector:"[ngbAccordionCollapse]",host:{attributes:{role:"region"},properties:{"class.accordion-collapse":"true",id:"item.collapseId","attr.aria-labelledby":"item.toggleId"}},exportAs:["ngbAccordionCollapse"],hostDirectives:[{directive:oe}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ce,decorators:[{type:m.Directive,args:[{exportAs:"ngbAccordionCollapse",standalone:!0,selector:"[ngbAccordionCollapse]",host:{role:"region","[class.accordion-collapse]":"true","[id]":"item.collapseId","[attr.aria-labelledby]":"item.toggleId"},hostDirectives:[{directive:oe}]}]}],ctorParameters:function(){return[{type:ue,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ue)]}]},{type:oe}]}});class de{constructor(t,e){this.item=t,this.accordion=e}}de.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:de,deps:[{token:(0,m.forwardRef)(()=>ue)},{token:(0,m.forwardRef)(()=>ge)}],target:m["ɵɵFactoryTarget"].Directive}),de.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:de,isStandalone:!0,selector:"[ngbAccordionToggle]",host:{listeners:{click:"!item.disabled && accordion.toggle(item.id)"},properties:{id:"item.toggleId","class.collapsed":"item.collapsed","attr.aria-controls":"item.collapseId","attr.aria-expanded":"!item.collapsed"}},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:de,decorators:[{type:m.Directive,args:[{selector:"[ngbAccordionToggle]",standalone:!0,host:{"[id]":"item.toggleId","[class.collapsed]":"item.collapsed","[attr.aria-controls]":"item.collapseId","[attr.aria-expanded]":"!item.collapsed","(click)":"!item.disabled && accordion.toggle(item.id)"}}]}],ctorParameters:function(){return[{type:ue,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ue)]}]},{type:ge,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ge)]}]}]}});class he{constructor(t){this.item=t}}he.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:he,deps:[{token:(0,m.forwardRef)(()=>ue)}],target:m["ɵɵFactoryTarget"].Directive}),he.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:he,isStandalone:!0,selector:"button[ngbAccordionButton]",host:{attributes:{type:"button"},properties:{disabled:"item.disabled","class.accordion-button":"true"}},hostDirectives:[{directive:de}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:he,decorators:[{type:m.Directive,args:[{selector:"button[ngbAccordionButton]",standalone:!0,host:{"[disabled]":"item.disabled","[class.accordion-button]":"true",type:"button"},hostDirectives:[{directive:de}]}]}],ctorParameters:function(){return[{type:ue,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ue)]}]}]}});class pe{constructor(t){this.item=t}}pe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:pe,deps:[{token:(0,m.forwardRef)(()=>ue)}],target:m["ɵɵFactoryTarget"].Directive}),pe.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:pe,isStandalone:!0,selector:"[ngbAccordionHeader]",host:{attributes:{role:"heading"},properties:{"class.accordion-header":"true","class.collapsed":"item.collapsed"}},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:pe,decorators:[{type:m.Directive,args:[{selector:"[ngbAccordionHeader]",standalone:!0,host:{role:"heading","[class.accordion-header]":"true","[class.collapsed]":"item.collapsed"}}]}],ctorParameters:function(){return[{type:ue,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ue)]}]}]}});class ue{constructor(t,e){this._accordion=t,this._cd=e,this._subscriptions=[],this._collapsed=!0,this._id="ngb-accordion-item-"+re++,this.animatingBodyCollapse=!1,this.destroyOnHide=this._accordion.destroyOnHide,this.disabled=!1,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter}set id(t){Ft(t)&&""!==t&&(this._id=t)}set collapsed(t){if(this.collapsed!==t){if(this.collapsed&&!this._accordion._ensureCanExpand(this))return;this._collapsed=t,this._cd.markForCheck(),this.collapsed||(this.animatingBodyCollapse=!0,this._cd.detectChanges()),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=this.collapsed}}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}ngAfterContentInit(){const{ngbCollapse:t}=this._collapse;t.animation=!1,t.collapsed=this.collapsed,t.animation=this._accordion.animation,this._subscriptions.push(t.hidden.subscribe(()=>{this.animatingBodyCollapse=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),t.shown.subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id)}))}ngOnDestroy(){this._subscriptions.forEach(t=>t.unsubscribe())}toggle(){this.collapsed=!this.collapsed}expand(){this.collapsed=!1}collapse(){this.collapsed=!0}}ue.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ue,deps:[{token:(0,m.forwardRef)(()=>ge)},{token:m.ChangeDetectorRef}],target:m["ɵɵFactoryTarget"].Directive}),ue.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ue,isStandalone:!0,selector:"[ngbAccordionItem]",inputs:{id:["ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.accordion-item":"true",id:"id"}},queries:[{propertyName:"_collapse",first:!0,predicate:ce,descendants:!0,static:!0}],exportAs:["ngbAccordionItem"],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ue,decorators:[{type:m.Directive,args:[{selector:"[ngbAccordionItem]",exportAs:"ngbAccordionItem",standalone:!0,host:{"[class.accordion-item]":"true","[id]":"id"}}]}],ctorParameters:function(){return[{type:ge,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>ge)]}]},{type:m.ChangeDetectorRef}]},propDecorators:{_collapse:[{type:m.ContentChild,args:[ce,{static:!0}]}],id:[{type:m.Input,args:["ngbAccordionItem"]}],destroyOnHide:[{type:m.Input}],disabled:[{type:m.Input}],collapsed:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});class ge{constructor(t){this.destroyOnHide=!0,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=t.animation,this.closeOthers=t.closeOthers}toggle(t){var e;null===(e=this._getItem(t))||void 0===e||e.toggle()}expand(t){var e;null===(e=this._getItem(t))||void 0===e||e.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(t=>!t.collapsed)||this._items.first.expand():this._items.forEach(t=>t.expand()))}collapse(t){var e;null===(e=this._getItem(t))||void 0===e||e.collapse()}collapseAll(){var t;null===(t=this._items)||void 0===t||t.forEach(t=>t.collapse())}isExpanded(t){const e=this._getItem(t);return!!e&&!e.collapsed}_ensureCanExpand(t){var e;return!(this.closeOthers&&(this._items?(null===(e=this._items.find(e=>!e.collapsed&&t!==e))||void 0===e||e.collapse(),0):this._anItemWasAlreadyExpandedDuringInitialisation||(this._anItemWasAlreadyExpandedDuringInitialisation=!0,0)))}_getItem(t){var e;return null===(e=this._items)||void 0===e?void 0:e.find(e=>e.id===t)}}ge.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ge,deps:[{token:Gt}],target:m["ɵɵFactoryTarget"].Directive}),ge.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ge,isStandalone:!0,selector:"[ngbAccordion]",inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.accordion":"true"}},queries:[{propertyName:"_items",predicate:ue}],exportAs:["ngbAccordion"],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ge,decorators:[{type:m.Directive,args:[{selector:"[ngbAccordion]",standalone:!0,exportAs:"ngbAccordion",host:{"[class.accordion]":"true"}}]}],ctorParameters:function(){return[{type:Gt}]},propDecorators:{_items:[{type:m.ContentChildren,args:[ue,{descendants:!1}]}],animation:[{type:m.Input}],closeOthers:[{type:m.Input}],destroyOnHide:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});const me=[se,ee,Qt,te,Jt,ie,he,ge,ue,pe,de,le,ce];class fe{}fe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fe,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),fe.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:fe,imports:[se,ee,Qt,te,Jt,ie,he,ge,ue,pe,de,le,ce],exports:[se,ee,Qt,te,Jt,ie,he,ge,ue,pe,de,le,ce]}),fe.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fe,imports:[se]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fe,decorators:[{type:m.NgModule,args:[{imports:me,exports:me}]}]});const be=({classList:t})=>{t.remove("show")};class ye{constructor(t){this._ngbConfig=t,this.dismissible=!0,this.type="warning"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ye.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ye,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),ye.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ye,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ye,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});class ve{constructor(t,e,n,i){this._renderer=e,this._element=n,this._zone=i,this.closed=new m.EventEmitter,this.dismissible=t.dismissible,this.type=t.type,this.animation=t.animation}close(){const t=Yt(this._zone,this._element.nativeElement,be,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>this.closed.emit()),t}ngOnChanges(t){const e=t.type;e&&!e.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${e.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${e.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}ve.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ve,deps:[{token:ye},{token:m.Renderer2},{token:m.ElementRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),ve.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ve,isStandalone:!0,selector:"ngb-alert",inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},host:{attributes:{role:"alert"},properties:{"class.fade":"animation","class.alert-dismissible":"dismissible"},classAttribute:"alert show"},exportAs:["ngbAlert"],usesOnChanges:!0,ngImport:f,template:'\n\t\t<ng-content></ng-content>\n\t\t<button\n\t\t\t*ngIf="dismissible"\n\t\t\ttype="button"\n\t\t\tclass="btn-close"\n\t\t\taria-label="Close"\n\t\t\ti18n-aria-label="@@ngb.alert.close"\n\t\t\t(click)="close()"\n\t\t>\n\t\t</button>\n\t',isInline:!0,styles:["ngb-alert{display:block}\n"],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ve,decorators:[{type:m.Component,args:[{selector:"ngb-alert",exportAs:"ngbAlert",standalone:!0,imports:[b.NgIf],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{role:"alert",class:"alert show","[class.fade]":"animation","[class.alert-dismissible]":"dismissible"},template:'\n\t\t<ng-content></ng-content>\n\t\t<button\n\t\t\t*ngIf="dismissible"\n\t\t\ttype="button"\n\t\t\tclass="btn-close"\n\t\t\taria-label="Close"\n\t\t\ti18n-aria-label="@@ngb.alert.close"\n\t\t\t(click)="close()"\n\t\t>\n\t\t</button>\n\t',styles:["ngb-alert{display:block}\n"]}]}],ctorParameters:function(){return[{type:ye},{type:m.Renderer2},{type:m.ElementRef},{type:m.NgZone}]},propDecorators:{animation:[{type:m.Input}],dismissible:[{type:m.Input}],type:[{type:m.Input}],closed:[{type:m.Output}]}});class _e{}var xe;_e.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_e,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),_e.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:_e,imports:[ve],exports:[ve]}),_e.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_e,imports:[ve]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_e,decorators:[{type:m.NgModule,args:[{imports:[ve],exports:[ve]}]}]}),function(t){t.START="start",t.END="end"}(xe||(xe={}));const we=({classList:t})=>t.contains("carousel-item-start")||t.contains("carousel-item-end"),De=t=>{t.remove("carousel-item-start"),t.remove("carousel-item-end")},Ie=t=>{De(t),t.remove("carousel-item-prev"),t.remove("carousel-item-next")},ke=(t,e,{direction:n})=>{const{classList:i}=t;return e?(we(t)?De(i):(i.add("carousel-item-"+(n===xe.START?"next":"prev")),Bt(t),i.add("carousel-item-"+n)),()=>{Ie(i),i.add("active")}):(De(i),Ie(i),void i.add("active"))},Ce=(t,e,{direction:n})=>{const{classList:i}=t;return e?(we(t)?De(i):i.add("carousel-item-"+n),()=>{Ie(i),i.remove("active")}):(De(i),Ie(i),void i.remove("active"))};class Me{constructor(t){this._ngbConfig=t,this.interval=5e3,this.wrap=!0,this.keyboard=!0,this.pauseOnHover=!0,this.pauseOnFocus=!0,this.showNavigationArrows=!0,this.showNavigationIndicators=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Me.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Me,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),Me.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Me,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Me,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});let Se=0;class Te{constructor(t){this.tplRef=t,this.id="ngb-slide-"+Se++,this.slid=new m.EventEmitter}}Te.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Te,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),Te.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Te,isStandalone:!0,selector:"ng-template[ngbSlide]",inputs:{id:"id"},outputs:{slid:"slid"},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Te,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbSlide]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]},propDecorators:{id:[{type:m.Input}],slid:[{type:m.Output}]}});class Oe{constructor(t,e,n,i,s){this._platformId=e,this._ngZone=n,this._cd=i,this._container=s,this.NgbSlideEventSource=Ee,this._destroy$=new v.Subject,this._interval$=new v.BehaviorSubject(0),this._mouseHover$=new v.BehaviorSubject(!1),this._focused$=new v.BehaviorSubject(!1),this._pauseOnHover$=new v.BehaviorSubject(!1),this._pauseOnFocus$=new v.BehaviorSubject(!1),this._pause$=new v.BehaviorSubject(!1),this._wrap$=new v.BehaviorSubject(!1),this.slide=new m.EventEmitter,this.slid=new m.EventEmitter,this._transitionIds=null,this.animation=t.animation,this.interval=t.interval,this.wrap=t.wrap,this.keyboard=t.keyboard,this.pauseOnHover=t.pauseOnHover,this.pauseOnFocus=t.pauseOnFocus,this.showNavigationArrows=t.showNavigationArrows,this.showNavigationIndicators=t.showNavigationIndicators}set interval(t){this._interval$.next(t)}get interval(){return this._interval$.value}set wrap(t){this._wrap$.next(t)}get wrap(){return this._wrap$.value}set pauseOnHover(t){this._pauseOnHover$.next(t)}get pauseOnHover(){return this._pauseOnHover$.value}set pauseOnFocus(t){this._pauseOnFocus$.next(t)}get pauseOnFocus(){return this._pauseOnFocus$.value}set mouseHover(t){this._mouseHover$.next(t)}get mouseHover(){return this._mouseHover$.value}set focused(t){this._focused$.next(t)}get focused(){return this._focused$.value}arrowLeft(){this.focus(),this.prev(Ee.ARROW_LEFT)}arrowRight(){this.focus(),this.next(Ee.ARROW_RIGHT)}ngAfterContentInit(){(0,b.isPlatformBrowser)(this._platformId)&&this._ngZone.runOutsideAngular(()=>{const t=(0,v.combineLatest)([this.slide.pipe((0,_.map)(t=>t.current),(0,_.startWith)(this.activeId)),this._wrap$,this.slides.changes.pipe((0,_.startWith)(null))]).pipe((0,_.map)(([t,e])=>{const n=this.slides.toArray(),i=this._getSlideIdxById(t);return e?n.length>1:i<n.length-1}),(0,_.distinctUntilChanged)());(0,v.combineLatest)([this._pause$,this._pauseOnHover$,this._mouseHover$,this._pauseOnFocus$,this._focused$,this._interval$,t]).pipe((0,_.map)(([t,e,n,i,s,a,o])=>t||e&&n||i&&s||!o?0:a),(0,_.distinctUntilChanged)(),(0,_.switchMap)(t=>t>0?(0,v.timer)(t,t):v.NEVER),(0,_.takeUntil)(this._destroy$)).subscribe(()=>this._ngZone.run(()=>this.next(Ee.TIMER)))}),this.slides.changes.pipe((0,_.takeUntil)(this._destroy$)).subscribe(()=>{var t;null===(t=this._transitionIds)||void 0===t||t.forEach(t=>(t=>{var e;null===(e=qt.get(t))||void 0===e||e.complete()})(this._getSlideElement(t))),this._transitionIds=null,this._cd.markForCheck(),this._ngZone.onStable.pipe((0,_.take)(1)).subscribe(()=>{for(const{id:t}of this.slides){const e=this._getSlideElement(t);t===this.activeId?e.classList.add("active"):e.classList.remove("active")}})})}ngAfterContentChecked(){let t=this._getSlideById(this.activeId);this.activeId=t?t.id:this.slides.length?this.slides.first.id:""}ngAfterViewInit(){if(this.activeId){const t=this._getSlideElement(this.activeId);t&&t.classList.add("active")}}ngOnDestroy(){this._destroy$.next()}select(t,e){this._cycleToSelected(t,this._getSlideEventDirection(this.activeId,t),e)}prev(t){this._cycleToSelected(this._getPrevSlide(this.activeId),xe.END,t)}next(t){this._cycleToSelected(this._getNextSlide(this.activeId),xe.START,t)}pause(){this._pause$.next(!0)}cycle(){this._pause$.next(!1)}focus(){this._container.nativeElement.focus()}_cycleToSelected(t,e,n){const i=this._transitionIds;if(i&&(i[0]!==t||i[1]!==this.activeId))return;let s=this._getSlideById(t);if(s&&s.id!==this.activeId){this._transitionIds=[this.activeId,t],this.slide.emit({prev:this.activeId,current:s.id,direction:e,paused:this._pause$.value,source:n});const i={animation:this.animation,runningTransition:"stop",context:{direction:e}},a=[],o=this._getSlideById(this.activeId);if(o){const t=Yt(this._ngZone,this._getSlideElement(o.id),Ce,i);t.subscribe(()=>{o.slid.emit({isShown:!1,direction:e,source:n})}),a.push(t)}const r=this.activeId;this.activeId=s.id;const l=this._getSlideById(this.activeId),c=Yt(this._ngZone,this._getSlideElement(s.id),ke,i);c.subscribe(()=>{null==l||l.slid.emit({isShown:!0,direction:e,source:n})}),a.push(c),(0,v.zip)(...a).pipe((0,_.take)(1)).subscribe(()=>{this._transitionIds=null,this.slid.emit({prev:r,current:s.id,direction:e,paused:this._pause$.value,source:n})})}this._cd.markForCheck()}_getSlideEventDirection(t,e){return this._getSlideIdxById(t)>this._getSlideIdxById(e)?xe.END:xe.START}_getSlideById(t){return this.slides.find(e=>e.id===t)||null}_getSlideIdxById(t){const e=this._getSlideById(t);return null!=e?this.slides.toArray().indexOf(e):-1}_getNextSlide(t){const e=this.slides.toArray(),n=this._getSlideIdxById(t);return n===e.length-1?this.wrap?e[0].id:e[e.length-1].id:e[n+1].id}_getPrevSlide(t){const e=this.slides.toArray(),n=this._getSlideIdxById(t);return 0===n?this.wrap?e[e.length-1].id:e[0].id:e[n-1].id}_getSlideElement(t){return this._container.nativeElement.querySelector(`#slide-${t}`)}}var Ee,Re,Pe;Oe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Oe,deps:[{token:Me},{token:m.PLATFORM_ID},{token:m.NgZone},{token:m.ChangeDetectorRef},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Component}),Oe.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Oe,isStandalone:!0,selector:"ngb-carousel",inputs:{animation:"animation",activeId:"activeId",interval:"interval",wrap:"wrap",keyboard:"keyboard",pauseOnHover:"pauseOnHover",pauseOnFocus:"pauseOnFocus",showNavigationArrows:"showNavigationArrows",showNavigationIndicators:"showNavigationIndicators"},outputs:{slide:"slide",slid:"slid"},host:{attributes:{tabIndex:"0"},listeners:{"keydown.arrowLeft":"keyboard && arrowLeft()","keydown.arrowRight":"keyboard && arrowRight()",mouseenter:"mouseHover = true",mouseleave:"mouseHover = false",focusin:"focused = true",focusout:"focused = false"},properties:{"style.display":'"block"',"attr.aria-activedescendant":"'slide-' + activeId"},classAttribute:"carousel slide"},queries:[{propertyName:"slides",predicate:Te}],exportAs:["ngbCarousel"],ngImport:f,template:'\n\t\t<div class="carousel-indicators" [class.visually-hidden]="!showNavigationIndicators" role="tablist">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tdata-bs-target\n\t\t\t\t*ngFor="let slide of slides"\n\t\t\t\t[class.active]="slide.id === activeId"\n\t\t\t\trole="tab"\n\t\t\t\t[attr.aria-labelledby]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-controls]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-selected]="slide.id === activeId"\n\t\t\t\t(click)="focus(); select(slide.id, NgbSlideEventSource.INDICATOR)"\n\t\t\t></button>\n\t\t</div>\n\t\t<div class="carousel-inner">\n\t\t\t<div\n\t\t\t\t*ngFor="let slide of slides; index as i; count as c"\n\t\t\t\tclass="carousel-item"\n\t\t\t\t[id]="\'slide-\' + slide.id"\n\t\t\t\trole="tabpanel"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclass="visually-hidden"\n\t\t\t\t\ti18n="Currently selected slide number read by screen reader@@ngb.carousel.slide-number"\n\t\t\t\t>\n\t\t\t\t\tSlide {{ i + 1 }} of {{ c }}\n\t\t\t\t</span>\n\t\t\t\t<ng-template [ngTemplateOutlet]="slide.tplRef"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t\t<button class="carousel-control-prev" type="button" (click)="arrowLeft()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-prev-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.previous">Previous</span>\n\t\t</button>\n\t\t<button class="carousel-control-next" type="button" (click)="arrowRight()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-next-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.next">Next</span>\n\t\t</button>\n\t',isInline:!0,dependencies:[{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Oe,decorators:[{type:m.Component,args:[{selector:"ngb-carousel",exportAs:"ngbCarousel",standalone:!0,imports:[b.NgFor,b.NgTemplateOutlet,b.NgIf],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{class:"carousel slide","[style.display]":'"block"',tabIndex:"0","(keydown.arrowLeft)":"keyboard && arrowLeft()","(keydown.arrowRight)":"keyboard && arrowRight()","(mouseenter)":"mouseHover = true","(mouseleave)":"mouseHover = false","(focusin)":"focused = true","(focusout)":"focused = false","[attr.aria-activedescendant]":"'slide-' + activeId"},template:'\n\t\t<div class="carousel-indicators" [class.visually-hidden]="!showNavigationIndicators" role="tablist">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tdata-bs-target\n\t\t\t\t*ngFor="let slide of slides"\n\t\t\t\t[class.active]="slide.id === activeId"\n\t\t\t\trole="tab"\n\t\t\t\t[attr.aria-labelledby]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-controls]="\'slide-\' + slide.id"\n\t\t\t\t[attr.aria-selected]="slide.id === activeId"\n\t\t\t\t(click)="focus(); select(slide.id, NgbSlideEventSource.INDICATOR)"\n\t\t\t></button>\n\t\t</div>\n\t\t<div class="carousel-inner">\n\t\t\t<div\n\t\t\t\t*ngFor="let slide of slides; index as i; count as c"\n\t\t\t\tclass="carousel-item"\n\t\t\t\t[id]="\'slide-\' + slide.id"\n\t\t\t\trole="tabpanel"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclass="visually-hidden"\n\t\t\t\t\ti18n="Currently selected slide number read by screen reader@@ngb.carousel.slide-number"\n\t\t\t\t>\n\t\t\t\t\tSlide {{ i + 1 }} of {{ c }}\n\t\t\t\t</span>\n\t\t\t\t<ng-template [ngTemplateOutlet]="slide.tplRef"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t\t<button class="carousel-control-prev" type="button" (click)="arrowLeft()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-prev-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.previous">Previous</span>\n\t\t</button>\n\t\t<button class="carousel-control-next" type="button" (click)="arrowRight()" *ngIf="showNavigationArrows">\n\t\t\t<span class="carousel-control-next-icon" aria-hidden="true"></span>\n\t\t\t<span class="visually-hidden" i18n="@@ngb.carousel.next">Next</span>\n\t\t</button>\n\t'}]}],ctorParameters:function(){return[{type:Me},{type:void 0,decorators:[{type:m.Inject,args:[m.PLATFORM_ID]}]},{type:m.NgZone},{type:m.ChangeDetectorRef},{type:m.ElementRef}]},propDecorators:{slides:[{type:m.ContentChildren,args:[Te]}],animation:[{type:m.Input}],activeId:[{type:m.Input}],interval:[{type:m.Input}],wrap:[{type:m.Input}],keyboard:[{type:m.Input}],pauseOnHover:[{type:m.Input}],pauseOnFocus:[{type:m.Input}],showNavigationArrows:[{type:m.Input}],showNavigationIndicators:[{type:m.Input}],slide:[{type:m.Output}],slid:[{type:m.Output}]}}),function(t){t.TIMER="timer",t.ARROW_LEFT="arrowLeft",t.ARROW_RIGHT="arrowRight",t.INDICATOR="indicator"}(Ee||(Ee={}));class Fe{}Fe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fe,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Fe.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Fe,imports:[Oe,Te],exports:[Oe,Te]}),Fe.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fe,imports:[Oe]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fe,decorators:[{type:m.NgModule,args:[{imports:[Oe,Te],exports:[Oe,Te]}]}]});class Ve{}Ve.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ve,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Ve.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Ve,imports:[oe],exports:[oe]}),Ve.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ve}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ve,decorators:[{type:m.NgModule,args:[{imports:[oe],exports:[oe]}]}]});class Ae{constructor(t,e,n){this.year=At(t)?t:null,this.month=At(e)?e:null,this.day=At(n)?n:null}static from(t){return t instanceof Ae?t:t?new Ae(t.year,t.month,t.day):null}equals(t){return null!=t&&this.year===t.year&&this.month===t.month&&this.day===t.day}before(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day<t.day:this.month<t.month:this.year<t.year)}after(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day>t.day:this.month>t.month:this.year>t.year)}}function Ne(t,e){return!function(t,e){return!t&&!e||!!t&&!!e&&t.equals(e)}(t,e)}function je(t,e){return!(!t&&!e||t&&e&&t.year===e.year&&t.month===e.month)}function Le(t,e,n){return t&&e&&t.before(e)?e:t&&n&&t.after(n)?n:t||null}function ze(t,e){const{minDate:n,maxDate:i,disabled:s,markDisabled:a}=e;return!(null==t||s||a&&a(t,{year:t.year,month:t.month})||n&&t.before(n)||i&&t.after(i))}function Be(t){return new Ae(t.getFullYear(),t.getMonth()+1,t.getDate())}function $e(t){const e=new Date(t.year,t.month-1,t.day,12);return isNaN(e.getTime())||e.setFullYear(t.year),e}function He(){return new Ue}class We{}We.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:We,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),We.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:We,providedIn:"root",useFactory:He}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:We,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:He}]}]});class Ue extends We{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){let i=$e(t),s=!0,a=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":a+=n,i.setMonth(a),a%=12,a<0&&(a+=12);break;case"d":i.setDate(i.getDate()+n),s=!1;break;default:return t}return s&&i.getMonth()!==a&&i.setDate(0),Be(i)}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){let e=$e(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=$e(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}getToday(){return Be(new Date)}isValid(t){if(!(t&&At(t.year)&&At(t.month)&&At(t.day)))return!1;if(0===t.year)return!1;const e=$e(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year&&e.getMonth()+1===t.month&&e.getDate()===t.day}}function qe(t){return new Ze(t)}Ue.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ue,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Ue.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ue}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ue,decorators:[{type:m.Injectable}]});class Ye{getMonthLabel(t){return`${this.getMonthFullName(t.month,t.year)} ${this.getYearNumerals(t.year)}`}getDayNumerals(t){return`${t.day}`}getWeekNumerals(t){return`${t}`}getYearNumerals(t){return`${t}`}getWeekLabel(){return""}}Ye.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ye,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Ye.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ye,providedIn:"root",useFactory:qe,deps:[{token:m.LOCALE_ID}]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ye,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:qe,deps:[m.LOCALE_ID]}]}]});class Ze extends Ye{constructor(t){super(),this._locale=t,this._monthsShort=(0,b.getLocaleMonthNames)(t,b.FormStyle.Standalone,b.TranslationWidth.Abbreviated),this._monthsFull=(0,b.getLocaleMonthNames)(t,b.FormStyle.Standalone,b.TranslationWidth.Wide)}getWeekdayLabel(t,e){const n=(0,b.getLocaleDayNames)(this._locale,b.FormStyle.Standalone,void 0===e?b.TranslationWidth.Short:e),i=n.map((t,e)=>n[(e+1)%7]);return i[t-1]||""}getMonthShortName(t){return this._monthsShort[t-1]||""}getMonthFullName(t){return this._monthsFull[t-1]||""}getDayAriaLabel(t){const e=new Date(t.year,t.month-1,t.day);return(0,b.formatDate)(e,"fullDate",this._locale)}}Ze.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ze,deps:[{token:m.LOCALE_ID}],target:m["ɵɵFactoryTarget"].Injectable}),Ze.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ze}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ze,decorators:[{type:m.Injectable}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[m.LOCALE_ID]}]}]}});class Ke{constructor(t,e){this._calendar=t,this._i18n=e,this._VALIDATORS={dayTemplateData:t=>{if(this._state.dayTemplateData!==t)return{dayTemplateData:t}},displayMonths:t=>{if(At(t=Et(t))&&t>0&&this._state.displayMonths!==t)return{displayMonths:t}},disabled:t=>{if(this._state.disabled!==t)return{disabled:t}},firstDayOfWeek:t=>{if(At(t=Et(t))&&t>=0&&this._state.firstDayOfWeek!==t)return{firstDayOfWeek:t}},focusVisible:t=>{if(this._state.focusVisible!==t&&!this._state.disabled)return{focusVisible:t}},markDisabled:t=>{if(this._state.markDisabled!==t)return{markDisabled:t}},maxDate:t=>{const e=this.toValidDate(t,null);if(Ne(this._state.maxDate,e))return{maxDate:e}},minDate:t=>{const e=this.toValidDate(t,null);if(Ne(this._state.minDate,e))return{minDate:e}},navigation:t=>{if(this._state.navigation!==t)return{navigation:t}},outsideDays:t=>{if(this._state.outsideDays!==t)return{outsideDays:t}},weekdays:t=>{const e=!0===t||!1===t?b.TranslationWidth.Short:t,n=!0!==t&&!1!==t||t;if(this._state.weekdayWidth!==e||this._state.weekdaysVisible!==n)return{weekdayWidth:e,weekdaysVisible:n}}},this._model$=new v.Subject,this._dateSelect$=new v.Subject,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:b.TranslationWidth.Short,weekdaysVisible:!0}}get model$(){return this._model$.pipe((0,_.filter)(t=>t.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe((0,_.filter)(t=>null!==t))}set(t){let e=Object.keys(t).map(e=>this._VALIDATORS[e](t[e])).reduce((t,e)=>Object.assign(Object.assign({},t),e),{});Object.keys(e).length>0&&this._nextState(e)}focus(t){const e=this.toValidDate(t,null);null!=e&&!this._state.disabled&&Ne(this._state.focusDate,e)&&this._nextState({focusDate:t})}focusSelect(){ze(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(t){const e=this.toValidDate(t,this._calendar.getToday());null==e||this._state.disabled||this._state.firstDate&&!je(this._state.firstDate,e)||this._nextState({firstDate:e})}select(t,e={}){const n=this.toValidDate(t,null);null==n||this._state.disabled||(Ne(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),e.emitEvent&&ze(n,this._state)&&this._dateSelect$.next(n))}toValidDate(t,e){const n=Ae.from(t);return void 0===e&&(e=this._calendar.getToday()),this._calendar.isValid(n)?n:e}getMonth(t){for(let e of this._state.months)if(t.month===e.number&&t.year===e.year)return e;throw new Error(`month ${t.month} of year ${t.year} not found`)}_nextState(t){const e=this._updateState(t);this._patchContexts(e),this._state=e,this._model$.next(this._state)}_patchContexts(t){const{months:e,displayMonths:n,selectedDate:i,focusDate:s,focusVisible:a,disabled:o,outsideDays:r}=t;t.months.forEach(t=>{t.weeks.forEach(l=>{l.days.forEach(l=>{s&&(l.context.focused=s.equals(l.date)&&a),l.tabindex=!o&&s&&l.date.equals(s)&&s.month===t.number?0:-1,!0===o&&(l.context.disabled=!0),void 0!==i&&(l.context.selected=null!==i&&i.equals(l.date)),t.number!==l.date.month&&(l.hidden="hidden"===r||"collapsed"===r||n>1&&l.date.after(e[0].firstDate)&&l.date.before(e[n-1].lastDate))})})})}_updateState(t){const e=Object.assign({},this._state,t);let n=e.firstDate;if(("minDate"in t||"maxDate"in t)&&(function(t,e){if(e&&t&&e.before(t))throw new Error(`'maxDate' ${e} should be greater than 'minDate' ${t}`)}(e.minDate,e.maxDate),e.focusDate=Le(e.focusDate,e.minDate,e.maxDate),e.firstDate=Le(e.firstDate,e.minDate,e.maxDate),n=e.focusDate),"disabled"in t&&(e.focusVisible=!1),"selectedDate"in t&&0===this._state.months.length&&(n=e.selectedDate),"focusVisible"in t)return e;if("focusDate"in t&&(e.focusDate=Le(e.focusDate,e.minDate,e.maxDate),n=e.focusDate,0!==e.months.length&&e.focusDate&&!e.focusDate.before(e.firstDate)&&!e.focusDate.after(e.lastDate)))return e;if("firstDate"in t&&(e.firstDate=Le(e.firstDate,e.minDate,e.maxDate),n=e.firstDate),n){const i="dayTemplateData"in t||"firstDayOfWeek"in t||"markDisabled"in t||"minDate"in t||"maxDate"in t||"disabled"in t||"outsideDays"in t||"weekdaysVisible"in t,s=function(t,e,n,i,s){const{displayMonths:a,months:o}=n,r=o.splice(0,o.length);return Array.from({length:a},(n,i)=>{const a=Object.assign(t.getNext(e,"m",i),{day:1});if(o[i]=null,!s){const t=r.findIndex(t=>t.firstDate.equals(a));-1!==t&&(o[i]=r.splice(t,1)[0])}return a}).forEach((e,s)=>{null===o[s]&&(o[s]=function(t,e,n,i,s={}){const{dayTemplateData:a,minDate:o,maxDate:r,firstDayOfWeek:l,markDisabled:c,outsideDays:d,weekdayWidth:h,weekdaysVisible:p}=n,u=t.getToday();s.firstDate=null,s.lastDate=null,s.number=e.month,s.year=e.year,s.weeks=s.weeks||[],s.weekdays=s.weekdays||[],e=function(t,e,n){const i=t.getDaysPerWeek(),s=new Ae(e.year,e.month,1),a=t.getWeekday(s)%i;return t.getPrev(s,"d",(i+a-n)%i)}(t,e,l),p||(s.weekdays.length=0);for(let n=0;n<t.getWeeksPerMonth();n++){let g=s.weeks[n];g||(g=s.weeks[n]={number:0,days:[],collapsed:!0});const m=g.days;for(let l=0;l<t.getDaysPerWeek();l++){0===n&&p&&(s.weekdays[l]=i.getWeekdayLabel(t.getWeekday(e),h));const d=new Ae(e.year,e.month,e.day),g=t.getNext(d),f=i.getDayAriaLabel(d);let b=!!(o&&d.before(o)||r&&d.after(r));!b&&c&&(b=c(d,{month:s.number,year:s.year}));let y=d.equals(u),v=a?a(d,{month:s.number,year:s.year}):void 0;null===s.firstDate&&d.month===s.number&&(s.firstDate=d),d.month===s.number&&g.month!==s.number&&(s.lastDate=d);let _=m[l];_||(_=m[l]={}),_.date=d,_.context=Object.assign(_.context||{},{$implicit:d,date:d,data:v,currentMonth:s.number,currentYear:s.year,disabled:b,focused:!1,selected:!1,today:y}),_.tabindex=-1,_.ariaLabel=f,_.hidden=!1,e=g}g.number=t.getWeekNumber(m.map(t=>t.date),l),g.collapsed="collapsed"===d&&m[0].date.month!==s.number&&m[m.length-1].date.month!==s.number}return s}(t,e,n,i,r.shift()||{}))}),o}(this._calendar,n,e,this._i18n,i);e.months=s,e.firstDate=s[0].firstDate,e.lastDate=s[s.length-1].lastDate,"selectedDate"in t&&!ze(e.selectedDate,e)&&(e.selectedDate=null),"firstDate"in t&&(!e.focusDate||e.focusDate.before(e.firstDate)||e.focusDate.after(e.lastDate))&&(e.focusDate=n);const a=!this._state.firstDate||this._state.firstDate.year!==e.firstDate.year,o=!this._state.firstDate||this._state.firstDate.month!==e.firstDate.month;"select"===e.navigation?(("minDate"in t||"maxDate"in t||0===e.selectBoxes.years.length||a)&&(e.selectBoxes.years=function(t,e,n){if(!t)return[];const i=e?Math.max(e.year,t.year-500):t.year-10,s=(n?Math.min(n.year,t.year+500):t.year+10)-i+1,a=Array(s);for(let t=0;t<s;t++)a[t]=i+t;return a}(e.firstDate,e.minDate,e.maxDate)),("minDate"in t||"maxDate"in t||0===e.selectBoxes.months.length||a)&&(e.selectBoxes.months=function(t,e,n,i){if(!e)return[];let s=t.getMonths(e.year);if(n&&e.year===n.year){const t=s.findIndex(t=>t===n.month);s=s.slice(t)}if(i&&e.year===i.year){const t=s.findIndex(t=>t===i.month);s=s.slice(0,t+1)}return s}(this._calendar,e.firstDate,e.minDate,e.maxDate))):e.selectBoxes={years:[],months:[]},"arrows"!==e.navigation&&"select"!==e.navigation||!(o||a||"minDate"in t||"maxDate"in t||"disabled"in t)||(e.prevDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getPrev(e,"m"),{day:1});return null!=n&&(i.year===n.year&&i.month<n.month||i.year<n.year&&1===n.month)}(this._calendar,e.firstDate,e.minDate),e.nextDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getNext(e,"m"),{day:1});return null!=n&&i.after(n)}(this._calendar,e.lastDate,e.maxDate))}return e}}Ke.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ke,deps:[{token:We},{token:Ye}],target:m["ɵɵFactoryTarget"].Injectable}),Ke.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ke}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ke,decorators:[{type:m.Injectable}],ctorParameters:function(){return[{type:We},{type:Ye}]}}),function(t){t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT"}(Re||(Re={}));class Ge{constructor(t){this.i18n=t}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}}Ge.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ge,deps:[{token:Ye}],target:m["ɵɵFactoryTarget"].Component}),Ge.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Ge,isStandalone:!0,selector:"[ngbDatepickerDayView]",inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},host:{properties:{"class.bg-primary":"selected","class.text-white":"selected","class.text-muted":"isMuted()","class.outside":"isMuted()","class.active":"focused"},classAttribute:"btn-light"},ngImport:f,template:"{{ i18n.getDayNumerals(date) }}",isInline:!0,styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ge,decorators:[{type:m.Component,args:[{selector:"[ngbDatepickerDayView]",standalone:!0,changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{class:"btn-light","[class.bg-primary]":"selected","[class.text-white]":"selected","[class.text-muted]":"isMuted()","[class.outside]":"isMuted()","[class.active]":"focused"},template:"{{ i18n.getDayNumerals(date) }}",styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"]}]}],ctorParameters:function(){return[{type:Ye}]},propDecorators:{currentMonth:[{type:m.Input}],date:[{type:m.Input}],disabled:[{type:m.Input}],focused:[{type:m.Input}],selected:[{type:m.Input}]}});class Xe{constructor(t,e){this.i18n=t,this._renderer=e,this.select=new m.EventEmitter,this._month=-1,this._year=-1}changeMonth(t){this.select.emit(new Ae(this.date.year,Et(t),1))}changeYear(t){this.select.emit(new Ae(Et(t),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}}Xe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xe,deps:[{token:Ye},{token:m.Renderer2}],target:m["ɵɵFactoryTarget"].Component}),Xe.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Xe,isStandalone:!0,selector:"ngb-datepicker-navigation-select",inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},viewQueries:[{propertyName:"monthSelect",first:!0,predicate:["month"],descendants:!0,read:m.ElementRef,static:!0},{propertyName:"yearSelect",first:!0,predicate:["year"],descendants:!0,read:m.ElementRef,static:!0}],ngImport:f,template:'\n\t\t<select\n\t\t\t#month\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-month"\n\t\t\taria-label="Select month"\n\t\t\ti18n-title="@@ngb.datepicker.select-month"\n\t\t\ttitle="Select month"\n\t\t\t(change)="changeMonth($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let m of months" [attr.aria-label]="i18n.getMonthFullName(m, date.year)" [value]="m">{{\n\t\t\t\ti18n.getMonthShortName(m, date.year)\n\t\t\t}}</option> </select\n\t\t><select\n\t\t\t#year\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-year"\n\t\t\taria-label="Select year"\n\t\t\ti18n-title="@@ngb.datepicker.select-year"\n\t\t\ttitle="Select year"\n\t\t\t(change)="changeYear($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let y of years" [value]="y">{{ i18n.getYearNumerals(y) }}</option>\n\t\t</select>\n\t',isInline:!0,styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"],dependencies:[{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xe,decorators:[{type:m.Component,args:[{selector:"ngb-datepicker-navigation-select",standalone:!0,imports:[b.NgFor],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,template:'\n\t\t<select\n\t\t\t#month\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-month"\n\t\t\taria-label="Select month"\n\t\t\ti18n-title="@@ngb.datepicker.select-month"\n\t\t\ttitle="Select month"\n\t\t\t(change)="changeMonth($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let m of months" [attr.aria-label]="i18n.getMonthFullName(m, date.year)" [value]="m">{{\n\t\t\t\ti18n.getMonthShortName(m, date.year)\n\t\t\t}}</option> </select\n\t\t><select\n\t\t\t#year\n\t\t\t[disabled]="disabled"\n\t\t\tclass="form-select"\n\t\t\ti18n-aria-label="@@ngb.datepicker.select-year"\n\t\t\taria-label="Select year"\n\t\t\ti18n-title="@@ngb.datepicker.select-year"\n\t\t\ttitle="Select year"\n\t\t\t(change)="changeYear($any($event).target.value)"\n\t\t>\n\t\t\t<option *ngFor="let y of years" [value]="y">{{ i18n.getYearNumerals(y) }}</option>\n\t\t</select>\n\t',styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"]}]}],ctorParameters:function(){return[{type:Ye},{type:m.Renderer2}]},propDecorators:{date:[{type:m.Input}],disabled:[{type:m.Input}],months:[{type:m.Input}],years:[{type:m.Input}],select:[{type:m.Output}],monthSelect:[{type:m.ViewChild,args:["month",{static:!0,read:m.ElementRef}]}],yearSelect:[{type:m.ViewChild,args:["year",{static:!0,read:m.ElementRef}]}]}});class Je{constructor(t){this.i18n=t,this.navigation=Re,this.months=[],this.navigate=new m.EventEmitter,this.select=new m.EventEmitter}onClickPrev(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}}Je.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Je,deps:[{token:Ye}],target:m["ɵɵFactoryTarget"].Component}),Je.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Je,isStandalone:!0,selector:"ngb-datepicker-navigation",inputs:{date:"date",disabled:"disabled",months:"months",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},ngImport:f,template:'\n\t\t<div class="ngb-dp-arrow">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickPrev($event)"\n\t\t\t\t[disabled]="prevDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.previous-month"\n\t\t\t\taria-label="Previous month"\n\t\t\t\ti18n-title="@@ngb.datepicker.previous-month"\n\t\t\t\ttitle="Previous month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t\t<ngb-datepicker-navigation-select\n\t\t\t*ngIf="showSelect"\n\t\t\tclass="ngb-dp-navigation-select"\n\t\t\t[date]="date"\n\t\t\t[disabled]="disabled"\n\t\t\t[months]="selectBoxes.months"\n\t\t\t[years]="selectBoxes.years"\n\t\t\t(select)="select.emit($event)"\n\t\t>\n\t\t</ngb-datepicker-navigation-select>\n\n\t\t<ng-template *ngIf="!showSelect" ngFor let-month [ngForOf]="months" let-i="index">\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i > 0"></div>\n\t\t\t<div class="ngb-dp-month-name">\n\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t</div>\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i !== months.length - 1"></div>\n\t\t</ng-template>\n\t\t<div class="ngb-dp-arrow right">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickNext($event)"\n\t\t\t\t[disabled]="nextDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.next-month"\n\t\t\t\taria-label="Next month"\n\t\t\t\ti18n-title="@@ngb.datepicker.next-month"\n\t\t\t\ttitle="Next month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t',isInline:!0,styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"component",type:Xe,selector:"ngb-datepicker-navigation-select",inputs:["date","disabled","months","years"],outputs:["select"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Je,decorators:[{type:m.Component,args:[{selector:"ngb-datepicker-navigation",standalone:!0,imports:[b.NgIf,b.NgFor,Xe],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,template:'\n\t\t<div class="ngb-dp-arrow">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickPrev($event)"\n\t\t\t\t[disabled]="prevDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.previous-month"\n\t\t\t\taria-label="Previous month"\n\t\t\t\ti18n-title="@@ngb.datepicker.previous-month"\n\t\t\t\ttitle="Previous month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t\t<ngb-datepicker-navigation-select\n\t\t\t*ngIf="showSelect"\n\t\t\tclass="ngb-dp-navigation-select"\n\t\t\t[date]="date"\n\t\t\t[disabled]="disabled"\n\t\t\t[months]="selectBoxes.months"\n\t\t\t[years]="selectBoxes.years"\n\t\t\t(select)="select.emit($event)"\n\t\t>\n\t\t</ngb-datepicker-navigation-select>\n\n\t\t<ng-template *ngIf="!showSelect" ngFor let-month [ngForOf]="months" let-i="index">\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i > 0"></div>\n\t\t\t<div class="ngb-dp-month-name">\n\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t</div>\n\t\t\t<div class="ngb-dp-arrow" *ngIf="i !== months.length - 1"></div>\n\t\t</ng-template>\n\t\t<div class="ngb-dp-arrow right">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="btn btn-link ngb-dp-arrow-btn"\n\t\t\t\t(click)="onClickNext($event)"\n\t\t\t\t[disabled]="nextDisabled"\n\t\t\t\ti18n-aria-label="@@ngb.datepicker.next-month"\n\t\t\t\taria-label="Next month"\n\t\t\t\ti18n-title="@@ngb.datepicker.next-month"\n\t\t\t\ttitle="Next month"\n\t\t\t>\n\t\t\t\t<span class="ngb-dp-navigation-chevron"></span>\n\t\t\t</button>\n\t\t</div>\n\t',styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"]}]}],ctorParameters:function(){return[{type:Ye}]},propDecorators:{date:[{type:m.Input}],disabled:[{type:m.Input}],months:[{type:m.Input}],showSelect:[{type:m.Input}],prevDisabled:[{type:m.Input}],nextDisabled:[{type:m.Input}],selectBoxes:[{type:m.Input}],navigate:[{type:m.Output}],select:[{type:m.Output}]}}),function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(Pe||(Pe={}));class Qe{processKey(t,e){const{state:n,calendar:i}=e;switch(t.which){case Pe.PageUp:e.focusDate(i.getPrev(n.focusedDate,t.shiftKey?"y":"m",1));break;case Pe.PageDown:e.focusDate(i.getNext(n.focusedDate,t.shiftKey?"y":"m",1));break;case Pe.End:e.focusDate(t.shiftKey?n.maxDate:n.lastDate);break;case Pe.Home:e.focusDate(t.shiftKey?n.minDate:n.firstDate);break;case Pe.ArrowLeft:e.focusDate(i.getPrev(n.focusedDate,"d",1));break;case Pe.ArrowUp:e.focusDate(i.getPrev(n.focusedDate,"d",i.getDaysPerWeek()));break;case Pe.ArrowRight:e.focusDate(i.getNext(n.focusedDate,"d",1));break;case Pe.ArrowDown:e.focusDate(i.getNext(n.focusedDate,"d",i.getDaysPerWeek()));break;case Pe.Enter:case Pe.Space:e.focusSelect();break;default:return}t.preventDefault(),t.stopPropagation()}}Qe.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qe,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Qe.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qe,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qe,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class tn{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays=b.TranslationWidth.Short}}function en(){return new sn}tn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:tn,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),tn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:tn,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:tn,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class nn{}nn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:nn,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),nn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:nn,providedIn:"root",useFactory:en}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:nn,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:en}]}]});class sn extends nn{fromModel(t){return t&&At(t.year)&&At(t.month)&&At(t.day)?{year:t.year,month:t.month,day:t.day}:null}toModel(t){return t&&At(t.year)&&At(t.month)&&At(t.day)?{year:t.year,month:t.month,day:t.day}:null}}sn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:sn,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),sn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:sn}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:sn,decorators:[{type:m.Injectable}]});class an{constructor(t){this.templateRef=t}}an.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:an,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),an.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:an,isStandalone:!0,selector:"ng-template[ngbDatepickerContent]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:an,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbDatepickerContent]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class on{constructor(t,e,n,i){this.i18n=t,this.datepicker=e,this._keyboardService=n,this._service=i}set month(t){this.viewModel=this._service.getMonth(t)}onKeyDown(t){this._keyboardService.processKey(t,this.datepicker)}doSelect(t){t.context.disabled||t.hidden||this.datepicker.onDateSelect(t.date)}}on.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:on,deps:[{token:Ye},{token:(0,m.forwardRef)(()=>rn)},{token:Qe},{token:Ke}],target:m["ɵɵFactoryTarget"].Component}),on.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:on,isStandalone:!0,selector:"ngb-datepicker-month",inputs:{month:"month"},host:{attributes:{role:"grid"},listeners:{keydown:"onKeyDown($event)"}},ngImport:f,template:'\n\t\t<div *ngIf="viewModel.weekdays.length > 0" class="ngb-dp-week ngb-dp-weekdays" role="row">\n\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-weekday ngb-dp-showweek small">{{\n\t\t\t\ti18n.getWeekLabel()\n\t\t\t}}</div>\n\t\t\t<div *ngFor="let weekday of viewModel.weekdays" class="ngb-dp-weekday small" role="columnheader">{{\n\t\t\t\tweekday\n\t\t\t}}</div>\n\t\t</div>\n\t\t<ng-template ngFor let-week [ngForOf]="viewModel.weeks">\n\t\t\t<div *ngIf="!week.collapsed" class="ngb-dp-week" role="row">\n\t\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-week-number small text-muted">{{\n\t\t\t\t\ti18n.getWeekNumerals(week.number)\n\t\t\t\t}}</div>\n\t\t\t\t<div\n\t\t\t\t\t*ngFor="let day of week.days"\n\t\t\t\t\t(click)="doSelect(day); $event.preventDefault()"\n\t\t\t\t\tclass="ngb-dp-day"\n\t\t\t\t\trole="gridcell"\n\t\t\t\t\t[class.disabled]="day.context.disabled"\n\t\t\t\t\t[tabindex]="day.tabindex"\n\t\t\t\t\t[class.hidden]="day.hidden"\n\t\t\t\t\t[class.ngb-dp-today]="day.context.today"\n\t\t\t\t\t[attr.aria-label]="day.ariaLabel"\n\t\t\t\t>\n\t\t\t\t\t<ng-template [ngIf]="!day.hidden">\n\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t[ngTemplateOutlet]="datepicker.dayTemplate"\n\t\t\t\t\t\t\t[ngTemplateOutletContext]="day.context"\n\t\t\t\t\t\t></ng-template>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n'],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:on,decorators:[{type:m.Component,args:[{selector:"ngb-datepicker-month",standalone:!0,imports:[b.NgIf,b.NgFor,b.NgTemplateOutlet],host:{role:"grid","(keydown)":"onKeyDown($event)"},encapsulation:m.ViewEncapsulation.None,template:'\n\t\t<div *ngIf="viewModel.weekdays.length > 0" class="ngb-dp-week ngb-dp-weekdays" role="row">\n\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-weekday ngb-dp-showweek small">{{\n\t\t\t\ti18n.getWeekLabel()\n\t\t\t}}</div>\n\t\t\t<div *ngFor="let weekday of viewModel.weekdays" class="ngb-dp-weekday small" role="columnheader">{{\n\t\t\t\tweekday\n\t\t\t}}</div>\n\t\t</div>\n\t\t<ng-template ngFor let-week [ngForOf]="viewModel.weeks">\n\t\t\t<div *ngIf="!week.collapsed" class="ngb-dp-week" role="row">\n\t\t\t\t<div *ngIf="datepicker.showWeekNumbers" class="ngb-dp-week-number small text-muted">{{\n\t\t\t\t\ti18n.getWeekNumerals(week.number)\n\t\t\t\t}}</div>\n\t\t\t\t<div\n\t\t\t\t\t*ngFor="let day of week.days"\n\t\t\t\t\t(click)="doSelect(day); $event.preventDefault()"\n\t\t\t\t\tclass="ngb-dp-day"\n\t\t\t\t\trole="gridcell"\n\t\t\t\t\t[class.disabled]="day.context.disabled"\n\t\t\t\t\t[tabindex]="day.tabindex"\n\t\t\t\t\t[class.hidden]="day.hidden"\n\t\t\t\t\t[class.ngb-dp-today]="day.context.today"\n\t\t\t\t\t[attr.aria-label]="day.ariaLabel"\n\t\t\t\t>\n\t\t\t\t\t<ng-template [ngIf]="!day.hidden">\n\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t[ngTemplateOutlet]="datepicker.dayTemplate"\n\t\t\t\t\t\t\t[ngTemplateOutletContext]="day.context"\n\t\t\t\t\t\t></ng-template>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t',styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n']}]}],ctorParameters:function(){return[{type:Ye},{type:rn,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>rn)]}]},{type:Qe},{type:Ke}]},propDecorators:{month:[{type:m.Input}]}});class rn{constructor(t,e,n,i,s,a,o,r){this._service=t,this._calendar=e,this._i18n=n,this._elementRef=a,this._ngbDateAdapter=o,this._ngZone=r,this.injector=(0,m.inject)(m.Injector),this._controlValue=null,this._destroyed$=new v.Subject,this._publicState={},this.navigate=new m.EventEmitter,this.dateSelect=new m.EventEmitter,this.onChange=t=>{},this.onTouched=()=>{},["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekNumbers","startDate","weekdays"].forEach(t=>this[t]=i[t]),t.dateSelect$.pipe((0,_.takeUntil)(this._destroyed$)).subscribe(t=>{this.dateSelect.emit(t)}),t.model$.pipe((0,_.takeUntil)(this._destroyed$)).subscribe(t=>{const e=t.firstDate,n=this.model?this.model.firstDate:null;this._publicState={maxDate:t.maxDate,minDate:t.minDate,firstDate:t.firstDate,lastDate:t.lastDate,focusedDate:t.focusDate,months:t.months.map(t=>t.firstDate)};let i=!1;if(!e.equals(n)&&(this.navigate.emit({current:n?{year:n.year,month:n.month}:null,next:{year:e.year,month:e.month},preventDefault:()=>i=!0}),i&&null!==n))return void this._service.open(n);const a=t.selectedDate,o=t.focusDate,r=this.model?this.model.focusDate:null;this.model=t,Ne(a,this._controlValue)&&(this._controlValue=a,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(a))),Ne(o,r)&&r&&t.focusVisible&&this.focus(),s.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}get i18n(){return this._i18n}focusDate(t){this._service.focus(Ae.from(t))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{const t=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');t&&t.focus()})}navigateTo(t){this._service.open(Ae.from(t?t.day?t:Object.assign(Object.assign({},t),{day:1}):null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const t=(0,v.fromEvent)(this._contentEl.nativeElement,"focusin"),e=(0,v.fromEvent)(this._contentEl.nativeElement,"focusout"),{nativeElement:n}=this._elementRef;(0,v.merge)(t,e).pipe((0,_.filter)(({target:t,relatedTarget:e})=>!(zt(t,"ngb-dp-day")&&zt(e,"ngb-dp-day")&&n.contains(t)&&n.contains(e))),(0,_.takeUntil)(this._destroyed$)).subscribe(({type:t})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===t})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const t={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].forEach(e=>t[e]=this[e]),this._service.set(t),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(t){const e={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].filter(e=>e in t).forEach(t=>e[t]=this[t]),this._service.set(e),"startDate"in t){const{currentValue:e,previousValue:n}=t.startDate;je(n,e)&&this.navigateTo(this.startDate)}}onDateSelect(t){this._service.focus(t),this._service.select(t,{emitEvent:!0})}onNavigateDateSelect(t){this._service.open(t)}onNavigateEvent(t){switch(t){case Re.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case Re.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._service.set({disabled:t})}writeValue(t){this._controlValue=Ae.from(this._ngbDateAdapter.fromModel(t)),this._service.select(this._controlValue)}}rn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:rn,deps:[{token:Ke},{token:We},{token:Ye},{token:tn},{token:m.ChangeDetectorRef},{token:m.ElementRef},{token:nn},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),rn.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:rn,isStandalone:!0,selector:"ngb-datepicker",inputs:{contentTemplate:"contentTemplate",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",weekdays:"weekdays"},outputs:{navigate:"navigate",dateSelect:"dateSelect"},host:{properties:{"class.disabled":"model.disabled"}},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>rn),multi:!0},Ke],queries:[{propertyName:"contentTemplateFromContent",first:!0,predicate:an,descendants:!0,static:!0}],viewQueries:[{propertyName:"_defaultDayTemplate",first:!0,predicate:["defaultDayTemplate"],descendants:!0,static:!0},{propertyName:"_contentEl",first:!0,predicate:["content"],descendants:!0,static:!0}],exportAs:["ngbDatepicker"],usesOnChanges:!0,ngImport:f,template:'\n\t\t<ng-template\n\t\t\t#defaultDayTemplate\n\t\t\tlet-date="date"\n\t\t\tlet-currentMonth="currentMonth"\n\t\t\tlet-selected="selected"\n\t\t\tlet-disabled="disabled"\n\t\t\tlet-focused="focused"\n\t\t>\n\t\t\t<div\n\t\t\t\tngbDatepickerDayView\n\t\t\t\t[date]="date"\n\t\t\t\t[currentMonth]="currentMonth"\n\t\t\t\t[selected]="selected"\n\t\t\t\t[disabled]="disabled"\n\t\t\t\t[focused]="focused"\n\t\t\t>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<ng-template #defaultContentTemplate>\n\t\t\t<div *ngFor="let month of model.months; let i = index" class="ngb-dp-month">\n\t\t\t\t<div *ngIf="navigation === \'none\' || (displayMonths > 1 && navigation === \'select\')" class="ngb-dp-month-name">\n\t\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t\t</div>\n\t\t\t\t<ngb-datepicker-month [month]="month.firstDate"></ngb-datepicker-month>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<div class="ngb-dp-header">\n\t\t\t<ngb-datepicker-navigation\n\t\t\t\t*ngIf="navigation !== \'none\'"\n\t\t\t\t[date]="model.firstDate!"\n\t\t\t\t[months]="model.months"\n\t\t\t\t[disabled]="model.disabled"\n\t\t\t\t[showSelect]="model.navigation === \'select\'"\n\t\t\t\t[prevDisabled]="model.prevDisabled"\n\t\t\t\t[nextDisabled]="model.nextDisabled"\n\t\t\t\t[selectBoxes]="model.selectBoxes"\n\t\t\t\t(navigate)="onNavigateEvent($event)"\n\t\t\t\t(select)="onNavigateDateSelect($event)"\n\t\t\t>\n\t\t\t</ngb-datepicker-navigation>\n\t\t</div>\n\n\t\t<div class="ngb-dp-content" [class.ngb-dp-months]="!contentTemplate" #content>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="contentTemplate || contentTemplateFromContent?.templateRef || defaultContentTemplate"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: this }"\n\t\t\t\t[ngTemplateOutletInjector]="injector"\n\t\t\t></ng-template>\n\t\t</div>\n\n\t\t<ng-template [ngTemplateOutlet]="footerTemplate"></ng-template>\n\t',isInline:!0,styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"component",type:Ge,selector:"[ngbDatepickerDayView]",inputs:["currentMonth","date","disabled","focused","selected"]},{kind:"component",type:on,selector:"ngb-datepicker-month",inputs:["month"]},{kind:"component",type:Je,selector:"ngb-datepicker-navigation",inputs:["date","disabled","months","showSelect","prevDisabled","nextDisabled","selectBoxes"],outputs:["navigate","select"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:rn,decorators:[{type:m.Component,args:[{exportAs:"ngbDatepicker",selector:"ngb-datepicker",standalone:!0,imports:[b.NgIf,b.NgFor,b.NgTemplateOutlet,Ge,on,Je],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{"[class.disabled]":"model.disabled"},template:'\n\t\t<ng-template\n\t\t\t#defaultDayTemplate\n\t\t\tlet-date="date"\n\t\t\tlet-currentMonth="currentMonth"\n\t\t\tlet-selected="selected"\n\t\t\tlet-disabled="disabled"\n\t\t\tlet-focused="focused"\n\t\t>\n\t\t\t<div\n\t\t\t\tngbDatepickerDayView\n\t\t\t\t[date]="date"\n\t\t\t\t[currentMonth]="currentMonth"\n\t\t\t\t[selected]="selected"\n\t\t\t\t[disabled]="disabled"\n\t\t\t\t[focused]="focused"\n\t\t\t>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<ng-template #defaultContentTemplate>\n\t\t\t<div *ngFor="let month of model.months; let i = index" class="ngb-dp-month">\n\t\t\t\t<div *ngIf="navigation === \'none\' || (displayMonths > 1 && navigation === \'select\')" class="ngb-dp-month-name">\n\t\t\t\t\t{{ i18n.getMonthLabel(month.firstDate) }}\n\t\t\t\t</div>\n\t\t\t\t<ngb-datepicker-month [month]="month.firstDate"></ngb-datepicker-month>\n\t\t\t</div>\n\t\t</ng-template>\n\n\t\t<div class="ngb-dp-header">\n\t\t\t<ngb-datepicker-navigation\n\t\t\t\t*ngIf="navigation !== \'none\'"\n\t\t\t\t[date]="model.firstDate!"\n\t\t\t\t[months]="model.months"\n\t\t\t\t[disabled]="model.disabled"\n\t\t\t\t[showSelect]="model.navigation === \'select\'"\n\t\t\t\t[prevDisabled]="model.prevDisabled"\n\t\t\t\t[nextDisabled]="model.nextDisabled"\n\t\t\t\t[selectBoxes]="model.selectBoxes"\n\t\t\t\t(navigate)="onNavigateEvent($event)"\n\t\t\t\t(select)="onNavigateDateSelect($event)"\n\t\t\t>\n\t\t\t</ngb-datepicker-navigation>\n\t\t</div>\n\n\t\t<div class="ngb-dp-content" [class.ngb-dp-months]="!contentTemplate" #content>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="contentTemplate || contentTemplateFromContent?.templateRef || defaultContentTemplate"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: this }"\n\t\t\t\t[ngTemplateOutletInjector]="injector"\n\t\t\t></ng-template>\n\t\t</div>\n\n\t\t<ng-template [ngTemplateOutlet]="footerTemplate"></ng-template>\n\t',providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>rn),multi:!0},Ke],styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"]}]}],ctorParameters:function(){return[{type:Ke},{type:We},{type:Ye},{type:tn},{type:m.ChangeDetectorRef},{type:m.ElementRef},{type:nn},{type:m.NgZone}]},propDecorators:{_defaultDayTemplate:[{type:m.ViewChild,args:["defaultDayTemplate",{static:!0}]}],_contentEl:[{type:m.ViewChild,args:["content",{static:!0}]}],contentTemplate:[{type:m.Input}],contentTemplateFromContent:[{type:m.ContentChild,args:[an,{static:!0}]}],dayTemplate:[{type:m.Input}],dayTemplateData:[{type:m.Input}],displayMonths:[{type:m.Input}],firstDayOfWeek:[{type:m.Input}],footerTemplate:[{type:m.Input}],markDisabled:[{type:m.Input}],maxDate:[{type:m.Input}],minDate:[{type:m.Input}],navigation:[{type:m.Input}],outsideDays:[{type:m.Input}],showWeekNumbers:[{type:m.Input}],startDate:[{type:m.Input}],weekdays:[{type:m.Input}],navigate:[{type:m.Output}],dateSelect:[{type:m.Output}]}});const ln=(t,e)=>!!e&&e.some(e=>e.contains(t)),cn=(t,e)=>!e||null!=function(t,e){return e?void 0===t.closest?null:t.closest(e):null}(t,e),dn="undefined"!=typeof navigator&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));function hn(t,e,n,i,s,a,o,r){var l;n&&t.runOutsideAngular((l=()=>{const l=(0,v.fromEvent)(e,"keydown").pipe((0,_.takeUntil)(s),(0,_.filter)(t=>t.which===Pe.Escape),(0,_.tap)(t=>t.preventDefault())),c=(0,v.fromEvent)(e,"mousedown").pipe((0,_.map)(t=>{const e=t.target;return 2!==t.button&&!ln(e,o)&&("inside"===n?ln(e,a)&&cn(e,r):"outside"===n?!ln(e,a):cn(e,r)||!ln(e,a))}),(0,_.takeUntil)(s)),d=(0,v.fromEvent)(e,"mouseup").pipe((0,_.withLatestFrom)(c),(0,_.filter)(([t,e])=>e),(0,_.delay)(0),(0,_.takeUntil)(s));(0,v.race)([l.pipe((0,_.map)(t=>0)),d.pipe((0,_.map)(t=>1))]).subscribe(e=>t.run(()=>i(e)))},dn?()=>setTimeout(()=>l(),100):l))}const pn=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function un(t){const e=Array.from(t.querySelectorAll(pn)).filter(t=>-1!==t.tabIndex);return[e[0],e[e.length-1]]}const gn=(t,e,n,i=!1)=>{t.runOutsideAngular(()=>{const t=(0,v.fromEvent)(e,"focusin").pipe((0,_.takeUntil)(n),(0,_.map)(t=>t.target));(0,v.fromEvent)(e,"keydown").pipe((0,_.takeUntil)(n),(0,_.filter)(t=>t.which===Pe.Tab),(0,_.withLatestFrom)(t)).subscribe(([t,n])=>{const[i,s]=un(e);n!==i&&n!==e||!t.shiftKey||(s.focus(),t.preventDefault()),n!==s||t.shiftKey||(i.focus(),t.preventDefault())}),i&&(0,v.fromEvent)(e,"click").pipe((0,_.takeUntil)(n),(0,_.withLatestFrom)(t),(0,_.map)(t=>t[1])).subscribe(t=>t.focus())})};class mn{constructor(t){this._element=t.documentElement}isRTL(){return"rtl"===(this._element.getAttribute("dir")||"").toLowerCase()}}mn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:mn,deps:[{token:b.DOCUMENT}],target:m["ɵɵFactoryTarget"].Injectable}),mn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:mn,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:mn,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]}]}});const fn=/\s+/,bn=/ +/gi,yn={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]},vn=/^left/,_n=/^right/,xn=/^start/,wn=/^end/;function Dn({placement:t,baseClass:e},n){let i=Array.isArray(t)?t:t.split(fn);let s=i.findIndex(t=>"auto"===t);s>=0&&["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"].forEach(function(t){null==i.find(e=>-1!==e.search("^"+t))&&i.splice(s++,1,t)});const a=i.map(t=>function(t,e){const[n,i]=yn[t];return e&&i||n}(t,n.isRTL()));let o=a.shift();const r={name:"bootstrapClasses",enabled:!!e,phase:"write",fn({state:t}){const n=new RegExp(e+"(-[a-z]+)*","gi"),i=t.elements.popper,s=t.placement;let a=i.className;a=a.replace(n,""),a+=` ${function(t,e){let[n,i]=e.split("-");const s=n.replace(vn,"start").replace(_n,"end");let a=[s];if(i){let t=i;"left"!==n&&"right"!==n||(t=t.replace(xn,"top").replace(wn,"bottom")),a.push(`${s}-${t}`)}return t&&(a=a.map(e=>`${t}-${e}`)),a.join(" ")}(e,s)}`,a=a.trim().replace(bn," "),i.className=a}};return{placement:o,modifiers:[r,ft,vt,_t,{enabled:!0,name:"flip",options:{fallbackPlacements:a}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function In(t){return t}function kn(){const t=(0,m.inject)(mn);let e=null;return{createPopper(n){if(!e){let i=(n.updatePopperOptions||In)(Dn(n,t));e=Tt(n.hostElement,n.targetElement,i)}},update(){e&&e.update()},setOptions(n){if(e){let i=(n.updatePopperOptions||In)(Dn(n,t));e.setOptions(i)}},destroy(){e&&(e.destroy(),e=null)}}}class Cn extends tn{constructor(){super(...arguments),this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t,this.restoreFocus=!0}}function Mn(t){return e=>(e.modifiers.push(Ot,{name:"offset",options:{offset:()=>t}}),e)}function Sn(){return new On}Cn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cn,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Cn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cn,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cn,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class Tn{}Tn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Tn,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Tn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Tn,providedIn:"root",useFactory:Sn}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Tn,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:Sn}]}]});class On extends Tn{parse(t){if(null!=t){const e=t.trim().split("-");if(1===e.length&&Vt(e[0]))return{year:Et(e[0]),month:null,day:null};if(2===e.length&&Vt(e[0])&&Vt(e[1]))return{year:Et(e[0]),month:Et(e[1]),day:null};if(3===e.length&&Vt(e[0])&&Vt(e[1])&&Vt(e[2]))return{year:Et(e[0]),month:Et(e[1]),day:Et(e[2])}}return null}format(t){return t?`${t.year}-${Vt(t.month)?Lt(t.month):""}-${Vt(t.day)?Lt(t.day):""}`:""}}On.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:On,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),On.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:On}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:On,decorators:[{type:m.Injectable}]});class En{constructor(t,e,n,i,s,a,o,r,l,c){this._parserFormatter=t,this._elRef=e,this._vcRef=n,this._renderer=i,this._ngZone=s,this._calendar=a,this._dateAdapter=o,this._document=r,this._changeDetector=l,this._cRef=null,this._disabled=!1,this._elWithFocus=null,this._model=null,this._destroyCloseHandlers$=new v.Subject,this.dateSelect=new m.EventEmitter,this.navigate=new m.EventEmitter,this.closed=new m.EventEmitter,this._onChange=t=>{},this._onTouched=()=>{},this._validatorChange=()=>{},["autoClose","container","positionTarget","placement","popperOptions"].forEach(t=>this[t]=c[t]),this._positioning=kn()}get disabled(){return this._disabled}set disabled(t){this._disabled=""===t||t&&"false"!==t,this.isOpen()&&this._cRef.instance.setDisabledState(this._disabled)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}registerOnValidatorChange(t){this._validatorChange=t}setDisabledState(t){this.disabled=t}validate(t){const{value:e}=t;if(null!=e){const t=this._fromDateStruct(this._dateAdapter.fromModel(e));if(!t)return{ngbDate:{invalid:e}};if(this.minDate&&t.before(Ae.from(this.minDate)))return{ngbDate:{minDate:{minDate:this.minDate,actual:e}}};if(this.maxDate&&t.after(Ae.from(this.maxDate)))return{ngbDate:{maxDate:{maxDate:this.maxDate,actual:e}}}}return null}writeValue(t){this._model=this._fromDateStruct(this._dateAdapter.fromModel(t)),this._writeModelValue(this._model)}manualDateChange(t,e=!1){const n=t!==this._inputValue;n&&(this._inputValue=t,this._model=this._fromDateStruct(this._parserFormatter.parse(t))),!n&&e||this._onChange(this._model?this._dateAdapter.toModel(this._model):""===t?null:t),e&&this._model&&this._writeModelValue(this._model)}isOpen(){return!!this._cRef}open(){if(!this.isOpen()){let t;if(this._cRef=this._vcRef.createComponent(rn),this._applyPopupStyling(this._cRef.location.nativeElement),this._applyDatepickerInputs(this._cRef),this._subscribeForDatepickerOutputs(this._cRef.instance),this._cRef.instance.ngOnInit(),this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model)),this._cRef.instance.registerOnChange(t=>{this.writeValue(t),this._onChange(t),this._onTouched()}),this._cRef.changeDetectorRef.detectChanges(),this._cRef.instance.setDisabledState(this.disabled),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._cRef.location.nativeElement),this._elWithFocus=this._document.activeElement,gn(this._ngZone,this._cRef.location.nativeElement,this.closed,!0),setTimeout(()=>{var t;return null===(t=this._cRef)||void 0===t?void 0:t.instance.focus()}),t=Ft(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget instanceof HTMLElement?this.positionTarget:this._elRef.nativeElement,this._ngZone.runOutsideAngular(()=>{this._cRef&&(this._positioning.createPopper({hostElement:t,targetElement:this._cRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(Mn([0,2])(t))}),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update()))}),this.positionTarget&&!t)throw new Error("ngbDatepicker could not find element declared in [positionTarget] to position against.");this._setCloseHandlers()}}close(){var t;if(this.isOpen()){this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView)),this._cRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._destroyCloseHandlers$.next(),this.closed.emit(),this._changeDetector.markForCheck();let e=this._elWithFocus;Ft(this.restoreFocus)?e=this._document.querySelector(this.restoreFocus):void 0!==this.restoreFocus&&(e=this.restoreFocus),e&&e.focus?e.focus():this._document.body.focus()}}toggle(){this.isOpen()?this.close():this.open()}navigateTo(t){this.isOpen()&&this._cRef.instance.navigateTo(t)}onBlur(){this._onTouched()}onFocus(){this._elWithFocus=this._elRef.nativeElement}ngOnChanges(t){if((t.minDate||t.maxDate)&&(this._validatorChange(),this.isOpen()&&(t.minDate&&(this._cRef.instance.minDate=this.minDate),t.maxDate&&(this._cRef.instance.maxDate=this.maxDate),this._cRef.instance.ngOnChanges(t))),t.datepickerClass){const{currentValue:e,previousValue:n}=t.datepickerClass;this._applyPopupClass(e,n)}t.autoClose&&this.isOpen()&&this._setCloseHandlers()}ngOnDestroy(){this.close()}_applyDatepickerInputs(t){["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showNavigation","showWeekNumbers","weekdays"].forEach(e=>{void 0!==this[e]&&t.setInput(e,this[e])}),t.setInput("startDate",this.startDate||this._model)}_applyPopupClass(t,e){var n;const i=null===(n=this._cRef)||void 0===n?void 0:n.location.nativeElement;i&&(t&&this._renderer.addClass(i,t),e&&this._renderer.removeClass(i,e))}_applyPopupStyling(t){this._renderer.addClass(t,"dropdown-menu"),this._renderer.addClass(t,"show"),"body"===this.container&&this._renderer.addClass(t,"ngb-dp-body"),this._applyPopupClass(this.datepickerClass)}_subscribeForDatepickerOutputs(t){t.navigate.subscribe(t=>this.navigate.emit(t)),t.dateSelect.subscribe(t=>{this.dateSelect.emit(t),!0!==this.autoClose&&"inside"!==this.autoClose||this.close()})}_writeModelValue(t){const e=this._parserFormatter.format(t);this._inputValue=e,this._renderer.setProperty(this._elRef.nativeElement,"value",e),this.isOpen()&&(this._cRef.instance.writeValue(this._dateAdapter.toModel(t)),this._onTouched())}_fromDateStruct(t){const e=t?new Ae(t.year,t.month,t.day):null;return this._calendar.isValid(e)?e:null}_setCloseHandlers(){this._destroyCloseHandlers$.next(),hn(this._ngZone,this._document,this.autoClose,()=>this.close(),this._destroyCloseHandlers$,[],[this._elRef.nativeElement,this._cRef.location.nativeElement])}}En.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:En,deps:[{token:Tn},{token:m.ElementRef},{token:m.ViewContainerRef},{token:m.Renderer2},{token:m.NgZone},{token:We},{token:nn},{token:b.DOCUMENT},{token:m.ChangeDetectorRef},{token:Cn}],target:m["ɵɵFactoryTarget"].Directive}),En.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:En,isStandalone:!0,selector:"input[ngbDatepicker]",inputs:{autoClose:"autoClose",contentTemplate:"contentTemplate",datepickerClass:"datepickerClass",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",minDate:"minDate",maxDate:"maxDate",navigation:"navigation",outsideDays:"outsideDays",placement:"placement",popperOptions:"popperOptions",restoreFocus:"restoreFocus",showWeekNumbers:"showWeekNumbers",startDate:"startDate",container:"container",positionTarget:"positionTarget",weekdays:"weekdays",disabled:"disabled"},outputs:{dateSelect:"dateSelect",navigate:"navigate",closed:"closed"},host:{listeners:{input:"manualDateChange($event.target.value)",change:"manualDateChange($event.target.value, true)",focus:"onFocus()",blur:"onBlur()"},properties:{disabled:"disabled"}},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>En),multi:!0},{provide:y.NG_VALIDATORS,useExisting:(0,m.forwardRef)(()=>En),multi:!0},{provide:tn,useExisting:Cn}],exportAs:["ngbDatepicker"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:En,decorators:[{type:m.Directive,args:[{selector:"input[ngbDatepicker]",exportAs:"ngbDatepicker",standalone:!0,host:{"(input)":"manualDateChange($event.target.value)","(change)":"manualDateChange($event.target.value, true)","(focus)":"onFocus()","(blur)":"onBlur()","[disabled]":"disabled"},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>En),multi:!0},{provide:y.NG_VALIDATORS,useExisting:(0,m.forwardRef)(()=>En),multi:!0},{provide:tn,useExisting:Cn}]}]}],ctorParameters:function(){return[{type:Tn},{type:m.ElementRef},{type:m.ViewContainerRef},{type:m.Renderer2},{type:m.NgZone},{type:We},{type:nn},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.ChangeDetectorRef},{type:Cn}]},propDecorators:{autoClose:[{type:m.Input}],contentTemplate:[{type:m.Input}],datepickerClass:[{type:m.Input}],dayTemplate:[{type:m.Input}],dayTemplateData:[{type:m.Input}],displayMonths:[{type:m.Input}],firstDayOfWeek:[{type:m.Input}],footerTemplate:[{type:m.Input}],markDisabled:[{type:m.Input}],minDate:[{type:m.Input}],maxDate:[{type:m.Input}],navigation:[{type:m.Input}],outsideDays:[{type:m.Input}],placement:[{type:m.Input}],popperOptions:[{type:m.Input}],restoreFocus:[{type:m.Input}],showWeekNumbers:[{type:m.Input}],startDate:[{type:m.Input}],container:[{type:m.Input}],positionTarget:[{type:m.Input}],weekdays:[{type:m.Input}],dateSelect:[{type:m.Output}],navigate:[{type:m.Output}],closed:[{type:m.Output}],disabled:[{type:m.Input}]}});class Rn extends We{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){switch(t=new Ae(t.year,t.month,t.day),e){case"y":return(t=this._setYear(t,t.year+n)).month=1,t.day=1,t;case"m":return(t=this._setMonth(t,t.month+n)).day=1,t;case"d":return this._setDay(t,t.day+n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=this.toGregorian(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=t[(11-e)%7],i=this.toGregorian(n);i.setDate(i.getDate()+4-(i.getDay()||7));const s=i.getTime(),a=this.toGregorian(new Ae(n.year,1,1));return Math.floor(Math.round((s-a.getTime())/864e5)/7)+1}getToday(){return this.fromGregorian(new Date)}isValid(t){return null!=t&&Vt(t.year)&&Vt(t.month)&&Vt(t.day)&&!isNaN(this.toGregorian(t).getTime())}_setDay(t,e){e=+e;let n=this.getDaysPerMonth(t.month,t.year);if(e<=0)for(;e<=0;)t=this._setMonth(t,t.month-1),n=this.getDaysPerMonth(t.month,t.year),e+=n;else if(e>n)for(;e>n;)e-=n,t=this._setMonth(t,t.month+1),n=this.getDaysPerMonth(t.month,t.year);return t.day=e,t}_setMonth(t,e){return e=+e,t.year=t.year+Math.floor((e-1)/12),t.month=Math.floor(((e-1)%12+12)%12)+1,t}_setYear(t,e){return t.year=+e,t}}function Pn(t){const e=t.getFullYear();return e%4==0&&e%100!=0||e%400==0}function Fn(t,e){return t-e*Math.floor(t/e)}Rn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rn,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Rn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rn}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rn,decorators:[{type:m.Injectable}]});const Vn=1721425.5,An=1948439.5;class Nn extends Rn{fromGregorian(t){const e=t.getFullYear(),n=t.getMonth(),i=t.getDate();let s=1721424.5+365*(e-1)+Math.floor((e-1)/4)+-Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*(n+1)-362)/12+(n+1<=2?0:Pn(t)?-1:-2)+i);s=Math.floor(s)+.5;const a=s-An,o=Math.floor((30*a+10646)/10631);let r=Math.ceil((a-29-(354*((l=o)-1)+Math.floor((3+11*l)/30)))/29.5);var l;r=Math.min(r,11);const c=Math.ceil(a-function(t,e){return Math.ceil(29.5*e)+354*(t-1)+Math.floor((3+11*t)/30)}(o,r))+1;return new Ae(o,r+1,c)}toGregorian(t){const e=t.year,n=t.month-1,i=t.day+Math.ceil(29.5*n)+354*(e-1)+Math.floor((3+11*e)/30)+An-1,s=Math.floor(i-.5)+.5,a=s-Vn,o=Math.floor(a/146097),r=Fn(a,146097),l=Math.floor(r/36524),c=Fn(r,36524),d=Math.floor(c/1461),h=Fn(c,1461),p=Math.floor(h/365);let u=400*o+100*l+4*d+p;4!==l&&4!==p&&u++;const g=s-(Vn+365*(u-1)+Math.floor((u-1)/4)-Math.floor((u-1)/100)+Math.floor((u-1)/400)),m=s<1721424.5+365*(u-1)+Math.floor((u-1)/4)-Math.floor((u-1)/100)+Math.floor((u-1)/400)+Math.floor(739/12+(Pn(new Date(u,3,1))?-1:-2)+1)?0:Pn(new Date(u,3,1))?1:2,f=Math.floor((12*(g+m)+373)/367),b=1721424.5+365*(u-1)+Math.floor((u-1)/4)-Math.floor((u-1)/100)+Math.floor((u-1)/400)+Math.floor((367*f-362)/12+(f<=2?0:Pn(new Date(u,f-1,1))?-1:-2)+1);return new Date(u,f-1,s-b+1)}getDaysPerMonth(t,e){e+=Math.floor(t/13);let n=29+(t=(t-1)%12+1)%2;return 12===t&&(14+11*e)%30<11&&n++,n}}Nn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Nn,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Nn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Nn}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Nn,decorators:[{type:m.Injectable}]});const jn=new Date(1882,10,12),Ln=new Date(2174,10,25),zn=1300,Bn=["101010101010","110101010100","111011001001","011011010100","011011101010","001101101100","101010101101","010101010101","011010101001","011110010010","101110101001","010111010100","101011011010","010101011100","110100101101","011010010101","011101001010","101101010100","101101101010","010110101101","010010101110","101001001111","010100010111","011010001011","011010100101","101011010101","001011010110","100101011011","010010011101","101001001101","110100100110","110110010101","010110101100","100110110110","001010111010","101001011011","010100101011","101010010101","011011001010","101011101001","001011110100","100101110110","001010110110","100101010110","101011001010","101110100100","101111010010","010111011001","001011011100","100101101101","010101001101","101010100101","101101010010","101110100101","010110110100","100110110110","010101010111","001010010111","010101001011","011010100011","011101010010","101101100101","010101101010","101010101011","010100101011","110010010101","110101001010","110110100101","010111001010","101011010110","100101010111","010010101011","100101001011","101010100101","101101010010","101101101010","010101110101","001001110110","100010110111","010001011011","010101010101","010110101001","010110110100","100111011010","010011011101","001001101110","100100110110","101010101010","110101010100","110110110010","010111010101","001011011010","100101011011","010010101011","101001010101","101101001001","101101100100","101101110001","010110110100","101010110101","101001010101","110100100101","111010010010","111011001001","011011010100","101011101001","100101101011","010010101011","101010010011","110101001001","110110100100","110110110010","101010111001","010010111010","101001011011","010100101011","101010010101","101100101010","101101010101","010101011100","010010111101","001000111101","100100011101","101010010101","101101001010","101101011010","010101101101","001010110110","100100111011","010010011011","011001010101","011010101001","011101010100","101101101010","010101101100","101010101101","010101010101","101100101001","101110010010","101110101001","010111010100","101011011010","010101011010","101010101011","010110010101","011101001001","011101100100","101110101010","010110110101","001010110110","101001010110","111001001101","101100100101","101101010010","101101101010","010110101101","001010101110","100100101111","010010010111","011001001011","011010100101","011010101100","101011010110","010101011101","010010011101","101001001101","110100010110","110110010101","010110101010","010110110101","001011011010","100101011011","010010101101","010110010101","011011001010","011011100100","101011101010","010011110101","001010110110","100101010110","101010101010","101101010100","101111010010","010111011001","001011101010","100101101101","010010101101","101010010101","101101001010","101110100101","010110110010","100110110101","010011010110","101010010111","010101000111","011010010011","011101001001","101101010101","010101101010","101001101011","010100101011","101010001011","110101000110","110110100011","010111001010","101011010110","010011011011","001001101011","100101001011","101010100101","101101010010","101101101001","010101110101","000101110110","100010110111","001001011011","010100101011","010101100101","010110110100","100111011010","010011101101","000101101101","100010110110","101010100110","110101010010","110110101001","010111010100","101011011010","100101011011","010010101011","011001010011","011100101001","011101100010","101110101001","010110110010","101010110101","010101010101","101100100101","110110010010","111011001001","011011010010","101011101001","010101101011","010010101011","101001010101","110100101001","110101010100","110110101010","100110110101","010010111010","101000111011","010010011011","101001001101","101010101010","101011010101","001011011010","100101011101","010001011110","101000101110","110010011010","110101010101","011010110010","011010111001","010010111010","101001011101","010100101101","101010010101","101101010010","101110101000","101110110100","010110111001","001011011010","100101011010","101101001010","110110100100","111011010001","011011101000","101101101010","010101101101","010100110101","011010010101","110101001010","110110101000","110111010100","011011011010","010101011011","001010011101","011000101011","101100010101","101101001010","101110010101","010110101010","101010101110","100100101110","110010001111","010100100111","011010010101","011010101010","101011010110","010101011101","001010011101"];class $n extends Nn{fromGregorian(t){let e=1,n=0,i=1300,s=function(t,e){const n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),s=Math.abs(n-i);return Math.round(s/864e5)}(t,jn);if(t.getTime()-jn.getTime()>=0&&t.getTime()-Ln.getTime()<=0){let t=1300;for(let a=0;a<Bn.length;a++,t++)for(let o=0;o<12;o++){let r=+Bn[a][o]+29;if(s<=r)return e=s+1,e>r&&(e=1,o++),o>11&&(o=0,t++),n=o,i=t,new Ae(i,n+1,e);s-=r}return null}return super.fromGregorian(t)}toGregorian(t){const e=t.year,n=t.month-1,i=t.day;let s=new Date(jn),a=i-1;if(e>=zn&&e<=1600){for(let t=0;t<e-zn;t++)for(let e=0;e<12;e++)a+=+Bn[t][e]+29;for(let t=0;t<n;t++)a+=+Bn[e-zn][t]+29;s.setDate(jn.getDate()+a)}else s=super.toGregorian(t);return s}getDaysPerMonth(t,e){return e>=zn&&e<=1600?+Bn[e-zn][t-1]+29:super.getDaysPerMonth(t,e)}}function Hn(t){let e=Zn(function(t,e,n){let i=Yn(t);return Kn(i.gy,3,i.march)+31*(e-1)-qn(e,7)*(e-7)+n-1}(t.year,t.month,t.day));return e.setHours(6,30,3,200),e}function Wn(t,e){return e=+e,t.year=t.year+Math.floor((e-1)/12),t.month=Math.floor(((e-1)%12+12)%12)+1,t}function Un(t,e){return t-e*Math.floor(t/e)}function qn(t,e){return Math.trunc(t/e)}function Yn(t){let e=[-61,9,38,199,426,686,756,818,1111,1181,1210,1635,2060,2097,2192,2262,2324,2394,2456,3178];const n=e.length,i=t+621;let s,a=-14,o=e[0];if(t<o||t>=e[n-1])throw new Error("Invalid Jalali year "+t);for(let i=1;i<n;i+=1){const n=e[i];if(s=n-o,t<n)break;a=a+8*qn(s,33)+qn(Un(s,33),4),o=n}let r=t-o;a=a+8*qn(r,33)+qn(Un(r,33)+3,4),4===Un(s,33)&&s-r===4&&(a+=1);const l=20+a-(qn(i,4)-qn(3*(qn(i,100)+1),4)-150);s-r<6&&(r=r-s+33*qn(s+4,33));let c=Un(Un(r+1,33)-1,4);return-1===c&&(c=4),{leap:c,gy:i,march:l}}function Zn(t){let e=4*t+139361631;e=e+4*qn(3*qn(4*t+183187720,146097),4)-3908;const n=5*qn(Un(e,1461),4)+308,i=qn(Un(n,153),5)+1,s=Un(qn(n,153),12)+1,a=qn(e,1461)-100100+qn(8-s,6);return new Date(a,s-1,i)}function Kn(t,e,n){let i=qn(1461*(t+qn(e-8,6)+100100),4)+qn(153*Un(e+9,12)+2,5)+n-34840408;return i=i-qn(3*qn(t+100100+qn(e-8,6),100),4)+752,i}function Gn(t,e){return t<=6?31:t<=11||0===Yn(e).leap?30:29}$n.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$n,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),$n.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$n}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$n,decorators:[{type:m.Injectable}]});class Xn extends We{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){switch(t=new Ae(t.year,t.month,t.day),e){case"y":return(t=function(t,e){return t.year=+e,t}(t,t.year+n)).month=1,t.day=1,t;case"m":return(t=Wn(t,t.month+n)).day=1,t;case"d":return function(t,e){let n=Gn(t.month,t.year);if(e<=0)for(;e<=0;)n=Gn((t=Wn(t,t.month-1)).month,t.year),e+=n;else if(e>n)for(;e>n;)e-=n,n=Gn((t=Wn(t,t.month+1)).month,t.year);return t.day=e,t}(t,t.day+n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=Hn(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=t[(11-e)%7],i=Hn(n);i.setDate(i.getDate()+4-(i.getDay()||7));const s=i.getTime(),a=Hn(new Ae(n.year,1,1));return Math.floor(Math.round((s-a.getTime())/864e5)/7)+1}getToday(){return function(t){let e,n,i,s=Zn(t).getFullYear(),a=s-621,o=Yn(a);if(i=t-Kn(s,3,o.march),i>=0){if(i<=185)return n=1+qn(i,31),e=Un(i,31)+1,new Ae(a,n,e);i-=186}else a-=1,i+=179,1===o.leap&&(i+=1);return n=7+qn(i,30),e=Un(i,30)+1,new Ae(a,n,e)}(Kn((t=new Date).getFullYear(),t.getMonth()+1,t.getDate()));var t}isValid(t){return null!=t&&At(t.year)&&At(t.month)&&At(t.day)&&!isNaN(Hn(t).getTime())}}Xn.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xn,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Xn.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xn}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xn,decorators:[{type:m.Injectable}]});const Jn=25920;function Qn(t){return t%4==0&&t%100!=0||t%400==0}function ti(t){let e=Math.floor((235*t-234)/19),n=13753*e+12084,i=29*e+Math.floor(n/Jn),s=n%Jn,a=i%7;return 2!==a&&4!==a&&6!==a||(i++,a=i%7),1===a&&s>16404&&!si(t)?i+=2:0===a&&s>23269&&si(t-1)&&i++,i}function ei(t,e){let n=[31,28,31,30,31,30,31,31,30,31,30,31];return Qn(e)&&n[1]++,n[t-1]}function ni(t){return si(t)?13:12}function ii(t){return ti(t+1)-ti(t)}function si(t){if(null!=t){let e=(12*t+17)%19;return e>=(e<0?-7:12)}return!1}function ai(t,e){let n=ti(e+1)-ti(e),i=(n<=380?n:n-30)-353,s=si(e)?[30,29,29,29,30,30,29,30,29,30,29,30,29]:[30,29,29,29,30,29,30,29,30,29,30,29];return i>0&&s[2]++,i>1&&s[1]++,s[t-1]}function oi(t){let e=0;for(let n=1;n<t.month;n++)e+=ai(n,t.year);return e+t.day}function ri(t){const e=new Date(t),n=e.getFullYear(),i=e.getMonth(),s=e.getDate();let a=1721424.5+365*(n-1)+Math.floor((n-1)/4)-Math.floor((n-1)/100)+Math.floor((n-1)/400)+Math.floor((367*(i+1)-362)/12+(i+1<=2?0:Qn(n)?-1:-2)+s);a=Math.floor(a+.5);let o=a-347997,r=Math.floor(o*Jn/765433),l=Math.floor((19*r+234)/235)+1,c=ti(l),d=o-c;for(;d<1;)l--,c=ti(l),d=o-c;let h=1,p=d;for(;p>ai(h,l);)p-=ai(h,l),h++;return new Ae(l,h,p)}function li(t){const e=t.year,n=t.month,i=t.day;let s=ti(e);for(let t=1;t<n;t++)s+=ai(t,e);s+=i;let a=s-2092591,o=a>=0;o||(a=-a);let r=1970,l=1,c=1;for(;a>0;)o?a>=(Qn(r)?366:365)?(a-=Qn(r)?366:365,r++):a>=ei(l,r)?(a-=ei(l,r),l++):(c+=a,a=0):a>=(Qn(r-1)?366:365)?(a-=Qn(r-1)?366:365,r--):(l>1?l--:(l=12,r--),a>=ei(l,r)?a-=ei(l,r):(c=ei(l,r)-a+1,a=0));return new Date(r,l-1,c)}function ci(t){if(!t)return"";const e=["","א","ב","ג","ד","ה","ו","ז","ח","ט"],n=["י","יא","יב","יג","יד","טו","טז","יז","יח","יט"],i=["","","כ","ל","מ","נ","ס","ע","פ","צ"],s=["","ק","ר","ש","ת","תק","תר","תש","תת","תתק"],a=["","א","ב","בא","בב","ה","הא","הב","הבא","הבב"];let o=0,r=[],l=0;for(;t>0;){let c=t%10;if(0===l)o=c;else if(1===l)1!==c?r.unshift(i[c],e[o]):r.unshift(n[o]);else{if(2!==l){5!==c&&r.unshift(a[c],"׳"," ");break}r.unshift(s[c])}t=Math.floor(t/10),0===l&&0===t&&r.unshift(e[c]),l++}return r=r.join("").split(""),1===r.length?r.push("׳"):r.length>1&&r.splice(r.length-1,0,"״"),r.join("")}class di extends We{getDaysPerWeek(){return 7}getMonths(t){return t&&si(t)?[1,2,3,4,5,6,7,8,9,10,11,12,13]:[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}isValid(t){if(null!=t){let e=Vt(t.year)&&Vt(t.month)&&Vt(t.day);return e=e&&t.month>0&&t.month<=(si(t.year)?13:12),e=e&&t.day>0&&t.day<=ai(t.month,t.year),e&&!isNaN(li(t).getTime())}return!1}getNext(t,e="d",n=1){switch(t=new Ae(t.year,t.month,t.day),e){case"y":return t.year+=n,t.month=1,t.day=1,t;case"m":return(t=function(t,e){let n=e>=0;for(n||(e=-e);e>0;)n?e>ni(t.year)-t.month?(e-=ni(t.year)-t.month+1,t.year++,t.month=1):(t.month+=e,e=0):e>=t.month?(t.year--,e-=t.month,t.month=ni(t.year)):(t.month-=e,e=0);return t}(t,n)).day=1,t;case"d":return function(t,e){let n=e>=0;for(n||(e=-e);e>0;)n?e>ii(t.year)-oi(t)?(e-=ii(t.year)-oi(t)+1,t.year++,t.month=1,t.day=1):e>ai(t.month,t.year)-t.day?(e-=ai(t.month,t.year)-t.day+1,t.month++,t.day=1):(t.day+=e,e=0):e>=t.day?(e-=t.day,t.month--,0===t.month&&(t.year--,t.month=ni(t.year)),t.day=ai(t.month,t.year)):(t.day-=e,e=0);return t}(t,n);default:return t}}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){const e=li(t).getDay();return 0===e?7:e}getWeekNumber(t,e){const n=t[t.length-1];return Math.ceil(oi(n)/7)}getToday(){return ri(new Date)}toGregorian(t){return Be(li(t))}fromGregorian(t){return ri($e(t))}}di.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:di,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),di.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:di}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:di,decorators:[{type:m.Injectable}]});const hi=["שני","שלישי","רביעי","חמישי","שישי","שבת","ראשון"],pi=["תשרי","חשון","כסלו","טבת","שבט","אדר","ניסן","אייר","סיון","תמוז","אב","אלול"],ui=["תשרי","חשון","כסלו","טבת","שבט","אדר א׳","אדר ב׳","ניסן","אייר","סיון","תמוז","אב","אלול"];class gi extends Ye{getMonthShortName(t,e){return this.getMonthFullName(t,e)}getMonthFullName(t,e){return si(e)?ui[t-1]||"":pi[t-1]||""}getWeekdayLabel(t,e){return hi[t-1]||""}getDayAriaLabel(t){return`${ci(t.day)} ${this.getMonthFullName(t.month,t.year)} ${ci(t.year)}`}getDayNumerals(t){return ci(t.day)}getWeekNumerals(t){return ci(t)}getYearNumerals(t){return ci(t)}}function mi(t){return new Date(t.year-543,t.month-1,t.day)}function fi(t){return new Ae(t.getFullYear()+543,t.getMonth()+1,t.getDate())}gi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:gi,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),gi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:gi}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:gi,decorators:[{type:m.Injectable}]});class bi extends Ue{getToday(){return fi(new Date)}getNext(t,e="d",n=1){let i=mi(t),s=!0,a=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":a+=n,i.setMonth(a),a%=12,a<0&&(a+=12);break;case"d":i.setDate(i.getDate()+n),s=!1;break;default:return t}return s&&i.getMonth()!==a&&i.setDate(0),fi(i)}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){let e=mi(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=mi(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}isValid(t){if(!(t&&At(t.year)&&At(t.month)&&At(t.day)))return!1;if(0===t.year)return!1;const e=mi(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year-543&&e.getMonth()+1===t.month&&e.getDate()===t.day}}bi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bi,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),bi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bi}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bi,decorators:[{type:m.Injectable}]});class yi extends nn{fromModel(t){return t instanceof Date&&!isNaN(t.getTime())?this._fromNativeDate(t):null}toModel(t){return t&&At(t.year)&&At(t.month)&&At(t.day)?this._toNativeDate(t):null}_fromNativeDate(t){return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}}_toNativeDate(t){const e=new Date(t.year,t.month-1,t.day,12);return e.setFullYear(t.year),e}}yi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:yi,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),yi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:yi}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:yi,decorators:[{type:m.Injectable}]});class vi extends yi{_fromNativeDate(t){return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()}}_toNativeDate(t){const e=new Date(Date.UTC(t.year,t.month-1,t.day));return e.setUTCFullYear(t.year),e}}vi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:vi,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),vi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:vi}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:vi,decorators:[{type:m.Injectable}]});const _i=[rn,an,En,on];class xi{}xi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:xi,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),xi.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:xi,imports:[rn,an,En,on],exports:[rn,an,En,on]}),xi.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:xi,imports:[rn,on]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:xi,decorators:[{type:m.NgModule,args:[{exports:_i,imports:_i}]}]});class wi{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t}}wi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:wi,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),wi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:wi,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:wi,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class Di{}Di.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Di,deps:[],target:m["ɵɵFactoryTarget"].Directive}),Di.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Di,isStandalone:!0,selector:".navbar",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Di,decorators:[{type:m.Directive,args:[{selector:".navbar",standalone:!0}]}]});class Ii{constructor(t,e){this.elementRef=t,this._renderer=e,this._disabled=!1}set disabled(t){this._disabled=""===t||!0===t,this._renderer.setProperty(this.elementRef.nativeElement,"disabled",this._disabled)}get disabled(){return this._disabled}}Ii.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ii,deps:[{token:m.ElementRef},{token:m.Renderer2}],target:m["ɵɵFactoryTarget"].Directive}),Ii.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ii,isStandalone:!0,selector:"[ngbDropdownItem]",inputs:{disabled:"disabled"},host:{properties:{"class.disabled":"disabled",tabIndex:"disabled ? -1 : 0"},classAttribute:"dropdown-item"},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ii,decorators:[{type:m.Directive,args:[{selector:"[ngbDropdownItem]",standalone:!0,host:{class:"dropdown-item","[class.disabled]":"disabled","[tabIndex]":"disabled ? -1 : 0"}}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.Renderer2}]},propDecorators:{disabled:[{type:m.Input}]}});class ki{constructor(t,e){this.dropdown=t,this.placement="bottom",this.isOpen=!1,this.nativeElement=e.nativeElement}}ki.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ki,deps:[{token:(0,m.forwardRef)(()=>Si)},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),ki.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ki,isStandalone:!0,selector:"[ngbDropdownMenu]",host:{listeners:{"keydown.ArrowUp":"dropdown.onKeyDown($event)","keydown.ArrowDown":"dropdown.onKeyDown($event)","keydown.Home":"dropdown.onKeyDown($event)","keydown.End":"dropdown.onKeyDown($event)","keydown.Enter":"dropdown.onKeyDown($event)","keydown.Space":"dropdown.onKeyDown($event)","keydown.Tab":"dropdown.onKeyDown($event)","keydown.Shift.Tab":"dropdown.onKeyDown($event)"},properties:{"class.dropdown-menu":"true","class.show":"dropdown.isOpen()"}},queries:[{propertyName:"menuItems",predicate:Ii}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ki,decorators:[{type:m.Directive,args:[{selector:"[ngbDropdownMenu]",standalone:!0,host:{"[class.dropdown-menu]":"true","[class.show]":"dropdown.isOpen()","(keydown.ArrowUp)":"dropdown.onKeyDown($event)","(keydown.ArrowDown)":"dropdown.onKeyDown($event)","(keydown.Home)":"dropdown.onKeyDown($event)","(keydown.End)":"dropdown.onKeyDown($event)","(keydown.Enter)":"dropdown.onKeyDown($event)","(keydown.Space)":"dropdown.onKeyDown($event)","(keydown.Tab)":"dropdown.onKeyDown($event)","(keydown.Shift.Tab)":"dropdown.onKeyDown($event)"}}]}],ctorParameters:function(){return[{type:Si,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>Si)]}]},{type:m.ElementRef}]},propDecorators:{menuItems:[{type:m.ContentChildren,args:[Ii]}]}});class Ci{constructor(t,e){this.dropdown=t,this.nativeElement=e.nativeElement}}Ci.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ci,deps:[{token:(0,m.forwardRef)(()=>Si)},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),Ci.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ci,isStandalone:!0,selector:"[ngbDropdownAnchor]",host:{properties:{"attr.aria-expanded":"dropdown.isOpen()"},classAttribute:"dropdown-toggle"},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ci,decorators:[{type:m.Directive,args:[{selector:"[ngbDropdownAnchor]",standalone:!0,host:{class:"dropdown-toggle","[attr.aria-expanded]":"dropdown.isOpen()"}}]}],ctorParameters:function(){return[{type:Si,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>Si)]}]},{type:m.ElementRef}]}});class Mi extends Ci{constructor(t,e){super(t,e)}}Mi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Mi,deps:[{token:(0,m.forwardRef)(()=>Si)},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),Mi.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Mi,isStandalone:!0,selector:"[ngbDropdownToggle]",host:{listeners:{click:"dropdown.toggle()","keydown.ArrowUp":"dropdown.onKeyDown($event)","keydown.ArrowDown":"dropdown.onKeyDown($event)","keydown.Home":"dropdown.onKeyDown($event)","keydown.End":"dropdown.onKeyDown($event)","keydown.Tab":"dropdown.onKeyDown($event)","keydown.Shift.Tab":"dropdown.onKeyDown($event)"},properties:{"attr.aria-expanded":"dropdown.isOpen()"},classAttribute:"dropdown-toggle"},providers:[{provide:Ci,useExisting:(0,m.forwardRef)(()=>Mi)}],usesInheritance:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Mi,decorators:[{type:m.Directive,args:[{selector:"[ngbDropdownToggle]",standalone:!0,host:{class:"dropdown-toggle","[attr.aria-expanded]":"dropdown.isOpen()","(click)":"dropdown.toggle()","(keydown.ArrowUp)":"dropdown.onKeyDown($event)","(keydown.ArrowDown)":"dropdown.onKeyDown($event)","(keydown.Home)":"dropdown.onKeyDown($event)","(keydown.End)":"dropdown.onKeyDown($event)","(keydown.Tab)":"dropdown.onKeyDown($event)","(keydown.Shift.Tab)":"dropdown.onKeyDown($event)"},providers:[{provide:Ci,useExisting:(0,m.forwardRef)(()=>Mi)}]}]}],ctorParameters:function(){return[{type:Si,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>Si)]}]},{type:m.ElementRef}]}});class Si{constructor(t,e,n,i,s,a){this._changeDetector=t,this._document=n,this._ngZone=i,this._elementRef=s,this._renderer=a,this._destroyCloseHandlers$=new v.Subject,this._bodyContainer=null,this._open=!1,this.openChange=new m.EventEmitter,this.placement=e.placement,this.popperOptions=e.popperOptions,this.container=e.container,this.autoClose=e.autoClose,this._positioning=kn(),this.display=this._elementRef.nativeElement.closest(".navbar")?"static":"dynamic"}ngAfterContentInit(){this._ngZone.onStable.pipe((0,_.take)(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(t){if(t.container&&this._open&&this._applyContainer(this.container),t.placement&&!t.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container}),this._applyPlacementClasses()),t.dropdownClass){const{currentValue:e,previousValue:n}=t.dropdownClass;this._applyCustomDropdownClass(e,n)}t.autoClose&&this._open&&(this.autoClose=t.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),"dynamic"===this.display&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(Mn([0,2])(t))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),hn(this._ngZone,this._document,this.autoClose,t=>{this.close(),0===t&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){var t;this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(t){const e=t.which,n=this._getMenuElements();let i=-1,s=null;const a=this._isEventFromToggle(t);if(!a&&n.length&&n.forEach((e,n)=>{e.contains(t.target)&&(s=e),e===this._document.activeElement&&(i=n)}),e!==Pe.Space&&e!==Pe.Enter){if(e!==Pe.Tab){if(a||s){if(this.open(),n.length){switch(e){case Pe.ArrowDown:i=Math.min(i+1,n.length-1);break;case Pe.ArrowUp:if(this._isDropup()&&-1===i){i=n.length-1;break}i=Math.max(i-1,0);break;case Pe.Home:i=0;break;case Pe.End:i=n.length-1}n[i].focus()}t.preventDefault()}}else if(t.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===t.target)return void("body"!==this.container||t.shiftKey?t.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const e=this._menu.nativeElement.querySelectorAll(pn);t.shiftKey&&t.target===e[0]?(this._anchor.nativeElement.focus(),t.preventDefault()):t.shiftKey||t.target!==e[e.length-1]||(this._anchor.nativeElement.focus(),this.close())}else(0,v.fromEvent)(t.target,"focusout").pipe((0,_.take)(1)).subscribe(({relatedTarget:t})=>{this._elementRef.nativeElement.contains(t)||this.close()})}}else!s||!0!==this.autoClose&&"inside"!==this.autoClose||(0,v.fromEvent)(s,"click").pipe((0,_.take)(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(t){return this._anchor.nativeElement.contains(t.target)}_getMenuElements(){const t=this._menu;return null==t?[]:t.menuItems.filter(t=>!t.disabled).map(t=>t.elementRef.nativeElement)}_positionMenu(){const t=this._menu;this.isOpen()&&t&&("dynamic"===this.display?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(t){return Array.isArray(t)?t[0]:t.split(" ")[0]}_resetContainer(){const t=this._renderer;if(this._menu){const e=this._elementRef.nativeElement,n=this._menu.nativeElement;t.appendChild(e,n)}this._bodyContainer&&(t.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(t=null){if(this._resetContainer(),"body"===t){const t=this._renderer,e=this._menu.nativeElement,n=this._bodyContainer=this._bodyContainer||t.createElement("div");t.setStyle(n,"position","absolute"),t.setStyle(e,"position","static"),t.setStyle(n,"z-index","1055"),t.appendChild(n,e),t.appendChild(this._document.body,n)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(t,e){const n="body"===this.container?this._bodyContainer:this._elementRef.nativeElement;n&&(e&&this._renderer.removeClass(n,e),t&&this._renderer.addClass(n,t))}_applyPlacementClasses(t){const e=this._menu;if(e){t||(t=this._getFirstPlacement(this.placement));const n=this._renderer,i=this._elementRef.nativeElement;n.removeClass(i,"dropup"),n.removeClass(i,"dropdown");const{nativeElement:s}=e;"static"===this.display?(e.placement=null,n.setAttribute(s,"data-bs-popper","static")):(e.placement=t,n.removeAttribute(s,"data-bs-popper"));const a=-1!==t.search("^top")?"dropup":"dropdown";n.addClass(i,a);const o=this._bodyContainer;o&&(n.removeClass(o,"dropup"),n.removeClass(o,"dropdown"),n.addClass(o,a))}}}Si.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Si,deps:[{token:m.ChangeDetectorRef},{token:wi},{token:b.DOCUMENT},{token:m.NgZone},{token:m.ElementRef},{token:m.Renderer2}],target:m["ɵɵFactoryTarget"].Directive}),Si.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Si,isStandalone:!0,selector:"[ngbDropdown]",inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:["open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},host:{properties:{"class.show":"isOpen()"}},queries:[{propertyName:"_menu",first:!0,predicate:ki,descendants:!0},{propertyName:"_anchor",first:!0,predicate:Ci,descendants:!0}],exportAs:["ngbDropdown"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Si,decorators:[{type:m.Directive,args:[{selector:"[ngbDropdown]",exportAs:"ngbDropdown",standalone:!0,host:{"[class.show]":"isOpen()"}}]}],ctorParameters:function(){return[{type:m.ChangeDetectorRef},{type:wi},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.NgZone},{type:m.ElementRef},{type:m.Renderer2}]},propDecorators:{_menu:[{type:m.ContentChild,args:[ki,{static:!1}]}],_anchor:[{type:m.ContentChild,args:[Ci,{static:!1}]}],autoClose:[{type:m.Input}],dropdownClass:[{type:m.Input}],_open:[{type:m.Input,args:["open"]}],placement:[{type:m.Input}],popperOptions:[{type:m.Input}],container:[{type:m.Input}],display:[{type:m.Input}],openChange:[{type:m.Output}]}});const Ti=[Si,Ci,Mi,ki,Ii];class Oi{}Oi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Oi,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Oi.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Oi,imports:[Si,Ci,Mi,ki,Ii],exports:[Si,Ci,Mi,ki,Ii]}),Oi.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Oi}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Oi,decorators:[{type:m.NgModule,args:[{imports:Ti,exports:Ti}]}]});class Ei{constructor(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}}class Ri{constructor(t,e,n,i,s,a){this._componentType=t,this._injector=e,this._viewContainerRef=n,this._renderer=i,this._ngZone=s,this._applicationRef=a,this._windowRef=null,this._contentRef=null}open(t,e,n=!1){this._windowRef||(this._contentRef=this._getContentRef(t,e),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));const{nativeElement:i}=this._windowRef.location,s=this._ngZone.onStable.pipe((0,_.take)(1),(0,_.mergeMap)(()=>Yt(this._ngZone,i,({classList:t})=>t.add("show"),{animation:n,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:s}}close(t=!1){return this._windowRef?Yt(this._ngZone,this._windowRef.location.nativeElement,({classList:t})=>t.remove("show"),{animation:t,runningTransition:"stop"}).pipe((0,_.tap)(()=>{var t;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),(null===(t=this._contentRef)||void 0===t?void 0:t.viewRef)&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):(0,v.of)(void 0)}_getContentRef(t,e){if(t){if(t instanceof m.TemplateRef){const n=t.createEmbeddedView(e);return this._applicationRef.attachView(n),new Ei([n.rootNodes],n)}return new Ei([[this._renderer.createText(`${t}`)]])}return new Ei([])}}class Pi{constructor(t,e){this._el=t,this._zone=e}ngOnInit(){this._zone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{Yt(this._zone,this._el.nativeElement,(t,e)=>{e&&Bt(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Yt(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}}Pi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Pi,deps:[{token:m.ElementRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),Pi.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Pi,isStandalone:!0,selector:"ngb-modal-backdrop",inputs:{animation:"animation",backdropClass:"backdropClass"},host:{properties:{class:'"modal-backdrop" + (backdropClass ? " " + backdropClass : "")',"class.show":"!animation","class.fade":"animation"},styleAttribute:"z-index: 1055"},ngImport:f,template:"",isInline:!0,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Pi,decorators:[{type:m.Component,args:[{selector:"ngb-modal-backdrop",standalone:!0,encapsulation:m.ViewEncapsulation.None,template:"",host:{"[class]":'"modal-backdrop" + (backdropClass ? " " + backdropClass : "")',"[class.show]":"!animation","[class.fade]":"animation",style:"z-index: 1055"}}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.NgZone}]},propDecorators:{animation:[{type:m.Input}],backdropClass:[{type:m.Input}]}});class Fi{update(t){}close(t){}dismiss(t){}}const Vi=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],Ai=["animation","backdropClass"];class Ni{constructor(t,e,n,i){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=i,this._closed=new v.Subject,this._dismissed=new v.Subject,this._hidden=new v.Subject,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}_applyWindowOptions(t,e){Vi.forEach(n=>{Nt(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){Ai.forEach(n=>{Nt(e[n])&&(t[n]=e[n])})}update(t){this._applyWindowOptions(this._windowCmptRef.instance,t),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,t)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe((0,_.takeUntil)(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe((0,_.takeUntil)(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();jt(e)?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():(0,v.of)(void 0);t.subscribe(()=>{const{nativeElement:t}=this._windowCmptRef.location;t.parentNode.removeChild(t),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:t}=this._backdropCmptRef.location;t.parentNode.removeChild(t),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),(0,v.zip)(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var ji;!function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(ji||(ji={}));class Li{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new v.Subject,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new m.EventEmitter,this.shown=new v.Subject,this.hidden=new v.Subject}get fullscreenClass(){return!0===this.fullscreen?" modal-fullscreen":Ft(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,e={animation:this.animation,runningTransition:"stop"},n=Yt(this._zone,t,()=>t.classList.remove("show"),e),i=Yt(this._zone,this._dialogEl.nativeElement,()=>{},e),s=(0,v.zip)(n,i);return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const t={animation:this.animation,runningTransition:"continue"},e=Yt(this._zone,this._elRef.nativeElement,(t,e)=>{e&&Bt(t),t.classList.add("show")},t),n=Yt(this._zone,this._dialogEl.nativeElement,()=>{},t);(0,v.zip)(e,n).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{(0,v.fromEvent)(t,"keydown").pipe((0,_.takeUntil)(this._closed$),(0,_.filter)(t=>t.which===Pe.Escape)).subscribe(t=>{this.keyboard?requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(ji.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let e=!1;(0,v.fromEvent)(this._dialogEl.nativeElement,"mousedown").pipe((0,_.takeUntil)(this._closed$),(0,_.tap)(()=>e=!1),(0,_.switchMap)(()=>(0,v.fromEvent)(t,"mouseup").pipe((0,_.takeUntil)(this._closed$),(0,_.take)(1))),(0,_.filter)(({target:e})=>t===e)).subscribe(()=>{e=!0}),(0,v.fromEvent)(t,"click").pipe((0,_.takeUntil)(this._closed$)).subscribe(({target:n})=>{t===n&&("static"===this.backdrop?this._bumpBackdrop():!0!==this.backdrop||e||this._zone.run(()=>this.dismiss(ji.BACKDROP_CLICK))),e=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=un(t)[0];(e||n||t).focus()}}_restoreFocus(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&Yt(this._zone,this._elRef.nativeElement,({classList:t})=>(t.add("modal-static"),()=>t.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}Li.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Li,deps:[{token:b.DOCUMENT},{token:m.ElementRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),Li.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Li,isStandalone:!0,selector:"ngb-modal-window",inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},host:{attributes:{role:"dialog",tabindex:"-1"},properties:{class:'"modal d-block" + (windowClass ? " " + windowClass : "")',"class.fade":"animation","attr.aria-modal":"true","attr.aria-labelledby":"ariaLabelledBy","attr.aria-describedby":"ariaDescribedBy"}},viewQueries:[{propertyName:"_dialogEl",first:!0,predicate:["dialog"],descendants:!0,static:!0}],ngImport:f,template:"\n\t\t<div\n\t\t\t#dialog\n\t\t\t[class]=\"\n\t\t\t\t'modal-dialog' +\n\t\t\t\t(size ? ' modal-' + size : '') +\n\t\t\t\t(centered ? ' modal-dialog-centered' : '') +\n\t\t\t\tfullscreenClass +\n\t\t\t\t(scrollable ? ' modal-dialog-scrollable' : '') +\n\t\t\t\t(modalDialogClass ? ' ' + modalDialogClass : '')\n\t\t\t\"\n\t\t\trole=\"document\"\n\t\t>\n\t\t\t<div class=\"modal-content\"><ng-content></ng-content></div>\n\t\t</div>\n\t",isInline:!0,styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Li,decorators:[{type:m.Component,args:[{selector:"ngb-modal-window",standalone:!0,host:{"[class]":'"modal d-block" + (windowClass ? " " + windowClass : "")',"[class.fade]":"animation",role:"dialog",tabindex:"-1","[attr.aria-modal]":"true","[attr.aria-labelledby]":"ariaLabelledBy","[attr.aria-describedby]":"ariaDescribedBy"},template:"\n\t\t<div\n\t\t\t#dialog\n\t\t\t[class]=\"\n\t\t\t\t'modal-dialog' +\n\t\t\t\t(size ? ' modal-' + size : '') +\n\t\t\t\t(centered ? ' modal-dialog-centered' : '') +\n\t\t\t\tfullscreenClass +\n\t\t\t\t(scrollable ? ' modal-dialog-scrollable' : '') +\n\t\t\t\t(modalDialogClass ? ' ' + modalDialogClass : '')\n\t\t\t\"\n\t\t\trole=\"document\"\n\t\t>\n\t\t\t<div class=\"modal-content\"><ng-content></ng-content></div>\n\t\t</div>\n\t",encapsulation:m.ViewEncapsulation.None,styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"]}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.ElementRef},{type:m.NgZone}]},propDecorators:{_dialogEl:[{type:m.ViewChild,args:["dialog",{static:!0}]}],animation:[{type:m.Input}],ariaLabelledBy:[{type:m.Input}],ariaDescribedBy:[{type:m.Input}],backdrop:[{type:m.Input}],centered:[{type:m.Input}],fullscreen:[{type:m.Input}],keyboard:[{type:m.Input}],scrollable:[{type:m.Input}],size:[{type:m.Input}],windowClass:[{type:m.Input}],modalDialogClass:[{type:m.Input}],dismissEvent:[{type:m.Output,args:["dismiss"]}]}});class zi{constructor(t){this._document=t}hide(){const t=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),e=this._document.body,n=e.style,{overflow:i,paddingRight:s}=n;if(t>0){const i=parseFloat(window.getComputedStyle(e).paddingRight);n.paddingRight=`${i+t}px`}return n.overflow="hidden",()=>{t>0&&(n.paddingRight=s),n.overflow=i}}}zi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zi,deps:[{token:b.DOCUMENT}],target:m["ɵɵFactoryTarget"].Injectable}),zi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zi,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zi,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]}]}});class Bi{constructor(t,e,n,i,s,a,o){this._applicationRef=t,this._injector=e,this._environmentInjector=n,this._document=i,this._scrollBar=s,this._rendererFactory=a,this._ngZone=o,this._activeWindowCmptHasChanged=new v.Subject,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new m.EventEmitter,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const t=this._windowCmpts[this._windowCmpts.length-1];gn(this._ngZone,t.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(t.location.nativeElement)}})}_restoreScrollBar(){const t=this._scrollBarRestoreFn;t&&(this._scrollBarRestoreFn=null,t())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(t,e,n){const i=n.container instanceof HTMLElement?n.container:Nt(n.container)?this._document.querySelector(n.container):this._document.body,s=this._rendererFactory.createRenderer(null,null);if(!i)throw new Error(`The specified modal container "${n.container||"body"}" was not found in the DOM.`);this._hideScrollBar();const a=new Fi,o=(t=n.injector||t).get(m.EnvironmentInjector,null)||this._environmentInjector,r=this._getContentRef(t,o,e,a,n);let l=!1!==n.backdrop?this._attachBackdrop(i):void 0,c=this._attachWindowComponent(i,r.nodes),d=new Ni(c,r,l,n.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(c),d.hidden.pipe((0,_.take)(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(s.removeClass(this._document.body,"modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),a.close=t=>{d.close(t)},a.dismiss=t=>{d.dismiss(t)},a.update=t=>{d.update(t)},d.update(n),1===this._modalRefs.length&&s.addClass(this._document.body,"modal-open"),l&&l.instance&&l.changeDetectorRef.detectChanges(),c.changeDetectorRef.detectChanges(),d}get activeInstances(){return this._activeInstances}dismissAll(t){this._modalRefs.forEach(e=>e.dismiss(t))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(t){let e=(0,m.createComponent)(Pi,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(e.hostView),t.appendChild(e.location.nativeElement),e}_attachWindowComponent(t,e){let n=(0,m.createComponent)(Li,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:e});return this._applicationRef.attachView(n.hostView),t.appendChild(n.location.nativeElement),n}_getContentRef(t,e,n,i,s){return n?n instanceof m.TemplateRef?this._createFromTemplateRef(n,i):Ft(n)?this._createFromString(n):this._createFromComponent(t,e,n,i,s):new Ei([])}_createFromTemplateRef(t,e){const n={$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}},i=t.createEmbeddedView(n);return this._applicationRef.attachView(i),new Ei([i.rootNodes],i)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new Ei([[e]])}_createFromComponent(t,e,n,i,s){const a=m.Injector.create({providers:[{provide:Fi,useValue:i}],parent:t}),o=(0,m.createComponent)(n,{environmentInjector:e,elementInjector:a}),r=o.location.nativeElement;return s.scrollable&&r.classList.add("component-host-scrollable"),this._applicationRef.attachView(o.hostView),new Ei([[r]],o.hostView,o)}_setAriaHidden(t){const e=t.parentElement;e&&t!==this._document.body&&(Array.from(e.children).forEach(e=>{e!==t&&"SCRIPT"!==e.nodeName&&(this._ariaHiddenValues.set(e,e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}),this._setAriaHidden(e))}_revertAriaHidden(){this._ariaHiddenValues.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(t){const e=()=>{const e=this._modalRefs.indexOf(t);e>-1&&(this._modalRefs.splice(e,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(t),this._activeInstances.emit(this._modalRefs),t.result.then(e,e)}_registerWindowCmpt(t){this._windowCmpts.push(t),this._activeWindowCmptHasChanged.next(),t.onDestroy(()=>{const e=this._windowCmpts.indexOf(t);e>-1&&(this._windowCmpts.splice(e,1),this._activeWindowCmptHasChanged.next())})}}Bi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Bi,deps:[{token:m.ApplicationRef},{token:m.Injector},{token:m.EnvironmentInjector},{token:b.DOCUMENT},{token:zi},{token:m.RendererFactory2},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Injectable}),Bi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Bi,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Bi,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:m.ApplicationRef},{type:m.Injector},{type:m.EnvironmentInjector},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:zi},{type:m.RendererFactory2},{type:m.NgZone}]}});class $i{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}$i.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$i,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),$i.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$i,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$i,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});class Hi{constructor(t,e,n){this._injector=t,this._modalStack=e,this._config=n}open(t,e={}){const n=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),e);return this._modalStack.open(this._injector,t,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(t){this._modalStack.dismissAll(t)}hasOpenModals(){return this._modalStack.hasOpenModals()}}Hi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hi,deps:[{token:m.Injector},{token:Bi},{token:$i}],target:m["ɵɵFactoryTarget"].Injectable}),Hi.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hi,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hi,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:m.Injector},{type:Bi},{type:$i}]}});class Wi{}Wi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Wi,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Wi.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Wi}),Wi.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Wi,providers:[Hi]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Wi,decorators:[{type:m.NgModule,args:[{providers:[Hi]}]}]});class Ui{constructor(t){this._ngbConfig=t,this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Ui.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ui,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),Ui.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ui,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ui,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});const qi=t=>Nt(t)&&""!==t;let Yi=0;class Zi{constructor(t){this.templateRef=t}}Zi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Zi,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),Zi.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Zi,isStandalone:!0,selector:"ng-template[ngbNavContent]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Zi,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbNavContent]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class Ki{constructor(t,e){this.role=t,this.nav=e}}Ki.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ki,deps:[{token:"role",attribute:!0},{token:(0,m.forwardRef)(()=>Xi)}],target:m["ɵɵFactoryTarget"].Directive}),Ki.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ki,isStandalone:!0,selector:"[ngbNavItem]:not(ng-container)",host:{properties:{"attr.role":"role ? role : nav.roles ? 'presentation' : undefined"}},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ki,decorators:[{type:m.Directive,args:[{selector:"[ngbNavItem]:not(ng-container)",standalone:!0,host:{"[attr.role]":"role ? role : nav.roles ? 'presentation' : undefined"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Attribute,args:["role"]}]},{type:Xi,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>Xi)]}]}]}});class Gi{constructor(t,e){this._nav=t,this.elementRef=e,this.disabled=!1,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){Nt(this.domId)||(this.domId="ngb-nav-"+Yi++)}get active(){return this._nav.activeId===this.id}get id(){return qi(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Nt(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}Gi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gi,deps:[{token:(0,m.forwardRef)(()=>Xi)},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),Gi.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Gi,isStandalone:!0,selector:"[ngbNavItem]",inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},host:{properties:{"class.nav-item":"true"}},queries:[{propertyName:"contentTpls",predicate:Zi}],exportAs:["ngbNavItem"],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gi,decorators:[{type:m.Directive,args:[{selector:"[ngbNavItem]",exportAs:"ngbNavItem",standalone:!0,host:{"[class.nav-item]":"true"}}]}],ctorParameters:function(){return[{type:Xi,decorators:[{type:m.Inject,args:[(0,m.forwardRef)(()=>Xi)]}]},{type:m.ElementRef}]},propDecorators:{destroyOnHide:[{type:m.Input}],disabled:[{type:m.Input}],domId:[{type:m.Input}],_id:[{type:m.Input,args:["ngbNavItem"]}],shown:[{type:m.Output}],hidden:[{type:m.Output}],contentTpls:[{type:m.ContentChildren,args:[Zi,{descendants:!1}]}]}});class Xi{constructor(t,e,n,i){this.role=t,this._cd=n,this._document=i,this.activeIdChange=new m.EventEmitter,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this.destroy$=new v.Subject,this.navItemChange$=new v.Subject,this.navChange=new m.EventEmitter,this.animation=e.animation,this.destroyOnHide=e.destroyOnHide,this.orientation=e.orientation,this.roles=e.roles,this.keyboard=e.keyboard}click(t){t.disabled||this._updateActiveId(t.id)}onKeyDown(t){if("tablist"!==this.roles||!this.keyboard)return;const e=t.which,n=this.links.filter(t=>!t.navItem.disabled),{length:i}=n;let s=-1;if(n.forEach((t,e)=>{t.elRef.nativeElement===this._document.activeElement&&(s=e)}),i){switch(e){case Pe.ArrowLeft:if("vertical"===this.orientation)return;s=(s-1+i)%i;break;case Pe.ArrowRight:if("vertical"===this.orientation)return;s=(s+1)%i;break;case Pe.ArrowDown:if("horizontal"===this.orientation)return;s=(s+1)%i;break;case Pe.ArrowUp:if("horizontal"===this.orientation)return;s=(s-1+i)%i;break;case Pe.Home:s=0;break;case Pe.End:s=i-1}"changeWithArrows"===this.keyboard&&this.select(n[s].navItem.id),n[s].elRef.nativeElement.focus(),t.preventDefault()}}select(t){this._updateActiveId(t,!1)}ngAfterContentInit(){if(!Nt(this.activeId)){const t=this.items.first?this.items.first.id:null;qi(t)&&(this._updateActiveId(t,!1),this._cd.detectChanges())}this.items.changes.pipe((0,_.takeUntil)(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:t}){t&&!t.firstChange&&this._notifyItemChanged(t.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(t,e=!0){if(this.activeId!==t){let n=!1;e&&this.navChange.emit({activeId:this.activeId,nextId:t,preventDefault:()=>{n=!0}}),n||(this.activeId=t,this.activeIdChange.emit(t),this._notifyItemChanged(t))}}_notifyItemChanged(t){this.navItemChange$.next(this._getItemById(t))}_getItemById(t){return this.items&&this.items.find(e=>e.id===t)||null}}Xi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xi,deps:[{token:"role",attribute:!0},{token:Ui},{token:m.ChangeDetectorRef},{token:b.DOCUMENT}],target:m["ɵɵFactoryTarget"].Directive}),Xi.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Xi,isStandalone:!0,selector:"[ngbNav]",inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},host:{listeners:{"keydown.arrowLeft":"onKeyDown($event)","keydown.arrowRight":"onKeyDown($event)","keydown.arrowDown":"onKeyDown($event)","keydown.arrowUp":"onKeyDown($event)","keydown.Home":"onKeyDown($event)","keydown.End":"onKeyDown($event)"},properties:{"class.nav":"true","class.flex-column":"orientation === 'vertical'","attr.aria-orientation":"orientation === 'vertical' && roles === 'tablist' ? 'vertical' : undefined","attr.role":"role ? role : roles ? 'tablist' : undefined"}},queries:[{propertyName:"items",predicate:Gi},{propertyName:"links",predicate:m.forwardRef(function(){return Ji}),descendants:!0}],exportAs:["ngbNav"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Xi,decorators:[{type:m.Directive,args:[{selector:"[ngbNav]",exportAs:"ngbNav",standalone:!0,host:{"[class.nav]":"true","[class.flex-column]":"orientation === 'vertical'","[attr.aria-orientation]":"orientation === 'vertical' && roles === 'tablist' ? 'vertical' : undefined","[attr.role]":"role ? role : roles ? 'tablist' : undefined","(keydown.arrowLeft)":"onKeyDown($event)","(keydown.arrowRight)":"onKeyDown($event)","(keydown.arrowDown)":"onKeyDown($event)","(keydown.arrowUp)":"onKeyDown($event)","(keydown.Home)":"onKeyDown($event)","(keydown.End)":"onKeyDown($event)"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Attribute,args:["role"]}]},{type:Ui},{type:m.ChangeDetectorRef},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]}]},propDecorators:{activeId:[{type:m.Input}],activeIdChange:[{type:m.Output}],animation:[{type:m.Input}],destroyOnHide:[{type:m.Input}],orientation:[{type:m.Input}],roles:[{type:m.Input}],keyboard:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}],items:[{type:m.ContentChildren,args:[Gi]}],links:[{type:m.ContentChildren,args:[(0,m.forwardRef)(()=>Ji),{descendants:!0}]}],navChange:[{type:m.Output}]}});class Ji{constructor(t,e,n,i){this.role=t,this.navItem=e,this.nav=n,this.elRef=i}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}Ji.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ji,deps:[{token:"role",attribute:!0},{token:Gi},{token:Xi},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),Ji.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ji,isStandalone:!0,selector:"[ngbNavLink]",host:{properties:{id:"navItem.domId","class.nav-link":"true","class.nav-item":"hasNavItemClass()","attr.role":"role ? role : nav.roles ? 'tab' : undefined","class.active":"navItem.active","class.disabled":"navItem.disabled","attr.tabindex":"navItem.disabled ? -1 : undefined","attr.aria-controls":"navItem.isPanelInDom() ? navItem.panelDomId : null","attr.aria-selected":"navItem.active","attr.aria-disabled":"navItem.disabled"}},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ji,decorators:[{type:m.Directive,args:[{selector:"[ngbNavLink]",standalone:!0,host:{"[id]":"navItem.domId","[class.nav-link]":"true","[class.nav-item]":"hasNavItemClass()","[attr.role]":"role ? role : nav.roles ? 'tab' : undefined","[class.active]":"navItem.active","[class.disabled]":"navItem.disabled","[attr.tabindex]":"navItem.disabled ? -1 : undefined","[attr.aria-controls]":"navItem.isPanelInDom() ? navItem.panelDomId : null","[attr.aria-selected]":"navItem.active","[attr.aria-disabled]":"navItem.disabled"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Attribute,args:["role"]}]},{type:Gi},{type:Xi},{type:m.ElementRef}]}});class Qi{constructor(t,e){this.navItem=t,this.nav=e}}Qi.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qi,deps:[{token:Gi},{token:Xi}],target:m["ɵɵFactoryTarget"].Directive}),Qi.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Qi,isStandalone:!0,selector:"button[ngbNavLink]",host:{attributes:{type:"button"},listeners:{click:"nav.click(navItem)"},properties:{disabled:"navItem.disabled"}},hostDirectives:[{directive:Ji}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qi,decorators:[{type:m.Directive,args:[{selector:"button[ngbNavLink]",standalone:!0,hostDirectives:[Ji],host:{type:"button","[disabled]":"navItem.disabled","(click)":"nav.click(navItem)"}}]}],ctorParameters:function(){return[{type:Gi},{type:Xi}]}});class ts{constructor(t,e){this.navItem=t,this.nav=e}}ts.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ts,deps:[{token:Gi},{token:Xi}],target:m["ɵɵFactoryTarget"].Directive}),ts.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ts,isStandalone:!0,selector:"a[ngbNavLink]",host:{attributes:{href:""},listeners:{click:"nav.click(navItem); $event.preventDefault()"}},hostDirectives:[{directive:Ji}],ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ts,decorators:[{type:m.Directive,args:[{selector:"a[ngbNavLink]",standalone:!0,hostDirectives:[Ji],host:{href:"","(click)":"nav.click(navItem); $event.preventDefault()"}}]}],ctorParameters:function(){return[{type:Gi},{type:Xi}]}});const es=({classList:t})=>(t.remove("show"),()=>t.remove("active")),ns=(t,e)=>{e&&Bt(t),t.classList.add("show")};class is{constructor(t){this.elRef=t}}is.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:is,deps:[{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Directive}),is.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:is,isStandalone:!0,selector:"[ngbNavPane]",inputs:{item:"item",nav:"nav",role:"role"},host:{properties:{id:"item.panelDomId","class.fade":"nav.animation","attr.role":'role ? role : nav.roles ? "tabpanel" : undefined',"attr.aria-labelledby":"item.domId"},classAttribute:"tab-pane"},ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:is,decorators:[{type:m.Directive,args:[{selector:"[ngbNavPane]",standalone:!0,host:{"[id]":"item.panelDomId",class:"tab-pane","[class.fade]":"nav.animation","[attr.role]":'role ? role : nav.roles ? "tabpanel" : undefined',"[attr.aria-labelledby]":"item.domId"}}]}],ctorParameters:function(){return[{type:m.ElementRef}]},propDecorators:{item:[{type:m.Input}],nav:[{type:m.Input}],role:[{type:m.Input}]}});class ss{constructor(t,e){this._cd=t,this._ngZone=e,this._activePane=null}isPanelTransitioning(t){var e;return(null===(e=this._activePane)||void 0===e?void 0:e.item)===t}ngAfterViewInit(){var t;this._updateActivePane(),this.nav.navItemChange$.pipe((0,_.takeUntil)(this.nav.destroy$),(0,_.startWith)((null===(t=this._activePane)||void 0===t?void 0:t.item)||null),(0,_.distinctUntilChanged)(),(0,_.skip)(1)).subscribe(t=>{const e={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?Yt(this._ngZone,this._activePane.elRef.nativeElement,es,e).subscribe(()=>{var n;const i=null===(n=this._activePane)||void 0===n?void 0:n.item;this._activePane=this._getPaneForItem(t),this._cd.markForCheck(),this._activePane&&(this._activePane.elRef.nativeElement.classList.add("active"),Yt(this._ngZone,this._activePane.elRef.nativeElement,ns,e).subscribe(()=>{t&&(t.shown.emit(),this.nav.shown.emit(t.id))})),i&&(i.hidden.emit(),this.nav.hidden.emit(i.id))}):this._updateActivePane()})}_updateActivePane(){var t,e;this._activePane=this._getActivePane(),null===(t=this._activePane)||void 0===t||t.elRef.nativeElement.classList.add("show"),null===(e=this._activePane)||void 0===e||e.elRef.nativeElement.classList.add("active")}_getPaneForItem(t){return this._panes&&this._panes.find(e=>e.item===t)||null}_getActivePane(){return this._panes&&this._panes.find(t=>t.item.active)||null}}ss.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ss,deps:[{token:m.ChangeDetectorRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),ss.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ss,isStandalone:!0,selector:"[ngbNavOutlet]",inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},host:{properties:{"class.tab-content":"true"}},viewQueries:[{propertyName:"_panes",predicate:is,descendants:!0}],ngImport:f,template:'\n\t\t<ng-template ngFor let-item [ngForOf]="nav.items">\n\t\t\t<div\n\t\t\t\tngbNavPane\n\t\t\t\t*ngIf="item.isPanelInDom() || isPanelTransitioning(item)"\n\t\t\t\t[item]="item"\n\t\t\t\t[nav]="nav"\n\t\t\t\t[role]="paneRole"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="item.contentTpl?.templateRef || null"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: item.active || isPanelTransitioning(item) }"\n\t\t\t\t></ng-template>\n\t\t\t</div>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:is,selector:"[ngbNavPane]",inputs:["item","nav","role"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ss,decorators:[{type:m.Component,args:[{selector:"[ngbNavOutlet]",standalone:!0,imports:[is,b.NgFor,b.NgIf,b.NgTemplateOutlet],host:{"[class.tab-content]":"true"},encapsulation:m.ViewEncapsulation.None,changeDetection:m.ChangeDetectionStrategy.OnPush,template:'\n\t\t<ng-template ngFor let-item [ngForOf]="nav.items">\n\t\t\t<div\n\t\t\t\tngbNavPane\n\t\t\t\t*ngIf="item.isPanelInDom() || isPanelTransitioning(item)"\n\t\t\t\t[item]="item"\n\t\t\t\t[nav]="nav"\n\t\t\t\t[role]="paneRole"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="item.contentTpl?.templateRef || null"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: item.active || isPanelTransitioning(item) }"\n\t\t\t\t></ng-template>\n\t\t\t</div>\n\t\t</ng-template>\n\t'}]}],ctorParameters:function(){return[{type:m.ChangeDetectorRef},{type:m.NgZone}]},propDecorators:{_panes:[{type:m.ViewChildren,args:[is]}],paneRole:[{type:m.Input}],nav:[{type:m.Input,args:["ngbNavOutlet"]}]}});const as=[Zi,Xi,Gi,Ki,ts,Qi,Ji,ss,is];class os{}os.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:os,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),os.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:os,imports:[Zi,Xi,Gi,Ki,ts,Qi,Ji,ss,is],exports:[Zi,Xi,Gi,Ki,ts,Qi,Ji,ss,is]}),os.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:os,imports:[ss]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:os,decorators:[{type:m.NgModule,args:[{imports:as,exports:as}]}]});class rs{constructor(){this.disabled=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.ellipses=!0,this.maxSize=0,this.pageSize=10,this.rotate=!1}}rs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:rs,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),rs.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:rs,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:rs,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class ls{constructor(t){this.templateRef=t}}ls.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ls,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),ls.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ls,isStandalone:!0,selector:"ng-template[ngbPaginationEllipsis]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ls,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationEllipsis]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class cs{constructor(t){this.templateRef=t}}cs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:cs,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),cs.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:cs,isStandalone:!0,selector:"ng-template[ngbPaginationFirst]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:cs,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationFirst]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class ds{constructor(t){this.templateRef=t}}ds.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ds,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),ds.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ds,isStandalone:!0,selector:"ng-template[ngbPaginationLast]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ds,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationLast]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class hs{constructor(t){this.templateRef=t}}hs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:hs,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),hs.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:hs,isStandalone:!0,selector:"ng-template[ngbPaginationNext]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:hs,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationNext]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class ps{constructor(t){this.templateRef=t}}ps.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ps,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),ps.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ps,isStandalone:!0,selector:"ng-template[ngbPaginationNumber]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ps,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationNumber]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class us{constructor(t){this.templateRef=t}}us.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:us,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),us.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:us,isStandalone:!0,selector:"ng-template[ngbPaginationPrevious]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:us,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationPrevious]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class gs{constructor(t){this.templateRef=t}}gs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:gs,deps:[{token:m.TemplateRef}],target:m["ɵɵFactoryTarget"].Directive}),gs.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:gs,isStandalone:!0,selector:"ng-template[ngbPaginationPages]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:gs,decorators:[{type:m.Directive,args:[{selector:"ng-template[ngbPaginationPages]",standalone:!0}]}],ctorParameters:function(){return[{type:m.TemplateRef}]}});class ms{constructor(t){this.pageCount=0,this.pages=[],this.page=1,this.pageChange=new m.EventEmitter(!0),this.disabled=t.disabled,this.boundaryLinks=t.boundaryLinks,this.directionLinks=t.directionLinks,this.ellipses=t.ellipses,this.maxSize=t.maxSize,this.pageSize=t.pageSize,this.rotate=t.rotate,this.size=t.size}hasPrevious(){return this.page>1}hasNext(){return this.page<this.pageCount}nextDisabled(){return!this.hasNext()||this.disabled}previousDisabled(){return!this.hasPrevious()||this.disabled}selectPage(t){this._updatePages(t)}ngOnChanges(t){this._updatePages(this.page)}isEllipsis(t){return-1===t}_applyEllipses(t,e){this.ellipses&&(t>0&&(t>2?this.pages.unshift(-1):2===t&&this.pages.unshift(2),this.pages.unshift(1)),e<this.pageCount&&(e<this.pageCount-2?this.pages.push(-1):e===this.pageCount-2&&this.pages.push(this.pageCount-1),this.pages.push(this.pageCount)))}_applyRotation(){let t=0,e=this.pageCount,n=Math.floor(this.maxSize/2),i=this.maxSize%2==0?n-1:n;return this.page<=n?e=this.maxSize:this.pageCount-this.page<n?t=this.pageCount-this.maxSize:(t=this.page-n-1,e=this.page+i),[t,e]}_applyPagination(){let t=(Math.ceil(this.page/this.maxSize)-1)*this.maxSize;return[t,t+this.maxSize]}_setPageInRange(t){const e=this.page;this.page=Pt(t,this.pageCount,1),this.page!==e&&Vt(this.collectionSize)&&this.pageChange.emit(this.page)}_updatePages(t){this.pageCount=Math.ceil(this.collectionSize/this.pageSize),Vt(this.pageCount)||(this.pageCount=0),this.pages.length=0;for(let t=1;t<=this.pageCount;t++)this.pages.push(t);if(this._setPageInRange(t),this.maxSize>0&&this.pageCount>this.maxSize){let t=0,e=this.pageCount;this.rotate?[t,e]=this._applyRotation():[t,e]=this._applyPagination(),this.pages=this.pages.slice(t,e),this._applyEllipses(t,e)}}}ms.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ms,deps:[{token:rs}],target:m["ɵɵFactoryTarget"].Component}),ms.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ms,isStandalone:!0,selector:"ngb-pagination",inputs:{disabled:"disabled",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",ellipses:"ellipses",rotate:"rotate",collectionSize:"collectionSize",maxSize:"maxSize",page:"page",pageSize:"pageSize",size:"size"},outputs:{pageChange:"pageChange"},host:{attributes:{role:"navigation"}},queries:[{propertyName:"tplEllipsis",first:!0,predicate:ls,descendants:!0},{propertyName:"tplFirst",first:!0,predicate:cs,descendants:!0},{propertyName:"tplLast",first:!0,predicate:ds,descendants:!0},{propertyName:"tplNext",first:!0,predicate:hs,descendants:!0},{propertyName:"tplNumber",first:!0,predicate:ps,descendants:!0},{propertyName:"tplPrevious",first:!0,predicate:us,descendants:!0},{propertyName:"tplPages",first:!0,predicate:gs,descendants:!0}],usesOnChanges:!0,ngImport:f,template:'\n\t\t<ng-template #first><span aria-hidden="true" i18n="@@ngb.pagination.first">««</span></ng-template>\n\t\t<ng-template #previous><span aria-hidden="true" i18n="@@ngb.pagination.previous">«</span></ng-template>\n\t\t<ng-template #next><span aria-hidden="true" i18n="@@ngb.pagination.next">»</span></ng-template>\n\t\t<ng-template #last><span aria-hidden="true" i18n="@@ngb.pagination.last">»»</span></ng-template>\n\t\t<ng-template #ellipsis>...</ng-template>\n\t\t<ng-template #defaultNumber let-page let-currentPage="currentPage">{{ page }}</ng-template>\n\t\t<ng-template #defaultPages let-page let-pages="pages" let-disabled="disabled">\n\t\t\t<li\n\t\t\t\t*ngFor="let pageNumber of pages"\n\t\t\t\tclass="page-item"\n\t\t\t\t[class.active]="pageNumber === page"\n\t\t\t\t[class.disabled]="isEllipsis(pageNumber) || disabled"\n\t\t\t\t[attr.aria-current]="pageNumber === page ? \'page\' : null"\n\t\t\t>\n\t\t\t\t<a *ngIf="isEllipsis(pageNumber)" class="page-link" tabindex="-1" aria-disabled="true">\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplEllipsis?.templateRef || ellipsis"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: true, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t\t<a\n\t\t\t\t\t*ngIf="!isEllipsis(pageNumber)"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageNumber); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="disabled ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="disabled ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNumber?.templateRef || defaultNumber"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: disabled, $implicit: pageNumber, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ng-template>\n\t\t<ul [class]="\'pagination\' + (size ? \' pagination-\' + size : \'\')">\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="First"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.first-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplFirst?.templateRef || first"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Previous"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.previous-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page - 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplPrevious?.templateRef || previous"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled() }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="tplPages?.templateRef || defaultPages"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: page, pages: pages, disabled: disabled }"\n\t\t\t>\n\t\t\t</ng-template>\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Next"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.next-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page + 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNext?.templateRef || next"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Last"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.last-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageCount); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplLast?.templateRef || last"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\t',isInline:!0,dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:m.ChangeDetectionStrategy.OnPush}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ms,decorators:[{type:m.Component,args:[{selector:"ngb-pagination",standalone:!0,imports:[b.NgIf,b.NgFor,b.NgTemplateOutlet],changeDetection:m.ChangeDetectionStrategy.OnPush,host:{role:"navigation"},template:'\n\t\t<ng-template #first><span aria-hidden="true" i18n="@@ngb.pagination.first">««</span></ng-template>\n\t\t<ng-template #previous><span aria-hidden="true" i18n="@@ngb.pagination.previous">«</span></ng-template>\n\t\t<ng-template #next><span aria-hidden="true" i18n="@@ngb.pagination.next">»</span></ng-template>\n\t\t<ng-template #last><span aria-hidden="true" i18n="@@ngb.pagination.last">»»</span></ng-template>\n\t\t<ng-template #ellipsis>...</ng-template>\n\t\t<ng-template #defaultNumber let-page let-currentPage="currentPage">{{ page }}</ng-template>\n\t\t<ng-template #defaultPages let-page let-pages="pages" let-disabled="disabled">\n\t\t\t<li\n\t\t\t\t*ngFor="let pageNumber of pages"\n\t\t\t\tclass="page-item"\n\t\t\t\t[class.active]="pageNumber === page"\n\t\t\t\t[class.disabled]="isEllipsis(pageNumber) || disabled"\n\t\t\t\t[attr.aria-current]="pageNumber === page ? \'page\' : null"\n\t\t\t>\n\t\t\t\t<a *ngIf="isEllipsis(pageNumber)" class="page-link" tabindex="-1" aria-disabled="true">\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplEllipsis?.templateRef || ellipsis"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: true, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t\t<a\n\t\t\t\t\t*ngIf="!isEllipsis(pageNumber)"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageNumber); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="disabled ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="disabled ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNumber?.templateRef || defaultNumber"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: disabled, $implicit: pageNumber, currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ng-template>\n\t\t<ul [class]="\'pagination\' + (size ? \' pagination-\' + size : \'\')">\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="First"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.first-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplFirst?.templateRef || first"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="previousDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Previous"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.previous-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page - 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="previousDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="previousDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplPrevious?.templateRef || previous"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: previousDisabled() }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="tplPages?.templateRef || defaultPages"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: page, pages: pages, disabled: disabled }"\n\t\t\t>\n\t\t\t</ng-template>\n\t\t\t<li *ngIf="directionLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Next"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.next-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(page + 1); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplNext?.templateRef || next"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\n\t\t\t<li *ngIf="boundaryLinks" class="page-item" [class.disabled]="nextDisabled()">\n\t\t\t\t<a\n\t\t\t\t\taria-label="Last"\n\t\t\t\t\ti18n-aria-label="@@ngb.pagination.last-aria"\n\t\t\t\t\tclass="page-link"\n\t\t\t\t\thref\n\t\t\t\t\t(click)="selectPage(pageCount); $event.preventDefault()"\n\t\t\t\t\t[attr.tabindex]="nextDisabled() ? \'-1\' : null"\n\t\t\t\t\t[attr.aria-disabled]="nextDisabled() ? \'true\' : null"\n\t\t\t\t>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]="tplLast?.templateRef || last"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{ disabled: nextDisabled(), currentPage: page }"\n\t\t\t\t\t></ng-template>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\t'}]}],ctorParameters:function(){return[{type:rs}]},propDecorators:{tplEllipsis:[{type:m.ContentChild,args:[ls,{static:!1}]}],tplFirst:[{type:m.ContentChild,args:[cs,{static:!1}]}],tplLast:[{type:m.ContentChild,args:[ds,{static:!1}]}],tplNext:[{type:m.ContentChild,args:[hs,{static:!1}]}],tplNumber:[{type:m.ContentChild,args:[ps,{static:!1}]}],tplPrevious:[{type:m.ContentChild,args:[us,{static:!1}]}],tplPages:[{type:m.ContentChild,args:[gs,{static:!1}]}],disabled:[{type:m.Input}],boundaryLinks:[{type:m.Input}],directionLinks:[{type:m.Input}],ellipses:[{type:m.Input}],rotate:[{type:m.Input}],collectionSize:[{type:m.Input}],maxSize:[{type:m.Input}],page:[{type:m.Input}],pageSize:[{type:m.Input}],pageChange:[{type:m.Output}],size:[{type:m.Input}]}});const fs=[ms,ls,cs,ds,hs,ps,us,gs];class bs{}bs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bs,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),bs.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:bs,imports:[ms,ls,cs,ds,hs,ps,us,gs],exports:[ms,ls,cs,ds,hs,ps,us,gs]}),bs.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bs,imports:[ms]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:bs,decorators:[{type:m.NgModule,args:[{imports:fs,exports:fs}]}]});class ys{constructor(t,e){this.open=t,this.close=e,e||(this.close=t)}isManual(){return"manual"===this.open||"manual"===this.close}}const vs={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},_s=t=>t>0?(0,_.delay)(t):t=>t;function xs(t,e,n,i,s,a,o=0,r=0){const l=function(t,e=vs){const n=(t||"").trim();if(0===n.length)return[];const i=n.split(/\s+/).map(t=>t.split(":")).map(t=>{let n=e[t[0]]||t;return new ys(n[0],n[1])}),s=i.filter(t=>t.isManual());if(s.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===s.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(n);if(1===l.length&&l[0].isManual())return()=>{};const c=function(t,e,n,i){return new v.Observable(s=>{const a=[],o=()=>s.next(!0),r=()=>s.next(!1),l=()=>s.next(!i());return n.forEach(n=>{n.open===n.close?a.push(t.listen(e,n.open,l)):a.push(t.listen(e,n.open,o),t.listen(e,n.close,r))}),()=>{a.forEach(t=>t())}})}(t,e,l,i).pipe(function(t,e,n){return i=>{let s=null;const a=i.pipe((0,_.map)(t=>({open:t})),(0,_.filter)(t=>{const e=n();return e===t.open||s&&s.open!==e?(s&&s.open!==t.open&&(s=null),!1):(s=t,!0)}),(0,_.share)()),o=a.pipe((0,_.filter)(t=>t.open),_s(t)),r=a.pipe((0,_.filter)(t=>!t.open),_s(e));return(0,v.merge)(o,r).pipe((0,_.filter)(t=>t===s&&(s=null,t.open!==n())),(0,_.map)(t=>t.open))}}(o,r,i)).subscribe(t=>t?s():a());return()=>c.unsubscribe()}class ws{constructor(t){this._ngbConfig=t,this.autoClose=!0,this.placement="auto",this.popperOptions=t=>t,this.triggers="click",this.disablePopover=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}ws.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ws,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),ws.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ws,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ws,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});let Ds=0;class Is{isTitleTemplate(){return this.title instanceof m.TemplateRef}}Is.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Is,deps:[],target:m["ɵɵFactoryTarget"].Component}),Is.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Is,isStandalone:!0,selector:"ngb-popover-window",inputs:{animation:"animation",title:"title",id:"id",popoverClass:"popoverClass",context:"context"},host:{attributes:{role:"tooltip"},properties:{class:'"popover" + (popoverClass ? " " + popoverClass : "")',"class.fade":"animation",id:"id"},styleAttribute:"position: absolute;"},ngImport:f,template:' <div class="popover-arrow" data-popper-arrow></div>\n\t\t<h3 class="popover-header" *ngIf="title">\n\t\t\t<ng-template #simpleTitle>{{ title }}</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="isTitleTemplate() ? $any(title) : simpleTitle"\n\t\t\t\t[ngTemplateOutletContext]="context"\n\t\t\t></ng-template>\n\t\t</h3>\n\t\t<div class="popover-body"><ng-content></ng-content></div>',isInline:!0,dependencies:[{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Is,decorators:[{type:m.Component,args:[{selector:"ngb-popover-window",standalone:!0,imports:[b.NgTemplateOutlet,b.NgIf],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{"[class]":'"popover" + (popoverClass ? " " + popoverClass : "")',"[class.fade]":"animation",role:"tooltip","[id]":"id",style:"position: absolute;"},template:' <div class="popover-arrow" data-popper-arrow></div>\n\t\t<h3 class="popover-header" *ngIf="title">\n\t\t\t<ng-template #simpleTitle>{{ title }}</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="isTitleTemplate() ? $any(title) : simpleTitle"\n\t\t\t\t[ngTemplateOutletContext]="context"\n\t\t\t></ng-template>\n\t\t</h3>\n\t\t<div class="popover-body"><ng-content></ng-content></div>'}]}],propDecorators:{animation:[{type:m.Input}],title:[{type:m.Input}],id:[{type:m.Input}],popoverClass:[{type:m.Input}],context:[{type:m.Input}]}});class ks{constructor(t,e,n,i,s,a,o,r,l){this._elementRef=t,this._renderer=e,this._ngZone=a,this._document=o,this._changeDetector=r,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this._ngbPopoverWindowId="ngb-popover-"+Ds++,this._windowRef=null,this.animation=s.animation,this.autoClose=s.autoClose,this.placement=s.placement,this.popperOptions=s.popperOptions,this.triggers=s.triggers,this.container=s.container,this.disablePopover=s.disablePopover,this.popoverClass=s.popoverClass,this.openDelay=s.openDelay,this.closeDelay=s.closeDelay,this._positioning=kn(),this._popupService=new Ri(Is,n,i,e,this._ngZone,l)}_isDisabled(){return!!this.disablePopover||!this.ngbPopover&&!this.popoverTitle}open(t){if(!this._windowRef&&!this._isDisabled()){const{windowRef:e,transition$:n}=this._popupService.open(this.ngbPopover,t,this.animation);this._windowRef=e,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("title",this.popoverTitle),this._windowRef.setInput("context",t),this._windowRef.setInput("popoverClass",this.popoverClass),this._windowRef.setInput("id",this._ngbPopoverWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbPopoverWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-popover",updatePopperOptions:t=>this.popperOptions(Mn([0,8])(t))}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),hn(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),n.subscribe(()=>this.shown.emit())}}close(t=this.animation){this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(t).subscribe(()=>{var t;this._windowRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=xs(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({ngbPopover:t,popoverTitle:e,disablePopover:n,popoverClass:i}){i&&this.isOpen()&&(this._windowRef.instance.popoverClass=i.currentValue),(t||e||n)&&this._isDisabled()&&this.close()}ngOnDestroy(){var t;this.close(!1),null===(t=this._unregisterListenersFn)||void 0===t||t.call(this)}_getPositionTargetElement(){return(Ft(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}ks.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ks,deps:[{token:m.ElementRef},{token:m.Renderer2},{token:m.Injector},{token:m.ViewContainerRef},{token:ws},{token:m.NgZone},{token:b.DOCUMENT},{token:m.ChangeDetectorRef},{token:m.ApplicationRef}],target:m["ɵɵFactoryTarget"].Directive}),ks.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:ks,isStandalone:!0,selector:"[ngbPopover]",inputs:{animation:"animation",autoClose:"autoClose",ngbPopover:"ngbPopover",popoverTitle:"popoverTitle",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disablePopover:"disablePopover",popoverClass:"popoverClass",openDelay:"openDelay",closeDelay:"closeDelay"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbPopover"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ks,decorators:[{type:m.Directive,args:[{selector:"[ngbPopover]",exportAs:"ngbPopover",standalone:!0}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.Renderer2},{type:m.Injector},{type:m.ViewContainerRef},{type:ws},{type:m.NgZone},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.ChangeDetectorRef},{type:m.ApplicationRef}]},propDecorators:{animation:[{type:m.Input}],autoClose:[{type:m.Input}],ngbPopover:[{type:m.Input}],popoverTitle:[{type:m.Input}],placement:[{type:m.Input}],popperOptions:[{type:m.Input}],triggers:[{type:m.Input}],positionTarget:[{type:m.Input}],container:[{type:m.Input}],disablePopover:[{type:m.Input}],popoverClass:[{type:m.Input}],openDelay:[{type:m.Input}],closeDelay:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});class Cs{}Cs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cs,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Cs.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Cs,imports:[ks],exports:[ks]}),Cs.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cs}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Cs,decorators:[{type:m.NgModule,args:[{imports:[ks],exports:[ks]}]}]});class Ms{constructor(){this.max=100,this.animated=!1,this.ariaLabel="progress bar",this.striped=!1,this.showValue=!1}}Ms.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ms,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Ms.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ms,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ms,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class Ss{constructor(t){this.value=0,this.max=t.max,this.animated=t.animated,this.ariaLabel=t.ariaLabel,this.striped=t.striped,this.textType=t.textType,this.type=t.type,this.showValue=t.showValue,this.height=t.height}set max(t){this._max=!Vt(t)||t<=0?100:t}get max(){return this._max}getValue(){return Pt(this.value,this.max)}getPercentValue(){return 100*this.getValue()/this.max}}Ss.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ss,deps:[{token:Ms}],target:m["ɵɵFactoryTarget"].Component}),Ss.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Ss,isStandalone:!0,selector:"ngb-progressbar",inputs:{max:"max",animated:"animated",ariaLabel:"ariaLabel",striped:"striped",showValue:"showValue",textType:"textType",type:"type",value:"value",height:"height"},host:{attributes:{role:"progressbar","aria-valuemin":"0"},properties:{"attr.aria-valuenow":"getValue()","attr.aria-valuemax":"max","attr.aria-label":"ariaLabel","style.height":"this.height"},classAttribute:"progress"},ngImport:f,template:'\n\t\t<div\n\t\t\tclass="progress-bar{{ type ? (textType ? \' bg-\' + type : \' text-bg-\' + type) : \'\' }}{{\n\t\t\t\ttextType ? \' text-\' + textType : \'\'\n\t\t\t}}"\n\t\t\t[class.progress-bar-animated]="animated"\n\t\t\t[class.progress-bar-striped]="striped"\n\t\t\t[style.width.%]="getPercentValue()"\n\t\t>\n\t\t\t<span *ngIf="showValue" i18n="@@ngb.progressbar.value">{{ getValue() / max | percent }}</span\n\t\t\t><ng-content></ng-content>\n\t\t</div>\n\t',isInline:!0,dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"pipe",type:b.PercentPipe,name:"percent"}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ss,decorators:[{type:m.Component,args:[{selector:"ngb-progressbar",standalone:!0,imports:[b.NgIf,b.PercentPipe],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{class:"progress",role:"progressbar","[attr.aria-valuenow]":"getValue()","aria-valuemin":"0","[attr.aria-valuemax]":"max","[attr.aria-label]":"ariaLabel"},template:'\n\t\t<div\n\t\t\tclass="progress-bar{{ type ? (textType ? \' bg-\' + type : \' text-bg-\' + type) : \'\' }}{{\n\t\t\t\ttextType ? \' text-\' + textType : \'\'\n\t\t\t}}"\n\t\t\t[class.progress-bar-animated]="animated"\n\t\t\t[class.progress-bar-striped]="striped"\n\t\t\t[style.width.%]="getPercentValue()"\n\t\t>\n\t\t\t<span *ngIf="showValue" i18n="@@ngb.progressbar.value">{{ getValue() / max | percent }}</span\n\t\t\t><ng-content></ng-content>\n\t\t</div>\n\t'}]}],ctorParameters:function(){return[{type:Ms}]},propDecorators:{max:[{type:m.Input}],animated:[{type:m.Input}],ariaLabel:[{type:m.Input}],striped:[{type:m.Input}],showValue:[{type:m.Input}],textType:[{type:m.Input}],type:[{type:m.Input}],value:[{type:m.Input}],height:[{type:m.Input},{type:m.HostBinding,args:["style.height"]}]}});class Ts{}Ts.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ts,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Ts.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Ts,imports:[Ss],exports:[Ss]}),Ts.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ts,imports:[Ss]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ts,decorators:[{type:m.NgModule,args:[{imports:[Ss],exports:[Ss]}]}]});class Os{constructor(){this.max=10,this.readonly=!1,this.resettable=!1,this.tabindex=0}}Os.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Os,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Os.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Os,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Os,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class Es{constructor(t,e){this._changeDetectorRef=e,this.contexts=[],this.disabled=!1,this.hover=new m.EventEmitter,this.leave=new m.EventEmitter,this.rateChange=new m.EventEmitter(!0),this.onChange=t=>{},this.onTouched=()=>{},this.max=t.max,this.readonly=t.readonly,this.tabindex=t.tabindex}ariaValueText(t,e){return`${t} out of ${e}`}isInteractive(){return!this.readonly&&!this.disabled}enter(t){this.isInteractive()&&this._updateState(t),this.hover.emit(t)}handleBlur(){this.onTouched()}handleClick(t){this.isInteractive()&&this.update(this.resettable&&this.rate===t?0:t)}handleKeyDown(t){switch(t.which){case Pe.ArrowDown:case Pe.ArrowLeft:this.update(this.rate-1);break;case Pe.ArrowUp:case Pe.ArrowRight:this.update(this.rate+1);break;case Pe.Home:this.update(0);break;case Pe.End:this.update(this.max);break;default:return}t.preventDefault()}ngOnChanges(t){t.rate&&this.update(this.rate),t.max&&this._updateMax()}ngOnInit(){this._setupContexts(),this._updateState(this.rate)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}reset(){this.leave.emit(this.nextRate),this._updateState(this.rate)}setDisabledState(t){this.disabled=t}update(t,e=!0){const n=Pt(t,this.max,0);this.isInteractive()&&this.rate!==n&&(this.rate=n,this.rateChange.emit(this.rate)),e&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)}writeValue(t){this.update(t,!1),this._changeDetectorRef.markForCheck()}_updateState(t){this.nextRate=t,this.contexts.forEach((e,n)=>e.fill=Math.round(100*Pt(t-n,1,0)))}_updateMax(){this.max>0&&(this._setupContexts(),this.update(this.rate))}_setupContexts(){this.contexts=Array.from({length:this.max},(t,e)=>({fill:0,index:e}))}}Es.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Es,deps:[{token:Os},{token:m.ChangeDetectorRef}],target:m["ɵɵFactoryTarget"].Component}),Es.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Es,isStandalone:!0,selector:"ngb-rating",inputs:{max:"max",rate:"rate",readonly:"readonly",resettable:"resettable",starTemplate:"starTemplate",tabindex:"tabindex",ariaValueText:"ariaValueText"},outputs:{hover:"hover",leave:"leave",rateChange:"rateChange"},host:{attributes:{role:"slider","aria-valuemin":"0"},listeners:{blur:"handleBlur()",keydown:"handleKeyDown($event)",mouseleave:"reset()"},properties:{tabindex:"disabled ? -1 : tabindex","attr.aria-valuemax":"max","attr.aria-valuenow":"nextRate","attr.aria-valuetext":"ariaValueText(nextRate, max)","attr.aria-disabled":"readonly ? true : null"},classAttribute:"d-inline-flex"},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>Es),multi:!0}],queries:[{propertyName:"starTemplateFromContent",first:!0,predicate:m.TemplateRef,descendants:!0}],usesOnChanges:!0,ngImport:f,template:'\n\t\t<ng-template #t let-fill="fill">{{ fill === 100 ? \'★\' : \'☆\' }}</ng-template>\n\t\t<ng-template ngFor [ngForOf]="contexts" let-index="index">\n\t\t\t<span class="visually-hidden">({{ index < nextRate ? \'*\' : \' \' }})</span>\n\t\t\t<span\n\t\t\t\t(mouseenter)="enter(index + 1)"\n\t\t\t\t(click)="handleClick(index + 1)"\n\t\t\t\t[style.cursor]="isInteractive() ? \'pointer\' : \'default\'"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="starTemplate || starTemplateFromContent || t"\n\t\t\t\t\t[ngTemplateOutletContext]="contexts[index]"\n\t\t\t\t>\n\t\t\t\t</ng-template>\n\t\t\t</span>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Es,decorators:[{type:m.Component,args:[{selector:"ngb-rating",standalone:!0,imports:[b.NgFor,b.NgTemplateOutlet],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{class:"d-inline-flex","[tabindex]":"disabled ? -1 : tabindex",role:"slider","aria-valuemin":"0","[attr.aria-valuemax]":"max","[attr.aria-valuenow]":"nextRate","[attr.aria-valuetext]":"ariaValueText(nextRate, max)","[attr.aria-disabled]":"readonly ? true : null","(blur)":"handleBlur()","(keydown)":"handleKeyDown($event)","(mouseleave)":"reset()"},template:'\n\t\t<ng-template #t let-fill="fill">{{ fill === 100 ? \'★\' : \'☆\' }}</ng-template>\n\t\t<ng-template ngFor [ngForOf]="contexts" let-index="index">\n\t\t\t<span class="visually-hidden">({{ index < nextRate ? \'*\' : \' \' }})</span>\n\t\t\t<span\n\t\t\t\t(mouseenter)="enter(index + 1)"\n\t\t\t\t(click)="handleClick(index + 1)"\n\t\t\t\t[style.cursor]="isInteractive() ? \'pointer\' : \'default\'"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="starTemplate || starTemplateFromContent || t"\n\t\t\t\t\t[ngTemplateOutletContext]="contexts[index]"\n\t\t\t\t>\n\t\t\t\t</ng-template>\n\t\t\t</span>\n\t\t</ng-template>\n\t',providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>Es),multi:!0}]}]}],ctorParameters:function(){return[{type:Os},{type:m.ChangeDetectorRef}]},propDecorators:{max:[{type:m.Input}],rate:[{type:m.Input}],readonly:[{type:m.Input}],resettable:[{type:m.Input}],starTemplate:[{type:m.Input}],starTemplateFromContent:[{type:m.ContentChild,args:[m.TemplateRef,{static:!1}]}],tabindex:[{type:m.Input}],ariaValueText:[{type:m.Input}],hover:[{type:m.Output}],leave:[{type:m.Output}],rateChange:[{type:m.Output}]}});class Rs{}Rs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rs,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Rs.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Rs,imports:[Es],exports:[Es]}),Rs.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rs,imports:[Es]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Rs,decorators:[{type:m.NgModule,args:[{imports:[Es],exports:[Es]}]}]});class Ps{constructor(t,e,n){this.hour=Et(t),this.minute=Et(e),this.second=Et(n)}changeHour(t=1){this.updateHour((isNaN(this.hour)?0:this.hour)+t)}updateHour(t){Vt(t)?this.hour=(t<0?24+t:t)%24:this.hour=NaN}changeMinute(t=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+t)}updateMinute(t){Vt(t)?(this.minute=t%60<0?60+t%60:t%60,this.changeHour(Math.floor(t/60))):this.minute=NaN}changeSecond(t=1){this.updateSecond((isNaN(this.second)?0:this.second)+t)}updateSecond(t){Vt(t)?(this.second=t<0?60+t%60:t%60,this.changeMinute(Math.floor(t/60))):this.second=NaN}isValid(t=!0){return Vt(this.hour)&&Vt(this.minute)&&(!t||Vt(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}class Fs{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}}function Vs(){return new Ns}Fs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fs,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Fs.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fs,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Fs,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});class As{}As.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:As,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),As.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:As,providedIn:"root",useFactory:Vs}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:As,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:Vs}]}]});class Ns extends As{fromModel(t){return t&&At(t.hour)&&At(t.minute)?{hour:t.hour,minute:t.minute,second:At(t.second)?t.second:null}:null}toModel(t){return t&&At(t.hour)&&At(t.minute)?{hour:t.hour,minute:t.minute,second:At(t.second)?t.second:null}:null}}function js(t){return new zs(t)}Ns.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ns,deps:null,target:m["ɵɵFactoryTarget"].Injectable}),Ns.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ns}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ns,decorators:[{type:m.Injectable}]});class Ls{}Ls.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ls,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Ls.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ls,providedIn:"root",useFactory:js,deps:[{token:m.LOCALE_ID}]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ls,decorators:[{type:m.Injectable,args:[{providedIn:"root",useFactory:js,deps:[m.LOCALE_ID]}]}]});class zs extends Ls{constructor(t){super(),this._periods=(0,b.getLocaleDayPeriods)(t,b.FormStyle.Standalone,b.TranslationWidth.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}}zs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zs,deps:[{token:m.LOCALE_ID}],target:m["ɵɵFactoryTarget"].Injectable}),zs.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zs}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:zs,decorators:[{type:m.Injectable}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[m.LOCALE_ID]}]}]}});const Bs=/[^0-9]/g;class $s{constructor(t,e,n,i){this._config=t,this._ngbTimeAdapter=e,this._cd=n,this.i18n=i,this.onChange=t=>{},this.onTouched=()=>{},this.meridian=t.meridian,this.spinners=t.spinners,this.seconds=t.seconds,this.hourStep=t.hourStep,this.minuteStep=t.minuteStep,this.secondStep=t.secondStep,this.disabled=t.disabled,this.readonlyInputs=t.readonlyInputs,this.size=t.size}set hourStep(t){this._hourStep=At(t)?t:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(t){this._minuteStep=At(t)?t:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(t){this._secondStep=At(t)?t:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(t){const e=this._ngbTimeAdapter.fromModel(t);this.model=e?new Ps(e.hour,e.minute,e.second):new Ps,this.seconds||e&&Vt(e.second)||(this.model.second=0),this._cd.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}changeHour(t){var e;null===(e=this.model)||void 0===e||e.changeHour(t),this.propagateModelChange()}changeMinute(t){var e;null===(e=this.model)||void 0===e||e.changeMinute(t),this.propagateModelChange()}changeSecond(t){var e;null===(e=this.model)||void 0===e||e.changeSecond(t),this.propagateModelChange()}updateHour(t){var e,n;const i=!!this.model&&this.model.hour>=12,s=Et(t);this.meridian&&(i&&s<12||!i&&12===s)?null===(e=this.model)||void 0===e||e.updateHour(s+12):null===(n=this.model)||void 0===n||n.updateHour(s),this.propagateModelChange()}updateMinute(t){var e;null===(e=this.model)||void 0===e||e.updateMinute(Et(t)),this.propagateModelChange()}updateSecond(t){var e;null===(e=this.model)||void 0===e||e.updateSecond(Et(t)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(t){t.value=t.value.replace(Bs,"")}formatHour(t){return Vt(t)?this.meridian?Lt(t%12==0?12:t%12):Lt(t%24):Lt(NaN)}formatMinSec(t){return Lt(Vt(t)?t:NaN)}handleBlur(){this.onTouched()}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(t){t.seconds&&!this.seconds&&this.model&&!Vt(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(t=!0){var e;t&&this.onTouched(),(null===(e=this.model)||void 0===e?void 0:e.isValid(this.seconds))?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}}$s.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$s,deps:[{token:Fs},{token:As},{token:m.ChangeDetectorRef},{token:Ls}],target:m["ɵɵFactoryTarget"].Component}),$s.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:$s,isStandalone:!0,selector:"ngb-timepicker",inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>$s),multi:!0}],exportAs:["ngbTimepicker"],usesOnChanges:!0,ngImport:f,template:'\n\t\t<fieldset [disabled]="disabled" [class.disabled]="disabled">\n\t\t\t<div class="ngb-tp">\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-hour">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-hours">Increment hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="HH"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.HH"\n\t\t\t\t\t\t[value]="formatHour(model?.hour)"\n\t\t\t\t\t\t(change)="updateHour($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Hours"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.hours"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeHour(hourStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeHour(-hourStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(-hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-hours">Decrement hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ngb-tp-spacer">:</div>\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-minute">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-minutes">Increment minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="MM"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.MM"\n\t\t\t\t\t\t[value]="formatMinSec(model?.minute)"\n\t\t\t\t\t\t(change)="updateMinute($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Minutes"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.minutes"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeMinute(minuteStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeMinute(-minuteStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(-minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-minutes">Decrement minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-spacer">:</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-input-container ngb-tp-second">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-seconds">Increment seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="SS"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.SS"\n\t\t\t\t\t\t[value]="formatMinSec(model?.second)"\n\t\t\t\t\t\t(change)="updateSecond($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Seconds"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.seconds"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeSecond(secondStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeSecond(-secondStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(-secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-seconds">Decrement seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-spacer"></div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-meridian">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="btn btn-outline-primary"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t(click)="toggleMeridian()"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-container *ngIf="model && model.hour >= 12; else am" i18n="@@ngb.timepicker.PM">{{\n\t\t\t\t\t\t\ti18n.getAfternoonPeriod()\n\t\t\t\t\t\t}}</ng-container>\n\t\t\t\t\t\t<ng-template #am i18n="@@ngb.timepicker.AM">{{ i18n.getMorningPeriod() }}</ng-template>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t',isInline:!0,styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n'],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:$s,decorators:[{type:m.Component,args:[{exportAs:"ngbTimepicker",selector:"ngb-timepicker",standalone:!0,imports:[b.NgIf],encapsulation:m.ViewEncapsulation.None,template:'\n\t\t<fieldset [disabled]="disabled" [class.disabled]="disabled">\n\t\t\t<div class="ngb-tp">\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-hour">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-hours">Increment hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="HH"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.HH"\n\t\t\t\t\t\t[value]="formatHour(model?.hour)"\n\t\t\t\t\t\t(change)="updateHour($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Hours"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.hours"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeHour(hourStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeHour(-hourStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeHour(-hourStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-hours">Decrement hours</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ngb-tp-spacer">:</div>\n\t\t\t\t<div class="ngb-tp-input-container ngb-tp-minute">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-minutes">Increment minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="MM"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.MM"\n\t\t\t\t\t\t[value]="formatMinSec(model?.minute)"\n\t\t\t\t\t\t(change)="updateMinute($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Minutes"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.minutes"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeMinute(minuteStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeMinute(-minuteStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeMinute(-minuteStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-minutes">Decrement minutes</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-spacer">:</div>\n\t\t\t\t<div *ngIf="seconds" class="ngb-tp-input-container ngb-tp-second">\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.increment-seconds">Increment seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\tclass="ngb-tp-input form-control"\n\t\t\t\t\t\t[class.form-control-sm]="isSmallSize"\n\t\t\t\t\t\t[class.form-control-lg]="isLargeSize"\n\t\t\t\t\t\tmaxlength="2"\n\t\t\t\t\t\tinputmode="numeric"\n\t\t\t\t\t\tplaceholder="SS"\n\t\t\t\t\t\ti18n-placeholder="@@ngb.timepicker.SS"\n\t\t\t\t\t\t[value]="formatMinSec(model?.second)"\n\t\t\t\t\t\t(change)="updateSecond($any($event).target.value)"\n\t\t\t\t\t\t[readOnly]="readonlyInputs"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\taria-label="Seconds"\n\t\t\t\t\t\ti18n-aria-label="@@ngb.timepicker.seconds"\n\t\t\t\t\t\t(blur)="handleBlur()"\n\t\t\t\t\t\t(input)="formatInput($any($event).target)"\n\t\t\t\t\t\t(keydown.ArrowUp)="changeSecond(secondStep); $event.preventDefault()"\n\t\t\t\t\t\t(keydown.ArrowDown)="changeSecond(-secondStep); $event.preventDefault()"\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\t*ngIf="spinners"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t(click)="changeSecond(-secondStep)"\n\t\t\t\t\t\tclass="btn btn-link"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class="chevron ngb-tp-chevron bottom"></span>\n\t\t\t\t\t\t<span class="visually-hidden" i18n="@@ngb.timepicker.decrement-seconds">Decrement seconds</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-spacer"></div>\n\t\t\t\t<div *ngIf="meridian" class="ngb-tp-meridian">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="btn btn-outline-primary"\n\t\t\t\t\t\t[class.btn-sm]="isSmallSize"\n\t\t\t\t\t\t[class.btn-lg]="isLargeSize"\n\t\t\t\t\t\t[disabled]="disabled"\n\t\t\t\t\t\t[class.disabled]="disabled"\n\t\t\t\t\t\t(click)="toggleMeridian()"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-container *ngIf="model && model.hour >= 12; else am" i18n="@@ngb.timepicker.PM">{{\n\t\t\t\t\t\t\ti18n.getAfternoonPeriod()\n\t\t\t\t\t\t}}</ng-container>\n\t\t\t\t\t\t<ng-template #am i18n="@@ngb.timepicker.AM">{{ i18n.getMorningPeriod() }}</ng-template>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t',providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>$s),multi:!0}],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n']}]}],ctorParameters:function(){return[{type:Fs},{type:As},{type:m.ChangeDetectorRef},{type:Ls}]},propDecorators:{meridian:[{type:m.Input}],spinners:[{type:m.Input}],seconds:[{type:m.Input}],hourStep:[{type:m.Input}],minuteStep:[{type:m.Input}],secondStep:[{type:m.Input}],readonlyInputs:[{type:m.Input}],size:[{type:m.Input}]}});class Hs{}Hs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hs,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Hs.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Hs,imports:[$s],exports:[$s]}),Hs.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hs,imports:[$s]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Hs,decorators:[{type:m.NgModule,args:[{imports:[$s],exports:[$s]}]}]});const Ws=(t,e)=>{const{classList:n}=t;if(e)return n.add("fade"),Bt(t),n.add("show","showing"),()=>{n.remove("showing")};n.add("show")},Us=({classList:t})=>(t.add("showing"),()=>{t.remove("show","showing")});class qs{constructor(t){this._ngbConfig=t,this.autohide=!0,this.delay=5e3,this.ariaLive="polite"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}qs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:qs,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),qs.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:qs,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:qs,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});class Ys{}Ys.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ys,deps:[],target:m["ɵɵFactoryTarget"].Directive}),Ys.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Ys,isStandalone:!0,selector:"[ngbToastHeader]",ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ys,decorators:[{type:m.Directive,args:[{selector:"[ngbToastHeader]",standalone:!0}]}]});class Zs{constructor(t,e,n,i){this.ariaLive=t,this._zone=n,this._element=i,this.contentHeaderTpl=null,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,null==this.ariaLive&&(this.ariaLive=e.ariaLive),this.delay=e.delay,this.autohide=e.autohide,this.animation=e.animation}ngAfterContentInit(){this._zone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{this._init(),this.show()})}ngOnChanges(t){"autohide"in t&&(this._clearTimeout(),this._init())}hide(){this._clearTimeout();const t=Yt(this._zone,this._element.nativeElement,Us,{animation:this.animation,runningTransition:"stop"});return t.subscribe(()=>{this.hidden.emit()}),t}show(){const t=Yt(this._zone,this._element.nativeElement,Ws,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>{this.shown.emit()}),t}_init(){this.autohide&&!this._timeoutID&&(this._timeoutID=setTimeout(()=>this.hide(),this.delay))}_clearTimeout(){this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null)}}Zs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Zs,deps:[{token:"aria-live",attribute:!0},{token:qs},{token:m.NgZone},{token:m.ElementRef}],target:m["ɵɵFactoryTarget"].Component}),Zs.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Zs,isStandalone:!0,selector:"ngb-toast",inputs:{animation:"animation",delay:"delay",autohide:"autohide",header:"header"},outputs:{shown:"shown",hidden:"hidden"},host:{attributes:{role:"alert","aria-atomic":"true"},properties:{"attr.aria-live":"ariaLive","class.fade":"animation"},classAttribute:"toast"},queries:[{propertyName:"contentHeaderTpl",first:!0,predicate:Ys,descendants:!0,read:m.TemplateRef,static:!0}],exportAs:["ngbToast"],usesOnChanges:!0,ngImport:f,template:'\n\t\t<ng-template #headerTpl>\n\t\t\t<strong class="me-auto">{{ header }}</strong>\n\t\t</ng-template>\n\t\t<ng-template [ngIf]="contentHeaderTpl || header">\n\t\t\t<div class="toast-header">\n\t\t\t\t<ng-template [ngTemplateOutlet]="contentHeaderTpl || headerTpl"></ng-template>\n\t\t\t\t<button\n\t\t\t\t\ttype="button"\n\t\t\t\t\tclass="btn-close"\n\t\t\t\t\taria-label="Close"\n\t\t\t\t\ti18n-aria-label="@@ngb.toast.close-aria"\n\t\t\t\t\t(click)="hide()"\n\t\t\t\t>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<div class="toast-body">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t',isInline:!0,styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Zs,decorators:[{type:m.Component,args:[{selector:"ngb-toast",exportAs:"ngbToast",standalone:!0,imports:[b.NgIf,b.NgTemplateOutlet],encapsulation:m.ViewEncapsulation.None,host:{role:"alert","[attr.aria-live]":"ariaLive","aria-atomic":"true",class:"toast","[class.fade]":"animation"},template:'\n\t\t<ng-template #headerTpl>\n\t\t\t<strong class="me-auto">{{ header }}</strong>\n\t\t</ng-template>\n\t\t<ng-template [ngIf]="contentHeaderTpl || header">\n\t\t\t<div class="toast-header">\n\t\t\t\t<ng-template [ngTemplateOutlet]="contentHeaderTpl || headerTpl"></ng-template>\n\t\t\t\t<button\n\t\t\t\t\ttype="button"\n\t\t\t\t\tclass="btn-close"\n\t\t\t\t\taria-label="Close"\n\t\t\t\t\ti18n-aria-label="@@ngb.toast.close-aria"\n\t\t\t\t\t(click)="hide()"\n\t\t\t\t>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<div class="toast-body">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t',styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"]}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Attribute,args:["aria-live"]}]},{type:qs},{type:m.NgZone},{type:m.ElementRef}]},propDecorators:{animation:[{type:m.Input}],delay:[{type:m.Input}],autohide:[{type:m.Input}],header:[{type:m.Input}],contentHeaderTpl:[{type:m.ContentChild,args:[Ys,{read:m.TemplateRef,static:!0}]}],shown:[{type:m.Output}],hidden:[{type:m.Output}]}});class Ks{}Ks.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ks,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),Ks.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:Ks,imports:[Zs,Ys],exports:[Zs,Ys]}),Ks.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ks,imports:[Zs]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Ks,decorators:[{type:m.NgModule,args:[{imports:[Zs,Ys],exports:[Zs,Ys]}]}]});class Gs{constructor(t){this._ngbConfig=t,this.autoClose=!0,this.placement="auto",this.popperOptions=t=>t,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}Gs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gs,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),Gs.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gs,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Gs,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});let Xs=0;class Js{}Js.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Js,deps:[],target:m["ɵɵFactoryTarget"].Component}),Js.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:Js,isStandalone:!0,selector:"ngb-tooltip-window",inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},host:{attributes:{role:"tooltip"},properties:{class:'"tooltip" + (tooltipClass ? " " + tooltipClass : "")',"class.fade":"animation",id:"id"},styleAttribute:"position: absolute;"},ngImport:f,template:'<div class="tooltip-arrow" data-popper-arrow></div\n\t\t><div class="tooltip-inner"><ng-content></ng-content></div>',isInline:!0,changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Js,decorators:[{type:m.Component,args:[{selector:"ngb-tooltip-window",standalone:!0,changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,host:{"[class]":'"tooltip" + (tooltipClass ? " " + tooltipClass : "")',"[class.fade]":"animation",role:"tooltip","[id]":"id",style:"position: absolute;"},template:'<div class="tooltip-arrow" data-popper-arrow></div\n\t\t><div class="tooltip-inner"><ng-content></ng-content></div>'}]}],propDecorators:{animation:[{type:m.Input}],id:[{type:m.Input}],tooltipClass:[{type:m.Input}]}});class Qs{constructor(t,e,n,i,s,a,o,r,l){this._elementRef=t,this._renderer=e,this._ngZone=a,this._document=o,this._changeDetector=r,this.shown=new m.EventEmitter,this.hidden=new m.EventEmitter,this._ngbTooltipWindowId="ngb-tooltip-"+Xs++,this._windowRef=null,this.animation=s.animation,this.autoClose=s.autoClose,this.placement=s.placement,this.popperOptions=s.popperOptions,this.triggers=s.triggers,this.container=s.container,this.disableTooltip=s.disableTooltip,this.tooltipClass=s.tooltipClass,this.openDelay=s.openDelay,this.closeDelay=s.closeDelay,this._popupService=new Ri(Js,n,i,e,this._ngZone,l),this._positioning=kn()}set ngbTooltip(t){this._ngbTooltip=t,!t&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(t){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:e,transition$:n}=this._popupService.open(this._ngbTooltip,t,this.animation);this._windowRef=e,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-tooltip",updatePopperOptions:t=>this.popperOptions(t)}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),hn(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),n.subscribe(()=>this.shown.emit())}}close(t=this.animation){null!=this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(t).subscribe(()=>{var t;this._windowRef=null,this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=xs(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:t}){t&&this.isOpen()&&(this._windowRef.instance.tooltipClass=t.currentValue)}ngOnDestroy(){var t;this.close(!1),null===(t=this._unregisterListenersFn)||void 0===t||t.call(this)}_getPositionTargetElement(){return(Ft(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}Qs.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qs,deps:[{token:m.ElementRef},{token:m.Renderer2},{token:m.Injector},{token:m.ViewContainerRef},{token:Gs},{token:m.NgZone},{token:b.DOCUMENT},{token:m.ChangeDetectorRef},{token:m.ApplicationRef}],target:m["ɵɵFactoryTarget"].Directive}),Qs.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:Qs,isStandalone:!0,selector:"[ngbTooltip]",inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:Qs,decorators:[{type:m.Directive,args:[{selector:"[ngbTooltip]",standalone:!0,exportAs:"ngbTooltip"}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.Renderer2},{type:m.Injector},{type:m.ViewContainerRef},{type:Gs},{type:m.NgZone},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.ChangeDetectorRef},{type:m.ApplicationRef}]},propDecorators:{animation:[{type:m.Input}],autoClose:[{type:m.Input}],placement:[{type:m.Input}],popperOptions:[{type:m.Input}],triggers:[{type:m.Input}],positionTarget:[{type:m.Input}],container:[{type:m.Input}],disableTooltip:[{type:m.Input}],tooltipClass:[{type:m.Input}],openDelay:[{type:m.Input}],closeDelay:[{type:m.Input}],shown:[{type:m.Output}],hidden:[{type:m.Output}],ngbTooltip:[{type:m.Input}]}});class ta{}ta.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ta,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),ta.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:ta,imports:[Qs],exports:[Qs]}),ta.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ta}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ta,decorators:[{type:m.NgModule,args:[{imports:[Qs],exports:[Qs]}]}]});class ea{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(t){this.accentSensitive||String.prototype.normalize||(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);const e=Rt(this.result),n=Array.isArray(this.term)?this.term:[this.term],i=t=>this.accentSensitive?t:$t(t),s=n.map(t=>i(Rt(t)).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")).filter(t=>t),a=this.accentSensitive?e:$t(e),o=s.length?a.split(new RegExp(`(${s.join("|")})`,"gmi")):[e];if(this.accentSensitive)this.parts=o;else{let t=0;this.parts=o.map(n=>e.substring(t,t+=n.length))}}}ea.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ea,deps:[],target:m["ɵɵFactoryTarget"].Component}),ea.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ea,isStandalone:!0,selector:"ngb-highlight",inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},usesOnChanges:!0,ngImport:f,template:'<ng-template ngFor [ngForOf]="parts" let-part let-isOdd="odd"><span *ngIf="isOdd; else even" [class]="highlightClass">{{part}}</span><ng-template #even>{{part}}</ng-template></ng-template>',isInline:!0,styles:[".ngb-highlight{font-weight:700}\n"],dependencies:[{kind:"directive",type:b.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]}],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ea,decorators:[{type:m.Component,args:[{selector:"ngb-highlight",standalone:!0,imports:[b.NgIf,b.NgFor],changeDetection:m.ChangeDetectionStrategy.OnPush,encapsulation:m.ViewEncapsulation.None,template:'<ng-template ngFor [ngForOf]="parts" let-part let-isOdd="odd"><span *ngIf="isOdd; else even" [class]="highlightClass">{{part}}</span><ng-template #even>{{part}}</ng-template></ng-template>',styles:[".ngb-highlight{font-weight:700}\n"]}]}],propDecorators:{highlightClass:[{type:m.Input}],result:[{type:m.Input}],term:[{type:m.Input}],accentSensitive:[{type:m.Input}]}});class na{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=Rt,this.selectEvent=new m.EventEmitter,this.activeChangeEvent=new m.EventEmitter}hasActive(){return this.activeIdx>-1&&this.activeIdx<this.results.length}getActive(){return this.results[this.activeIdx]}markActive(t){this.activeIdx=t,this._activeChanged()}next(){this.activeIdx===this.results.length-1?this.activeIdx=this.focusFirst?(this.activeIdx+1)%this.results.length:-1:this.activeIdx++,this._activeChanged()}prev(){this.activeIdx<0?this.activeIdx=this.results.length-1:0===this.activeIdx?this.activeIdx=this.focusFirst?this.results.length-1:-1:this.activeIdx--,this._activeChanged()}resetActive(){this.activeIdx=this.focusFirst?0:-1,this._activeChanged()}select(t){this.selectEvent.emit(t)}ngOnInit(){this.resetActive()}_activeChanged(){this.activeChangeEvent.emit(this.activeIdx>=0?this.id+"-"+this.activeIdx:void 0)}}na.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:na,deps:[],target:m["ɵɵFactoryTarget"].Component}),na.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:na,isStandalone:!0,selector:"ngb-typeahead-window",inputs:{id:"id",focusFirst:"focusFirst",results:"results",term:"term",formatter:"formatter",resultTemplate:"resultTemplate",popupClass:"popupClass"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},host:{attributes:{role:"listbox"},listeners:{mousedown:"$event.preventDefault()"},properties:{class:'"dropdown-menu show" + (popupClass ? " " + popupClass : "")',id:"id"}},exportAs:["ngbTypeaheadWindow"],ngImport:f,template:'\n\t\t<ng-template #rt let-result="result" let-term="term" let-formatter="formatter">\n\t\t\t<ngb-highlight [result]="formatter(result)" [term]="term"></ngb-highlight>\n\t\t</ng-template>\n\t\t<ng-template ngFor [ngForOf]="results" let-result let-idx="index">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="dropdown-item"\n\t\t\t\trole="option"\n\t\t\t\t[id]="id + \'-\' + idx"\n\t\t\t\t[class.active]="idx === activeIdx"\n\t\t\t\t(mouseenter)="markActive(idx)"\n\t\t\t\t(click)="select(result)"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="resultTemplate || rt"\n\t\t\t\t\t[ngTemplateOutletContext]="{ result: result, term: term, formatter: formatter }"\n\t\t\t\t></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t',isInline:!0,dependencies:[{kind:"component",type:ea,selector:"ngb-highlight",inputs:["highlightClass","result","term","accentSensitive"]},{kind:"directive",type:b.NgFor,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:b.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:na,decorators:[{type:m.Component,args:[{selector:"ngb-typeahead-window",exportAs:"ngbTypeaheadWindow",standalone:!0,imports:[ea,b.NgFor,b.NgTemplateOutlet],encapsulation:m.ViewEncapsulation.None,host:{"(mousedown)":"$event.preventDefault()","[class]":'"dropdown-menu show" + (popupClass ? " " + popupClass : "")',role:"listbox","[id]":"id"},template:'\n\t\t<ng-template #rt let-result="result" let-term="term" let-formatter="formatter">\n\t\t\t<ngb-highlight [result]="formatter(result)" [term]="term"></ngb-highlight>\n\t\t</ng-template>\n\t\t<ng-template ngFor [ngForOf]="results" let-result let-idx="index">\n\t\t\t<button\n\t\t\t\ttype="button"\n\t\t\t\tclass="dropdown-item"\n\t\t\t\trole="option"\n\t\t\t\t[id]="id + \'-\' + idx"\n\t\t\t\t[class.active]="idx === activeIdx"\n\t\t\t\t(mouseenter)="markActive(idx)"\n\t\t\t\t(click)="select(result)"\n\t\t\t>\n\t\t\t\t<ng-template\n\t\t\t\t\t[ngTemplateOutlet]="resultTemplate || rt"\n\t\t\t\t\t[ngTemplateOutletContext]="{ result: result, term: term, formatter: formatter }"\n\t\t\t\t></ng-template>\n\t\t\t</button>\n\t\t</ng-template>\n\t'}]}],propDecorators:{id:[{type:m.Input}],focusFirst:[{type:m.Input}],results:[{type:m.Input}],term:[{type:m.Input}],formatter:[{type:m.Input}],resultTemplate:[{type:m.Input}],popupClass:[{type:m.Input}],selectEvent:[{type:m.Output,args:["select"]}],activeChangeEvent:[{type:m.Output,args:["activeChange"]}]}});class ia{constructor(){this.editable=!0,this.focusFirst=!0,this.selectOnExact=!1,this.showHint=!1,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t}}ia.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ia,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),ia.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ia,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ia,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]});const sa=new m.InjectionToken("live announcer delay",{providedIn:"root",factory:function(){return 100}});function aa(t,e=!1){let n=t.body.querySelector("#ngb-live");return null==n&&e&&(n=t.createElement("div"),n.setAttribute("id","ngb-live"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),n.classList.add("visually-hidden"),t.body.appendChild(n)),n}class oa{constructor(t,e){this._document=t,this._delay=e}ngOnDestroy(){const t=aa(this._document);t&&t.parentElement.removeChild(t)}say(t){const e=aa(this._document,!0),n=this._delay;if(null!=e){e.textContent="";const i=()=>e.textContent=t;null===n?i():setTimeout(i,n)}}}oa.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:oa,deps:[{token:b.DOCUMENT},{token:sa}],target:m["ɵɵFactoryTarget"].Injectable}),oa.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:oa,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:oa,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:void 0,decorators:[{type:m.Inject,args:[sa]}]}]}});let ra=0;class la{constructor(t,e,n,i,s,a,o,r,l,c,d){this._elementRef=t,this._renderer=n,this._live=o,this._document=r,this._ngZone=l,this._changeDetector=c,this._subscription=null,this._closed$=new v.Subject,this._inputValueBackup=null,this._inputValueForSelectOnExact=null,this._windowRef=null,this.autocomplete="off",this.placement="bottom-start",this.selectItem=new m.EventEmitter,this.activeDescendant=null,this.popupId="ngb-typeahead-"+ra++,this._onTouched=()=>{},this._onChange=t=>{},this.container=s.container,this.editable=s.editable,this.focusFirst=s.focusFirst,this.selectOnExact=s.selectOnExact,this.showHint=s.showHint,this.placement=s.placement,this.popperOptions=s.popperOptions,this._valueChanges=(0,v.fromEvent)(t.nativeElement,"input").pipe((0,_.map)(t=>t.target.value)),this._resubscribeTypeahead=new v.BehaviorSubject(null),this._popupService=new Ri(na,i,e,n,this._ngZone,d),this._positioning=kn()}ngOnInit(){this._subscribeToUserInput()}ngOnChanges({ngbTypeahead:t}){t&&!t.firstChange&&(this._unsubscribeFromUserInput(),this._subscribeToUserInput())}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput()}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}writeValue(t){this._writeInputValue(this._formatItemForInput(t)),this.showHint&&(this._inputValueBackup=t)}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead.next(null),this._closePopup(),this.showHint&&null!==this._inputValueBackup&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return null!=this._windowRef}handleBlur(){this._resubscribeTypeahead.next(null),this._onTouched()}handleKeyDown(t){if(this.isPopupOpen())switch(t.which){case Pe.ArrowDown:t.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case Pe.ArrowUp:t.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case Pe.Enter:case Pe.Tab:{const e=this._windowRef.instance.getActive();Nt(e)&&(t.preventDefault(),t.stopPropagation(),this._selectResult(e)),this._closePopup();break}}}_openPopup(){if(!this.isPopupOpen()){this._inputValueBackup=this._elementRef.nativeElement.value;const{windowRef:t}=this._popupService.open();this._windowRef=t,this._windowRef.setInput("id",this.popupId),this._windowRef.setInput("popupClass",this.popupClass),this._windowRef.instance.selectEvent.subscribe(t=>this._selectResultClosePopup(t)),this._windowRef.instance.activeChangeEvent.subscribe(t=>this.activeDescendant=t),"body"===this.container&&(this._renderer.setStyle(this._windowRef.location.nativeElement,"z-index","1055"),this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement)),this._changeDetector.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._windowRef&&(this._positioning.createPopper({hostElement:this._elementRef.nativeElement,targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:t=>this.popperOptions(Mn([0,2])(t))}),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update()))}),hn(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._elementRef.nativeElement,this._windowRef.location.nativeElement])}}_closePopup(){this._popupService.close().subscribe(()=>{var t;this._positioning.destroy(),null===(t=this._zoneSubscription)||void 0===t||t.unsubscribe(),this._closed$.next(),this._windowRef=null,this.activeDescendant=null})}_selectResult(t){let e=!1;this.selectItem.emit({item:t,preventDefault:()=>{e=!0}}),this._resubscribeTypeahead.next(null),e||(this.writeValue(t),this._onChange(t))}_selectResultClosePopup(t){this._selectResult(t),this._closePopup()}_showHint(){var t;if(this.showHint&&(null===(t=this._windowRef)||void 0===t?void 0:t.instance.hasActive())&&null!=this._inputValueBackup){const t=this._inputValueBackup.toLowerCase(),e=this._formatItemForInput(this._windowRef.instance.getActive());t===e.substring(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+e.substring(this._inputValueBackup.length)),this._elementRef.nativeElement.setSelectionRange.apply(this._elementRef.nativeElement,[this._inputValueBackup.length,e.length])):this._writeInputValue(e)}}_formatItemForInput(t){return null!=t&&this.inputFormatter?this.inputFormatter(t):Rt(t)}_writeInputValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",Rt(t))}_subscribeToUserInput(){const t=this._valueChanges.pipe((0,_.tap)(t=>{this._inputValueBackup=this.showHint?t:null,this._inputValueForSelectOnExact=this.selectOnExact?t:null,this._onChange(this.editable?t:void 0)}),this.ngbTypeahead?this.ngbTypeahead:()=>(0,v.of)([]));this._subscription=this._resubscribeTypeahead.pipe((0,_.switchMap)(()=>t)).subscribe(t=>{t&&0!==t.length?this.selectOnExact&&1===t.length&&this._formatItemForInput(t[0])===this._inputValueForSelectOnExact?(this._selectResult(t[0]),this._closePopup()):(this._openPopup(),this._windowRef.instance.focusFirst=this.focusFirst,this._windowRef.instance.results=t,this._windowRef.instance.term=this._elementRef.nativeElement.value,this.resultFormatter&&(this._windowRef.instance.formatter=this.resultFormatter),this.resultTemplate&&(this._windowRef.instance.resultTemplate=this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint()):this._closePopup();const e=t?t.length:0;this._live.say(0===e?"No results available":`${e} result${1===e?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}}la.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:la,deps:[{token:m.ElementRef},{token:m.ViewContainerRef},{token:m.Renderer2},{token:m.Injector},{token:ia},{token:m.NgZone},{token:oa},{token:b.DOCUMENT},{token:m.NgZone},{token:m.ChangeDetectorRef},{token:m.ApplicationRef}],target:m["ɵɵFactoryTarget"].Directive}),la.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"15.0.0",type:la,isStandalone:!0,selector:"input[ngbTypeahead]",inputs:{autocomplete:"autocomplete",container:"container",editable:"editable",focusFirst:"focusFirst",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate",selectOnExact:"selectOnExact",showHint:"showHint",placement:"placement",popperOptions:"popperOptions",popupClass:"popupClass"},outputs:{selectItem:"selectItem"},host:{attributes:{autocapitalize:"off",autocorrect:"off",role:"combobox"},listeners:{blur:"handleBlur()",keydown:"handleKeyDown($event)"},properties:{"class.open":"isPopupOpen()",autocomplete:"autocomplete","attr.aria-autocomplete":'showHint ? "both" : "list"',"attr.aria-activedescendant":"activeDescendant","attr.aria-owns":"isPopupOpen() ? popupId : null","attr.aria-expanded":"isPopupOpen()"}},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>la),multi:!0}],exportAs:["ngbTypeahead"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:la,decorators:[{type:m.Directive,args:[{selector:"input[ngbTypeahead]",exportAs:"ngbTypeahead",standalone:!0,host:{"(blur)":"handleBlur()","[class.open]":"isPopupOpen()","(keydown)":"handleKeyDown($event)","[autocomplete]":"autocomplete",autocapitalize:"off",autocorrect:"off",role:"combobox","[attr.aria-autocomplete]":'showHint ? "both" : "list"',"[attr.aria-activedescendant]":"activeDescendant","[attr.aria-owns]":"isPopupOpen() ? popupId : null","[attr.aria-expanded]":"isPopupOpen()"},providers:[{provide:y.NG_VALUE_ACCESSOR,useExisting:(0,m.forwardRef)(()=>la),multi:!0}]}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.ViewContainerRef},{type:m.Renderer2},{type:m.Injector},{type:ia},{type:m.NgZone},{type:oa},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.NgZone},{type:m.ChangeDetectorRef},{type:m.ApplicationRef}]},propDecorators:{autocomplete:[{type:m.Input}],container:[{type:m.Input}],editable:[{type:m.Input}],focusFirst:[{type:m.Input}],inputFormatter:[{type:m.Input}],ngbTypeahead:[{type:m.Input}],resultFormatter:[{type:m.Input}],resultTemplate:[{type:m.Input}],selectOnExact:[{type:m.Input}],showHint:[{type:m.Input}],placement:[{type:m.Input}],popperOptions:[{type:m.Input}],popupClass:[{type:m.Input}],selectItem:[{type:m.Output}]}});class ca{}ca.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ca,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),ca.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:ca,imports:[ea,la],exports:[ea,la]}),ca.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ca,imports:[ea]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ca,decorators:[{type:m.NgModule,args:[{imports:[ea,la],exports:[ea,la]}]}]});class da{close(t){}dismiss(t){}}class ha{constructor(t,e,n,i){this._panelCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=i,this._closed=new v.Subject,this._dismissed=new v.Subject,this._hidden=new v.Subject,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),n&&n.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe((0,_.takeUntil)(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe((0,_.takeUntil)(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._panelCmptRef.instance.shown.asObservable()}close(t){this._panelCmptRef&&(this._closed.next(t),this._resolve(t),this._removeOffcanvasElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeOffcanvasElements()}dismiss(t){if(this._panelCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();jt(e)?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeOffcanvasElements(){const t=this._panelCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():(0,v.of)(void 0);t.subscribe(()=>{const{nativeElement:t}=this._panelCmptRef.location;t.parentNode.removeChild(t),this._panelCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._panelCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:t}=this._backdropCmptRef.location;t.parentNode.removeChild(t),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),(0,v.zip)(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var pa;!function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(pa||(pa={}));class ua{constructor(t,e){this._el=t,this._zone=e,this.dismissEvent=new m.EventEmitter}ngOnInit(){this._zone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{Yt(this._zone,this._el.nativeElement,(t,e)=>{e&&Bt(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Yt(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}dismiss(){this.static||this.dismissEvent.emit(pa.BACKDROP_CLICK)}}ua.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ua,deps:[{token:m.ElementRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),ua.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ua,isStandalone:!0,selector:"ngb-offcanvas-backdrop",inputs:{animation:"animation",backdropClass:"backdropClass",static:"static"},outputs:{dismissEvent:"dismiss"},host:{listeners:{mousedown:"dismiss()"},properties:{class:'"offcanvas-backdrop" + (backdropClass ? " " + backdropClass : "")',"class.show":"!animation","class.fade":"animation"}},ngImport:f,template:"",isInline:!0,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ua,decorators:[{type:m.Component,args:[{selector:"ngb-offcanvas-backdrop",standalone:!0,encapsulation:m.ViewEncapsulation.None,template:"",host:{"[class]":'"offcanvas-backdrop" + (backdropClass ? " " + backdropClass : "")',"[class.show]":"!animation","[class.fade]":"animation","(mousedown)":"dismiss()"}}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.NgZone}]},propDecorators:{animation:[{type:m.Input}],backdropClass:[{type:m.Input}],static:[{type:m.Input}],dismissEvent:[{type:m.Output,args:["dismiss"]}]}});class ga{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new v.Subject,this._elWithFocus=null,this.keyboard=!0,this.position="start",this.dismissEvent=new m.EventEmitter,this.shown=new v.Subject,this.hidden=new v.Subject}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe((0,_.take)(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,e={animation:this.animation,runningTransition:"stop"},n=Yt(this._zone,this._elRef.nativeElement,e=>(t.classList.remove("showing"),t.classList.add("hiding"),()=>t.classList.remove("show","hiding")),e);return n.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),n}_show(){const t={animation:this.animation,runningTransition:"continue"};Yt(this._zone,this._elRef.nativeElement,(t,e)=>(e&&Bt(t),t.classList.add("show","showing"),()=>t.classList.remove("showing")),t).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{(0,v.fromEvent)(t,"keydown").pipe((0,_.takeUntil)(this._closed$),(0,_.filter)(t=>t.which===Pe.Escape)).subscribe(t=>{this.keyboard&&requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(pa.ESC))})})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=un(t)[0];(e||n||t).focus()}}_restoreFocus(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}}ga.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ga,deps:[{token:b.DOCUMENT},{token:m.ElementRef},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Component}),ga.ɵcmp=m["ɵɵngDeclareComponent"]({minVersion:"14.0.0",version:"15.0.0",type:ga,isStandalone:!0,selector:"ngb-offcanvas-panel",inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",keyboard:"keyboard",panelClass:"panelClass",position:"position"},outputs:{dismissEvent:"dismiss"},host:{attributes:{role:"dialog",tabindex:"-1"},properties:{class:'"offcanvas offcanvas-" + position + (panelClass ? " " + panelClass : "")',"attr.aria-modal":"true","attr.aria-labelledby":"ariaLabelledBy","attr.aria-describedby":"ariaDescribedBy"}},ngImport:f,template:"<ng-content></ng-content>",isInline:!0,encapsulation:m.ViewEncapsulation.None}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ga,decorators:[{type:m.Component,args:[{selector:"ngb-offcanvas-panel",standalone:!0,template:"<ng-content></ng-content>",encapsulation:m.ViewEncapsulation.None,host:{"[class]":'"offcanvas offcanvas-" + position + (panelClass ? " " + panelClass : "")',role:"dialog",tabindex:"-1","[attr.aria-modal]":"true","[attr.aria-labelledby]":"ariaLabelledBy","[attr.aria-describedby]":"ariaDescribedBy"}}]}],ctorParameters:function(){return[{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:m.ElementRef},{type:m.NgZone}]},propDecorators:{animation:[{type:m.Input}],ariaLabelledBy:[{type:m.Input}],ariaDescribedBy:[{type:m.Input}],keyboard:[{type:m.Input}],panelClass:[{type:m.Input}],position:[{type:m.Input}],dismissEvent:[{type:m.Output,args:["dismiss"]}]}});class ma{constructor(t,e,n,i,s){this._applicationRef=t,this._injector=e,this._document=n,this._scrollBar=i,this._ngZone=s,this._activePanelCmptHasChanged=new v.Subject,this._scrollBarRestoreFn=null,this._backdropAttributes=["animation","backdropClass"],this._panelAttributes=["animation","ariaDescribedBy","ariaLabelledBy","keyboard","panelClass","position"],this._activeInstance=new m.EventEmitter,this._activePanelCmptHasChanged.subscribe(()=>{this._panelCmpt&&gn(this._ngZone,this._panelCmpt.location.nativeElement,this._activePanelCmptHasChanged)})}_restoreScrollBar(){const t=this._scrollBarRestoreFn;t&&(this._scrollBarRestoreFn=null,t())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(t,e,n){const i=n.container instanceof HTMLElement?n.container:Nt(n.container)?this._document.querySelector(n.container):this._document.body;if(!i)throw new Error(`The specified offcanvas container "${n.container||"body"}" was not found in the DOM.`);n.scroll||this._hideScrollBar();const s=new da,a=this._getContentRef(n.injector||t,e,s);let o=!1!==n.backdrop?this._attachBackdrop(i):void 0,r=this._attachWindowComponent(i,a.nodes),l=new ha(r,a,o,n.beforeDismiss);return this._registerOffcanvasRef(l),this._registerPanelCmpt(r),l.hidden.pipe((0,_.finalize)(()=>this._restoreScrollBar())).subscribe(),s.close=t=>{l.close(t)},s.dismiss=t=>{l.dismiss(t)},this._applyPanelOptions(r.instance,n),o&&o.instance&&(this._applyBackdropOptions(o.instance,n),o.changeDetectorRef.detectChanges()),r.changeDetectorRef.detectChanges(),l}get activeInstance(){return this._activeInstance}dismiss(t){var e;null===(e=this._offcanvasRef)||void 0===e||e.dismiss(t)}hasOpenOffcanvas(){return!!this._offcanvasRef}_attachBackdrop(t){let e=(0,m.createComponent)(ua,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(e.hostView),t.appendChild(e.location.nativeElement),e}_attachWindowComponent(t,e){let n=(0,m.createComponent)(ga,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:e});return this._applicationRef.attachView(n.hostView),t.appendChild(n.location.nativeElement),n}_applyPanelOptions(t,e){this._panelAttributes.forEach(n=>{Nt(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){this._backdropAttributes.forEach(n=>{Nt(e[n])&&(t[n]=e[n])}),t.static="static"===e.backdrop}_getContentRef(t,e,n){return e?e instanceof m.TemplateRef?this._createFromTemplateRef(e,n):Ft(e)?this._createFromString(e):this._createFromComponent(t,e,n):new Ei([])}_createFromTemplateRef(t,e){const n={$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}},i=t.createEmbeddedView(n);return this._applicationRef.attachView(i),new Ei([i.rootNodes],i)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new Ei([[e]])}_createFromComponent(t,e,n){const i=m.Injector.create({providers:[{provide:da,useValue:n}],parent:t}),s=(0,m.createComponent)(e,{environmentInjector:this._applicationRef.injector,elementInjector:i}),a=s.location.nativeElement;return this._applicationRef.attachView(s.hostView),new Ei([[a]],s.hostView,s)}_registerOffcanvasRef(t){const e=()=>{this._offcanvasRef=void 0,this._activeInstance.emit(this._offcanvasRef)};this._offcanvasRef=t,this._activeInstance.emit(this._offcanvasRef),t.result.then(e,e)}_registerPanelCmpt(t){this._panelCmpt=t,this._activePanelCmptHasChanged.next(),t.onDestroy(()=>{this._panelCmpt=void 0,this._activePanelCmptHasChanged.next()})}}ma.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ma,deps:[{token:m.ApplicationRef},{token:m.Injector},{token:b.DOCUMENT},{token:zi},{token:m.NgZone}],target:m["ɵɵFactoryTarget"].Injectable}),ma.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ma,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ma,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:m.ApplicationRef},{type:m.Injector},{type:void 0,decorators:[{type:m.Inject,args:[b.DOCUMENT]}]},{type:zi},{type:m.NgZone}]}});class fa{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.keyboard=!0,this.position="start",this.scroll=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}fa.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fa,deps:[{token:Kt}],target:m["ɵɵFactoryTarget"].Injectable}),fa.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fa,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:fa,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:Kt}]}});class ba{constructor(t,e,n){this._injector=t,this._offcanvasStack=e,this._config=n}open(t,e={}){const n=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),e);return this._offcanvasStack.open(this._injector,t,n)}get activeInstance(){return this._offcanvasStack.activeInstance}dismiss(t){this._offcanvasStack.dismiss(t)}hasOpenOffcanvas(){return this._offcanvasStack.hasOpenOffcanvas()}}ba.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ba,deps:[{token:m.Injector},{token:ma},{token:fa}],target:m["ɵɵFactoryTarget"].Injectable}),ba.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ba,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ba,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:m.Injector},{type:ma},{type:fa}]}});class ya{}ya.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ya,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),ya.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:ya}),ya.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ya}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:ya,decorators:[{type:m.NgModule,args:[{}]}]});const va=[fe,_e,Fe,Ve,xi,Oi,Wi,os,ya,bs,Cs,Ts,Rs,Hs,Ks,ta,ca];class _a{}_a.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_a,deps:[],target:m["ɵɵFactoryTarget"].NgModule}),_a.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"15.0.0",ngImport:f,type:_a,imports:[fe,_e,Fe,Ve,xi,Oi,Wi,os,ya,bs,Cs,Ts,Rs,Hs,Ks,ta,ca],exports:[fe,_e,Fe,Ve,xi,Oi,Wi,os,ya,bs,Cs,Ts,Rs,Hs,Ks,ta,ca]}),_a.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_a,imports:[va,fe,_e,Fe,Ve,xi,Oi,Wi,os,ya,bs,Cs,Ts,Rs,Hs,Ks,ta,ca]}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"15.0.0",ngImport:f,type:_a,decorators:[{type:m.NgModule,args:[{imports:va,exports:va}]}]});var xa=h(650),wa=h.n(xa),Da=h(700);function Ia(t){return t+.5|0}const ka=(t,e,n)=>Math.max(Math.min(t,n),e);function Ca(t){return ka(Ia(2.55*t),0,255)}function Ma(t){return ka(Ia(255*t),0,255)}function Sa(t){return ka(Ia(t/2.55)/100,0,1)}function Ta(t){return ka(Ia(100*t),0,100)}const Oa={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ea=[..."0123456789ABCDEF"],Ra=t=>Ea[15&t],Pa=t=>Ea[(240&t)>>4]+Ea[15&t],Fa=t=>(240&t)>>4==(15&t);const Va=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Aa(t,e,n){const i=e*Math.min(n,1-n),s=(e,s=(e+t/30)%12)=>n-i*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function Na(t,e,n){const i=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function ja(t,e,n){const i=Aa(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)i[s]*=1-e-n,i[s]+=e;return i}function La(t){const e=t.r/255,n=t.g/255,i=t.b/255,s=Math.max(e,n,i),a=Math.min(e,n,i),o=(s+a)/2;let r,l,c;return s!==a&&(c=s-a,l=o>.5?c/(2-s-a):c/(s+a),r=function(t,e,n,i,s){return t===s?(e-n)/i+(e<n?6:0):e===s?(n-t)/i+2:(t-e)/i+4}(e,n,i,c,s),r=60*r+.5),[0|r,l||0,o]}function za(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(Ma)}function Ba(t,e,n){return za(Aa,t,e,n)}function $a(t){return(t%360+360)%360}const Ha={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Wa={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Ua;const qa=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Ya=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Za=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Ka(t,e,n){if(t){let i=La(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=Ba(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Ga(t,e){return t?Object.assign(e||{},t):t}function Xa(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Ma(t[3]))):(e=Ga(t,{r:0,g:0,b:0,a:1})).a=Ma(e.a),e}function Ja(t){return"r"===t.charAt(0)?function(t){const e=qa.exec(t);let n,i,s,a=255;if(e){if(e[7]!==n){const t=+e[7];a=e[8]?Ca(t):ka(255*t,0,255)}return n=+e[1],i=+e[3],s=+e[5],n=255&(e[2]?Ca(n):ka(n,0,255)),i=255&(e[4]?Ca(i):ka(i,0,255)),s=255&(e[6]?Ca(s):ka(s,0,255)),{r:n,g:i,b:s,a}}}(t):function(t){const e=Va.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?Ca(+e[5]):Ma(+e[5]));const s=$a(+e[2]),a=+e[3]/100,o=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return za(ja,t,e,n)}(s,a,o):"hsv"===e[1]?function(t,e,n){return za(Na,t,e,n)}(s,a,o):Ba(s,a,o),{r:n[0],g:n[1],b:n[2],a:i}}(t)}class Qa{constructor(t){if(t instanceof Qa)return t;const e=typeof t;let n;var i,s,a;"object"===e?n=Xa(t):"string"===e&&(a=(i=t).length,"#"===i[0]&&(4===a||5===a?s={r:255&17*Oa[i[1]],g:255&17*Oa[i[2]],b:255&17*Oa[i[3]],a:5===a?17*Oa[i[4]]:255}:7!==a&&9!==a||(s={r:Oa[i[1]]<<4|Oa[i[2]],g:Oa[i[3]]<<4|Oa[i[4]],b:Oa[i[5]]<<4|Oa[i[6]],a:9===a?Oa[i[7]]<<4|Oa[i[8]]:255})),n=s||function(t){Ua||(Ua=function(){const t={},e=Object.keys(Wa),n=Object.keys(Ha);let i,s,a,o,r;for(i=0;i<e.length;i++){for(o=r=e[i],s=0;s<n.length;s++)a=n[s],r=r.replace(a,Ha[a]);a=parseInt(Wa[o],16),t[r]=[a>>16&255,a>>8&255,255&a]}return t}(),Ua.transparent=[0,0,0,0]);const e=Ua[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||Ja(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Ga(this._rgb);return t&&(t.a=Sa(t.a)),t}set rgb(t){this._rgb=Xa(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Sa(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>Fa(t.r)&&Fa(t.g)&&Fa(t.b)&&Fa(t.a))(t)?Ra:Pa,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=La(t),n=e[0],i=Ta(e[1]),s=Ta(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${Sa(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let s;const a=e===s?.5:e,o=2*a-1,r=n.a-i.a,l=((o*r===-1?o:(o+r)/(1+o*r))+1)/2;s=1-l,n.r=255&l*n.r+s*i.r+.5,n.g=255&l*n.g+s*i.g+.5,n.b=255&l*n.b+s*i.b+.5,n.a=a*n.a+(1-a)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const i=Za(Sa(t.r)),s=Za(Sa(t.g)),a=Za(Sa(t.b));return{r:Ma(Ya(i+n*(Za(Sa(e.r))-i))),g:Ma(Ya(s+n*(Za(Sa(e.g))-s))),b:Ma(Ya(a+n*(Za(Sa(e.b))-a))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Qa(this.rgb)}alpha(t){return this._rgb.a=Ma(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Ia(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ka(this._rgb,2,t),this}darken(t){return Ka(this._rgb,2,-t),this}saturate(t){return Ka(this._rgb,1,t),this}desaturate(t){return Ka(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=La(t);n[0]=$a(n[0]+e),n=Ba(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function to(){}const eo=(()=>{let t=0;return()=>t++})();function no(t){return null==t}function io(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function so(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function ao(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function oo(t,e){return ao(t)?t:e}function ro(t,e){return void 0===t?e:t}const lo=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function co(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function ho(t,e,n,i){let s,a,o;if(io(t))if(a=t.length,i)for(s=a-1;s>=0;s--)e.call(n,t[s],s);else for(s=0;s<a;s++)e.call(n,t[s],s);else if(so(t))for(o=Object.keys(t),a=o.length,s=0;s<a;s++)e.call(n,t[o[s]],o[s])}function po(t,e){let n,i,s,a;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(s=t[n],a=e[n],s.datasetIndex!==a.datasetIndex||s.index!==a.index)return!1;return!0}function uo(t){if(io(t))return t.map(uo);if(so(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let s=0;for(;s<i;++s)e[n[s]]=uo(t[n[s]]);return e}return t}function go(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function mo(t,e,n,i){if(!go(t))return;const s=e[t],a=n[t];so(s)&&so(a)?fo(s,a,i):e[t]=uo(a)}function fo(t,e,n){const i=io(e)?e:[e],s=i.length;if(!so(t))return t;const a=(n=n||{}).merger||mo;let o;for(let e=0;e<s;++e){if(o=i[e],!so(o))continue;const s=Object.keys(o);for(let e=0,i=s.length;e<i;++e)a(s[e],t,o,n)}return t}function bo(t,e){return fo(t,e,{merger:yo})}function yo(t,e,n){if(!go(t))return;const i=e[t],s=n[t];so(i)&&so(s)?bo(i,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=uo(s))}const vo={"":t=>t,x:t=>t.x,y:t=>t.y};function _o(t,e){const n=vo[e]||(vo[e]=function(t){const e=function(t){const e=t.split("."),n=[];let i="";for(const t of e)i+=t,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function xo(t){return t.charAt(0).toUpperCase()+t.slice(1)}const wo=t=>void 0!==t,Do=t=>"function"==typeof t,Io=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0},ko=Math.PI,Co=2*ko,Mo=Co+ko,So=Number.POSITIVE_INFINITY,To=ko/180,Oo=ko/2,Eo=ko/4,Ro=2*ko/3,Po=Math.log10,Fo=Math.sign;function Vo(t,e,n){return Math.abs(t-e)<n}function Ao(t){const e=Math.round(t);t=Vo(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Po(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function No(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function jo(t,e,n){let i,s,a;for(i=0,s=t.length;i<s;i++)a=t[i][n],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function Lo(t){return t*(ko/180)}function zo(t){return t*(180/ko)}function Bo(t){if(!ao(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function $o(t,e){const n=e.x-t.x,i=e.y-t.y,s=Math.sqrt(n*n+i*i);let a=Math.atan2(i,n);return a<-.5*ko&&(a+=Co),{angle:a,distance:s}}function Ho(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Wo(t,e){return(t-e+Mo)%Co-ko}function Uo(t){return(t%Co+Co)%Co}function qo(t,e,n,i){const s=Uo(t),a=Uo(e),o=Uo(n),r=Uo(a-s),l=Uo(o-s),c=Uo(s-a),d=Uo(s-o);return s===a||s===o||i&&a===o||r>l&&c<d}function Yo(t,e,n){return Math.max(e,Math.min(n,t))}function Zo(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function Ko(t,e,n){n=n||(n=>t[n]<e);let i,s=t.length-1,a=0;for(;s-a>1;)i=a+s>>1,n(i)?a=i:s=i;return{lo:a,hi:s}}const Go=(t,e,n,i)=>Ko(t,n,i?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),Xo=(t,e,n)=>Ko(t,n,i=>t[i][e]>=n),Jo=["push","pop","shift","splice","unshift"];function Qo(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(e);-1!==s&&i.splice(s,1),i.length>0||(Jo.forEach(e=>{delete t[e]}),delete t._chartjs)}function tr(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const er="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function nr(t,e){let n=[],i=!1;return function(...s){n=s,i||(i=!0,er.call(window,()=>{i=!1,t.apply(e,n)}))}}const ir=t=>"start"===t?"left":"end"===t?"right":"center",sr=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function ar(t,e,n){const i=e.length;let s=0,a=i;if(t._sorted){const{iScale:o,vScale:r,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=o.axis,{min:h,max:p,minDefined:u,maxDefined:g}=o.getUserBounds();if(u){if(s=Math.min(Go(l,d,h).lo,n?i:Go(e,d,o.getPixelForValue(h)).lo),c){const t=l.slice(0,s+1).reverse().findIndex(t=>!no(t[r.axis]));s-=Math.max(0,t)}s=Yo(s,0,i-1)}if(g){let t=Math.max(Go(l,o.axis,p,!0).hi+1,n?0:Go(e,d,o.getPixelForValue(p),!0).hi+1);if(c){const e=l.slice(t-1).findIndex(t=>!no(t[r.axis]));t+=Math.max(0,e)}a=Yo(t,s,i)-s}else a=i-s}return{start:s,count:a}}function or(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,s={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=s,!0;const a=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),a}const rr=t=>0===t||1===t,lr=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*Co/n),cr=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Co/n)+1,dr={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Oo),easeOutSine:t=>Math.sin(t*Oo),easeInOutSine:t=>-.5*(Math.cos(ko*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>rr(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>rr(t)?t:lr(t,.075,.3),easeOutElastic:t=>rr(t)?t:cr(t,.075,.3),easeInOutElastic(t){const e=.1125;return rr(t)?t:t<.5?.5*lr(2*t,e,.45):.5+.5*cr(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-dr.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*dr.easeInBounce(2*t):.5*dr.easeOutBounce(2*t-1)+.5};function hr(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function pr(t){return hr(t)?t:new Qa(t)}function ur(t){return hr(t)?t:new Qa(t).saturate(.5).darken(.1).hexString()}const gr=["x","y","borderWidth","radius","tension"],mr=["color","borderColor","backgroundColor"],fr=new Map;function br(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=fr.get(n);return i||(i=new Intl.NumberFormat(t,e),fr.set(n,i)),i}(e,n).format(t)}const yr={values:t=>io(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let s,a=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),a=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}(t,n)}const o=Po(Math.abs(a)),r=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),br(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(Po(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?yr.numeric.call(this,t,e,n):""}};var vr={formatters:yr};const _r=Object.create(null),xr=Object.create(null);function wr(t,e){if(!e)return t;const n=e.split(".");for(let e=0,i=n.length;e<i;++e){const i=n[e];t=t[i]||(t[i]=Object.create(null))}return t}function Dr(t,e,n){return"string"==typeof e?fo(wr(t,e),n):fo(wr(t,""),e)}class Ir{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>ur(e.backgroundColor),this.hoverBorderColor=(t,e)=>ur(e.borderColor),this.hoverColor=(t,e)=>ur(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Dr(this,t,e)}get(t){return wr(this,t)}describe(t,e){return Dr(xr,t,e)}override(t,e){return Dr(_r,t,e)}route(t,e,n,i){const s=wr(this,t),a=wr(this,n),o="_"+e;Object.defineProperties(s,{[o]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=a[i];return so(t)?Object.assign({},e,t):ro(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach(t=>t(this))}}var kr=new Ir({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:mr},numbers:{type:"number",properties:gr}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:vr.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Cr(t,e,n,i,s){let a=e[s];return a||(a=e[s]=t.measureText(s).width,n.push(s)),a>i&&(i=a),i}function Mr(t,e,n,i){let s=(i=i||{}).data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},a=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let o=0;const r=n.length;let l,c,d,h,p;for(l=0;l<r;l++)if(h=n[l],null==h||io(h)){if(io(h))for(c=0,d=h.length;c<d;c++)p=h[c],null==p||io(p)||(o=Cr(t,s,a,o,p))}else o=Cr(t,s,a,o,h);t.restore();const u=a.length/2;if(u>n.length){for(l=0;l<u;l++)delete s[a[l]];a.splice(0,u)}return o}function Sr(t,e,n){const i=t.currentDevicePixelRatio,s=0!==n?Math.max(n/2,.5):0;return Math.round((e-s)*i)/i+s}function Tr(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Or(t,e,n,i){Er(t,e,n,i,null)}function Er(t,e,n,i,s){let a,o,r,l,c,d,h,p;const u=e.pointStyle,g=e.rotation,m=e.radius;let f=(g||0)*To;if(u&&"object"==typeof u&&(a=u.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return t.save(),t.translate(n,i),t.rotate(f),t.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),void t.restore();if(!(isNaN(m)||m<=0)){switch(t.beginPath(),u){default:s?t.ellipse(n,i,s/2,m,0,0,Co):t.arc(n,i,m,0,Co),t.closePath();break;case"triangle":d=s?s/2:m,t.moveTo(n+Math.sin(f)*d,i-Math.cos(f)*m),f+=Ro,t.lineTo(n+Math.sin(f)*d,i-Math.cos(f)*m),f+=Ro,t.lineTo(n+Math.sin(f)*d,i-Math.cos(f)*m),t.closePath();break;case"rectRounded":c=.516*m,l=m-c,o=Math.cos(f+Eo)*l,h=Math.cos(f+Eo)*(s?s/2-c:l),r=Math.sin(f+Eo)*l,p=Math.sin(f+Eo)*(s?s/2-c:l),t.arc(n-h,i-r,c,f-ko,f-Oo),t.arc(n+p,i-o,c,f-Oo,f),t.arc(n+h,i+r,c,f,f+Oo),t.arc(n-p,i+o,c,f+Oo,f+ko),t.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,d=s?s/2:l,t.rect(n-d,i-l,2*d,2*l);break}f+=Eo;case"rectRot":h=Math.cos(f)*(s?s/2:m),o=Math.cos(f)*m,r=Math.sin(f)*m,p=Math.sin(f)*(s?s/2:m),t.moveTo(n-h,i-r),t.lineTo(n+p,i-o),t.lineTo(n+h,i+r),t.lineTo(n-p,i+o),t.closePath();break;case"crossRot":f+=Eo;case"cross":h=Math.cos(f)*(s?s/2:m),o=Math.cos(f)*m,r=Math.sin(f)*m,p=Math.sin(f)*(s?s/2:m),t.moveTo(n-h,i-r),t.lineTo(n+h,i+r),t.moveTo(n+p,i-o),t.lineTo(n-p,i+o);break;case"star":h=Math.cos(f)*(s?s/2:m),o=Math.cos(f)*m,r=Math.sin(f)*m,p=Math.sin(f)*(s?s/2:m),t.moveTo(n-h,i-r),t.lineTo(n+h,i+r),t.moveTo(n+p,i-o),t.lineTo(n-p,i+o),f+=Eo,h=Math.cos(f)*(s?s/2:m),o=Math.cos(f)*m,r=Math.sin(f)*m,p=Math.sin(f)*(s?s/2:m),t.moveTo(n-h,i-r),t.lineTo(n+h,i+r),t.moveTo(n+p,i-o),t.lineTo(n-p,i+o);break;case"line":o=s?s/2:Math.cos(f)*m,r=Math.sin(f)*m,t.moveTo(n-o,i-r),t.lineTo(n+o,i+r);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(f)*(s?s/2:m),i+Math.sin(f)*m);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Rr(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Pr(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Fr(t){t.restore()}function Vr(t,e,n,i,s){if(!e)return t.lineTo(n.x,n.y);if("middle"===s){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else"after"===s!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Ar(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function Nr(t,e,n,i,s){if(s.strikethrough||s.underline){const a=t.measureText(i),o=e-a.actualBoundingBoxLeft,r=e+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,d=s.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(o,d),t.lineTo(r,d),t.stroke()}}function jr(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Lr(t,e,n,i,s,a={}){const o=io(e)?e:[e],r=a.strokeWidth>0&&""!==a.strokeColor;let l,c;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),no(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,a),l=0;l<o.length;++l)c=o[l],a.backdrop&&jr(t,a.backdrop),r&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),no(a.strokeWidth)||(t.lineWidth=a.strokeWidth),t.strokeText(c,n,i,a.maxWidth)),t.fillText(c,n,i,a.maxWidth),Nr(t,n,i,c,a),i+=Number(s.lineHeight);t.restore()}function zr(t,e){const{x:n,y:i,w:s,h:a,radius:o}=e;t.arc(n+o.topLeft,i+o.topLeft,o.topLeft,1.5*ko,ko,!0),t.lineTo(n,i+a-o.bottomLeft),t.arc(n+o.bottomLeft,i+a-o.bottomLeft,o.bottomLeft,ko,Oo,!0),t.lineTo(n+s-o.bottomRight,i+a),t.arc(n+s-o.bottomRight,i+a-o.bottomRight,o.bottomRight,Oo,0,!0),t.lineTo(n+s,i+o.topRight),t.arc(n+s-o.topRight,i+o.topRight,o.topRight,0,-Oo,!0),t.lineTo(n+o.topLeft,i)}const Br=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,$r=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Hr(t,e){const n=(""+t).match(Br);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}const Wr=t=>+t||0;function Ur(t,e){const n={},i=so(e),s=i?Object.keys(e):e,a=so(t)?i?n=>ro(t[n],t[e[n]]):e=>t[e]:()=>t;for(const t of s)n[t]=Wr(a(t));return n}function qr(t){return Ur(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Yr(t){return Ur(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Zr(t){const e=qr(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Kr(t,e){t=t||{},e=e||kr.font;let n=ro(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let i=ro(t.style,e.style);i&&!(""+i).match($r)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:ro(t.family,e.family),lineHeight:Hr(ro(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:ro(t.weight,e.weight),string:""};return s.string=function(t){return!t||no(t.size)||no(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function Gr(t,e,n,i){let s,a,o,r=!0;for(s=0,a=t.length;s<a;++s)if(o=t[s],void 0!==o&&(void 0!==e&&"function"==typeof o&&(o=o(e),r=!1),void 0!==n&&io(o)&&(o=o[n%o.length],r=!1),void 0!==o))return i&&!r&&(i.cacheable=!1),o}function Xr(t,e){return Object.assign(Object.create(t),e)}function Jr(t,e=[""],n,i,s=()=>t[0]){const a=n||t;void 0===i&&(i=cl("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:i,_getTarget:s,override:n=>Jr([n,...t],e,a,i)};return new Proxy(o,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>il(n,i,()=>function(t,e,n,i){let s;for(const a of e)if(s=cl(el(a,t),n),void 0!==s)return nl(t,s)?rl(n,i,t,s):s}(i,e,t,n)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>dl(t).includes(e),ownKeys:t=>dl(t),set(t,e,n){const i=t._storage||(t._storage=s());return t[e]=i[e]=n,delete t._keys,!0}})}function Qr(t,e,n,i){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:tl(t,i),setContext:e=>Qr(t,e,n,i),override:s=>Qr(t.override(s),e,n,i)};return new Proxy(s,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>il(t,e,()=>function(t,e,n){const{_proxy:i,_context:s,_subProxy:a,_descriptors:o}=t;let r=i[e];return Do(r)&&o.isScriptable(e)&&(r=function(t,e,n,i){const{_proxy:s,_context:a,_subProxy:o,_stack:r}=n;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let l=e(a,o||i);return r.delete(t),nl(t,l)&&(l=rl(s._scopes,s,t,l)),l}(e,r,t,n)),io(r)&&r.length&&(r=function(t,e,n,i){const{_proxy:s,_context:a,_subProxy:o,_descriptors:r}=n;if(void 0!==a.index&&i(t))return e[a.index%e.length];if(so(e[0])){const n=e,i=s._scopes.filter(t=>t!==n);e=[];for(const l of n){const n=rl(i,s,t,l);e.push(Qr(n,a,o&&o[t],r))}}return e}(e,r,t,o.isIndexable)),nl(e,r)&&(r=Qr(r,s,a&&a[e],o)),r}(t,e,n)),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function tl(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:n,indexable:i,isScriptable:Do(n)?n:()=>n,isIndexable:Do(i)?i:()=>i}}const el=(t,e)=>t?t+xo(e):e,nl=(t,e)=>so(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function il(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const i=n();return t[e]=i,i}function sl(t,e,n){return Do(t)?t(e,n):t}const al=(t,e)=>!0===t?e:"string"==typeof t?_o(e,t):void 0;function ol(t,e,n,i,s){for(const a of e){const e=al(n,a);if(e){t.add(e);const a=sl(e._fallback,n,s);if(void 0!==a&&a!==n&&a!==i)return a}else if(!1===e&&void 0!==i&&n!==i)return null}return!1}function rl(t,e,n,i){const s=e._rootScopes,a=sl(e._fallback,n,i),o=[...t,...s],r=new Set;r.add(i);let l=ll(r,o,n,a||n,i);return null!==l&&(void 0===a||a===n||(l=ll(r,o,a,l,i),null!==l))&&Jr(Array.from(r),[""],s,a,()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const s=i[e];return io(s)&&so(n)?n:s||{}}(e,n,i))}function ll(t,e,n,i,s){for(;n;)n=ol(t,e,n,i,s);return n}function cl(t,e){for(const n of e){if(!n)continue;const e=n[t];if(void 0!==e)return e}}function dl(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function hl(t,e,n,i){const{iScale:s}=t,{key:a="r"}=this._parsing,o=new Array(i);let r,l,c,d;for(r=0,l=i;r<l;++r)c=r+n,d=e[c],o[r]={r:s.parse(_o(d,a),c)};return o}const pl=Number.EPSILON||1e-14,ul=(t,e)=>e<t.length&&!t[e].skip&&t[e],gl=t=>"x"===t?"y":"x";function ml(t,e,n,i){const s=t.skip?e:t,a=e,o=n.skip?e:n,r=Ho(a,s),l=Ho(o,a);let c=r/(r+l),d=l/(r+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const h=i*c,p=i*d;return{previous:{x:a.x-h*(o.x-s.x),y:a.y-h*(o.y-s.y)},next:{x:a.x+p*(o.x-s.x),y:a.y+p*(o.y-s.y)}}}function fl(t,e,n){return Math.max(Math.min(t,n),e)}function bl(t,e,n,i,s){let a,o,r,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const n=gl(e),i=t.length,s=Array(i).fill(0),a=Array(i);let o,r,l,c=ul(t,0);for(o=0;o<i;++o)if(r=l,l=c,c=ul(t,o+1),l){if(c){const t=c[e]-l[e];s[o]=0!==t?(c[n]-l[n])/t:0}a[o]=r?c?Fo(s[o-1])!==Fo(s[o])?0:(s[o-1]+s[o])/2:s[o-1]:s[o]}!function(t,e,n){const i=t.length;let s,a,o,r,l,c=ul(t,0);for(let d=0;d<i-1;++d)l=c,c=ul(t,d+1),l&&c&&(Vo(e[d],0,pl)?n[d]=n[d+1]=0:(s=n[d]/e[d],a=n[d+1]/e[d],r=Math.pow(s,2)+Math.pow(a,2),r<=9||(o=3/Math.sqrt(r),n[d]=s*o*e[d],n[d+1]=a*o*e[d])))}(t,s,a),function(t,e,n="x"){const i=gl(n),s=t.length;let a,o,r,l=ul(t,0);for(let c=0;c<s;++c){if(o=r,r=l,l=ul(t,c+1),!r)continue;const s=r[n],d=r[i];o&&(a=(s-o[n])/3,r[`cp1${n}`]=s-a,r[`cp1${i}`]=d-a*e[c]),l&&(a=(l[n]-s)/3,r[`cp2${n}`]=s+a,r[`cp2${i}`]=d+a*e[c])}}(t,a,e)}(t,s);else{let n=i?t[t.length-1]:t[0];for(a=0,o=t.length;a<o;++a)r=t[a],l=ml(n,r,t[Math.min(a+1,o-(i?0:1))%o],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,n=r}e.capBezierPoints&&function(t,e){let n,i,s,a,o,r=Rr(t[0],e);for(n=0,i=t.length;n<i;++n)o=a,a=r,r=n<i-1&&Rr(t[n+1],e),a&&(s=t[n],o&&(s.cp1x=fl(s.cp1x,e.left,e.right),s.cp1y=fl(s.cp1y,e.top,e.bottom)),r&&(s.cp2x=fl(s.cp2x,e.left,e.right),s.cp2y=fl(s.cp2y,e.top,e.bottom)))}(t,n)}function yl(){return"undefined"!=typeof window&&"undefined"!=typeof document}function vl(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function _l(t,e,n){let i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}const xl=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),wl=["top","right","bottom","left"];function Dl(t,e,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const a=wl[s];i[a]=parseFloat(t[e+"-"+a+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function Il(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,s=xl(n),a="border-box"===s.boxSizing,o=Dl(s,"padding"),r=Dl(s,"border","width"),{x:l,y:c,box:d}=function(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:s,offsetY:a}=i;let o,r,l=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(s,a,t.target))o=s,r=a;else{const t=e.getBoundingClientRect();o=i.clientX-t.left,r=i.clientY-t.top,l=!0}return{x:o,y:r,box:l}}(t,n),h=o.left+(d&&r.left),p=o.top+(d&&r.top);let{width:u,height:g}=e;return a&&(u-=o.width+r.width,g-=o.height+r.height),{x:Math.round((l-h)/u*n.width/i),y:Math.round((c-p)/g*n.height/i)}}const kl=t=>Math.round(10*t)/10;function Cl(t,e,n){const i=e||1,s=kl(t.height*i),a=kl(t.width*i);t.height=kl(t.height),t.width=kl(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||o.height!==s||o.width!==a)&&(t.currentDevicePixelRatio=i,o.height=s,o.width=a,t.ctx.setTransform(i,0,0,i,0,0),!0)}const Ml=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};yl()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Sl(t,e){const n=function(t,e){return xl(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Tl(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Ol(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function El(t,e,n,i){const s={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},o=Tl(t,s,n),r=Tl(s,a,n),l=Tl(a,e,n),c=Tl(o,r,n),d=Tl(r,l,n);return Tl(c,d,n)}function Rl(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Pl(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function Fl(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Vl(t){return"angle"===t?{between:qo,compare:Wo,normalize:Uo}:{between:Zo,compare:(t,e)=>t-e,normalize:t=>t}}function Al({start:t,end:e,count:n,loop:i,style:s}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0,style:s}}function Nl(t,e,n){if(!n)return[t];const{property:i,start:s,end:a}=n,o=e.length,{compare:r,between:l,normalize:c}=Vl(i),{start:d,end:h,loop:p,style:u}=function(t,e,n){const{property:i,start:s,end:a}=n,{between:o,normalize:r}=Vl(i),l=e.length;let c,d,{start:h,end:p,loop:u}=t;if(u){for(h+=l,p+=l,c=0,d=l;c<d&&o(r(e[h%l][i]),s,a);++c)h--,p--;h%=l,p%=l}return p<h&&(p+=l),{start:h,end:p,loop:u,style:t.style}}(t,e,n),g=[];let m,f,b,y=!1,v=null;const _=()=>y||l(s,b,m)&&0!==r(s,b),x=()=>!y||0===r(a,m)||l(a,b,m);for(let t=d,n=d;t<=h;++t)f=e[t%o],f.skip||(m=c(f[i]),m!==b&&(y=l(m,s,a),null===v&&_()&&(v=0===r(m,s)?t:n),null!==v&&x()&&(g.push(Al({start:v,end:t,loop:p,count:o,style:u})),v=null),n=t,b=m));return null!==v&&g.push(Al({start:v,end:h,loop:p,count:o,style:u})),g}function jl(t,e){const n=[],i=t.segments;for(let s=0;s<i.length;s++){const a=Nl(i[s],t.points,e);a.length&&n.push(...a)}return n}function Ll(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function zl(t,e){if(!e)return!1;const n=[],i=function(t,e){return hr(e)?(n.includes(e)||n.push(e),n.indexOf(e)):e};return JSON.stringify(t,i)!==JSON.stringify(e,i)}function Bl(t,e,n){return t.options.clip?t[n]:e[n]}function $l(t,e){const n=e._clip;if(n.disabled)return!1;const i=function(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:Bl(n,e,"left"),right:Bl(n,e,"right"),top:Bl(i,e,"top"),bottom:Bl(i,e,"bottom")}:e}(e,t.chartArea);return{left:!1===n.left?0:i.left-(!0===n.left?0:n.left),right:!1===n.right?t.width:i.right+(!0===n.right?0:n.right),top:!1===n.top?0:i.top-(!0===n.top?0:n.top),bottom:!1===n.bottom?t.height:i.bottom+(!0===n.bottom?0:n.bottom)}}class Hl{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const s=e.listeners[i],a=e.duration;s.forEach(i=>i({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(n-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=er.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,o=s.length-1,r=!1;for(;o>=0;--o)a=s[o],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),r=!0):(s[o]=s[s.length-1],s.pop());r&&(i.draw(),this._notify(i,n,t,"progress")),s.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=s.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Wl=new Hl;const Ul="transparent",ql={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const i=pr(t||Ul),s=i.valid&&pr(e||Ul);return s&&s.valid?s.mix(i,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Yl{constructor(t,e,n,i){const s=e[n];i=Gr([t.to,i,s,t.from]);const a=Gr([t.from,s,i]);this._active=!0,this._fn=t.fn||ql[t.type||typeof a],this._easing=dr[t.easing]||dr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const i=this._target[this._prop],s=n-this._start,a=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Gr([t.to,e,i,t.from]),this._from=Gr([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,s=this._from,a=this._loop,o=this._to;let r;if(this._active=s!==o&&(a||e<n),!this._active)return this._target[i]=o,void this._notify(!0);e<0?this._target[i]=s:(r=e/n%2,r=a&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[i]=this._fn(s,o,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let t=0;t<n.length;t++)n[t][e]()}}class Zl{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!so(t))return;const e=Object.keys(kr.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!so(s))return;const a={};for(const t of e)a[t]=s[t];(io(s.properties)&&s.properties||[i]).forEach(t=>{t!==i&&n.has(t)||n.set(t,a)})})}_animateOptions(t,e){const n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(n)return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;t.options=e}(t,n);if(!i)return[];const s=this._createAnimations(i,n);return n.$shared&&function(t,e){const n=[],i=Object.keys(e);for(let e=0;e<i.length;e++){const s=t[i[e]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}(t.options.$animations,n).then(()=>{t.options=n},()=>{}),s}_createAnimations(t,e){const n=this._properties,i=[],s=t.$animations||(t.$animations={}),a=Object.keys(e),o=Date.now();let r;for(r=a.length-1;r>=0;--r){const l=a[r];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(t,e));continue}const c=e[l];let d=s[l];const h=n.get(l);if(d){if(h&&d.active()){d.update(h,c,o);continue}d.cancel()}h&&h.duration?(s[l]=d=new Yl(h,t,l,c),i.push(d)):t[l]=c}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(Wl.add(this._chart,n),!0):void 0}}function Kl(t,e){const n=t&&t.options||{},i=n.reverse,s=void 0===n.min?e:0,a=void 0===n.max?e:0;return{start:i?a:s,end:i?s:a}}function Gl(t,e){const n=[],i=t._getSortedDatasetMetas(e);let s,a;for(s=0,a=i.length;s<a;++s)n.push(i[s].index);return n}function Xl(t,e,n,i={}){const s=t.keys,a="single"===i.mode;let o,r,l,c;if(null===e)return;let d=!1;for(o=0,r=s.length;o<r;++o){if(l=+s[o],l===n){if(d=!0,i.all)continue;break}c=t.values[l],ao(c)&&(a||0===e||Fo(e)===Fo(c))&&(e+=c)}return d||i.all?e:0}function Jl(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function Ql(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function tc(t,e,n,i){for(const s of e.getMatchingVisibleMetas(i).reverse()){const e=t[s.index];if(n&&e>0||!n&&e<0)return s.index}return null}function ec(t,e){const{chart:n,_cachedMeta:i}=t,s=n._stacks||(n._stacks={}),{iScale:a,vScale:o,index:r}=i,l=a.axis,c=o.axis,d=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(a,o,i),h=e.length;let p;for(let t=0;t<h;++t){const n=e[t],{[l]:a,[c]:h}=n;p=(n._stacks||(n._stacks={}))[c]=Ql(s,d,a),p[r]=h,p._top=tc(p,o,!0,i.type),p._bottom=tc(p,o,!1,i.type),(p._visualValues||(p._visualValues={}))[r]=h}}function nc(t,e){const n=t.scales;return Object.keys(n).filter(t=>n[t].axis===e).shift()}function ic(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n],void 0!==e[i]._visualValues&&void 0!==e[i]._visualValues[n]&&delete e[i]._visualValues[n]}}}const sc=t=>"reset"===t||"none"===t,ac=(t,e)=>e?t:Object.assign({},t);class oc{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Jl(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ic(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),i=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,s=e.xAxisID=ro(n.xAxisID,nc(t,"x")),a=e.yAxisID=ro(n.yAxisID,nc(t,"y")),o=e.rAxisID=ro(n.rAxisID,nc(t,"r")),r=e.indexAxis,l=e.iAxisID=i(r,s,a,o),c=e.vAxisID=i(r,a,s,o);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Qo(this._data,this),t._stacked&&ic(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(so(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:n,vScale:i}=e,s="x"===n.axis?"x":"y",a="x"===i.axis?"x":"y",o=Object.keys(t),r=new Array(o.length);let l,c,d;for(l=0,c=o.length;l<c;++l)d=o[l],r[l]={[s]:d,[a]:t[d]};return r}(e,t)}else if(n!==e){if(n){Qo(n,this);const t=this._cachedMeta;ic(t),t._parsed=[]}e&&Object.isExtensible(e)&&((i=e)._chartjs?i._chartjs.listeners.push(this):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),Jo.forEach(t=>{const e="_onData"+xo(t),n=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...t){const s=n.apply(this,t);return i._chartjs.listeners.forEach(n=>{"function"==typeof n[e]&&n[e](...t)}),s}})}))),this._syncList=[],this._data=e}var i}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const s=e._stacked;e._stacked=Jl(e.vScale,e),e.stack!==n.stack&&(i=!0,ic(e),e.stack=n.stack),this._resyncElements(t),(i||s!==e._stacked)&&(ec(this,e._parsed),e._stacked=Jl(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:i}=this,{iScale:s,_stacked:a}=n,o=s.axis;let r,l,c,d=0===t&&e===i.length||n._sorted,h=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=i,n._sorted=!0,c=i;else{c=io(i[t])?this.parseArrayData(n,i,t,e):so(i[t])?this.parseObjectData(n,i,t,e):this.parsePrimitiveData(n,i,t,e);const s=()=>null===l[o]||h&&l[o]<h[o];for(r=0;r<e;++r)n._parsed[r+t]=l=c[r],d&&(s()&&(d=!1),h=l);n._sorted=d}a&&ec(this,c)}parsePrimitiveData(t,e,n,i){const{iScale:s,vScale:a}=t,o=s.axis,r=a.axis,l=s.getLabels(),c=s===a,d=new Array(i);let h,p,u;for(h=0,p=i;h<p;++h)u=h+n,d[h]={[o]:c||s.parse(l[u],u),[r]:a.parse(e[u],u)};return d}parseArrayData(t,e,n,i){const{xScale:s,yScale:a}=t,o=new Array(i);let r,l,c,d;for(r=0,l=i;r<l;++r)c=r+n,d=e[c],o[r]={x:s.parse(d[0],c),y:a.parse(d[1],c)};return o}parseObjectData(t,e,n,i){const{xScale:s,yScale:a}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,l=new Array(i);let c,d,h,p;for(c=0,d=i;c<d;++c)h=c+n,p=e[h],l[c]={x:s.parse(_o(p,o),h),y:a.parse(_o(p,r),h)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const i=this.chart,s=this._cachedMeta,a=e[t.axis];return Xl({keys:Gl(i,!0),values:e._stacks[t.axis]._visualValues},a,s.index,{mode:n})}updateRangeFromParsed(t,e,n,i){const s=n[e.axis];let a=null===s?NaN:s;const o=i&&n._stacks[e.axis];i&&o&&(i.values=o,a=Xl(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const n=this._cachedMeta,i=n._parsed,s=n._sorted&&t===n.iScale,a=i.length,o=this._getOtherScale(t),r=((t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Gl(n,!0),values:null})(e,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(t){const{min:e,max:n,minDefined:i,maxDefined:s}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}(o);let h,p;function u(){p=i[h];const e=p[o.axis];return!ao(p[t.axis])||c>e||d<e}for(h=0;h<a&&(u()||(this.updateRangeFromParsed(l,t,p,r),!s));++h);if(s)for(h=a-1;h>=0;--h)if(!u()){this.updateRangeFromParsed(l,t,p,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let i,s,a;for(i=0,s=e.length;i<s;++i)a=e[i][t.axis],ao(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,i=e.vScale,s=this.getParsed(t);return{label:n?""+n.getLabelForValue(s[n.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,n,i,s;return so(t)?(e=t.top,n=t.right,i=t.bottom,s=t.left):e=n=i=s=t,{top:e,right:n,bottom:i,left:s,disabled:!1===t}}(ro(this.options.clip,function(t,e,n){if(!1===n)return!1;const i=Kl(t,n),s=Kl(e,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,i=n.data||[],s=e.chartArea,a=[],o=this._drawStart||0,r=this._drawCount||i.length-o,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(t,s,o,r),c=o;c<o+r;++c){const e=i[c];e.hidden||(e.active&&l?a.push(e):e.draw(t,s))}for(c=0;c<a.length;++c)a[c].draw(t,s)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,n){return Xr(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=function(t,e){return Xr(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=n,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const i="active"===e,s=this._cachedDataOpts,a=t+"-"+e,o=s[a],r=this.enableOptionSharing&&wo(n);if(o)return ac(o,r);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],h=l.getOptionScopes(this.getDataset(),c),p=Object.keys(kr.elements[t]),u=l.resolveNamedOptions(h,p,()=>this.getContext(n,i,e),d);return u.$shared&&(u.$shared=r,s[a]=Object.freeze(ac(u,r))),u}_resolveAnimations(t,e,n){const i=this.chart,s=this._cachedDataOpts,a=`animation-${e}`,o=s[a];if(o)return o;let r;if(!1!==i.options.animation){const i=this.chart.config,s=i.datasetAnimationScopeKeys(this._type,e),a=i.getOptionScopes(this.getDataset(),s);r=i.createResolver(a,this.getContext(t,n,e))}const l=new Zl(i,r&&r.animations);return r&&r._cacheable&&(s[a]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||sc(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,s=this.getSharedOptions(n),a=this.includeOptions(e,s)||s!==i;return this.updateSharedOptions(s,e,n),{sharedOptions:s,includeOptions:a}}updateElement(t,e,n,i){sc(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!sc(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const s=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[t,e,n]of this._syncList)this[t](e,n);this._syncList=[];const i=n.length,s=e.length,a=Math.min(s,i);a&&this.parse(0,a),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,e,n=!0){const i=this._cachedMeta,s=i.data,a=t+e;let o;const r=t=>{for(t.length+=e,o=t.length-1;o>=a;o--)t[o]=t[o-e]};for(r(s),o=t;o<a;++o)s[o]=new this.dataElementType;this._parsing&&r(i._parsed),this.parse(t,e),n&&this.updateElements(s,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,e);n._stacked&&ic(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,i]=t;this[e](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function rc(t){const e=t.iScale,n=function(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let i=[];for(let e=0,s=n.length;e<s;e++)i=i.concat(n[e].controller.getAllParsedValues(t));t._cache.$bar=tr(i.sort((t,e)=>t-e))}return t._cache.$bar}(e,t.type);let i,s,a,o,r=e._length;const l=()=>{32767!==a&&-32768!==a&&(wo(o)&&(r=Math.min(r,Math.abs(a-o)||r)),o=a)};for(i=0,s=n.length;i<s;++i)a=e.getPixelForValue(n[i]),l();for(o=void 0,i=0,s=e.ticks.length;i<s;++i)a=e.getPixelForTick(i),l();return r}function lc(t,e,n,i){return io(t)?function(t,e,n,i){const s=n.parse(t[0],i),a=n.parse(t[1],i),o=Math.min(s,a),r=Math.max(s,a);let l=o,c=r;Math.abs(o)>Math.abs(r)&&(l=r,c=o),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:a,min:o,max:r}}(t,e,n,i):e[n.axis]=n.parse(t,i),e}function cc(t,e,n,i){const s=t.iScale,a=t.vScale,o=s.getLabels(),r=s===a,l=[];let c,d,h,p;for(c=n,d=n+i;c<d;++c)p=e[c],h={},h[s.axis]=r||s.parse(o[c],c),l.push(lc(p,h,a,c));return l}function dc(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function hc(t,e,n,i){let s=e.borderSkipped;const a={};if(!s)return void(t.borderSkipped=a);if(!0===s)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:o,end:r,reverse:l,top:c,bottom:d}=function(t){let e,n,i,s,a;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(s="end",a="start"):(s="start",a="end"),{start:n,end:i,reverse:e,top:s,bottom:a}}(t);"middle"===s&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?s=c:(n._bottom||0)===i?s=d:(a[pc(d,o,r,l)]=!0,s=c)),a[pc(s,o,r,l)]=!0,t.borderSkipped=a}function pc(t,e,n,i){var s,a,o;return i?(o=n,t=uc(t=(s=t)===(a=e)?o:s===o?a:s,n,e)):t=uc(t,e,n),t}function uc(t,e,n){return"start"===t?e:"end"===t?n:t}function gc(t,{inflateAmount:e},n){t.inflateAmount="auto"===e?1===n?.33:0:e}class mc extends oc{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:n,textAlign:i,color:s,useBorderRadius:a,borderRadius:o}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((e,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.getDataVisibility(r),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:i,pointStyle:n,borderRadius:a&&(o||l.borderRadius),index:r}}):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,i=this._cachedMeta;if(!1===this._parsing)i._parsed=n;else{let s,a,o=t=>+n[t];if(so(n[t])){const{key:t="value"}=this._parsing;o=e=>+_o(n[e],t)}for(s=t,a=t+e;s<a;++s)i._parsed[s]=o(s)}}_getRotation(){return Lo(this.options.rotation-90)}_getCircumference(){return Lo(this.options.circumference)}_getRotationExtents(){let t=Co,e=-Co;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const i=this.chart.getDatasetMeta(n).controller,s=i._getRotation(),a=i._getCircumference();t=Math.min(t,s),e=Math.max(e,s+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,i=this._cachedMeta,s=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,o=Math.max((Math.min(n.width,n.height)-a)/2,0),r=Math.min((c=o,"string"==typeof(l=this.options.cutout)&&l.endsWith("%")?parseFloat(l)/100:+l/c),1);var l,c;const d=this._getRingWeight(this.index),{circumference:h,rotation:p}=this._getRotationExtents(),{ratioX:u,ratioY:g,offsetX:m,offsetY:f}=function(t,e,n){let i=1,s=1,a=0,o=0;if(e<Co){const r=t,l=r+e,c=Math.cos(r),d=Math.sin(r),h=Math.cos(l),p=Math.sin(l),u=(t,e,i)=>qo(t,r,l,!0)?1:Math.max(e,e*n,i,i*n),g=(t,e,i)=>qo(t,r,l,!0)?-1:Math.min(e,e*n,i,i*n),m=u(0,c,h),f=u(Oo,d,p),b=g(ko,c,h),y=g(ko+Oo,d,p);i=(m-b)/2,s=(f-y)/2,a=-(m+b)/2,o=-(f+y)/2}return{ratioX:i,ratioY:s,offsetX:a,offsetY:o}}(p,h,r),b=(n.width-a)/u,y=(n.height-a)/g,v=Math.max(Math.min(b,y)/2,0),_=lo(this.options.radius,v),x=(_-Math.max(_*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*_,this.offsetY=f*_,i.total=this.calculateTotal(),this.outerRadius=_-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*d,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const n=this.options,i=this._cachedMeta,s=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===i._parsed[t]||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*s/Co)}updateElements(t,e,n,i){const s="reset"===i,a=this.chart,o=a.chartArea,r=a.options.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,d=s&&r.animateScale,h=d?0:this.innerRadius,p=d?0:this.outerRadius,{sharedOptions:u,includeOptions:g}=this._getSharedOptions(e,i);let m,f=this._getRotation();for(m=0;m<e;++m)f+=this._circumference(m,s);for(m=e;m<e+n;++m){const e=this._circumference(m,s),n=t[m],a={x:l+this.offsetX,y:c+this.offsetY,startAngle:f,endAngle:f+e,circumference:e,outerRadius:p,innerRadius:h};g&&(a.options=u||this.resolveDataElementOptions(m,n.active?"active":i)),f+=e,this.updateElement(n,m,a,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n,i=0;for(n=0;n<e.length;n++){const s=t._parsed[n];null===s||isNaN(s)||!this.chart.getDataVisibility(n)||e[n].hidden||(i+=Math.abs(s))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?Co*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=br(e._parsed[t],n.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,s,a,o,r;if(!t)for(i=0,s=n.data.datasets.length;i<s;++i)if(n.isDatasetVisible(i)){a=n.getDatasetMeta(i),t=a.data,o=a.controller;break}if(!t)return 0;for(i=0,s=t.length;i<s;++i)r=o.resolveDataElementOptions(i),"inner"!==r.borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,i=t.length;n<i;++n){const t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(ro(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class fc extends oc{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:i}}=t.legend.options;return e.labels.map((e,s)=>{const a=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=br(e._parsed[t].r,n.options.locale);return{label:i[t]||"",value:s}}parseObjectData(t,e,n,i){return hl.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,n)=>{const i=this.getParsed(n).r;!isNaN(i)&&this.chart.getDataVisibility(n)&&(i<e.min&&(e.min=i),i>e.max&&(e.max=i))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(i/2,0),a=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,n,i){const s="reset"===i,a=this.chart,o=a.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,c=r.yCenter,d=r.getIndexAngle(0)-.5*ko;let h,p=d;const u=360/this.countVisibleElements();for(h=0;h<e;++h)p+=this._computeAngle(h,i,u);for(h=e;h<e+n;h++){const e=t[h];let n=p,g=p+this._computeAngle(h,i,u),m=a.getDataVisibility(h)?r.getDistanceFromCenterForValue(this.getParsed(h).r):0;p=g,s&&(o.animateScale&&(m=0),o.animateRotate&&(n=g=d));const f={x:l,y:c,innerRadius:0,outerRadius:m,startAngle:n,endAngle:g,options:this.resolveDataElementOptions(h,e.active?"active":i)};this.updateElement(e,h,f,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((t,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?Lo(this.resolveDataElementOptions(t,e).angle||n):0}}var bc=Object.freeze({__proto__:null,BarController:class extends oc{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,n,i){return cc(t,e,n,i)}parseArrayData(t,e,n,i){return cc(t,e,n,i)}parseObjectData(t,e,n,i){const{iScale:s,vScale:a}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,l="x"===s.axis?o:r,c="x"===a.axis?o:r,d=[];let h,p,u,g;for(h=n,p=n+i;h<p;++h)g=e[h],u={},u[s.axis]=s.parse(_o(g,l),h),d.push(lc(_o(g,c),u,a,h));return d}updateRangeFromParsed(t,e,n,i){super.updateRangeFromParsed(t,e,n,i);const s=n._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:i}=e,s=this.getParsed(t),a=s._custom,o=dc(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+n.getLabelForValue(s[n.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,i){const s="reset"===i,{index:a,_cachedMeta:{vScale:o}}=this,r=o.getBasePixel(),l=o.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(e,i);for(let p=e;p<e+n;p++){const e=this.getParsed(p),n=s||no(e[o.axis])?{base:r,head:r}:this._calculateBarValuePixels(p),u=this._calculateBarIndexPixels(p,c),g=(e._stacks||{})[o.axis],m={horizontal:l,base:n.base,enableBorderRadius:!g||dc(e._custom)||a===g._top||a===g._bottom,x:l?n.head:u.center,y:l?u.center:n.head,height:l?u.size:Math.abs(n.size),width:l?Math.abs(n.size):u.size};h&&(m.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const f=m.options||t[p].options;hc(m,f,g,a),gc(m,f,c.ratio),this.updateElement(t[p],p,m,i)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),s=n.options.stacked,a=[],o=this._cachedMeta.controller.getParsed(e),r=o&&o[n.axis],l=t=>{const e=t._parsed.find(t=>t[n.axis]===r),i=e&&e[t.vScale.axis];if(no(i)||isNaN(i))return!0};for(const n of i)if((void 0===e||!l(n))&&((!1===s||-1===a.indexOf(n.stack)||void 0===s&&void 0===n.stack)&&a.push(n.stack),n.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const n of this.chart.data.datasets)t[ro("x"===this.chart.options.indexAxis?n.xAxisID:n.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,n){const i=this._getStacks(t,n),s=void 0!==e?i.indexOf(e):-1;return-1===s?i.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,i=[];let s,a;for(s=0,a=e.data.length;s<a;++s)i.push(n.getPixelForValue(this.getParsed(s)[n.axis],s));const o=t.barThickness;return{min:o||rc(e),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n,index:i},options:{base:s,minBarLength:a}}=this,o=s||0,r=this.getParsed(t),l=r._custom,c=dc(l);let d,h,p=r[e.axis],u=0,g=n?this.applyStack(e,r,n):p;g!==p&&(u=g-p,g=p),c&&(p=l.barStart,g=l.barEnd-l.barStart,0!==p&&Fo(p)!==Fo(l.barEnd)&&(u=0),u+=p);const m=no(s)||c?u:s;let f=e.getPixelForValue(m);if(d=this.chart.getDataVisibility(t)?e.getPixelForValue(u+g):f,h=d-f,Math.abs(h)<a){h=function(t,e,n){return 0!==t?Fo(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}(h,e,o)*a,p===o&&(f-=h/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1),l=Math.min(t,s),u=Math.max(t,s);f=Math.max(Math.min(f,u),l),d=f+h,n&&!c&&(r._stacks[e.axis]._visualValues[i]=e.getValueForPixel(d)-e.getValueForPixel(f))}if(f===e.getPixelForValue(o)){const t=Fo(h)*e.getLineWidthForValue(o)/2;f+=t,h-=t}return{size:h,base:f,head:d,center:d+h/2}}_calculateBarIndexPixels(t,e){const n=e.scale,i=this.options,s=i.skipNull,a=ro(i.maxBarThickness,1/0);let o,r;const l=this._getAxisCount();if(e.grouped){const n=s?this._getStackCount(t):e.stackCount,c="flex"===i.barThickness?function(t,e,n,i){const s=e.pixels,a=s[t];let o=t>0?s[t-1]:null,r=t<s.length-1?s[t+1]:null;const l=n.categoryPercentage;null===o&&(o=a-(null===r?e.end-e.start:r-a)),null===r&&(r=a+a-o);const c=a-(a-Math.min(o,r))/2*l;return{chunk:Math.abs(r-o)/2*l/i,ratio:n.barPercentage,start:c}}(t,e,i,n*l):function(t,e,n,i){const s=n.barThickness;let a,o;return no(s)?(a=e.min*n.categoryPercentage,o=n.barPercentage):(a=s*i,o=1),{chunk:a/i,ratio:o,start:e.pixels[t]-a/2}}(t,e,i,n*l),d="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(ro(d,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0)+h;o=c.start+c.chunk*p+c.chunk/2,r=Math.min(a,c.chunk*c.ratio)}else o=n.getPixelForValue(this.getParsed(t)[n.axis],t),r=Math.min(a,e.min*e.ratio);return{base:o-r/2,head:o+r/2,center:o,size:r}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,i=n.length;let s=0;for(;s<i;++s)null===this.getParsed(s)[e.axis]||n[s].hidden||n[s].draw(this._ctx)}},BubbleController:class extends oc{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,i){const s=super.parsePrimitiveData(t,e,n,i);for(let t=0;t<s.length;t++)s[t]._custom=this.resolveDataElementOptions(t+n).radius;return s}parseArrayData(t,e,n,i){const s=super.parseArrayData(t,e,n,i);for(let t=0;t<s.length;t++){const i=e[n+t];s[t]._custom=ro(i[2],this.resolveDataElementOptions(t+n).radius)}return s}parseObjectData(t,e,n,i){const s=super.parseObjectData(t,e,n,i);for(let t=0;t<s.length;t++){const i=e[n+t];s[t]._custom=ro(i&&i.r&&+i.r,this.resolveDataElementOptions(t+n).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:s}=e,a=this.getParsed(t),o=i.getLabelForValue(a.x),r=s.getLabelForValue(a.y),l=a._custom;return{label:n[t]||"",value:"("+o+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,i){const s="reset"===i,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,i),c=a.axis,d=o.axis;for(let h=e;h<e+n;h++){const e=t[h],n=!s&&this.getParsed(h),p={},u=p[c]=s?a.getPixelForDecimal(.5):a.getPixelForValue(n[c]),g=p[d]=s?o.getBasePixel():o.getPixelForValue(n[d]);p.skip=isNaN(u)||isNaN(g),l&&(p.options=r||this.resolveDataElementOptions(h,e.active?"active":i),s&&(p.options.radius=0)),this.updateElement(e,h,p,i)}}resolveDataElementOptions(t,e){const n=this.getParsed(t);let i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return"active"!==e&&(i.radius=0),i.radius+=ro(n&&n._custom,s),i}},DoughnutController:mc,LineController:class extends oc{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:i=[],_dataset:s}=e,a=this.chart._animationsDisabled;let{start:o,count:r}=ar(e,i,a);this._drawStart=o,this._drawCount=r,or(e)&&(o=0,r=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!s._decimated,n.points=i;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:l},t),this.updateElements(i,o,r,t)}updateElements(t,e,n,i){const s="reset"===i,{iScale:a,vScale:o,_stacked:r,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,i),h=a.axis,p=o.axis,{spanGaps:u,segment:g}=this.options,m=No(u)?u:Number.POSITIVE_INFINITY,f=this.chart._animationsDisabled||s||"none"===i,b=e+n,y=t.length;let v=e>0&&this.getParsed(e-1);for(let n=0;n<y;++n){const u=t[n],y=f?u:{};if(n<e||n>=b){y.skip=!0;continue}const _=this.getParsed(n),x=no(_[p]),w=y[h]=a.getPixelForValue(_[h],n),D=y[p]=s||x?o.getBasePixel():o.getPixelForValue(r?this.applyStack(o,_,r):_[p],n);y.skip=isNaN(w)||isNaN(D)||x,y.stop=n>0&&Math.abs(_[h]-v[h])>m,g&&(y.parsed=_,y.raw=l.data[n]),d&&(y.options=c||this.resolveDataElementOptions(n,u.active?"active":i)),f||this.updateElement(u,n,y,i),v=_}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PieController:class extends mc{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:fc,RadarController:class extends oc{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,i){return hl.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta,n=e.dataset,i=e.data||[],s=e.iScale.getLabels();if(n.points=i,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:e};this.updateElement(n,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,n,i){const s=this._cachedMeta.rScale,a="reset"===i;for(let o=e;o<e+n;o++){const e=t[o],n=this.resolveDataElementOptions(o,e.active?"active":i),r=s.getPointPositionForValue(o,this.getParsed(o).r),l=a?s.xCenter:r.x,c=a?s.yCenter:r.y,d={x:l,y:c,angle:r.angle,skip:isNaN(l)||isNaN(c),options:n};this.updateElement(e,o,d,i)}}},ScatterController:class extends oc{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:s}=e,a=this.getParsed(t),o=i.getLabelForValue(a.x),r=s.getLabelForValue(a.y);return{label:n[t]||"",value:"("+o+", "+r+")"}}update(t){const e=this._cachedMeta,{data:n=[]}=e,i=this.chart._animationsDisabled;let{start:s,count:a}=ar(e,n,i);if(this._drawStart=s,this._drawCount=a,or(e)&&(s=0,a=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:a}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!a._decimated,s.points=n;const o=this.resolveDatasetElementOptions(t);o.segment=this.options.segment,this.updateElement(s,void 0,{animated:!i,options:o},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,s,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,i){const s="reset"===i,{iScale:a,vScale:o,_stacked:r,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,i),d=this.getSharedOptions(c),h=this.includeOptions(i,d),p=a.axis,u=o.axis,{spanGaps:g,segment:m}=this.options,f=No(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||s||"none"===i;let y=e>0&&this.getParsed(e-1);for(let c=e;c<e+n;++c){const e=t[c],n=this.getParsed(c),g=b?e:{},v=no(n[u]),_=g[p]=a.getPixelForValue(n[p],c),x=g[u]=s||v?o.getBasePixel():o.getPixelForValue(r?this.applyStack(o,n,r):n[u],c);g.skip=isNaN(_)||isNaN(x)||v,g.stop=c>0&&Math.abs(n[p]-y[p])>f,m&&(g.parsed=n,g.raw=l.data[c]),h&&(g.options=d||this.resolveDataElementOptions(c,e.active?"active":i)),b||this.updateElement(e,c,g,i),y=n}this.updateSharedOptions(d,i,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}const n=t.dataset,i=n.options&&n.options.borderWidth||0;if(!e.length)return i;const s=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,s,a)/2}}});function yc(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class vc{static override(t){Object.assign(vc.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return yc()}parse(){return yc()}format(){return yc()}add(){return yc()}diff(){return yc()}startOf(){return yc()}endOf(){return yc()}}var _c=vc;function xc(t,e,n,i){const{controller:s,data:a,_sorted:o}=t,r=s._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(r&&e===r.axis&&"r"!==e&&o&&a.length){const o=r._reversePixels?Xo:Go;if(!i){const i=o(a,e,n);if(l){const{vScale:e}=s._cachedMeta,{_parsed:n}=t,a=n.slice(0,i.lo+1).reverse().findIndex(t=>!no(t[e.axis]));i.lo-=Math.max(0,a);const o=n.slice(i.hi).findIndex(t=>!no(t[e.axis]));i.hi+=Math.max(0,o)}return i}if(s._sharedOptions){const t=a[0],i="function"==typeof t.getRange&&t.getRange(e);if(i){const t=o(a,e,n-i),s=o(a,e,n+i);return{lo:t.lo,hi:s.hi}}}}return{lo:0,hi:a.length-1}}function wc(t,e,n,i,s){const a=t.getSortedVisibleDatasetMetas(),o=n[e];for(let t=0,n=a.length;t<n;++t){const{index:n,data:r}=a[t],{lo:l,hi:c}=xc(a[t],e,o,s);for(let t=l;t<=c;++t){const e=r[t];e.skip||i(e,n,t)}}}function Dc(t,e,n,i,s){const a=[];return s||t.isPointInArea(e)?(wc(t,n,e,function(n,o,r){(s||Rr(n,t.chartArea,0))&&n.inRange(e.x,e.y,i)&&a.push({element:n,datasetIndex:o,index:r})},!0),a):a}function Ic(t,e,n,i,s,a){return a||t.isPointInArea(e)?"r"!==n||i?function(t,e,n,i,s,a){let o=[];const r=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){const s=e?Math.abs(t.x-i.x):0,a=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(a,2))}}(n);let l=Number.POSITIVE_INFINITY;return wc(t,n,e,function(n,c,d){const h=n.inRange(e.x,e.y,s);if(i&&!h)return;const p=n.getCenterPoint(s);if(!a&&!t.isPointInArea(p)&&!h)return;const u=r(e,p);u<l?(o=[{element:n,datasetIndex:c,index:d}],l=u):u===l&&o.push({element:n,datasetIndex:c,index:d})}),o}(t,e,n,i,s,a):function(t,e,n,i){let s=[];return wc(t,n,e,function(t,n,a){const{startAngle:o,endAngle:r}=t.getProps(["startAngle","endAngle"],i),{angle:l}=$o(t,{x:e.x,y:e.y});qo(l,o,r)&&s.push({element:t,datasetIndex:n,index:a})}),s}(t,e,n,s):[]}function kc(t,e,n,i,s){const a=[],o="x"===n?"inXRange":"inYRange";let r=!1;return wc(t,n,e,(t,i,l)=>{t[o]&&t[o](e[n],s)&&(a.push({element:t,datasetIndex:i,index:l}),r=r||t.inRange(e.x,e.y,s))}),i&&!r?[]:a}var Cc={evaluateInteractionItems:wc,modes:{index(t,e,n,i){const s=Il(e,t),a=n.axis||"x",o=n.includeInvisible||!1,r=n.intersect?Dc(t,s,a,i,o):Ic(t,s,a,!1,i,o),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=r[0].index,n=t.data[e];n&&!n.skip&&l.push({element:n,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,n,i){const s=Il(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;let r=n.intersect?Dc(t,s,a,i,o):Ic(t,s,a,!1,i,o);if(r.length>0){const e=r[0].datasetIndex,n=t.getDatasetMeta(e).data;r=[];for(let t=0;t<n.length;++t)r.push({element:n[t],datasetIndex:e,index:t})}return r},point:(t,e,n,i)=>Dc(t,Il(e,t),n.axis||"xy",i,n.includeInvisible||!1),nearest(t,e,n,i){const s=Il(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;return Ic(t,s,a,n.intersect,i,o)},x:(t,e,n,i)=>kc(t,Il(e,t),"x",n.intersect,i),y:(t,e,n,i)=>kc(t,Il(e,t),"y",n.intersect,i)}};const Mc=["left","top","right","bottom"];function Sc(t,e){return t.filter(t=>t.pos===e)}function Tc(t,e){return t.filter(t=>-1===Mc.indexOf(t.pos)&&t.box.axis===e)}function Oc(t,e){return t.sort((t,n)=>{const i=e?n:t,s=e?t:n;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function Ec(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function Rc(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Pc(t,e,n,i){const{pos:s,box:a}=n,o=t.maxPadding;if(!so(s)){n.size&&(t[s]-=n.size);const e=i[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?a.height:a.width),n.size=e.size/e.count,t[s]+=n.size}a.getPadding&&Rc(o,a.getPadding());const r=Math.max(0,e.outerWidth-Ec(o,t,"left","right")),l=Math.max(0,e.outerHeight-Ec(o,t,"top","bottom")),c=r!==t.w,d=l!==t.h;return t.w=r,t.h=l,n.horizontal?{same:c,other:d}:{same:d,other:c}}function Fc(t,e){const n=e.maxPadding;return function(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{i[t]=Math.max(e[t],n[t])}),i}(t?["left","right"]:["top","bottom"])}function Vc(t,e,n,i){const s=[];let a,o,r,l,c,d;for(a=0,o=t.length,c=0;a<o;++a){r=t[a],l=r.box,l.update(r.width||e.w,r.height||e.h,Fc(r.horizontal,e));const{same:o,other:h}=Pc(e,n,r,i);c|=o&&s.length,d=d||h,l.fullSize||s.push(r)}return c&&Vc(s,e,n,i)||d}function Ac(t,e,n,i,s){t.top=n,t.left=e,t.right=e+i,t.bottom=n+s,t.width=i,t.height=s}function Nc(t,e,n,i){const s=n.padding;let{x:a,y:o}=e;for(const r of t){const t=r.box,l=i[r.stack]||{count:1,placed:0,weight:1},c=r.stackWeight/l.weight||1;if(r.horizontal){const i=e.w*c,a=l.size||t.height;wo(l.start)&&(o=l.start),t.fullSize?Ac(t,s.left,o,n.outerWidth-s.right-s.left,a):Ac(t,e.left+l.placed,o,i,a),l.start=o,l.placed+=i,o=t.bottom}else{const i=e.h*c,o=l.size||t.width;wo(l.start)&&(a=l.start),t.fullSize?Ac(t,a,s.top,o,n.outerHeight-s.bottom-s.top):Ac(t,a,e.top+l.placed,o,i),l.start=a,l.placed+=i,a=t.right}}e.x=a,e.y=o}var jc={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const s=Zr(t.options.layout.padding),a=Math.max(e-s.width,0),o=Math.max(n-s.height,0),r=function(t){const e=function(t){const e=[];let n,i,s,a,o,r;for(n=0,i=(t||[]).length;n<i;++n)s=t[n],({position:a,options:{stack:o,stackWeight:r=1}}=s),e.push({index:n,box:s,pos:a,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&a+o,stackWeight:r});return e}(t),n=Oc(e.filter(t=>t.box.fullSize),!0),i=Oc(Sc(e,"left"),!0),s=Oc(Sc(e,"right")),a=Oc(Sc(e,"top"),!0),o=Oc(Sc(e,"bottom")),r=Tc(e,"x"),l=Tc(e,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:s.concat(l).concat(o).concat(r),chartArea:Sc(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:a.concat(o).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;ho(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const d=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,h=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/d,hBoxMaxHeight:o/2}),p=Object.assign({},s);Rc(p,Zr(i));const u=Object.assign({maxPadding:p,w:a,h:o,x:s.left,y:s.top},s),g=function(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:i,stackWeight:s}=n;if(!t||!Mc.includes(i))continue;const a=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=s}return e}(t),{vBoxMaxWidth:i,hBoxMaxHeight:s}=e;let a,o,r;for(a=0,o=t.length;a<o;++a){r=t[a];const{fullSize:o}=r.box,l=n[r.stack],c=l&&r.stackWeight/l.weight;r.horizontal?(r.width=c?c*i:o&&e.availableWidth,r.height=s):(r.width=i,r.height=c?c*s:o&&e.availableHeight)}return n}(l.concat(c),h);Vc(r.fullSize,u,h,g),Vc(l,u,h,g),Vc(c,u,h,g)&&Vc(l,u,h,g),function(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(u),Nc(r.leftAndTop,u,h,g),u.x+=u.w,u.y+=u.h,Nc(r.rightAndBottom,u,h,g),t.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h,height:u.h,width:u.w},ho(r.chartArea,e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(u.w,u.h,{left:0,top:0,right:0,bottom:0})})}};class Lc{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class zc extends Lc{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Bc="$chartjs",$c={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Hc=t=>null===t||""===t,Wc=!!Ml&&{passive:!0};function Uc(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Wc)}function qc(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Yc(t,e,n){const i=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||qc(n.addedNodes,i),e=e&&!qc(n.removedNodes,i);e&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Zc(t,e,n){const i=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||qc(n.removedNodes,i),e=e&&!qc(n.addedNodes,i);e&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Kc=new Map;let Gc=0;function Xc(){const t=window.devicePixelRatio;t!==Gc&&(Gc=t,Kc.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Jc(t,e,n){const i=t.canvas,s=i&&vl(i);if(!s)return;const a=nr((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()},window),o=new ResizeObserver(t=>{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||a(n,i)});return o.observe(s),function(t,e){Kc.size||window.addEventListener("resize",Xc),Kc.set(t,e)}(t,a),o}function Qc(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){Kc.delete(t),Kc.size||window.removeEventListener("resize",Xc)}(t)}function td(t,e,n){const i=t.canvas,s=nr(e=>{null!==t.ctx&&n(function(t,e){const n=$c[t.type]||t.type,{x:i,y:s}=Il(t,e);return{type:n,chart:e,native:t,x:void 0!==i?i:null,y:void 0!==s?s:null}}(e,t))},t);return function(t,e,n){t&&t.addEventListener(e,n,Wc)}(i,e,s),s}class ed extends Lc{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[Bc]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Hc(s)){const e=Sl(t,"width");void 0!==e&&(t.width=e)}if(Hc(i))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Sl(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[Bc])return!1;const n=e[Bc].initial;["height","width"].forEach(t=>{const i=n[t];no(i)?e.removeAttribute(t):e.setAttribute(t,i)});const i=n.style||{};return Object.keys(i).forEach(t=>{e.style[t]=i[t]}),e.width=e.width,delete e[Bc],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),s={attach:Yc,detach:Zc,resize:Jc}[e]||td;i[e]=s(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];i&&(({attach:Qc,detach:Qc,resize:Qc}[e]||Uc)(t,e,i),n[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,i){return function(t,e,n,i){const s=xl(t),a=Dl(s,"margin"),o=_l(s.maxWidth,t,"clientWidth")||So,r=_l(s.maxHeight,t,"clientHeight")||So,l=function(t,e,n){let i,s;if(void 0===e||void 0===n){const a=t&&vl(t);if(a){const t=a.getBoundingClientRect(),o=xl(a),r=Dl(o,"border","width"),l=Dl(o,"padding");e=t.width-l.width-r.width,n=t.height-l.height-r.height,i=_l(o.maxWidth,a,"clientWidth"),s=_l(o.maxHeight,a,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||So,maxHeight:s||So}}(t,e,n);let{width:c,height:d}=l;if("content-box"===s.boxSizing){const t=Dl(s,"border","width"),e=Dl(s,"padding");c-=e.width+t.width,d-=e.height+t.height}return c=Math.max(0,c-a.width),d=Math.max(0,i?c/i:d-a.height),c=kl(Math.min(c,o,l.maxWidth)),d=kl(Math.min(d,r,l.maxHeight)),c&&!d&&(d=kl(c/2)),(void 0!==e||void 0!==n)&&i&&l.height&&d>l.height&&(d=l.height,c=kl(Math.floor(d*i))),{width:c,height:d}}(t,e,n,i)}isAttached(t){const e=t&&vl(t);return!(!e||!e.isConnected)}}class nd{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return No(this.x)&&No(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach(t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]}),i}}function id(t,e,n,i,s){const a=ro(i,0),o=Math.min(ro(s,t.length),t.length);let r,l,c,d=0;for(n=Math.ceil(n),s&&(r=s-i,n=r/Math.floor(r/n)),c=a;c<0;)d++,c=Math.round(a+d*n);for(l=Math.max(a,0);l<o;l++)l===c&&(e.push(t[l]),d++,c=Math.round(a+d*n))}const sd=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,ad=(t,e)=>Math.min(e||t,t);function od(t,e){const n=[],i=t.length/e,s=t.length;let a=0;for(;a<s;a+=i)n.push(t[Math.floor(a)]);return n}function rd(t,e,n){const i=t.ticks.length,s=Math.min(e,i-1),a=t._startPixel,o=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(s);if(!(n&&(l=1===i?Math.max(c-a,o-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(s-1))/2,c+=s<e?l:-l,c<a-r||c>o+r)))return c}function ld(t){return t.drawTicks?t.tickLength:0}function cd(t,e){if(!t.display)return 0;const n=Kr(t.font,e),i=Zr(t.padding);return(io(t.text)?t.text.length:1)*n.lineHeight+i.height}function dd(t,e,n){let i=ir(t);return(n&&"right"!==e||!n&&"right"===e)&&(i=(t=>"left"===t?"right":"right"===t?"left":t)(i)),i}class hd extends nd{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:i}=this;return t=oo(t,Number.POSITIVE_INFINITY),e=oo(e,Number.NEGATIVE_INFINITY),n=oo(n,Number.POSITIVE_INFINITY),i=oo(i,Number.NEGATIVE_INFINITY),{min:oo(t,n),max:oo(e,i),minDefined:ao(t),maxDefined:ao(e)}}getMinMax(t){let e,{min:n,max:i,minDefined:s,maxDefined:a}=this.getUserBounds();if(s&&a)return{min:n,max:i};const o=this.getMatchingVisibleMetas();for(let r=0,l=o.length;r<l;++r)e=o[r].controller.getMinMax(this,t),s||(n=Math.min(n,e.min)),a||(i=Math.max(i,e.max));return n=a&&n>i?i:n,i=s&&n>i?n:i,{min:oo(n,oo(i,n)),max:oo(i,oo(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){co(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:i,grace:s,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,n){const{min:i,max:s}=t,a=lo(e,(s-i)/2),o=(t,e)=>n&&0===t?0:t+e;return{min:o(i,-Math.abs(a)),max:o(s,a)}}(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=o<this.ticks.length;this._convertTicksToLabels(r?od(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=function(t,e){const n=t.options.ticks,i=function(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),s=t._maxLength/n;return Math.floor(Math.min(i,s))}(t),s=Math.min(n.maxTicksLimit||i,i),a=n.major.enabled?function(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}(e):[],o=a.length,r=a[0],l=a[o-1],c=[];if(o>s)return function(t,e,n,i){let s,a=0,o=n[0];for(i=Math.ceil(i),s=0;s<t.length;s++)s===o&&(e.push(t[s]),a++,o=n[a*i])}(e,c,a,o/s),c;const d=function(t,e,n){const i=function(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}(t),s=e.length/n;if(!i)return Math.max(s,1);const a=function(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i===0&&(e.push(i),e.push(t/i));return n===(0|n)&&e.push(n),e.sort((t,e)=>t-e).pop(),e}(i);for(let t=0,e=a.length-1;t<e;t++){const e=a[t];if(e>s)return e}return Math.max(s,1)}(a,e,s);if(o>0){let t,n;const i=o>1?Math.round((l-r)/(o-1)):null;for(id(e,c,d,no(i)?0:r-i,r),t=0,n=o-1;t<n;t++)id(e,c,d,a[t],a[t+1]);return id(e,c,d,l,no(i)?e.length:l+i),c}return id(e,c,d),c}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),r&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){co(this.options.afterUpdate,[this])}beforeSetDimensions(){co(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){co(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),co(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){co(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,i,s;for(n=0,i=t.length;n<i;n++)s=t[n],s.label=co(e.callback,[s.value,n,t],this)}afterTickToLabelConversion(){co(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){co(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=ad(this.ticks.length,t.ticks.maxTicksLimit),i=e.minRotation||0,s=e.maxRotation;let a,o,r,l=i;if(!this._isVisible()||!e.display||i>=s||n<=1||!this.isHorizontal())return void(this.labelRotation=i);const c=this._getLabelSizes(),d=c.widest.width,h=c.highest.height,p=Yo(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/n:p/(n-1),d+6>a&&(a=p/(n-(t.offset?.5:1)),o=this.maxHeight-ld(t.grid)-e.padding-cd(t.title,this.chart.options.font),r=Math.sqrt(d*d+h*h),l=zo(Math.min(Math.asin(Yo((c.highest.height+6)/a,-1,1)),Math.asin(Yo(o/r,-1,1))-Math.asin(Yo(h/r,-1,1)))),l=Math.max(i,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){co(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){co(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:i,grid:s}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){const a=cd(i,e.options.font);if(o?(t.width=this.maxWidth,t.height=ld(s)+a):(t.height=this.maxHeight,t.width=ld(s)+a),n.display&&this.ticks.length){const{first:e,last:i,widest:s,highest:a}=this._getLabelSizes(),r=2*n.padding,l=Lo(this.labelRotation),c=Math.cos(l),d=Math.sin(l);if(o){const e=n.mirror?0:d*s.width+c*a.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=n.mirror?0:c*s.width+d*a.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,i,d,c)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:s,padding:a},position:o}=this.options,r=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;r?l?(d=i*t.width,h=n*e.height):(d=n*t.height,h=i*e.width):"start"===s?h=e.width:"end"===s?d=t.width:"inner"!==s&&(d=t.width/2,h=e.width/2),this.paddingLeft=Math.max((d-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((h-c+a)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===s?(n=0,i=t.height):"end"===s&&(n=e.height,i=0),this.paddingTop=n+a,this.paddingBottom=i+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){co(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)no(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=od(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:i,_longestTextCache:s}=this,a=[],o=[],r=Math.floor(e/ad(e,n));let l,c,d,h,p,u,g,m,f,b,y,v=0,_=0;for(l=0;l<e;l+=r){if(h=t[l].label,p=this._resolveTickFontOptions(l),i.font=u=p.string,g=s[u]=s[u]||{data:{},gc:[]},m=p.lineHeight,f=b=0,no(h)||io(h)){if(io(h))for(c=0,d=h.length;c<d;++c)y=h[c],no(y)||io(y)||(f=Cr(i,g.data,g.gc,f,y),b+=m)}else f=Cr(i,g.data,g.gc,f,h),b=m;a.push(f),o.push(b),v=Math.max(f,v),_=Math.max(b,_)}!function(t,e){ho(t,t=>{const n=t.gc,i=n.length/2;let s;if(i>e){for(s=0;s<i;++s)delete t.data[n[s]];n.splice(0,i)}})}(s,e);const x=a.indexOf(v),w=o.indexOf(_),D=t=>({width:a[t]||0,height:o[t]||0});return{first:D(0),last:D(e-1),widest:D(x),highest:D(w),widths:a,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Yo(this._alignToPixels?Sr(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=function(t,e,n){return Xr(t,{tick:n,index:e,type:"tick"})}(this.getContext(),t,n))}return this.$context||(this.$context=Xr(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=Lo(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),s=this._getLabelSizes(),a=t.autoSkipPadding||0,o=s?s.widest.width+a:0,r=s?s.highest.height+a:0;return this.isHorizontal()?r*n>o*i?o/n:r/i:r*i<o*n?r/n:o/i}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,i=this.options,{grid:s,position:a,border:o}=i,r=s.offset,l=this.isHorizontal(),c=this.ticks.length+(r?1:0),d=ld(s),h=[],p=o.setContext(this.getContext()),u=p.display?p.width:0,g=u/2,m=function(t){return Sr(n,t,u)};let f,b,y,v,_,x,w,D,I,k,C,M;if("top"===a)f=m(this.bottom),x=this.bottom-d,D=f-g,k=m(t.top)+g,M=t.bottom;else if("bottom"===a)f=m(this.top),k=t.top,M=m(t.bottom)-g,x=f+g,D=this.top+d;else if("left"===a)f=m(this.right),_=this.right-d,w=f-g,I=m(t.left)+g,C=t.right;else if("right"===a)f=m(this.left),I=t.left,C=m(t.right)-g,_=f+g,w=this.left+d;else if("x"===e){if("center"===a)f=m((t.top+t.bottom)/2+.5);else if(so(a)){const t=Object.keys(a)[0],e=a[t];f=m(this.chart.scales[t].getPixelForValue(e))}k=t.top,M=t.bottom,x=f+g,D=x+d}else if("y"===e){if("center"===a)f=m((t.left+t.right)/2);else if(so(a)){const t=Object.keys(a)[0],e=a[t];f=m(this.chart.scales[t].getPixelForValue(e))}_=f-g,w=_-d,I=t.left,C=t.right}const S=ro(i.ticks.maxTicksLimit,c),T=Math.max(1,Math.ceil(c/S));for(b=0;b<c;b+=T){const t=this.getContext(b),e=s.setContext(t),i=o.setContext(t),a=e.lineWidth,c=e.color,d=i.dash||[],p=i.dashOffset,u=e.tickWidth,g=e.tickColor,m=e.tickBorderDash||[],f=e.tickBorderDashOffset;y=rd(this,b,r),void 0!==y&&(v=Sr(n,y,a),l?_=w=I=C=v:x=D=k=M=v,h.push({tx1:_,ty1:x,tx2:w,ty2:D,x1:I,y1:k,x2:C,y2:M,width:a,color:c,borderDash:d,borderDashOffset:p,tickWidth:u,tickColor:g,tickBorderDash:m,tickBorderDashOffset:f}))}return this._ticksLength=c,this._borderValue=f,h}_computeLabelItems(t){const e=this.axis,n=this.options,{position:i,ticks:s}=n,a=this.isHorizontal(),o=this.ticks,{align:r,crossAlign:l,padding:c,mirror:d}=s,h=ld(n.grid),p=h+c,u=d?-c:p,g=-Lo(this.labelRotation),m=[];let f,b,y,v,_,x,w,D,I,k,C,M,S="middle";if("top"===i)x=this.bottom-u,w=this._getXAxisLabelAlignment();else if("bottom"===i)x=this.top+u,w=this._getXAxisLabelAlignment();else if("left"===i){const t=this._getYAxisLabelAlignment(h);w=t.textAlign,_=t.x}else if("right"===i){const t=this._getYAxisLabelAlignment(h);w=t.textAlign,_=t.x}else if("x"===e){if("center"===i)x=(t.top+t.bottom)/2+p;else if(so(i)){const t=Object.keys(i)[0],e=i[t];x=this.chart.scales[t].getPixelForValue(e)+p}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===i)_=(t.left+t.right)/2-p;else if(so(i)){const t=Object.keys(i)[0],e=i[t];_=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(h).textAlign}"y"===e&&("start"===r?S="top":"end"===r&&(S="bottom"));const T=this._getLabelSizes();for(f=0,b=o.length;f<b;++f){y=o[f],v=y.label;const t=s.setContext(this.getContext(f));D=this.getPixelForTick(f)+s.labelOffset,I=this._resolveTickFontOptions(f),k=I.lineHeight,C=io(v)?v.length:1;const e=C/2,n=t.color,r=t.textStrokeColor,c=t.textStrokeWidth;let h,p=w;if(a?(_=D,"inner"===w&&(p=f===b-1?this.options.reverse?"left":"right":0===f?this.options.reverse?"right":"left":"center"),M="top"===i?"near"===l||0!==g?-C*k+k/2:"center"===l?-T.highest.height/2-e*k+k:-T.highest.height+k/2:"near"===l||0!==g?k/2:"center"===l?T.highest.height/2-e*k:T.highest.height-C*k,d&&(M*=-1),0===g||t.showLabelBackdrop||(_+=k/2*Math.sin(g))):(x=D,M=(1-C)*k/2),t.showLabelBackdrop){const e=Zr(t.backdropPadding),n=T.heights[f],i=T.widths[f];let s=M-e.top,a=0-e.left;switch(S){case"middle":s-=n/2;break;case"bottom":s-=n}switch(w){case"center":a-=i/2;break;case"right":a-=i;break;case"inner":f===b-1?a-=i:f>0&&(a-=i/2)}h={left:a,top:s,width:i+e.width,height:n+e.height,color:t.backdropColor}}m.push({label:v,font:I,textOffset:M,options:{rotation:g,color:n,strokeColor:r,strokeWidth:c,textAlign:p,textBaseline:S,translation:[_,x],backdrop:h}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Lo(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:s}}=this.options,a=t+s,o=this._getLabelSizes().widest.width;let r,l;return"left"===e?i?(l=this.right+s,"near"===n?r="left":"center"===n?(r="center",l+=o/2):(r="right",l+=o)):(l=this.right-a,"near"===n?r="right":"center"===n?(r="center",l-=o/2):(r="left",l=this.left)):"right"===e?i?(l=this.left+s,"near"===n?r="right":"center"===n?(r="center",l-=o/2):(r="left",l-=o)):(l=this.left+a,"near"===n?r="left":"center"===n?(r="center",l+=o/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:s,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,s,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(e=>e.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,a;const o=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(s=0,a=i.length;s<a;++s){const t=i[s];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:i}}=this,s=n.setContext(this.getContext()),a=n.display?s.width:0;if(!a)return;const o=i.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let l,c,d,h;this.isHorizontal()?(l=Sr(t,this.left,a)-a/2,c=Sr(t,this.right,o)+o/2,d=h=r):(d=Sr(t,this.top,a)-a/2,h=Sr(t,this.bottom,o)+o/2,l=c=r),e.save(),e.lineWidth=s.width,e.strokeStyle=s.color,e.beginPath(),e.moveTo(l,d),e.lineTo(c,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,n=this._computeLabelArea();n&&Pr(e,n);const i=this.getLabelItems(t);for(const t of i){const n=t.options,i=t.font;Lr(e,t.label,0,t.textOffset,i,n)}n&&Fr(e)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:i}}=this;if(!n.display)return;const s=Kr(n.font),a=Zr(n.padding),o=n.align;let r=s.lineHeight/2;"bottom"===e||"center"===e||so(e)?(r+=a.bottom,io(n.text)&&(r+=s.lineHeight*(n.text.length-1))):r+=a.top;const{titleX:l,titleY:c,maxWidth:d,rotation:h}=function(t,e,n,i){const{top:s,left:a,bottom:o,right:r,chart:l}=t,{chartArea:c,scales:d}=l;let h,p,u,g=0;const m=o-s,f=r-a;if(t.isHorizontal()){if(p=sr(i,a,r),so(n)){const t=Object.keys(n)[0],i=n[t];u=d[t].getPixelForValue(i)+m-e}else u="center"===n?(c.bottom+c.top)/2+m-e:sd(t,n,e);h=r-a}else{if(so(n)){const t=Object.keys(n)[0],i=n[t];p=d[t].getPixelForValue(i)-f+e}else p="center"===n?(c.left+c.right)/2-f+e:sd(t,n,e);u=sr(i,o,s),g="left"===n?-Oo:Oo}return{titleX:p,titleY:u,maxWidth:h,rotation:g}}(this,r,e,o);Lr(t,n.text,0,0,s,{color:n.color,maxWidth:d,rotation:h,textAlign:dd(o,e,i),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=ro(t.grid&&t.grid.z,-1),i=ro(t.border&&t.border.z,0);return this._isVisible()&&this.draw===hd.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let s,a;for(s=0,a=e.length;s<a;++s){const a=e[s];a[n]!==this.id||t&&a.type!==t||i.push(a)}return i}_resolveTickFontOptions(t){return Kr(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class pd{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(e)&&(n=this.register(e));const i=this.items,s=t.id,a=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,function(t,e,n){const i=fo(Object.create(null),[n?kr.get(n):{},kr.get(e),t.defaults]);kr.set(e,i),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(n=>{const i=n.split("."),s=i.pop(),a=[t].concat(i).join("."),o=e[n].split("."),r=o.pop(),l=o.join(".");kr.route(a,s,l,r)})}(e,t.defaultRoutes),t.descriptors&&kr.describe(e,t.descriptors)}(t,a,n),this.override&&kr.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,i=this.scope;n in e&&delete e[n],i&&n in kr[i]&&(delete kr[i][n],this.override&&delete _r[n])}}class ud{constructor(){this.controllers=new pd(oc,"datasets",!0),this.elements=new pd(nd,"elements"),this.plugins=new pd(Object,"plugins"),this.scales=new pd(hd,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(e=>{const i=n||this._getRegistryForType(e);n||i.isForType(e)||i===this.plugins&&e.id?this._exec(t,i,e):ho(e,e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)})})}_exec(t,e,n){const i=xo(t);co(n["before"+i],[],n),e[t](n),co(n["after"+i],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const i=e.get(t);if(void 0===i)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var gd=new ud;class md{constructor(){this._init=void 0}notify(t,e,n,i){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const s=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(s,t,e,n);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),a}_notify(t,e,n,i){i=i||{};for(const s of t){const t=s.plugin;if(!1===co(t[n],[e,i,s.options],t)&&i.cancelable)return!1}return!0}invalidate(){no(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,i=ro(n.options&&n.options.plugins,{}),s=function(t){const e={},n=[],i=Object.keys(gd.plugins.items);for(let t=0;t<i.length;t++)n.push(gd.getPlugin(i[t]));const s=t.plugins||[];for(let t=0;t<s.length;t++){const i=s[t];-1===n.indexOf(i)&&(n.push(i),e[i.id]=!0)}return{plugins:n,localIds:e}}(n);return!1!==i||e?function(t,{plugins:e,localIds:n},i,s){const a=[],o=t.getContext();for(const r of e){const e=r.id,l=fd(i[e],s);null!==l&&a.push({plugin:r,options:bd(t.config,{plugin:r,local:n[e]},l,o)})}return a}(t,s,i,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,i=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function fd(t,e){return e||!1!==t?!0===t?{}:t:null}function bd(t,{plugin:e,local:n},i,s){const a=t.pluginScopeKeys(e),o=t.getOptionScopes(i,a);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function yd(t,e){const n=kr.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function vd(t){if("x"===t||"y"===t||"r"===t)return t}function _d(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function xd(t,...e){if(vd(t))return t;for(const n of e){const e=n.axis||_d(n.position)||t.length>1&&vd(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function wd(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function Dd(t){const e=t.options||(t.options={});e.plugins=ro(e.plugins,{}),e.scales=function(t,e){const n=_r[t.type]||{scales:{}},i=e.scales||{},s=yd(t.type,e),a=Object.create(null);return Object.keys(i).forEach(e=>{const o=i[e];if(!so(o))return console.error(`Invalid scale configuration for scale: ${e}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=xd(e,o,function(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(n.length)return wd(t,"x",n[0])||wd(t,"y",n[0])}return{}}(e,t),kr.scales[o.type]),l=function(t,e){return t===e?"_index_":"_value_"}(r,s),c=n.scales||{};a[e]=bo(Object.create(null),[{axis:r},o,c[r],c[l]])}),t.data.datasets.forEach(n=>{const s=n.type||t.type,o=n.indexAxis||yd(s,e),r=(_r[s]||{}).scales||{};Object.keys(r).forEach(t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,o),s=n[e+"AxisID"]||e;a[s]=a[s]||Object.create(null),bo(a[s],[{axis:e},i[s],r[t]])})}),Object.keys(a).forEach(t=>{const e=a[t];bo(e,[kr.scales[e.type],kr.scale])}),a}(t,e)}function Id(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const kd=new Map,Cd=new Set;function Md(t,e){let n=kd.get(t);return n||(n=e(),kd.set(t,n),Cd.add(n)),n}const Sd=(t,e,n)=>{const i=_o(e,n);void 0!==i&&t.add(i)};class Td{constructor(t){this._config=function(t){return(t=t||{}).data=Id(t.data),Dd(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Id(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Dd(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Md(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Md(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Md(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return Md(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:i,type:s}=this,a=this._cachedScopes(t,n),o=a.get(e);if(o)return o;const r=new Set;e.forEach(e=>{t&&(r.add(t),e.forEach(e=>Sd(r,t,e))),e.forEach(t=>Sd(r,i,t)),e.forEach(t=>Sd(r,_r[s]||{},t)),e.forEach(t=>Sd(r,kr,t)),e.forEach(t=>Sd(r,xr,t))});const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Cd.has(e)&&a.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,_r[e]||{},kr.datasets[e]||{},{type:e},kr,xr]}resolveNamedOptions(t,e,n,i=[""]){const s={$shared:!0},{resolver:a,subPrefixes:o}=Od(this._resolverCache,t,i);let r=a;(function(t,e){const{isScriptable:n,isIndexable:i}=tl(t);for(const s of e){const e=n(s),a=i(s),o=(a||e)&&t[s];if(e&&(Do(o)||Ed(o))||a&&io(o))return!0}return!1})(a,e)&&(s.$shared=!1,r=Qr(a,n=Do(n)?n():n,this.createResolver(t,n,o)));for(const t of e)s[t]=r[t];return s}createResolver(t,e,n=[""],i){const{resolver:s}=Od(this._resolverCache,t,n);return so(e)?Qr(s,e,void 0,i):s}}function Od(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const s=n.join();let a=i.get(s);return a||(a={resolver:Jr(e,n),subPrefixes:n.filter(t=>!t.toLowerCase().includes("hover"))},i.set(s,a)),a}const Ed=t=>so(t)&&Object.getOwnPropertyNames(t).some(e=>Do(t[e])),Rd=["top","bottom","left","right","chartArea"];function Pd(t,e){return"top"===t||"bottom"===t||-1===Rd.indexOf(t)&&"x"===e}function Fd(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function Vd(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),co(n&&n.onComplete,[t],e)}function Ad(t){const e=t.chart,n=e.options.animation;co(n&&n.onProgress,[t],e)}function Nd(t){return yl()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const jd={},Ld=t=>{const e=Nd(t);return Object.values(jd).filter(t=>t.canvas===e).pop()};function zd(t,e,n){const i=Object.keys(t);for(const s of i){const i=+s;if(i>=e){const a=t[s];delete t[s],(n>0||i>e)&&(t[i+n]=a)}}}class Bd{static defaults=kr;static instances=jd;static overrides=_r;static registry=gd;static version="4.5.1";static getChart=Ld;static register(...t){gd.add(...t),$d()}static unregister(...t){gd.remove(...t),$d()}constructor(t,e){const n=this.config=new Td(e),i=Nd(t),s=Ld(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!yl()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?zc:ed}(i)),this.platform.updateConfig(n);const o=this.platform.acquireContext(i,a.aspectRatio),r=o&&o.canvas,l=r&&r.height,c=r&&r.width;this.id=eo(),this.ctx=o,this.canvas=r,this.width=c,this.height=l,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new md,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}(t=>this.update(t),a.resizeDelay||0),this._dataChanges=[],jd[this.id]=this,o&&r?(Wl.listen(this,"complete",Vd),Wl.listen(this,"progress",Ad),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:i,_aspectRatio:s}=this;return no(t)?e&&s?s:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return gd}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Cl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Tr(this.canvas,this.ctx),this}stop(){return Wl.stop(this),this}resize(t,e){Wl.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,i=this.canvas,s=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,e,s),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Cl(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),co(n.onResize,[this,a],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){ho(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,i=Object.keys(n).reduce((t,e)=>(t[e]=!1,t),{});let s=[];e&&(s=s.concat(Object.keys(e).map(t=>{const n=e[t],i=xd(t,n),s="r"===i,a="x"===i;return{options:n,dposition:s?"chartArea":a?"bottom":"left",dtype:s?"radialLinear":a?"category":"linear"}}))),ho(s,e=>{const s=e.options,a=s.id,o=xd(a,s),r=ro(s.type,e.dtype);void 0!==s.position&&Pd(s.position,o)===Pd(e.dposition)||(s.position=e.dposition),i[a]=!0;let l=null;a in n&&n[a].type===r?l=n[a]:(l=new(gd.getScale(r))({id:a,type:r,ctx:this.ctx,chart:this}),n[l.id]=l),l.init(s,t)}),ho(i,(t,e)=>{t||delete n[e]}),ho(n,t=>{jc.configure(this,t,t.options),jc.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((t,e)=>t.index-e.index),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(Fd("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,n)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=e.length;n<i;n++){const i=e[n];let s=this.getDatasetMeta(n);const a=i.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(n),s=this.getDatasetMeta(n)),s.type=a,s.indexAxis=i.indexAxis||yd(a,this.options),s.order=i.order||0,s.index=n,s.label=""+i.label,s.visible=this.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const e=gd.getController(a),{datasetElementType:i,dataElementType:o}=kr.datasets[a];Object.assign(e,{dataElementType:gd.getElement(o),datasetElementType:i&&gd.getElement(i)}),s.controller=new e(this,n),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){ho(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),n=!i&&-1===s.indexOf(e);e.buildOrUpdateElements(n),a=Math.max(+e.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),i||ho(s,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Fd("z","_idx"));const{_active:o,_lastEvent:r}=this;r?this._eventHandler(r,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){ho(this.scales,t=>{jc.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);Io(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:s}of e)zd(t,i,"_removeElements"===n?-s:s)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),i=n(0);for(let t=1;t<e;t++)if(!Io(i,n(t)))return;return Array.from(i).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;jc.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],ho(this.boxes,t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Do(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",i)&&(n.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Wl.has(this)?this.attached&&!Wl.running(this)&&Wl.start(this):(this.draw(),Vd({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let i,s;for(i=0,s=e.length;i<s;++i){const s=e[i];t&&!s.visible||n.push(s)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n={meta:t,index:t.index,cancelable:!0},i=$l(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(i&&Pr(e,i),t.controller.draw(),i&&Fr(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return Rr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const s=Cc.modes[e];return"function"==typeof s?s(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter(t=>t&&t._dataset===e).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=Xr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const i=n?"show":"hide",s=this.getDatasetMeta(t),a=s.controller._resolveAnimations(void 0,i);wo(e)?(s.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),a.update(s,{visible:n}),this.update(e=>e.datasetIndex===t?i:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Wl.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Tr(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete jd[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};ho(this.options.events,t=>n(t,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let a;const o=()=>{i("attach",o),this.attached=!0,this.resize(),n("resize",s),n("detach",a)};a=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),n("attach",o)},e.isAttached(this.canvas)?o():a()}unbindEvents(){ho(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},ho(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let s,a,o,r;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),o=0,r=t.length;o<r;++o){a=t[o];const e=a&&this.getDatasetMeta(a.datasetIndex).controller;e&&e[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:t,index:e})=>{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}});!po(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,n){const i=this.options.hover,s=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),a=s(e,t),o=n?t:s(t,e);a.length&&this.updateHoverStyle(a,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;const s=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(s||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:i=[],options:s}=this,a=e,o=this._getActiveElements(t,i,n,a),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}(t,this._lastEvent,n,r);n&&(this._lastEvent=null,co(s.onHover,[t,o,this],this),r&&co(s.onClick,[t,o,this],this));const c=!po(o,i);return(c||e)&&(this._active=o,this._updateHoverStyles(o,i,e)),this._lastEvent=l,c}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}}function $d(){return ho(Bd.instances,t=>t._plugins.invalidate())}function Hd(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Wd(t,e,n,i,s,a){const{x:o,y:r,startAngle:l,pixelMargin:c,innerRadius:d}=e,h=Math.max(e.outerRadius+i+n-c,0),p=d>0?d+i+n+c:0;let u=0;const g=s-l;if(i){const t=((d>0?d-i:0)+(h>0?h-i:0))/2;u=(g-(0!==t?g*t/(t+i):g))/2}const m=(g-Math.max(.001,g*h-n/ko)/h)/2,f=l+m+u,b=s-m-u,{outerStart:y,outerEnd:v,innerStart:_,innerEnd:x}=function(t,e,n,i){const s=Ur(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),a=(n-e)/2,o=Math.min(a,i*e/2),r=t=>{const e=(n-Math.min(a,t))*i/2;return Yo(t,0,Math.min(a,e))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:Yo(s.innerStart,0,o),innerEnd:Yo(s.innerEnd,0,o)}}(e,p,h,b-f),w=h-y,D=h-v,I=f+y/w,k=b-v/D,C=p+_,M=p+x,S=f+_/C,T=b-x/M;if(t.beginPath(),a){const e=(I+k)/2;if(t.arc(o,r,h,I,e),t.arc(o,r,h,e,k),v>0){const e=Hd(D,k,o,r);t.arc(e.x,e.y,v,k,b+Oo)}const n=Hd(M,b,o,r);if(t.lineTo(n.x,n.y),x>0){const e=Hd(M,T,o,r);t.arc(e.x,e.y,x,b+Oo,T+Math.PI)}const i=(b-x/p+(f+_/p))/2;if(t.arc(o,r,p,b-x/p,i,!0),t.arc(o,r,p,i,f+_/p,!0),_>0){const e=Hd(C,S,o,r);t.arc(e.x,e.y,_,S+Math.PI,f-Oo)}const s=Hd(w,f,o,r);if(t.lineTo(s.x,s.y),y>0){const e=Hd(w,I,o,r);t.arc(e.x,e.y,y,f-Oo,I)}}else{t.moveTo(o,r);const e=Math.cos(I)*h+o,n=Math.sin(I)*h+r;t.lineTo(e,n);const i=Math.cos(k)*h+o,s=Math.sin(k)*h+r;t.lineTo(i,s)}t.closePath()}function Ud(t,e,n=e){t.lineCap=ro(n.borderCapStyle,e.borderCapStyle),t.setLineDash(ro(n.borderDash,e.borderDash)),t.lineDashOffset=ro(n.borderDashOffset,e.borderDashOffset),t.lineJoin=ro(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=ro(n.borderWidth,e.borderWidth),t.strokeStyle=ro(n.borderColor,e.borderColor)}function qd(t,e,n){t.lineTo(n.x,n.y)}function Yd(t,e,n={}){const i=t.length,{start:s=0,end:a=i-1}=n,{start:o,end:r}=e,l=Math.max(s,o),c=Math.min(a,r),d=s<o&&a<o||s>r&&a>r;return{count:i,start:l,loop:e.loop,ilen:c<l&&!d?i+c-l:c-l}}function Zd(t,e,n,i){const{points:s,options:a}=e,{count:o,start:r,loop:l,ilen:c}=Yd(s,n,i),d=function(t){return t.stepped?Vr:t.tension||"monotone"===t.cubicInterpolationMode?Ar:qd}(a);let h,p,u,{move:g=!0,reverse:m}=i||{};for(h=0;h<=c;++h)p=s[(r+(m?c-h:h))%o],p.skip||(g?(t.moveTo(p.x,p.y),g=!1):d(t,u,p,m,a.stepped),u=p);return l&&(p=s[(r+(m?c:0))%o],d(t,u,p,m,a.stepped)),!!l}function Kd(t,e,n,i){const s=e.points,{count:a,start:o,ilen:r}=Yd(s,n,i),{move:l=!0,reverse:c}=i||{};let d,h,p,u,g,m,f=0,b=0;const y=t=>(o+(c?r-t:t))%a,v=()=>{u!==g&&(t.lineTo(f,g),t.lineTo(f,u),t.lineTo(f,m))};for(l&&(h=s[y(0)],t.moveTo(h.x,h.y)),d=0;d<=r;++d){if(h=s[y(d)],h.skip)continue;const e=h.x,n=h.y,i=0|e;i===p?(n<u?u=n:n>g&&(g=n),f=(b*f+e)/++b):(v(),t.lineTo(e,n),p=i,b=0,u=g=n),m=n}v()}function Gd(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n?Zd:Kd}const Xd="function"==typeof Path2D;class Jd extends nd{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;bl(this._points,n,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const n=t.points,i=t.options.spanGaps,s=n.length;if(!s)return[];const a=!!t._loop,{start:o,end:r}=function(t,e,n,i){let s=0,a=e-1;if(n&&!i)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,n&&(a+=s);a>s&&t[a%e].skip;)a--;return a%=e,{start:s,end:a}}(n,s,a,i);return function(t,e,n,i){return i&&i.setContext&&n?function(t,e,n,i){const s=t._chart.getContext(),a=Ll(t.options),{_datasetIndex:o,options:{spanGaps:r}}=t,l=n.length,c=[];let d=a,h=e[0].start,p=h;function u(t,e,i,s){const a=r?-1:1;if(t!==e){for(t+=l;n[t%l].skip;)t-=a;for(;n[e%l].skip;)e+=a;t%l!==e%l&&(c.push({start:t%l,end:e%l,loop:i,style:s}),d=s,h=e%l)}}for(const t of e){h=r?h:t.start;let e,a=n[h%l];for(p=h+1;p<=t.end;p++){const r=n[p%l];e=Ll(i.setContext(Xr(s,{type:"segment",p0:a,p1:r,p0DataIndex:(p-1)%l,p1DataIndex:p%l,datasetIndex:o}))),zl(e,d)&&u(h,p-1,t.loop,d),a=r,d=e}h<p-1&&u(h,p-1,t.loop,d)}return c}(t,e,n,i):e}(t,!0===i?[{start:o,end:r,loop:a}]:function(t,e,n,i){const s=t.length,a=[];let o,r=e,l=t[e];for(o=e+1;o<=n;++o){const n=t[o%s];n.skip||n.stop?l.skip||(i=!1,a.push({start:e%s,end:(o-1)%s,loop:i}),e=r=n.stop?o:null):(r=o,l.skip&&(e=o)),l=n}return null!==r&&a.push({start:e%s,end:r%s,loop:i}),a}(n,o,r<o?r+s:r,!!t._fullLoop&&0===o&&r===s-1),n,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,i=t[e],s=this.points,a=jl(this,{property:e,start:i,end:i});if(!a.length)return;const o=[],r=function(t){return t.stepped?Ol:t.tension||"monotone"===t.cubicInterpolationMode?El:Tl}(n);let l,c;for(l=0,c=a.length;l<c;++l){const{start:c,end:d}=a[l],h=s[c],p=s[d];if(h===p){o.push(h);continue}const u=r(h,p,Math.abs((i-h[e])/(p[e]-h[e])),n.stepped);u[e]=t[e],o.push(u)}return 1===o.length?o[0]:o}pathSegment(t,e,n){return Gd(this)(t,this,e,n)}path(t,e,n){const i=this.segments,s=Gd(this);let a=this._loop;e=e||0,n=n||this.points.length-e;for(const o of i)a&=s(t,this,o,{start:e,end:e+n-1});return!!a}draw(t,e,n,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),function(t,e,n,i){Xd&&!e.options.segment?function(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),Ud(t,e.options),t.stroke(s)}(t,e,n,i):function(t,e,n,i){const{segments:s,options:a}=e,o=Gd(e);for(const r of s)Ud(t,a,r.style),t.beginPath(),o(t,e,r,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}(t,e,n,i)}(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Qd(t,e,n,i){const s=t.options,{[n]:a}=t.getProps([n],i);return Math.abs(e-a)<s.radius+s.hitRadius}function th(t,e){const{x:n,y:i,base:s,width:a,height:o}=t.getProps(["x","y","base","width","height"],e);let r,l,c,d,h;return t.horizontal?(h=o/2,r=Math.min(n,s),l=Math.max(n,s),c=i-h,d=i+h):(h=a/2,r=n-h,l=n+h,c=Math.min(i,s),d=Math.max(i,s)),{left:r,top:c,right:l,bottom:d}}function eh(t,e,n,i){return t?0:Yo(e,n,i)}function nh(t,e,n,i){const s=null===e,a=null===n,o=t&&!(s&&a)&&th(t,i);return o&&(s||Zo(e,o.left,o.right))&&(a||Zo(n,o.top,o.bottom))}function ih(t,e){t.rect(e.x,e.y,e.w,e.h)}function sh(t,e,n={}){const i=t.x!==n.x?-e:0,s=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-i,o=(t.y+t.h!==n.y+n.h?e:0)-s;return{x:t.x+i,y:t.y+s,w:t.w+a,h:t.h+o,radius:t.radius}}var ah=Object.freeze({__proto__:null,ArcElement:class extends nd{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.getProps(["x","y"],n),{angle:s,distance:a}=$o(i,{x:t,y:e}),{startAngle:o,endAngle:r,innerRadius:l,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),h=(this.options.spacing+this.options.borderWidth)/2,p=ro(d,r-o),u=qo(s,o,r)&&o!==r,g=p>=Co||u,m=Zo(a,l+h,c+h);return g&&m}getCenterPoint(t){const{x:e,y:n,startAngle:i,endAngle:s,innerRadius:a,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,c=(i+s)/2,d=(a+o+l+r)/2;return{x:e+Math.cos(c)*d,y:n+Math.sin(c)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:n}=this,i=(e.offset||0)/4,s=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=n>Co?Math.floor(n/Co):0,0===n||this.innerRadius<0||this.outerRadius<0)return;t.save();const o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*i,Math.sin(o)*i);const r=i*(1-Math.sin(Math.min(ko,n||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,n,i,s){const{fullCircles:a,startAngle:o,circumference:r}=e;let l=e.endAngle;if(a){Wd(t,e,n,i,l,s);for(let e=0;e<a;++e)t.fill();isNaN(r)||(l=o+(r%Co||Co))}Wd(t,e,n,i,l,s),t.fill()}(t,this,r,s,a),function(t,e,n,i,s){const{fullCircles:a,startAngle:o,circumference:r,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:h,borderDashOffset:p,borderRadius:u}=l,g="inner"===l.borderAlign;if(!c)return;t.setLineDash(h||[]),t.lineDashOffset=p,g?(t.lineWidth=2*c,t.lineJoin=d||"round"):(t.lineWidth=c,t.lineJoin=d||"bevel");let m=e.endAngle;if(a){Wd(t,e,n,i,m,s);for(let e=0;e<a;++e)t.stroke();isNaN(r)||(m=o+(r%Co||Co))}g&&function(t,e,n){const{startAngle:i,pixelMargin:s,x:a,y:o,outerRadius:r,innerRadius:l}=e;let c=s/r;t.beginPath(),t.arc(a,o,r,i-c,n+c),l>s?(c=s/l,t.arc(a,o,l,n+c,i-c,!0)):t.arc(a,o,s,n+Oo,i-Oo),t.closePath(),t.clip()}(t,e,m),l.selfJoin&&m-o>=ko&&0===u&&"miter"!==d&&function(t,e,n){const{startAngle:i,x:s,y:a,outerRadius:o,innerRadius:r,options:l}=e,{borderWidth:c,borderJoinStyle:d}=l,h=Math.min(c/o,Uo(i-n));if(t.beginPath(),t.arc(s,a,o-c/2,i+h/2,n-h/2),r>0){const e=Math.min(c/r,Uo(i-n));t.arc(s,a,r+c/2,n-e/2,i+e/2,!0)}else{const e=Math.min(c/2,o*Uo(i-n));if("round"===d)t.arc(s,a,e,n-ko/2,i+ko/2,!0);else if("bevel"===d){const o=2*e*e,r=-o*Math.cos(n+ko/2)+s,l=-o*Math.sin(n+ko/2)+a,c=o*Math.cos(i+ko/2)+s,d=o*Math.sin(i+ko/2)+a;t.lineTo(r,l),t.lineTo(c,d)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,m),a||(Wd(t,e,n,i,m,s),t.stroke())}(t,this,r,s,a),t.restore()}},BarElement:class extends nd{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:i}}=this,{inner:s,outer:a}=function(t){const e=th(t),n=e.right-e.left,i=e.bottom-e.top,s=function(t,e,n){const i=t.options.borderWidth,s=t.borderSkipped,a=qr(i);return{t:eh(s.top,a.top,0,n),r:eh(s.right,a.right,0,e),b:eh(s.bottom,a.bottom,0,n),l:eh(s.left,a.left,0,e)}}(t,n/2,i/2),a=function(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,a=Yr(s),o=Math.min(e,n),r=t.borderSkipped,l=i||so(s);return{topLeft:eh(!l||r.top||r.left,a.topLeft,0,o),topRight:eh(!l||r.top||r.right,a.topRight,0,o),bottomLeft:eh(!l||r.bottom||r.left,a.bottomLeft,0,o),bottomRight:eh(!l||r.bottom||r.right,a.bottomRight,0,o)}}(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:a},inner:{x:e.left+s.l,y:e.top+s.t,w:n-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,a.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(s.b,s.r))}}}}(this),o=(r=a.radius).topLeft||r.topRight||r.bottomLeft||r.bottomRight?zr:ih;var r;t.save(),a.w===s.w&&a.h===s.h||(t.beginPath(),o(t,sh(a,e,s)),t.clip(),o(t,sh(s,-e,a)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),o(t,sh(s,e)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,e,n){return nh(this,t,e,n)}inXRange(t,e){return nh(this,t,null,e)}inYRange(t,e){return nh(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+i)/2:e,y:s?n:(n+i)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},LineElement:Jd,PointElement:class extends nd{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.options,{x:s,y:a}=this.getProps(["x","y"],n);return Math.pow(t-s,2)+Math.pow(e-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return Qd(this,t,"x",e)}inYRange(t,e){return Qd(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const n=this.options;this.skip||n.radius<.1||!Rr(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,Or(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}});const oh=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],rh=oh.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function lh(t){return oh[t%oh.length]}function ch(t){return rh[t%rh.length]}function dh(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var hh={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:i},options:s}=t.config,{elements:a}=s,o=dh(i)||(r=s)&&(r.borderColor||r.backgroundColor)||a&&dh(a)||"rgba(0,0,0,0.1)"!==kr.borderColor||"rgba(0,0,0,0.1)"!==kr.backgroundColor;var r;if(!n.forceOverride&&o)return;const l=function(t){let e=0;return(n,i)=>{const s=t.getDatasetMeta(i).controller;s instanceof mc?e=function(t,e){return t.backgroundColor=t.data.map(()=>lh(e++)),e}(n,e):s instanceof fc?e=function(t,e){return t.backgroundColor=t.data.map(()=>ch(e++)),e}(n,e):s&&(e=function(t,e){return t.borderColor=lh(e),t.backgroundColor=ch(e),++e}(n,e))}}(t);i.forEach(l)}};function ph(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function uh(t){t.data.datasets.forEach(t=>{ph(t)})}var gh={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled)return void uh(t);const i=t.width;t.data.datasets.forEach((e,s)=>{const{_data:a,indexAxis:o}=e,r=t.getDatasetMeta(s),l=a||e.data;if("y"===Gr([o,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let d,{start:h,count:p}=function(t,e){const n=e.length;let i,s=0;const{iScale:a}=t,{min:o,max:r,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(s=Yo(Go(e,a.axis,o).lo,0,n-1)),i=c?Yo(Go(e,a.axis,r).hi+1,s,n)-s:n-s,{start:s,count:i}}(r,l);if(p<=(n.threshold||4*i))ph(e);else{switch(no(a)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),n.algorithm){case"lttb":d=function(t,e,n,i,s){const a=s.samples||i;if(a>=n)return t.slice(e,e+n);const o=[],r=(n-2)/(a-2);let l=0;const c=e+n-1;let d,h,p,u,g,m=e;for(o[l++]=t[m],d=0;d<a-2;d++){let i,s=0,a=0;const c=Math.floor((d+1)*r)+1+e,f=Math.min(Math.floor((d+2)*r)+1,n)+e,b=f-c;for(i=c;i<f;i++)s+=t[i].x,a+=t[i].y;s/=b,a/=b;const y=Math.floor(d*r)+1+e,v=Math.min(Math.floor((d+1)*r)+1,n)+e,{x:_,y:x}=t[m];for(p=u=-1,i=y;i<v;i++)u=.5*Math.abs((_-s)*(t[i].y-x)-(_-t[i].x)*(a-x)),u>p&&(p=u,h=t[i],g=i);o[l++]=h,m=g}return o[l++]=t[c],o}(l,h,p,i,n);break;case"min-max":d=function(t,e,n,i){let s,a,o,r,l,c,d,h,p,u,g=0,m=0;const f=[],b=e+n-1,y=t[e].x,v=t[b].x-y;for(s=e;s<e+n;++s){a=t[s],o=(a.x-y)/v*i,r=a.y;const e=0|o;if(e===l)r<p?(p=r,c=s):r>u&&(u=r,d=s),g=(m*g+a.x)/++m;else{const n=s-1;if(!no(c)&&!no(d)){const e=Math.min(c,d),i=Math.max(c,d);e!==h&&e!==n&&f.push({...t[e],x:g}),i!==h&&i!==n&&f.push({...t[i],x:g})}s>0&&n!==h&&f.push(t[n]),f.push(a),l=e,m=0,p=u=r,c=d=h=s}}return f}(l,h,p,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}e._decimated=d}})},destroy(t){uh(t)}};function mh(t,e,n,i){if(i)return;let s=e[t],a=n[t];return"angle"===t&&(s=Uo(s),a=Uo(a)),{property:t,start:s,end:a}}function fh(t,e,n){for(;e>t;e--){const t=n[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function bh(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function yh(t,e){let n=[],i=!1;return io(t)?(i=!0,n=t):n=function(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,a=[];return e.segments.forEach(({start:t,end:e})=>{e=fh(t,e,s);const o=s[t],r=s[e];null!==i?(a.push({x:o.x,y:i}),a.push({x:r.x,y:i})):null!==n&&(a.push({x:n,y:o.y}),a.push({x:n,y:r.y}))}),a}(t,e),n.length?new Jd({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function vh(t){return t&&!1!==t.fill}function _h(t,e,n){let i=t[e].fill;const s=[e];let a;if(!n)return i;for(;!1!==i&&-1===s.indexOf(i);){if(!ao(i))return i;if(a=t[i],!a)return!1;if(a.visible)return i;s.push(i),i=a.fill}return!1}function xh(t,e,n){const i=function(t){const e=t.options,n=e.fill;let i=ro(n&&n.target,n);return void 0===i&&(i=!!e.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}(t);if(so(i))return!isNaN(i.value)&&i;let s=parseFloat(i);return ao(s)&&Math.floor(s)===s?function(t,e,n,i){return"-"!==t&&"+"!==t||(n=e+n),!(n===e||n<0||n>=i)&&n}(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function wh(t,e,n){const i=[];for(let s=0;s<n.length;s++){const a=n[s],{first:o,last:r,point:l}=Dh(a,e,"x");if(!(!l||o&&r))if(o)i.unshift(l);else if(t.push(l),!r)break}t.push(...i)}function Dh(t,e,n){const i=t.interpolate(e,n);if(!i)return{};const s=i[n],a=t.segments,o=t.points;let r=!1,l=!1;for(let t=0;t<a.length;t++){const e=a[t],i=o[e.start][n],c=o[e.end][n];if(Zo(s,i,c)){r=s===i,l=s===c;break}}return{first:r,last:l,point:i}}class Ih{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){const{x:i,y:s,radius:a}=this;return e=e||{start:0,end:Co},t.arc(i,s,a,e.end,e.start,!0),!n.bounds}interpolate(t){const{x:e,y:n,radius:i}=this,s=t.angle;return{x:e+Math.cos(s)*i,y:n+Math.sin(s)*i,angle:s}}}function kh(t,e,n){const i=function(t){const{chart:e,fill:n,line:i}=t;if(ao(n))return function(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}(e,n);if("stack"===n)return function(t){const{scale:e,index:n,line:i}=t,s=[],a=i.segments,o=i.points,r=function(t,e){const n=[],i=t.getMatchingVisibleMetas("line");for(let t=0;t<i.length;t++){const s=i[t];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}(e,n);r.push(yh({x:null,y:e.bottom},i));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)wh(s,o[t],r)}return new Jd({points:s,options:{}})}(t);if("shape"===n)return!0;const s=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:n}=t,i=e.options,s=e.getLabels().length,a=i.reverse?e.max:e.min,o=function(t,e,n){let i;return i="start"===t?n:"end"===t?e.options.reverse?e.min:e.max:so(t)?t.value:e.getBaseValue(),i}(n,e,a),r=[];if(i.grid.circular){const t=e.getPointPositionForValue(0,a);return new Ih({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(o)})}for(let t=0;t<s;++t)r.push(e.getPointPositionForValue(t,o));return r}(t):function(t){const{scale:e={},fill:n}=t,i=function(t,e){let n=null;return"start"===t?n=e.bottom:"end"===t?n=e.top:so(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}(n,e);if(ao(i)){const t=e.isHorizontal();return{x:t?i:null,y:t?null:i}}return null}(t)}(t);return s instanceof Ih?s:yh(s,i)}(e),{chart:s,index:a,line:o,scale:r,axis:l}=e,c=o.options,d=c.fill,h=c.backgroundColor,{above:p=h,below:u=h}=d||{},g=s.getDatasetMeta(a),m=$l(s,g);i&&o.points.length&&(Pr(t,n),function(t,e){const{line:n,target:i,above:s,below:a,area:o,scale:r,clip:l}=e,c=n._loop?"angle":e.axis;t.save();let d=a;a!==s&&("x"===c?(Ch(t,i,o.top),Sh(t,{line:n,target:i,color:s,scale:r,property:c,clip:l}),t.restore(),t.save(),Ch(t,i,o.bottom)):"y"===c&&(Mh(t,i,o.left),Sh(t,{line:n,target:i,color:a,scale:r,property:c,clip:l}),t.restore(),t.save(),Mh(t,i,o.right),d=s)),Sh(t,{line:n,target:i,color:d,scale:r,property:c,clip:l}),t.restore()}(t,{line:o,target:i,above:p,below:u,area:n,scale:r,axis:l,clip:m}),Fr(t))}function Ch(t,e,n){const{segments:i,points:s}=e;let a=!0,o=!1;t.beginPath();for(const r of i){const{start:i,end:l}=r,c=s[i],d=s[fh(i,l,s)];a?(t.moveTo(c.x,c.y),a=!1):(t.lineTo(c.x,n),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,r,{move:o}),o?t.closePath():t.lineTo(d.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Mh(t,e,n){const{segments:i,points:s}=e;let a=!0,o=!1;t.beginPath();for(const r of i){const{start:i,end:l}=r,c=s[i],d=s[fh(i,l,s)];a?(t.moveTo(c.x,c.y),a=!1):(t.lineTo(n,c.y),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,r,{move:o}),o?t.closePath():t.lineTo(n,d.y)}t.lineTo(n,e.first().y),t.closePath(),t.clip()}function Sh(t,e){const{line:n,target:i,property:s,color:a,scale:o,clip:r}=e,l=function(t,e,n){const i=t.segments,s=t.points,a=e.points,o=[];for(const t of i){let{start:i,end:r}=t;r=fh(i,r,s);const l=mh(n,s[i],s[r],t.loop);if(!e.segments){o.push({source:t,target:l,start:s[i],end:s[r]});continue}const c=jl(e,l);for(const e of c){const i=mh(n,a[e.start],a[e.end],e.loop),r=Nl(t,s,i);for(const t of r)o.push({source:t,target:e,start:{[n]:bh(l,i,"start",Math.max)},end:{[n]:bh(l,i,"end",Math.min)}})}}return o}(n,i,s);for(const{source:e,target:c,start:d,end:h}of l){const{style:{backgroundColor:l=a}={}}=e,p=!0!==i;t.save(),t.fillStyle=l,Th(t,o,r,p&&mh(s,d,h)),t.beginPath();const u=!!n.pathSegment(t,e);let g;if(p){u?t.closePath():Oh(t,i,h,s);const e=!!i.pathSegment(t,c,{move:u,reverse:!0});g=u&&e,g||Oh(t,i,d,s)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function Th(t,e,n,i){const s=e.chart.chartArea,{property:a,start:o,end:r}=i||{};if("x"===a||"y"===a){let e,i,l,c;"x"===a?(e=o,i=s.top,l=r,c=s.bottom):(e=s.left,i=o,l=s.right,c=r),t.beginPath(),n&&(e=Math.max(e,n.left),l=Math.min(l,n.right),i=Math.max(i,n.top),c=Math.min(c,n.bottom)),t.rect(e,i,l-e,c-i),t.clip()}}function Oh(t,e,n,i){const s=e.interpolate(n,i);s&&t.lineTo(s.x,s.y)}var Eh={id:"filler",afterDatasetsUpdate(t,e,n){const i=(t.data.datasets||[]).length,s=[];let a,o,r,l;for(o=0;o<i;++o)a=t.getDatasetMeta(o),r=a.dataset,l=null,r&&r.options&&r instanceof Jd&&(l={visible:t.isDatasetVisible(o),index:o,fill:xh(r,o,i),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:r}),a.$filler=l,s.push(l);for(o=0;o<i;++o)l=s[o],l&&!1!==l.fill&&(l.fill=_h(s,o,n.propagate))},beforeDraw(t,e,n){const i="beforeDraw"===n.drawTime,s=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let e=s.length-1;e>=0;--e){const n=s[e].$filler;n&&(n.line.updateControlPoints(a,n.axis),i&&n.fill&&kh(t.ctx,n,a))}},beforeDatasetsDraw(t,e,n){if("beforeDatasetsDraw"!==n.drawTime)return;const i=t.getSortedVisibleDatasetMetas();for(let e=i.length-1;e>=0;--e){const n=i[e].$filler;vh(n)&&kh(t.ctx,n,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;vh(i)&&"beforeDatasetDraw"===n.drawTime&&kh(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Rh=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}};class Ph extends nd{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=co(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,n)=>t.sort(e,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,i=Kr(n.font),s=i.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:r}=Rh(n,s);let l,c;e.font=i.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,s,o,r)+10):(c=this.maxHeight,l=this._fitCols(a,i,o,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:s,maxWidth:a,options:{labels:{padding:o}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],c=i+o;let d=t;s.textAlign="left",s.textBaseline="middle";let h=-1,p=-c;return this.legendItems.forEach((t,u)=>{const g=n+e/2+s.measureText(t.text).width;(0===u||l[l.length-1]+g+2*o>a)&&(d+=c,l[l.length-(u>0?0:1)]=0,p+=c,h++),r[u]={left:0,top:p,row:h,width:g,height:i},l[l.length-1]+=g+o}),d}_fitCols(t,e,n,i){const{ctx:s,maxHeight:a,options:{labels:{padding:o}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-t;let d=o,h=0,p=0,u=0,g=0;return this.legendItems.forEach((t,a)=>{const{itemWidth:m,itemHeight:f}=function(t,e,n,i,s){const a=function(t,e,n,i){let s=t.text;return s&&"string"!=typeof s&&(s=s.reduce((t,e)=>t.length>e.length?t:e)),e+n.size/2+i.measureText(s).width}(i,t,e,n),o=function(t,e,n){let i=t;return"string"!=typeof e.text&&(i=Fh(e,n)),i}(s,i,e.lineHeight);return{itemWidth:a,itemHeight:o}}(n,e,s,t,i);a>0&&p+f+2*o>c&&(d+=h+o,l.push({width:h,height:p}),u+=h+o,g++,h=p=0),r[a]={left:u,top:p,col:g,width:m,height:f},h=Math.max(h,m),p+=f+o}),d+=h,l.push({width:h,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:i},rtl:s}}=this,a=Rl(s,this.left,this.width);if(this.isHorizontal()){let s=0,o=sr(n,this.left+i,this.right-this.lineWidths[s]);for(const r of e)s!==r.row&&(s=r.row,o=sr(n,this.left+i,this.right-this.lineWidths[s])),r.top+=this.top+t+i,r.left=a.leftForLtr(a.x(o),r.width),o+=r.width+i}else{let s=0,o=sr(n,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const r of e)r.col!==s&&(s=r.col,o=sr(n,this.top+t+i,this.bottom-this.columnSizes[s].height)),r.top=o,r.left+=this.left+i,r.left=a.leftForLtr(a.x(r.left),r.width),o+=r.height+i}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Pr(t,this),this._draw(),Fr(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:i}=this,{align:s,labels:a}=t,o=kr.color,r=Rl(t.rtl,this.left,this.width),l=Kr(a.font),{padding:c}=a,d=l.size,h=d/2;let p;this.drawTitle(),i.textAlign=r.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=l.string;const{boxWidth:u,boxHeight:g,itemHeight:m}=Rh(a,d),f=this.isHorizontal(),b=this._computeTitleHeight();p=f?{x:sr(s,this.left+c,this.right-n[0]),y:this.top+c+b,line:0}:{x:this.left+c,y:sr(s,this.top+b+c,this.bottom-e[0].height),line:0},Pl(this.ctx,t.textDirection);const y=m+c;this.legendItems.forEach((v,_)=>{i.strokeStyle=v.fontColor,i.fillStyle=v.fontColor;const x=i.measureText(v.text).width,w=r.textAlign(v.textAlign||(v.textAlign=a.textAlign)),D=u+h+x;let I=p.x,k=p.y;if(r.setWidth(this.width),f?_>0&&I+D+c>this.right&&(k=p.y+=y,p.line++,I=p.x=sr(s,this.left+c,this.right-n[p.line])):_>0&&k+y>this.bottom&&(I=p.x=I+e[p.line].width+c,p.line++,k=p.y=sr(s,this.top+b+c,this.bottom-e[p.line].height)),function(t,e,n){if(isNaN(u)||u<=0||isNaN(g)||g<0)return;i.save();const s=ro(n.lineWidth,1);if(i.fillStyle=ro(n.fillStyle,o),i.lineCap=ro(n.lineCap,"butt"),i.lineDashOffset=ro(n.lineDashOffset,0),i.lineJoin=ro(n.lineJoin,"miter"),i.lineWidth=s,i.strokeStyle=ro(n.strokeStyle,o),i.setLineDash(ro(n.lineDash,[])),a.usePointStyle){const o={radius:g*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:s},l=r.xPlus(t,u/2);Er(i,o,l,e+h,a.pointStyleWidth&&u)}else{const a=e+Math.max((d-g)/2,0),o=r.leftForLtr(t,u),l=Yr(n.borderRadius);i.beginPath(),Object.values(l).some(t=>0!==t)?zr(i,{x:o,y:a,w:u,h:g,radius:l}):i.rect(o,a,u,g),i.fill(),0!==s&&i.stroke()}i.restore()}(r.x(I),k,v),I=((t,e,n,i)=>t===(i?"left":"right")?n:"center"===t?(e+n)/2:e)(w,I+u+h,f?I+D:this.right,t.rtl),function(t,e,n){Lr(i,n.text,t,e+m/2,l,{strikethrough:n.hidden,textAlign:r.textAlign(n.textAlign)})}(r.x(I),k,v),f)p.x+=D+c;else if("string"!=typeof v.text){const t=l.lineHeight;p.y+=Fh(v,t)+c}else p.y+=y}),Fl(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=Kr(e.font),i=Zr(e.padding);if(!e.display)return;const s=Rl(t.rtl,this.left,this.width),a=this.ctx,o=e.position,r=n.size/2,l=i.top+r;let c,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+l,d=sr(t.align,d,this.right-h);else{const e=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);c=l+sr(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const p=sr(o,d,d+h);a.textAlign=s.textAlign(ir(o)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=n.string,Lr(a,e.text,p,c,n)}_computeTitleHeight(){const t=this.options.title,e=Kr(t.font),n=Zr(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,i,s;if(Zo(t,this.left,this.right)&&Zo(e,this.top,this.bottom))for(s=this.legendHitBoxes,n=0;n<s.length;++n)if(i=s[n],Zo(t,i.left,i.left+i.width)&&Zo(e,i.top,i.top+i.height))return this.legendItems[n];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const a=this._hoveredItem,o=(s=n,null!==(i=a)&&null!==s&&i.datasetIndex===s.datasetIndex&&i.index===s.index);a&&!o&&co(e.onLeave,[t,a,this],this),this._hoveredItem=n,n&&!o&&co(e.onHover,[t,n,this],this)}else n&&co(e.onClick,[t,n,this],this);var i,s}}function Fh(t,e){return e*(t.text?t.text.length:0)}var Vh={id:"legend",_element:Ph,start(t,e,n){const i=t.legend=new Ph({ctx:t.ctx,options:n,chart:t});jc.configure(t,i,n),jc.addBox(t,i)},stop(t){jc.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;jc.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),e.hidden=!0):(s.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:a,useBorderRadius:o,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{const l=t.controller.getStyle(n?0:void 0),c=Zr(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:i||l.pointStyle,rotation:l.rotation,textAlign:s||l.textAlign,borderRadius:o&&(r||l.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Ah extends nd{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const i=io(n.text)?n.text.length:1;this._padding=Zr(n.padding);const s=i*Kr(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:i,right:s,options:a}=this,o=a.align;let r,l,c,d=0;return this.isHorizontal()?(l=sr(o,n,s),c=e+t,r=s-n):("left"===a.position?(l=n+t,c=sr(o,i,e),d=-.5*ko):(l=s-t,c=sr(o,e,i),d=.5*ko),r=i-e),{titleX:l,titleY:c,maxWidth:r,rotation:d}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=Kr(e.font),i=n.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:o,rotation:r}=this._drawArgs(i);Lr(t,e.text,0,0,n,{color:e.color,maxWidth:o,rotation:r,textAlign:ir(e.align),textBaseline:"middle",translation:[s,a]})}}var Nh={id:"title",_element:Ah,start(t,e,n){!function(t,e){const n=new Ah({ctx:t.ctx,options:e,chart:t});jc.configure(t,n,e),jc.addBox(t,n),t.titleBlock=n}(t,n)},stop(t){const e=t.titleBlock;jc.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;jc.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const jh=new WeakMap;var Lh={id:"subtitle",start(t,e,n){const i=new Ah({ctx:t.ctx,options:n,chart:t});jc.configure(t,i,n),jc.addBox(t,i),jh.set(t,i)},stop(t){jc.removeBox(t,jh.get(t)),jh.delete(t)},beforeUpdate(t,e,n){const i=jh.get(t);jc.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const zh={average(t){if(!t.length)return!1;let e,n,i=new Set,s=0,a=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();i.add(t.x),s+=t.y,++a}}return 0!==a&&0!==i.size&&{x:[...i].reduce((t,e)=>t+e)/i.size,y:s/a}},nearest(t,e){if(!t.length)return!1;let n,i,s,a=e.x,o=e.y,r=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){const i=t[n].element;if(i&&i.hasValue()){const t=Ho(e,i.getCenterPoint());t<r&&(r=t,s=i)}}if(s){const t=s.tooltipPosition();a=t.x,o=t.y}return{x:a,y:o}}};function Bh(t,e){return e&&(io(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function $h(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Hh(t,e){const{element:n,datasetIndex:i,index:s}=e,a=t.getDatasetMeta(i).controller,{label:o,value:r}=a.getLabelAndValue(s);return{chart:t,label:o,parsed:a.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:r,dataset:a.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function Wh(t,e){const n=t.chart.ctx,{body:i,footer:s,title:a}=t,{boxWidth:o,boxHeight:r}=e,l=Kr(e.bodyFont),c=Kr(e.titleFont),d=Kr(e.footerFont),h=a.length,p=s.length,u=i.length,g=Zr(e.padding);let m=g.height,f=0,b=i.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);b+=t.beforeBody.length+t.afterBody.length,h&&(m+=h*c.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),b&&(m+=u*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(b-u)*l.lineHeight+(b-1)*e.bodySpacing),p&&(m+=e.footerMarginTop+p*d.lineHeight+(p-1)*e.footerSpacing);let y=0;const v=function(t){f=Math.max(f,n.measureText(t).width+y)};return n.save(),n.font=c.string,ho(t.title,v),n.font=l.string,ho(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?o+2+e.boxPadding:0,ho(i,t=>{ho(t.before,v),ho(t.lines,v),ho(t.after,v)}),y=0,n.font=d.string,ho(t.footer,v),n.restore(),f+=g.width,{width:f,height:m}}function Uh(t,e,n,i){const{x:s,width:a}=n,{width:o,chartArea:{left:r,right:l}}=t;let c="center";return"center"===i?c=s<=(r+l)/2?"left":"right":s<=a/2?c="left":s>=o-a/2&&(c="right"),function(t,e,n,i){const{x:s,width:a}=i,o=n.caretSize+n.caretPadding;return"left"===t&&s+a+o>e.width||"right"===t&&s-a-o<0||void 0}(c,t,e,n)&&(c="center"),c}function qh(t,e,n){const i=n.yAlign||e.yAlign||function(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||Uh(t,e,n,i),yAlign:i}}function Yh(t,e,n,i){const{caretSize:s,caretPadding:a,cornerRadius:o}=t,{xAlign:r,yAlign:l}=n,c=s+a,{topLeft:d,topRight:h,bottomLeft:p,bottomRight:u}=Yr(o);let g=function(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}(e,r);const m=function(t,e,n){let{y:i,height:s}=t;return"top"===e?i+=n:i-="bottom"===e?s+n:s/2,i}(e,l,c);return"center"===l?"left"===r?g+=c:"right"===r&&(g-=c):"left"===r?g-=Math.max(d,p)+s:"right"===r&&(g+=Math.max(h,u)+s),{x:Yo(g,0,i.width-e.width),y:Yo(m,0,i.height-e.height)}}function Zh(t,e,n){const i=Zr(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function Kh(t){return Bh([],$h(t))}function Gh(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Xh={beforeTitle:to,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:to,beforeBody:to,beforeLabel:to,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return no(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:to,afterBody:to,beforeFooter:to,footer:to,afterFooter:to};function Jh(t,e,n,i){const s=t[e].call(n,i);return void 0===s?Xh[e].call(n,i):s}class Qh extends nd{static positioners=zh;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&e.options.animation&&n.animations,s=new Zl(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Xr(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"}))}getTitle(t,e){const{callbacks:n}=e,i=Jh(n,"beforeTitle",this,t),s=Jh(n,"title",this,t),a=Jh(n,"afterTitle",this,t);let o=[];return o=Bh(o,$h(i)),o=Bh(o,$h(s)),o=Bh(o,$h(a)),o}getBeforeBody(t,e){return Kh(Jh(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,i=[];return ho(t,t=>{const e={before:[],lines:[],after:[]},s=Gh(n,t);Bh(e.before,$h(Jh(s,"beforeLabel",this,t))),Bh(e.lines,Jh(s,"label",this,t)),Bh(e.after,$h(Jh(s,"afterLabel",this,t))),i.push(e)}),i}getAfterBody(t,e){return Kh(Jh(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,i=Jh(n,"beforeFooter",this,t),s=Jh(n,"footer",this,t),a=Jh(n,"afterFooter",this,t);let o=[];return o=Bh(o,$h(i)),o=Bh(o,$h(s)),o=Bh(o,$h(a)),o}_createItems(t){const e=this._active,n=this.chart.data,i=[],s=[],a=[];let o,r,l=[];for(o=0,r=e.length;o<r;++o)l.push(Hh(this.chart,e[o]));return t.filter&&(l=l.filter((e,i,s)=>t.filter(e,i,s,n))),t.itemSort&&(l=l.sort((e,i)=>t.itemSort(e,i,n))),ho(l,e=>{const n=Gh(t.callbacks,e);i.push(Jh(n,"labelColor",this,e)),s.push(Jh(n,"labelPointStyle",this,e)),a.push(Jh(n,"labelTextColor",this,e))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=a,this.dataPoints=l,l}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let s,a=[];if(i.length){const t=zh[n.position].call(this,i,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const e=this._size=Wh(this,n),o=Object.assign({},t,e),r=qh(this.chart,n,o),l=Yh(n,o,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=a,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const s=this.getCaretPosition(t,n,i);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,n){const{xAlign:i,yAlign:s}=this,{caretSize:a,cornerRadius:o}=n,{topLeft:r,topRight:l,bottomLeft:c,bottomRight:d}=Yr(o),{x:h,y:p}=t,{width:u,height:g}=e;let m,f,b,y,v,_;return"center"===s?(v=p+g/2,"left"===i?(m=h,f=m-a,y=v+a,_=v-a):(m=h+u,f=m+a,y=v-a,_=v+a),b=m):(f="left"===i?h+Math.max(r,c)+a:"right"===i?h+u-Math.max(l,d)-a:this.caretX,"top"===s?(y=p,v=y-a,m=f-a,b=f+a):(y=p+g,v=y+a,m=f+a,b=f-a),_=y),{x1:m,x2:f,x3:b,y1:y,y2:v,y3:_}}drawTitle(t,e,n){const i=this.title,s=i.length;let a,o,r;if(s){const l=Rl(n.rtl,this.x,this.width);for(t.x=Zh(this,n.titleAlign,n),e.textAlign=l.textAlign(n.titleAlign),e.textBaseline="middle",a=Kr(n.titleFont),o=n.titleSpacing,e.fillStyle=n.titleColor,e.font=a.string,r=0;r<s;++r)e.fillText(i[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+o,r+1===s&&(t.y+=n.titleMarginBottom-o)}}_drawColorBox(t,e,n,i,s){const a=this.labelColors[n],o=this.labelPointStyles[n],{boxHeight:r,boxWidth:l}=s,c=Kr(s.bodyFont),d=Zh(this,"left",s),h=i.x(d),p=r<c.lineHeight?(c.lineHeight-r)/2:0,u=e.y+p;if(s.usePointStyle){const e={radius:Math.min(l,r)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},n=i.leftForLtr(h,l)+l/2,c=u+r/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Or(t,e,n,c),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Or(t,e,n,c)}else{t.lineWidth=so(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=i.leftForLtr(h,l),n=i.leftForLtr(i.xPlus(h,1),l-2),o=Yr(a.borderRadius);Object.values(o).some(t=>0!==t)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,zr(t,{x:e,y:u,w:l,h:r,radius:o}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),zr(t,{x:n,y:u+1,w:l-2,h:r-2,radius:o}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,u,l,r),t.strokeRect(e,u,l,r),t.fillStyle=a.backgroundColor,t.fillRect(n,u+1,l-2,r-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:i}=this,{bodySpacing:s,bodyAlign:a,displayColors:o,boxHeight:r,boxWidth:l,boxPadding:c}=n,d=Kr(n.bodyFont);let h=d.lineHeight,p=0;const u=Rl(n.rtl,this.x,this.width),g=function(n){e.fillText(n,u.x(t.x+p),t.y+h/2),t.y+=h+s},m=u.textAlign(a);let f,b,y,v,_,x,w;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Zh(this,m,n),e.fillStyle=n.bodyColor,ho(this.beforeBody,g),p=o&&"right"!==m?"center"===a?l/2+c:l+2+c:0,v=0,x=i.length;v<x;++v){for(f=i[v],b=this.labelTextColors[v],e.fillStyle=b,ho(f.before,g),y=f.lines,o&&y.length&&(this._drawColorBox(e,t,v,u,n),h=Math.max(d.lineHeight,r)),_=0,w=y.length;_<w;++_)g(y[_]),h=d.lineHeight;ho(f.after,g)}p=0,h=d.lineHeight,ho(this.afterBody,g),t.y-=s}drawFooter(t,e,n){const i=this.footer,s=i.length;let a,o;if(s){const r=Rl(n.rtl,this.x,this.width);for(t.x=Zh(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=r.textAlign(n.footerAlign),e.textBaseline="middle",a=Kr(n.footerFont),e.fillStyle=n.footerColor,e.font=a.string,o=0;o<s;++o)e.fillText(i[o],r.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+n.footerSpacing}}drawBackground(t,e,n,i){const{xAlign:s,yAlign:a}=this,{x:o,y:r}=t,{width:l,height:c}=n,{topLeft:d,topRight:h,bottomLeft:p,bottomRight:u}=Yr(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(o+d,r),"top"===a&&this.drawCaret(t,e,n,i),e.lineTo(o+l-h,r),e.quadraticCurveTo(o+l,r,o+l,r+h),"center"===a&&"right"===s&&this.drawCaret(t,e,n,i),e.lineTo(o+l,r+c-u),e.quadraticCurveTo(o+l,r+c,o+l-u,r+c),"bottom"===a&&this.drawCaret(t,e,n,i),e.lineTo(o+p,r+c),e.quadraticCurveTo(o,r+c,o,r+c-p),"center"===a&&"left"===s&&this.drawCaret(t,e,n,i),e.lineTo(o,r+d),e.quadraticCurveTo(o,r,o+d,r),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,s=n&&n.y;if(i||s){const n=zh[t.position].call(this,this._active,this._eventPosition);if(!n)return;const a=this._size=Wh(this,t),o=Object.assign({},n,this._size),r=qh(e,t,o),l=Yh(t,o,r,e);i._to===l.x&&s._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=Zr(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=n,this.drawBackground(s,t,i,e),Pl(t,e.textDirection),s.y+=a.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),Fl(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,i=t.map(({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}),s=!po(n,i),a=this._positionChanged(i,e);(s||a)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],a=this._getActiveElements(t,s,e,n),o=this._positionChanged(a,t),r=e||!po(a,s)||o;return r&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,n,i){const s=this.options;if("mouseout"===t.type)return[];if(!i)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));const a=this.chart.getElementsAtEventForMode(t,s.mode,s,n);return s.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:n,caretY:i,options:s}=this,a=zh[s.position].call(this,t,e);return!1!==a&&(n!==a.x||i!==a.y)}}var tp={id:"tooltip",_element:Qh,positioners:zh,afterInit(t,e,n){n&&(t.tooltip=new Qh({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Xh},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},ep=Object.freeze({__proto__:null,Colors:hh,Decimation:gh,Filler:Eh,Legend:Vh,SubTitle:Lh,Title:Nh,Tooltip:tp});function np(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function ip(t,e,{horizontal:n,minRotation:i}){const s=Lo(i),a=(n?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/a,o)}class sp extends hd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return no(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this;const a=t=>i=e?i:t,o=t=>s=n?s:t;if(t){const t=Fo(i),e=Fo(s);t<0&&e<0?o(0):t>0&&e>0&&a(0)}if(i===s){let e=0===s?1:Math.abs(.05*s);o(s+e),t||a(i-e)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i=function(t,e){const n=[],{bounds:i,step:s,min:a,max:o,precision:r,count:l,maxTicks:c,maxDigits:d,includeBounds:h}=t,p=s||1,u=c-1,{min:g,max:m}=e,f=!no(a),b=!no(o),y=!no(l),v=(m-g)/(d+1);let _,x,w,D,I=Ao((m-g)/u/p)*p;if(I<1e-14&&!f&&!b)return[{value:g},{value:m}];D=Math.ceil(m/I)-Math.floor(g/I),D>u&&(I=Ao(D*I/u/p)*p),no(r)||(_=Math.pow(10,r),I=Math.ceil(I*_)/_),"ticks"===i?(x=Math.floor(g/I)*I,w=Math.ceil(m/I)*I):(x=g,w=m),f&&b&&s&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((o-a)/s,I/1e3)?(D=Math.round(Math.min((o-a)/I,c)),I=(o-a)/D,x=a,w=o):y?(x=f?a:x,w=b?o:w,D=l-1,I=(w-x)/D):(D=(w-x)/I,D=Vo(D,Math.round(D),I/1e3)?Math.round(D):Math.ceil(D));const k=Math.max(Bo(I),Bo(x));_=Math.pow(10,no(r)?k:r),x=Math.round(x*_)/_,w=Math.round(w*_)/_;let C=0;for(f&&(h&&x!==a?(n.push({value:a}),x<a&&C++,Vo(Math.round((x+C*I)*_)/_,a,ip(a,v,t))&&C++):x<a&&C++);C<D;++C){const t=Math.round((x+C*I)*_)/_;if(b&&t>o)break;n.push({value:t})}return b&&h&&w!==o?n.length&&Vo(n[n.length-1].value,o,ip(o,v,t))?n[n.length-1].value=o:n.push({value:o}):b&&w!==o||n.push({value:w}),n}({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&jo(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return br(t,this.chart.options.locale,this.options.ticks.format)}}class ap extends sp{static id="linear";static defaults={ticks:{callback:vr.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ao(t)?t:0,this.max=ao(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=Lo(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const op=t=>Math.floor(Po(t)),rp=(t,e)=>Math.pow(10,op(t)+e);function lp(t){return 1===t/Math.pow(10,op(t))}function cp(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}class dp extends hd{static id="logarithmic";static defaults={ticks:{callback:vr.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=sp.prototype.parse.apply(this,[t,e]);if(0!==n)return ao(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ao(t)?Math.max(0,t):null,this.max=ao(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ao(this._userMin)&&(this.min=t===rp(this.min,0)?rp(this.min,-1):rp(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,i=this.max;const s=e=>n=t?n:e,a=t=>i=e?i:t;n===i&&(n<=0?(s(1),a(10)):(s(rp(n,-1)),a(rp(i,1)))),n<=0&&s(rp(i,-1)),i<=0&&a(rp(n,1)),this.min=n,this.max=i}buildTicks(){const t=this.options,e=function(t,{min:e,max:n}){e=oo(t.min,e);const i=[],s=op(e);let a=function(t,e){let n=op(e-t);for(;cp(t,e,n)>10;)n++;for(;cp(t,e,n)<10;)n--;return Math.min(n,op(t))}(e,n),o=a<0?Math.pow(10,Math.abs(a)):1;const r=Math.pow(10,a),l=s>a?Math.pow(10,s):0,c=Math.round((e-l)*o)/o,d=Math.floor((e-l)/r/10)*r*10;let h=Math.floor((c-d)/Math.pow(10,a)),p=oo(t.min,Math.round((l+d+h*Math.pow(10,a))*o)/o);for(;p<n;)i.push({value:p,major:lp(p),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,o=a>=0?1:o),p=Math.round((l+d+h*Math.pow(10,a))*o)/o;const u=oo(t.max,p);return i.push({value:u,major:lp(u),significand:h}),i}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&jo(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":br(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Po(t),this._valueRange=Po(this.max)-Po(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Po(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function hp(t){const e=t.ticks;if(e.display&&t.display){const t=Zr(e.backdropPadding);return ro(e.font&&e.font.size,kr.font.size)+t.height}return 0}function pp(t,e,n){return n=io(n)?n:[n],{w:Mr(t,e.string,n),h:n.length*e.lineHeight}}function up(t,e,n,i,s){return t===i||t===s?{start:e-n/2,end:e+n/2}:t<i||t>s?{start:e-n,end:e}:{start:e,end:e+n}}function gp(t,e,n,i,s){const a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let r=0,l=0;i.start<e.l?(r=(e.l-i.start)/a,t.l=Math.min(t.l,e.l-r)):i.end>e.r&&(r=(i.end-e.r)/a,t.r=Math.max(t.r,e.r+r)),s.start<e.t?(l=(e.t-s.start)/o,t.t=Math.min(t.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function mp(t,e,n){const i=t.drawingArea,{extra:s,additionalAngle:a,padding:o,size:r}=n,l=t.getPointPosition(e,i+s+o,a),c=Math.round(zo(Uo(l.angle+Oo))),d=function(t,e,n){return 90===n||270===n?t-=e/2:(n>270||n<90)&&(t-=e),t}(l.y,r.h,c),h=function(t){return 0===t||180===t?"center":t<180?"left":"right"}(c),p=(u=l.x,g=r.w,"right"===(m=h)?u-=g:"center"===m&&(u-=g/2),u);var u,g,m;return{visible:!0,x:l.x,y:d,textAlign:h,left:p,top:d,right:p+r.w,bottom:d+r.h}}function fp(t,e){if(!e)return!0;const{left:n,top:i,right:s,bottom:a}=t;return!(Rr({x:n,y:i},e)||Rr({x:n,y:a},e)||Rr({x:s,y:i},e)||Rr({x:s,y:a},e))}function bp(t,e,n){const{left:i,top:s,right:a,bottom:o}=n,{backdropColor:r}=e;if(!no(r)){const n=Yr(e.borderRadius),l=Zr(e.backdropPadding);t.fillStyle=r;const c=i-l.left,d=s-l.top,h=a-i+l.width,p=o-s+l.height;Object.values(n).some(t=>0!==t)?(t.beginPath(),zr(t,{x:c,y:d,w:h,h:p,radius:n}),t.fill()):t.fillRect(c,d,h,p)}}function yp(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,Co);else{let n=t.getPointPosition(0,e);s.moveTo(n.x,n.y);for(let a=1;a<i;a++)n=t.getPointPosition(a,e),s.lineTo(n.x,n.y)}}class vp extends sp{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:vr.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Zr(hp(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=ao(t)&&!isNaN(t)?t:0,this.max=ao(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/hp(this.options))}generateTickLabels(t){sp.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{const n=co(this.options.pointLabels.callback,[t,e],this);return n||0===n?n:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],s=[],a=t._pointLabels.length,o=t.options.pointLabels,r=o.centerPointLabels?ko/a:0;for(let l=0;l<a;l++){const a=o.setContext(t.getPointLabelContext(l));s[l]=a.padding;const c=t.getPointPosition(l,t.drawingArea+s[l],r),d=Kr(a.font),h=pp(t.ctx,d,t._pointLabels[l]);i[l]=h;const p=Uo(t.getIndexAngle(l)+r),u=Math.round(zo(p));gp(n,e,p,up(u,c.x,h.w,0,180),up(u,c.y,h.h,90,270))}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=function(t,e,n){const i=[],s=t._pointLabels.length,a=t.options,{centerPointLabels:o,display:r}=a.pointLabels,l={extra:hp(a)/2,additionalAngle:o?ko/s:0};let c;for(let a=0;a<s;a++){l.padding=n[a],l.size=e[a];const s=mp(t,a,l);i.push(s),"auto"===r&&(s.visible=fp(s,c),s.visible&&(c=s))}return i}(t,i,s)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,i))}getIndexAngle(t){return Uo(t*(Co/(this._pointLabels.length||1))+Lo(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(no(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(no(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return function(t,e,n){return Xr(t,{label:n,index:e,type:"pointLabel"})}(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const i=this.getIndexAngle(t)-Oo+n;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:i,bottom:s}=this._pointLabelItems[t];return{left:e,top:n,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),yp(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:i,border:s}=e,a=this._pointLabels.length;let o,r,l;if(e.pointLabels.display&&function(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let s=e-1;s>=0;s--){const e=t._pointLabelItems[s];if(!e.visible)continue;const a=i.setContext(t.getPointLabelContext(s));bp(n,a,e);const o=Kr(a.font),{x:r,y:l,textAlign:c}=e;Lr(n,t._pointLabels[s],r,l+o.lineHeight/2,o,{color:a.color,textAlign:c,textBaseline:"middle"})}}(this,a),i.display&&this.ticks.forEach((t,e)=>{if(0!==e||0===e&&this.min<0){r=this.getDistanceFromCenterForValue(t.value);const n=this.getContext(e),o=i.setContext(n),l=s.setContext(n);!function(t,e,n,i,s){const a=t.ctx,o=e.circular,{color:r,lineWidth:l}=e;!o&&!i||!r||!l||n<0||(a.save(),a.strokeStyle=r,a.lineWidth=l,a.setLineDash(s.dash||[]),a.lineDashOffset=s.dashOffset,a.beginPath(),yp(t,n,o,i),a.closePath(),a.stroke(),a.restore())}(this,o,r,a,l)}}),n.display){for(t.save(),o=a-1;o>=0;o--){const i=n.setContext(this.getPointLabelContext(o)),{color:s,lineWidth:a}=i;a&&s&&(t.lineWidth=a,t.strokeStyle=s,t.setLineDash(i.borderDash),t.lineDashOffset=i.borderDashOffset,r=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(o,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const i=this.getIndexAngle(0);let s,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((i,o)=>{if(0===o&&this.min>=0&&!e.reverse)return;const r=n.setContext(this.getContext(o)),l=Kr(r.font);if(s=this.getDistanceFromCenterForValue(this.ticks[o].value),r.showLabelBackdrop){t.font=l.string,a=t.measureText(i.label).width,t.fillStyle=r.backdropColor;const e=Zr(r.backdropPadding);t.fillRect(-a/2-e.left,-s-l.size/2-e.top,a+e.width,l.size+e.height)}Lr(t,i.label,0,-s,l,{color:r.color,strokeColor:r.textStrokeColor,strokeWidth:r.textStrokeWidth})}),t.restore()}drawTitle(){}}const _p={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},xp=Object.keys(_p);function wp(t,e){return t-e}function Dp(t,e){if(no(e))return null;const n=t._adapter,{parser:i,round:s,isoWeekday:a}=t._parseOpts;let o=e;return"function"==typeof i&&(o=i(o)),ao(o)||(o="string"==typeof i?n.parse(o,i):n.parse(o)),null===o?null:(s&&(o="week"!==s||!No(a)&&!0!==a?n.startOf(o,s):n.startOf(o,"isoWeek",a)),+o)}function Ip(t,e,n,i){const s=xp.length;for(let a=xp.indexOf(t);a<s-1;++a){const t=_p[xp[a]],s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((n-e)/(s*t.size))<=i)return xp[a]}return xp[s-1]}function kp(t,e,n){if(n){if(n.length){const{lo:i,hi:s}=Ko(n,e);t[n[i]>=e?n[i]:n[s]]=!0}}else t[e]=!0}function Cp(t,e,n){const i=[],s={},a=e.length;let o,r;for(o=0;o<a;++o)r=e[o],s[r]=o,i.push({value:r,major:!1});return 0!==a&&n?function(t,e,n,i){const s=t._adapter,a=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,l;for(r=a;r<=o;r=+s.add(r,1,i))l=n[r],l>=0&&(e[l].major=!0);return e}(t,i,s,n):i}class Mp extends hd{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const n=t.time||(t.time={}),i=this._adapter=new _c(t.adapters.date);i.init(e),bo(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Dp(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:i,max:s,minDefined:a,maxDefined:o}=this.getUserBounds();function r(t){a||isNaN(t.min)||(i=Math.min(i,t.min)),o||isNaN(t.max)||(s=Math.max(s,t.max))}a&&o||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),i=ao(i)&&!isNaN(i)?i:+e.startOf(Date.now(),n),s=ao(s)&&!isNaN(s)?s:+e.endOf(Date.now(),n)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,i="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,a=function(t,e,n){let i=0,s=t.length;for(;i<s&&t[i]<e;)i++;for(;s>i&&t[s-1]>n;)s--;return i>0||s<t.length?t.slice(i,s):t}(i,s,this.max);return this._unit=e.unit||(n.autoSkip?Ip(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):function(t,e,n,i,s){for(let a=xp.length-1;a>=xp.indexOf(n);a--){const n=xp[a];if(_p[n].common&&t._adapter.diff(s,i,n)>=e-1)return n}return xp[n?xp.indexOf(n):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(t){for(let e=xp.indexOf(t)+1,n=xp.length;e<n;++e)if(_p[xp[e]].common)return xp[e]}(this._unit):void 0,this.initOffsets(i),t.reverse&&a.reverse(),Cp(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e,n,i=0,s=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),i=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,n=this.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;i=Yo(i,0,a),s=Yo(s,0,a),this._offsets={start:i,end:s,factor:1/(i+1+s)}}_generate(){const t=this._adapter,e=this.min,n=this.max,i=this.options,s=i.time,a=s.unit||Ip(s.minUnit,e,n,this._getLabelCapacity(e)),o=ro(i.ticks.stepSize,1),r="week"===a&&s.isoWeekday,l=No(r)||!0===r,c={};let d,h,p=e;if(l&&(p=+t.startOf(p,"isoWeek",r)),p=+t.startOf(p,l?"day":a),t.diff(n,e,a)>1e5*o)throw new Error(e+" and "+n+" are too far apart with stepSize of "+o+" "+a);const u="data"===i.ticks.source&&this.getDataTimestamps();for(d=p,h=0;d<n;d=+t.add(d,o,a),h++)kp(c,d,u);return d!==n&&"ticks"!==i.bounds&&1!==h||kp(c,d,u),Object.keys(c).sort(wp).map(t=>+t)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,i=this._unit,s=e||n[i];return this._adapter.format(t,s)}_tickFormatFunction(t,e,n,i){const s=this.options,a=s.ticks.callback;if(a)return co(a,[t,e,n],this);const o=s.time.displayFormats,r=this._unit,l=this._majorUnit,c=r&&o[r],d=l&&o[l],h=n[e],p=l&&d&&h&&h.major;return this._adapter.format(t,i||(p?d:c))}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e<n;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,i=Lo(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(i),a=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:n*s+o*a,h:n*a+o*s}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,s=this._tickFormatFunction(t,0,Cp(this,[t],this._majorUnit),i),a=this._getLabelSize(s),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;t<e;++t)n=n.concat(i[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const i=this.getLabels();for(e=0,n=i.length;e<n;++e)t.push(Dp(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return tr(t.sort(wp))}}function Sp(t,e,n){let i,s,a,o,r=0,l=t.length-1;n?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=Go(t,"pos",e)),({pos:i,time:a}=t[r]),({pos:s,time:o}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=Go(t,"time",e)),({time:i,pos:a}=t[r]),({time:s,pos:o}=t[l]));const c=s-i;return c?a+(o-a)*(e-i)/c:a}var Tp=Object.freeze({__proto__:null,CategoryScale:class extends hd{static id="category";static defaults={ticks:{callback:np}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:i}of e)t[n]===i&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(no(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:Yo(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:function(t,e,n,i){const s=t.indexOf(e);return-1===s?((t,e,n,i)=>("string"==typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,i):s!==t.lastIndexOf(e)?n:s}(n,t,ro(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,i=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=t;n<=e;n++)i.push({value:n});return i}getLabelForValue(t){return np.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:ap,LogarithmicScale:dp,RadialLinearScale:vp,TimeScale:Mp,TimeSeriesScale:class extends Mp{static id="timeseries";static defaults=Mp.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Sp(e,this.min),this._tableRange=Sp(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,i=[],s=[];let a,o,r,l,c;for(a=0,o=t.length;a<o;++a)l=t[a],l>=e&&l<=n&&i.push(l);if(i.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(a=0,o=i.length;a<o;++a)c=i[a+1],r=i[a-1],l=i[a],Math.round((c+r)/2)!==l&&s.push({time:l,pos:a/(o-1)});return s}_generate(){const t=this.min,e=this.max;let n=super.getDataTimestamps();return n.includes(t)&&n.length||n.splice(0,0,t),n.includes(e)&&1!==n.length||n.push(e),n.sort((t,e)=>t-e)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return t=e.length&&n.length?this.normalize(e.concat(n)):e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Sp(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return Sp(this._table,n*this._tableRange+this._minPos,!0)}}});const Op=[bc,ah,ep,Tp],Ep=function(t,e){return t===e||t!=t&&e!=e},Rp=function(t,e){for(var n=t.length;n--;)if(Ep(t[n][0],e))return n;return-1};var Pp=Array.prototype.splice;function Fp(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Fp.prototype.clear=function(){this.__data__=[],this.size=0},Fp.prototype.delete=function(t){var e=this.__data__,n=Rp(e,t);return!(n<0||(n==e.length-1?e.pop():Pp.call(e,n,1),--this.size,0))},Fp.prototype.get=function(t){var e=this.__data__,n=Rp(e,t);return n<0?void 0:e[n][1]},Fp.prototype.has=function(t){return Rp(this.__data__,t)>-1},Fp.prototype.set=function(t,e){var n=this.__data__,i=Rp(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};const Vp=Fp,Ap="object"==typeof global&&global&&global.Object===Object&&global;var Np="object"==typeof self&&self&&self.Object===Object&&self;const jp=Ap||Np||Function("return this")(),Lp=jp.Symbol;var zp=Object.prototype,Bp=zp.hasOwnProperty,$p=zp.toString,Hp=Lp?Lp.toStringTag:void 0;var Wp=Object.prototype.toString;var Up=Lp?Lp.toStringTag:void 0;const qp=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Up&&Up in Object(t)?function(t){var e=Bp.call(t,Hp),n=t[Hp];try{t[Hp]=void 0;var i=!0}catch(t){}var s=$p.call(t);return i&&(e?t[Hp]=n:delete t[Hp]),s}(t):function(t){return Wp.call(t)}(t)},Yp=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Zp=function(t){if(!Yp(t))return!1;var e=qp(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Kp=jp["__core-js_shared__"];var Gp=function(){var t=/[^.]+$/.exec(Kp&&Kp.keys&&Kp.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var Xp=Function.prototype.toString;var Jp=/^\[object .+?Constructor\]$/,Qp=Function.prototype,tu=Object.prototype,eu=Qp.toString,nu=tu.hasOwnProperty,iu=RegExp("^"+eu.call(nu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const su=function(t){return!(!Yp(t)||(e=t,Gp&&Gp in e))&&(Zp(t)?iu:Jp).test(function(t){if(null!=t){try{return Xp.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e},au=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return su(n)?n:void 0},ou=au(jp,"Map"),ru=au(Object,"create");var lu=Object.prototype.hasOwnProperty;var cu=Object.prototype.hasOwnProperty;function du(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}du.prototype.clear=function(){this.__data__=ru?ru(null):{},this.size=0},du.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},du.prototype.get=function(t){var e=this.__data__;if(ru){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return lu.call(e,t)?e[t]:void 0},du.prototype.has=function(t){var e=this.__data__;return ru?void 0!==e[t]:cu.call(e,t)},du.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ru&&void 0===e?"__lodash_hash_undefined__":e,this};const hu=du,pu=function(t,e){var n,i,s=t.__data__;return("string"==(i=typeof(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?s["string"==typeof e?"string":"hash"]:s.map};function uu(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}uu.prototype.clear=function(){this.size=0,this.__data__={hash:new hu,map:new(ou||Vp),string:new hu}},uu.prototype.delete=function(t){var e=pu(this,t).delete(t);return this.size-=e?1:0,e},uu.prototype.get=function(t){return pu(this,t).get(t)},uu.prototype.has=function(t){return pu(this,t).has(t)},uu.prototype.set=function(t,e){var n=pu(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};const gu=uu;function mu(t){var e=this.__data__=new Vp(t);this.size=e.size}mu.prototype.clear=function(){this.__data__=new Vp,this.size=0},mu.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},mu.prototype.get=function(t){return this.__data__.get(t)},mu.prototype.has=function(t){return this.__data__.has(t)},mu.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Vp){var i=n.__data__;if(!ou||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new gu(i)}return n.set(t,e),this.size=n.size,this};const fu=mu,bu=function(){try{var t=au(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),yu=function(t,e,n){"__proto__"==e&&bu?bu(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},vu=function(t,e,n){(void 0!==n&&!Ep(t[e],n)||void 0===n&&!(e in t))&&yu(t,e,n)},_u=function(t,e,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var r=a[xu?o:++i];if(!1===e(s[r],r,s))break}return t};var xu,wu="object"==typeof exports&&exports&&!exports.nodeType&&exports,Du=wu&&"object"==typeof module&&module&&!module.nodeType&&module,Iu=Du&&Du.exports===wu?jp.Buffer:void 0,ku=Iu?Iu.allocUnsafe:void 0;const Cu=jp.Uint8Array,Mu=function(t,e){var n,i,s=e?(n=t.buffer,i=new n.constructor(n.byteLength),new Cu(i).set(new Cu(n)),i):t.buffer;return new t.constructor(s,t.byteOffset,t.length)};var Su=Object.create;const Tu=function(){function t(){}return function(e){if(!Yp(e))return{};if(Su)return Su(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),Ou=(Eu=Object.getPrototypeOf,Ru=Object,function(t){return Eu(Ru(t))});var Eu,Ru,Pu=Object.prototype;const Fu=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Pu)},Vu=function(t){return null!=t&&"object"==typeof t},Au=function(t){return Vu(t)&&"[object Arguments]"==qp(t)};var Nu=Object.prototype,ju=Nu.hasOwnProperty,Lu=Nu.propertyIsEnumerable;const zu=Au(function(){return arguments}())?Au:function(t){return Vu(t)&&ju.call(t,"callee")&&!Lu.call(t,"callee")},Bu=Array.isArray,$u=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Hu=function(t){return null!=t&&$u(t.length)&&!Zp(t)};var Wu="object"==typeof exports&&exports&&!exports.nodeType&&exports,Uu=Wu&&"object"==typeof module&&module&&!module.nodeType&&module,qu=Uu&&Uu.exports===Wu?jp.Buffer:void 0;const Yu=(qu?qu.isBuffer:void 0)||function(){return!1};var Zu=Function.prototype,Ku=Object.prototype,Gu=Zu.toString,Xu=Ku.hasOwnProperty,Ju=Gu.call(Object);var Qu={};Qu["[object Float32Array]"]=Qu["[object Float64Array]"]=Qu["[object Int8Array]"]=Qu["[object Int16Array]"]=Qu["[object Int32Array]"]=Qu["[object Uint8Array]"]=Qu["[object Uint8ClampedArray]"]=Qu["[object Uint16Array]"]=Qu["[object Uint32Array]"]=!0,Qu["[object Arguments]"]=Qu["[object Array]"]=Qu["[object ArrayBuffer]"]=Qu["[object Boolean]"]=Qu["[object DataView]"]=Qu["[object Date]"]=Qu["[object Error]"]=Qu["[object Function]"]=Qu["[object Map]"]=Qu["[object Number]"]=Qu["[object Object]"]=Qu["[object RegExp]"]=Qu["[object Set]"]=Qu["[object String]"]=Qu["[object WeakMap]"]=!1;var tg="object"==typeof exports&&exports&&!exports.nodeType&&exports,eg=tg&&"object"==typeof module&&module&&!module.nodeType&&module,ng=eg&&eg.exports===tg&&Ap.process,ig=function(){try{return eg&&eg.require&&eg.require("util").types||ng&&ng.binding&&ng.binding("util")}catch(t){}}(),sg=ig&&ig.isTypedArray;const ag=sg?function(t){return function(e){return t(e)}}(sg):function(t){return Vu(t)&&$u(t.length)&&!!Qu[qp(t)]},og=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var rg=Object.prototype.hasOwnProperty;const lg=function(t,e,n){var i=t[e];rg.call(t,e)&&Ep(i,n)&&(void 0!==n||e in t)||yu(t,e,n)};var cg=/^(?:0|[1-9]\d*)$/;const dg=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&cg.test(t))&&t>-1&&t%1==0&&t<e};var hg=Object.prototype.hasOwnProperty;const pg=function(t,e){var n=Bu(t),i=!n&&zu(t),s=!n&&!i&&Yu(t),a=!n&&!i&&!s&&ag(t),o=n||i||s||a,r=o?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],l=r.length;for(var c in t)!e&&!hg.call(t,c)||o&&("length"==c||s&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||dg(c,l))||r.push(c);return r};var ug=Object.prototype.hasOwnProperty;const gg=function(t){if(!Yp(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Fu(t),n=[];for(var i in t)("constructor"!=i||!e&&ug.call(t,i))&&n.push(i);return n},mg=function(t){return Hu(t)?pg(t,!0):gg(t)},fg=function(t){return function(t,e,n,i){var s=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var r=e[a],l=i?i(n[r],t[r],r,n,t):void 0;void 0===l&&(l=t[r]),s?yu(n,r,l):lg(n,r,l)}return n}(t,mg(t))},bg=function(t,e,n,i,s,a,o){var r,l=og(t,n),c=og(e,n),d=o.get(c);if(d)vu(t,n,d);else{var h=a?a(l,c,n+"",t,e,o):void 0,p=void 0===h;if(p){var u=Bu(c),g=!u&&Yu(c),m=!u&&!g&&ag(c);h=c,u||g||m?Bu(l)?h=l:Vu(r=l)&&Hu(r)?h=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}(l):g?(p=!1,h=function(t,e){if(e)return t.slice();var n=t.length,i=ku?ku(n):new t.constructor(n);return t.copy(i),i}(c,!0)):m?(p=!1,h=Mu(c,!0)):h=[]:function(t){if(!Vu(t)||"[object Object]"!=qp(t))return!1;var e=Ou(t);if(null===e)return!0;var n=Xu.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Gu.call(n)==Ju}(c)||zu(c)?(h=l,zu(l)?h=fg(l):Yp(l)&&!Zp(l)||(h=function(t){return"function"!=typeof t.constructor||Fu(t)?{}:Tu(Ou(t))}(c))):p=!1}p&&(o.set(c,h),s(h,c,i,a,o),o.delete(c)),vu(t,n,h)}},yg=function t(e,n,i,s,a){e!==n&&_u(n,function(o,r){if(a||(a=new fu),Yp(o))bg(e,n,r,i,t,s,a);else{var l=s?s(og(e,r),o,r+"",e,n,a):void 0;void 0===l&&(l=o),vu(e,r,l)}},mg)},vg=function(t){return t};var _g=Math.max;const xg=bu?function(t,e){return bu(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:vg;var wg=Date.now;const Dg=function(t){var e=0,n=0;return function(){var i=wg(),s=16-(i-n);if(n=i,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(xg),Ig=function(t,e){return Dg(function(t,e,n){return e=_g(void 0===e?t.length-1:e,0),function(){for(var i=arguments,s=-1,a=_g(i.length-e,0),o=Array(a);++s<a;)o[s]=i[e+s];s=-1;for(var r=Array(e+1);++s<e;)r[s]=i[s];return r[e]=n(o),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,r)}}(t,e,vg),t+"")},kg=(Cg=function(t,e,n){yg(t,e,n)},Ig(function(t,e){var n=-1,i=e.length,s=i>1?e[i-1]:void 0,a=i>2?e[2]:void 0;for(s=Cg.length>3&&"function"==typeof s?(i--,s):void 0,a&&function(t,e,n){if(!Yp(n))return!1;var i=typeof e;return!!("number"==i?Hu(n)&&dg(e,n.length):"string"==i&&e in n)&&Ep(n[e],t)}(e[0],e[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var o=e[n];o&&Cg(t,o,n,s)}return t}));var Cg;class Mg{constructor(){this.colorschemesOptions=new v.BehaviorSubject(void 0)}setColorschemesOptions(t){this.pColorschemesOptions=t,this.colorschemesOptions.next(t)}getColorschemesOptions(){return this.pColorschemesOptions}}Mg.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Mg,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Mg.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Mg,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Mg,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[]}});class Sg{constructor(t,e,n){this.zone=e,this.themeService=n,this.type="bar",this.plugins=[],this.chartClick=new m.EventEmitter,this.chartHover=new m.EventEmitter,this.subs=[],this.themeOverrides={},this.ctx=t.nativeElement.getContext("2d"),this.subs.push(this.themeService.colorschemesOptions.pipe((0,_.distinctUntilChanged)()).subscribe(t=>this.themeChanged(t)))}ngOnChanges(t){const e=["type"],n=Object.getOwnPropertyNames(t);if(n.some(t=>e.includes(t))||n.every(e=>t[e].isFirstChange()))this.render();else{const t=this.getChartConfiguration();this.chart&&(Object.assign(this.chart.config.data,t.data),this.chart.config.plugins&&Object.assign(this.chart.config.plugins,t.plugins),this.chart.config.options&&Object.assign(this.chart.config.options,t.options)),this.update()}}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(t=>t.unsubscribe())}render(){return this.chart&&this.chart.destroy(),this.zone.runOutsideAngular(()=>this.chart=new Bd(this.ctx,this.getChartConfiguration()))}update(t){this.chart&&this.zone.runOutsideAngular(()=>{var e;return null===(e=this.chart)||void 0===e?void 0:e.update(t)})}hideDataset(t,e){this.chart&&(this.chart.getDatasetMeta(t).hidden=e,this.update())}isDatasetHidden(t){var e,n;return null===(n=null===(e=this.chart)||void 0===e?void 0:e.getDatasetMeta(t))||void 0===n?void 0:n.hidden}toBase64Image(){var t;return null===(t=this.chart)||void 0===t?void 0:t.toBase64Image()}themeChanged(t){this.themeOverrides=t,this.chart&&(this.chart.config.options&&Object.assign(this.chart.config.options,this.getChartOptions()),this.update())}getChartOptions(){return kg({onHover:(t,e)=>{var n;(this.chartHover.observed||(null===(n=this.chartHover.observers)||void 0===n?void 0:n.length))&&this.zone.run(()=>this.chartHover.emit({event:t,active:e}))},onClick:(t,e)=>{var n;(this.chartClick.observed||(null===(n=this.chartClick.observers)||void 0===n?void 0:n.length))&&this.zone.run(()=>this.chartClick.emit({event:t,active:e}))}},this.themeOverrides,this.options,{plugins:{legend:{display:this.legend}}})}getChartConfiguration(){return{type:this.type,data:this.getChartData(),options:this.getChartOptions(),plugins:this.plugins}}getChartData(){return this.data?this.data:{labels:this.labels||[],datasets:this.datasets||[]}}}Sg.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Sg,deps:[{token:m.ElementRef},{token:m.NgZone},{token:Mg}],target:m["ɵɵFactoryTarget"].Directive}),Sg.ɵdir=m["ɵɵngDeclareDirective"]({minVersion:"14.0.0",version:"14.2.12",type:Sg,selector:"canvas[baseChart]",inputs:{type:"type",legend:"legend",data:"data",options:"options",plugins:"plugins",labels:"labels",datasets:"datasets"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],usesOnChanges:!0,ngImport:f}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Sg,decorators:[{type:m.Directive,args:[{selector:"canvas[baseChart]",exportAs:"base-chart"}]}],ctorParameters:function(){return[{type:m.ElementRef},{type:m.NgZone},{type:Mg}]},propDecorators:{type:[{type:m.Input}],legend:[{type:m.Input}],data:[{type:m.Input}],options:[{type:m.Input}],plugins:[{type:m.Input}],labels:[{type:m.Input}],datasets:[{type:m.Input}],chartClick:[{type:m.Output}],chartHover:[{type:m.Output}]}});const Tg=[[255,99,132],[54,162,235],[255,206,86],[231,233,237],[75,192,192],[151,187,205],[220,220,220],[247,70,74],[70,191,189],[253,180,92],[148,159,177],[77,83,96]],Og={plugins:{colors:{enabled:!1}},datasets:{line:{backgroundColor:t=>Eg(Pg(t.datasetIndex),.4),borderColor:t=>Eg(Pg(t.datasetIndex),1),pointBackgroundColor:t=>Eg(Pg(t.datasetIndex),1),pointBorderColor:"#fff"},bar:{backgroundColor:t=>Eg(Pg(t.datasetIndex),.6),borderColor:t=>Eg(Pg(t.datasetIndex),1)},get radar(){return this.line},doughnut:{backgroundColor:t=>Eg(Pg(t.dataIndex),.6),borderColor:"#fff"},get pie(){return this.doughnut},polarArea:{backgroundColor:t=>Eg(Pg(t.dataIndex),.6),borderColor:t=>Eg(Pg(t.dataIndex),1)},get bubble(){return this.doughnut},get scatter(){return this.doughnut},get area(){return this.polarArea}}};function Eg(t,e){return"rgba("+t.concat(e).join(",")+")"}function Rg(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Pg(t=0){return Tg[t]||[Rg(0,255),Rg(0,255),Rg(0,255)]}class Fg{constructor(){this.generateColors=!0}}Fg.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Fg,deps:[],target:m["ɵɵFactoryTarget"].Injectable}),Fg.ɵprov=m["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Fg,providedIn:"root"}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Fg,decorators:[{type:m.Injectable,args:[{providedIn:"root"}]}]}),Bd.register(...Op);class Vg{constructor(t){(null==t?void 0:t.plugins)&&Bd.register(...null==t?void 0:t.plugins);const e=kg((null==t?void 0:t.generateColors)?Og:{},(null==t?void 0:t.defaults)||{});kr.set(e)}static forRoot(t){return{ngModule:Vg,providers:[{provide:Fg,useValue:t}]}}}Vg.ɵfac=m["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Vg,deps:[{token:Fg,optional:!0}],target:m["ɵɵFactoryTarget"].NgModule}),Vg.ɵmod=m["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"14.2.12",ngImport:f,type:Vg,declarations:[Sg],exports:[Sg]}),Vg.ɵinj=m["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Vg}),m["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Vg,decorators:[{type:m.NgModule,args:[{imports:[],declarations:[Sg],exports:[Sg]}]}],ctorParameters:function(){return[{type:Fg,decorators:[{type:m.Optional}]}]}});let Ag=class extends xa.ConfigProvider{constructor(){super(...arguments),this.defaults={plugin:{serverStats:{enabled:!0,displayMode:"bottomBar",location:{x:null,y:null},style:{background:"rgba(20, 20, 20, 0.90)",size:100,layout:"vertical"},customMetrics:[]}}}}};Ag=u([(0,m.Injectable)()],Ag);const Ng={"zh-CN":{"Server Stats":"服务器状态",Appearance:"外观","Display Mode":"显示模式","Floating Panel":"浮动面板","Bottom Bar":"底部栏","Layout Direction":"排列方向",Vertical:"纵向",Horizontal:"横向","Background Color":"背景颜色",Opacity:"不透明度","Chart Size":"图表大小","Panel Position":"面板位置","Reset Position":"重置位置","Show Server Stats":"显示服务器状态",CPU:"CPU",RAM:"内存",DISK:"磁盘",NET:"网络","Reset Panel Position":"重置面板位置",Reset:"重置","Vertical or Horizontal layout":"纵向或横向排列","Background color and opacity":"背景颜色与不透明度","Unit: px":"单位:像素","Reset to default position":"重置回默认位置",Layout:"布局","Choose between floating panel or bottom bar":"选择浮动面板或底部栏","Custom Metrics":"自定义指标","Define custom shell commands to fetch data. The command must output a single value (number or text).":"定义自定义 Shell 命令来获取数据。命令必须输出单个值(数字或文本)。","Add New Metric":"添加新指标","Edit Metric":"编辑指标",Label:"标签",Type:"类型","Progress Bar":"进度条","Text Value":"文本值",Color:"颜色","Max Value":"最大值",Suffix:"后缀","Command (Shell)":"Shell 命令",Add:"添加",Save:"保存",Cancel:"取消","No custom metrics defined.":"未定义自定义指标。","Preset Library":"预设库","Fetch from GitHub":"从 GitHub 拉取","Load Presets":"加载预设","Loading...":"加载中...","Add to my metrics":"添加到我的指标","Preset added":"预设已添加","Failed to load presets":"加载预设失败","No presets found":"未找到预设","Import commonly used metrics from the community":"从社区导入常用指标配置","I want to submit my own preset":"我想提交我的预设"}},jg=require("child_process");let Lg=class{constructor(t){this.config=t,this.baseStatsCommand='export LC_ALL=C; PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin; OS=$(uname -s 2>/dev/null || echo "Linux"); if [ "$OS" = "Darwin" ]; then cpu=$(ps -A -o %cpu | awk \'{s+=$1} END {print s}\' 2>/dev/null || echo "0"); mem=$(ps -A -o %mem | awk \'{s+=$1} END {print s}\' 2>/dev/null || echo "0"); disk=$(df -h / 2>/dev/null | awk \'NR==2{print $5}\' | sed \'s/%//\' || echo "0"); echo "TABBY-STATS-START $cpu 0 0 $mem $disk"; else stats=$( (grep \'cpu \' /proc/stat; awk \'NR>2 {r+=$2; t+=$10} END{print r, t}\' /proc/net/dev; sleep 1; grep \'cpu \' /proc/stat; awk \'NR>2 {r+=$2; t+=$10} END{print r, t}\' /proc/net/dev) 2>/dev/null | awk \'NR==1 {t1=$2+$3+$4+$5+$6+$7+$8; i1=$5} NR==2 {rx1=$1; tx1=$2} NR==3 {t2=$2+$3+$4+$5+$6+$7+$8; i2=$5} NR==4 {rx2=$1; tx2=$2} END { dt=t2-t1; di=i2-i1; cpu=(dt<=0)?0:(dt-di)/dt*100; rx=rx2-rx1; tx=tx2-tx1; printf "%.1f %.0f %.0f", cpu, rx, tx }\' ); mem=$(free 2>/dev/null | awk \'NR==2{printf "%.2f", $3*100/$2 }\'); disk=$(df -h / 2>/dev/null | awk \'NR==2{print $5}\' | sed \'s/%//\'); if [ -z "$stats" ]; then stats="0 0 0"; fi; if [ -z "$mem" ]; then mem="0"; fi; if [ -z "$disk" ]; then disk="0"; fi; echo "TABBY-STATS-START $stats $mem $disk"; fi',this.isFetching=!1}isPlatformSupport(t){const e=t.ssh&&t.ssh.ssh?t.ssh.ssh:null;return e&&"function"==typeof e.openSessionChannel||"linux"===process.platform||"darwin"===process.platform}async fetchStats(t){if(!t||this.isFetching)return null;this.isFetching=!0;try{const e=t.ssh&&t.ssh.ssh?t.ssh.ssh:null,n=e&&"function"==typeof e.openSessionChannel,i=!n&&("linux"===process.platform||"darwin"===process.platform);if(!n&&!i)return this.isFetching=!1,null;const s=this.config.store.plugin.serverStats.customMetrics||[];let a=this.baseStatsCommand;s.length>0&&(a+='; echo "TABBY-STATS-CUSTOM-START"; ',a+=s.map(t=>`( ${t.command} ) || echo "Err"`).join('; echo "TABBY-STATS-NEXT"; ')),a+='; echo " TABBY-STATS-END"',a=a.replace(/\n/g," "),a=`/bin/sh -c '${a.replace(/'/g,"'\\''")}'`;let o=null;if(n?o=await this.exec(e,a):i&&(o=await this.execLocal(a)),!o)return this.isFetching=!1,null;const r={},l=o.match(/TABBY-STATS-START\s+([\d\.]+)\s+([\d\.]+)\s+([\d\.]+)\s+([\d\.]+)\s+([\d\.]+)/);if(l&&l.length>=6&&(r.cpu=parseFloat(l[1])||0,r.netRx=parseFloat(l[2])||0,r.netTx=parseFloat(l[3])||0,r.mem=parseFloat(l[4])||0,r.disk=parseFloat(l[5])||0),s.length>0&&o.includes("TABBY-STATS-CUSTOM-START")){const t=o.split("TABBY-STATS-CUSTOM-START")[1].split("TABBY-STATS-END")[0].split("TABBY-STATS-NEXT").map(t=>t.trim());r.custom=s.map((e,n)=>({id:e.id,value:t[n]||"-"}))}return this.isFetching=!1,r}catch(t){this.isFetching=!1}return null}execLocal(t){return new Promise(e=>{(0,jg.exec)(t,{timeout:5e3},(t,n)=>{e(t?"":n)})})}async exec(t,e){const n=new Promise((t,e)=>setTimeout(()=>e(new Error("Stats: Timeout")),5e3));return Promise.race([(async()=>{let n=null;try{const e=await t.openSessionChannel();n=await t.activateChannel(e)}catch(t){throw t}return new Promise((t,i)=>{let s="",a=!1,o=null;const r=new TextDecoder("utf-8"),l=()=>{if(o&&o.unsubscribe(),n)try{n.close()}catch(t){}};if(!n.data$)return l(),void i(new Error("Channel has no data$ observable"));o=n.data$.subscribe(e=>(e=>{let n="";n="string"==typeof e?e:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?r.decode(e,{stream:!0}):e.toString(),s+=n,!a&&s.includes("TABBY-STATS-END")&&(a=!0,l(),t(s))})(e),t=>console.error("Stats: Data Stream Error",t)),"function"==typeof n.requestExec?n.requestExec(e).catch(t=>{l(),i(t)}):"function"==typeof n.exec?n.exec(e).catch(t=>{l(),i(t)}):(l(),i(new Error("Channel has no requestExec or exec method")))})})(),n])}};var zg;Lg=u([(0,m.Injectable)({providedIn:"root"}),g("design:paramtypes",[xa.ConfigService])],Lg);let Bg=class extends xa.ToolbarButtonProvider{constructor(t,e){super(),this.config=t,this.translate=e}provide(){return[{icon:h(943),title:this.translate.instant("Show Server Stats"),click:()=>{this.config.store.plugin||(this.config.store.plugin={}),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={});const t=this.config.store.plugin.serverStats.enabled;this.config.store.plugin.serverStats.enabled=!t,this.config.save();const e=window.serverStatsFloating,n=window.serverStatsBottomBar;e&&e.forceUpdate(),n&&n.forceUpdate()}}]}};Bg=u([(0,m.Injectable)(),g("design:paramtypes",[xa.ConfigService,"function"==typeof(zg=void 0!==xa.TranslateService&&xa.TranslateService)?zg:Object])],Bg);let $g=class{constructor(t,e,n,i,s){this.statsService=t,this.config=e,this.app=n,this.cdr=i,this.zone=s,this.visible=!1,this.currentStats={cpu:0,mem:0,disk:0,netRx:0,netTx:0,custom:[]},this.customMetrics=[],this.customChartsData=[],this.isDragging=!1,this.dragOffset={x:0,y:0},this.dragDimensions={width:0,height:0},this.pos={x:null,y:null},this.styleConfig={background:"rgba(20, 20, 20, 0.90)",size:100,layout:"vertical"},this.timerId=null,this.tabSubscription=null,this.doughnutChartType="doughnut",this.chartOptions={responsive:!0,maintainAspectRatio:!1,cutout:"75%",plugins:{legend:{display:!1},tooltip:{enabled:!1}},animation:{duration:0},events:[]},this.cpuData=this.createChartData("#e74c3c"),this.memData=this.createChartData("#f1c40f"),this.diskData=this.createChartData("#3498db"),window.serverStatsFloating=this}createChartData(t){return{labels:["Used","Free"],datasets:[{data:[0,100],backgroundColor:[t,"rgba(255,255,255,0.1)"],borderWidth:0}]}}ngOnInit(){this.loadConfig(),this.config.ready$.subscribe(()=>{this.loadConfig(),setTimeout(()=>this.checkAndFetch(),100)}),this.config.changed$.subscribe(()=>this.loadConfig()),this.tabSubscription=this.app.activeTabChange.subscribe(()=>{this.checkAndFetch()}),setTimeout(()=>this.checkAndFetch(),100),this.zone.runOutsideAngular(()=>{this.timerId=window.setInterval(()=>{this.zone.run(()=>{this.checkAndFetch()})},3e3)})}loadConfig(){var t;const e=(null===(t=this.config.store.plugin)||void 0===t?void 0:t.serverStats)||{};e.location?this.pos={x:e.location.x,y:e.location.y}:this.pos={x:null,y:null},e.style&&(this.styleConfig=Object.assign(Object.assign({},this.styleConfig),e.style)),this.customMetrics=e.customMetrics||[],this.customChartsData=this.customMetrics.map(t=>this.createChartData(t.color||"#00ff00")),setTimeout(()=>this.adjustPositionToViewport(),100),this.cdr.detectChanges()}formatSpeed(t){if(0===t)return"0 B/s";const e=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,e)).toFixed(1))+" "+["B/s","K/s","M/s","G/s"][e]}startDrag(t){if(0!==t.button)return;this.isDragging=!0;const e=t.currentTarget.getBoundingClientRect();this.dragDimensions.width=e.width,this.dragDimensions.height=e.height,this.dragOffset.x=t.clientX-e.left,this.dragOffset.y=t.clientY-e.top,t.preventDefault()}onMouseMove(t){if(!this.isDragging)return;let e=t.clientX-this.dragOffset.x,n=t.clientY-this.dragOffset.y;const i=window.innerWidth-this.dragDimensions.width,s=window.innerHeight-this.dragDimensions.height;this.pos.x=Math.min(Math.max(0,e),i),this.pos.y=Math.min(Math.max(0,n),s)}onMouseUp(){this.isDragging&&(this.isDragging=!1,this.adjustPositionToViewport(),this.config.store.plugin.serverStats||(this.config.store.plugin.serverStats={}),this.config.store.plugin.serverStats.location||(this.config.store.plugin.serverStats.location={}),this.config.store.plugin.serverStats.location.x=this.pos.x,this.config.store.plugin.serverStats.location.y=this.pos.y,this.config.save())}adjustPositionToViewport(){var t,e;if(null===this.pos.x||null===this.pos.y)return;const n=(null===(e=null===(t=this._elementRef)||void 0===t?void 0:t.nativeElement)||void 0===e?void 0:e.getBoundingClientRect)?this._elementRef.nativeElement.getBoundingClientRect():{width:4*this.styleConfig.size+60,height:this.styleConfig.size},i=10,s=window.innerWidth-n.width-i,a=window.innerHeight-n.height-i;let o=this.pos.x,r=this.pos.y;o<i&&(o=i),o>s&&(o=s),r<i&&(r=i),r>a&&(r=a),o===this.pos.x&&r===this.pos.y||(this.pos.x=o,this.pos.y=r,this.cdr.detectChanges())}onWindowResize(){this.adjustPositionToViewport()}forceUpdate(){this.checkAndFetch()}async checkAndFetch(){var t,e,n,i;const s=null===(e=null===(t=this.config.store.plugin)||void 0===t?void 0:t.serverStats)||void 0===e?void 0:e.enabled;if("floatingPanel"!==((null===(i=null===(n=this.config.store.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.displayMode)||"bottomBar"))return void(this.visible&&(this.visible=!1,this.cdr.detectChanges()));let a=this.app.activeTab;if(!s||!a)return void(this.visible&&(this.visible=!1,this.cdr.detectChanges()));a.focusedTab&&(a=a.focusedTab);const o=a.session;if(o&&this.statsService.isPlatformSupport(o))try{const t=await this.statsService.fetchStats(o);if(t)return this.visible=!0,this.updateCharts(t),void this.cdr.detectChanges()}catch(t){}this.visible&&(this.visible=!1,this.cdr.detectChanges())}getCustomValue(t){return this.currentStats.custom&&this.currentStats.custom[t]?this.currentStats.custom[t].value:"-"}updateCharts(t){this.currentStats=t,this.cpuData.datasets[0].data=[t.cpu,100-t.cpu],this.memData.datasets[0].data=[t.mem,100-t.mem],this.diskData.datasets[0].data=[t.disk,100-t.disk],this.cpuData=Object.assign({},this.cpuData),this.memData=Object.assign({},this.memData),this.diskData=Object.assign({},this.diskData),t.custom&&Array.isArray(t.custom)&&t.custom.forEach((t,e)=>{const n=this.customMetrics[e];if(n&&"progress"===n.type&&this.customChartsData[e]){const i=parseFloat(t.value)||0,s=n.maxValue||100,a=Math.max(0,s-i);this.customChartsData[e].datasets[0].data=[i,a],this.customChartsData[e]=Object.assign({},this.customChartsData[e])}}),this.charts&&this.charts.forEach(t=>t.update())}ngOnDestroy(){this.timerId&&clearInterval(this.timerId),this.tabSubscription&&this.tabSubscription.unsubscribe()}};u([(0,m.ViewChildren)(Sg),g("design:type",m.QueryList)],$g.prototype,"charts",void 0),u([(0,m.HostListener)("document:mousemove",["$event"]),g("design:type",Function),g("design:paramtypes",[MouseEvent]),g("design:returntype",void 0)],$g.prototype,"onMouseMove",null),u([(0,m.HostListener)("document:mouseup"),g("design:type",Function),g("design:paramtypes",[]),g("design:returntype",void 0)],$g.prototype,"onMouseUp",null),u([(0,m.HostListener)("window:resize"),g("design:type",Function),g("design:paramtypes",[]),g("design:returntype",void 0)],$g.prototype,"onWindowResize",null),$g=u([(0,m.Component)({selector:"server-stats-floating-panel",template:'\n <div class="stats-container" \n *ngIf="visible"\n (mousedown)="startDrag($event)"\n [style.top.px]="pos.y" \n [style.left.px]="pos.x"\n [style.right]="pos.x !== null ? \'auto\' : null"\n [style.background]="styleConfig.background"\n [style.flex-direction]="styleConfig.layout === \'horizontal\' ? \'row\' : \'column\'">\n \n \x3c!-- 基础指标 --\x3e\n <div class="chart-wrapper" \n [style.width.px]="styleConfig.size" \n [style.height.px]="styleConfig.size">\n <div class="chart-label">{{ \'CPU\' | translate }}</div>\n <canvas baseChart [data]="cpuData" [options]="chartOptions" [type]="doughnutChartType"></canvas>\n <div class="chart-value">{{currentStats.cpu | number:\'1.0-0\'}}%</div>\n </div>\n\n <div class="chart-wrapper" \n [style.width.px]="styleConfig.size" \n [style.height.px]="styleConfig.size">\n <div class="chart-label">{{ \'RAM\' | translate }}</div>\n <canvas baseChart [data]="memData" [options]="chartOptions" [type]="doughnutChartType"></canvas>\n <div class="chart-value">{{currentStats.mem | number:\'1.0-0\'}}%</div>\n </div>\n\n <div class="chart-wrapper" \n [style.width.px]="styleConfig.size" \n [style.height.px]="styleConfig.size">\n <div class="chart-label">{{ \'DISK\' | translate }}</div>\n <canvas baseChart [data]="diskData" [options]="chartOptions" [type]="doughnutChartType"></canvas>\n <div class="chart-value">{{currentStats.disk | number:\'1.0-0\'}}%</div>\n </div>\n\n \x3c!-- 自定义指标 --\x3e\n <ng-container *ngFor="let metric of customMetrics; let i = index">\n <div class="chart-wrapper" \n [style.width.px]="styleConfig.size" \n [style.height.px]="styleConfig.size">\n <div class="chart-label">{{ metric.label }}</div>\n \n <ng-container *ngIf="metric.type === \'progress\'">\n <canvas baseChart [data]="customChartsData[i]" [options]="chartOptions" [type]="doughnutChartType"></canvas>\n <div class="chart-value">{{ getCustomValue(i) }}</div>\n </ng-container>\n\n <ng-container *ngIf="metric.type === \'text\'">\n <div class="text-value-container" [style.color]="metric.color || \'#fff\'">\n {{ getCustomValue(i) }}<span class="unit">{{ metric.suffix }}</span>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n \x3c!-- 网络流量 --\x3e\n <div class="chart-wrapper" \n [style.width.px]="styleConfig.size" \n [style.height.px]="styleConfig.size">\n <div class="chart-label">{{ \'NET\' | translate }}</div>\n <div class="net-container">\n <div class="net-row download">\n <span>↓</span> {{ formatSpeed(currentStats.netRx) }}\n </div>\n <div class="net-row upload">\n <span>↑</span> {{ formatSpeed(currentStats.netTx) }}\n </div>\n </div>\n </div>\n </div>\n ',styles:["\n :host { display: block; position: absolute; z-index: 99999; }\n .stats-container {\n position: fixed;\n top: 100px; \n right: 20px; \n z-index: 10000; \n backdrop-filter: blur(12px);\n padding: 0px 10px 0px 10px;\n display: flex; \n gap: 15px;\n border-radius: 8px;\n border: 1px solid rgba(255,255,255,0.2);\n box-shadow: 0 10px 30px rgba(0,0,0,0.5);\n min-width: 100px;\n color: white;\n cursor: move;\n user-select: none;\n }\n .chart-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; container-type: inline-size; }\n \n .chart-label { font-size: 12cqw; font-weight: bold; margin-bottom: 2cqw; color: #aaa; pointer-events: none; margin-top: 5cqw }\n .chart-value { position: absolute; top: calc(50% + 10cqw); left: 50%; transform: translate(-50%, -50%); font-size: 25cqw; font-family: monospace; pointer-events: none; color: #fff; font-weight: bold; text-shadow: 0 1px 2px black; }\n \n .net-container { \n height: 100%; width: 100%; \n display: flex; flex-direction: column; justify-content: center; align-items: center; \n font-family: monospace; font-weight: bold;\n }\n .net-row { font-size: 13cqw; white-space: nowrap; }\n .net-row span { display: inline-block; width: 8cqw; }\n .download { color: #2ecc71; margin-bottom: 2cqw; }\n .upload { color: #e74c3c; }\n \n .text-value-container {\n position: absolute;\n top: calc(50% + 5cqw); left: 50%;\n transform: translate(-50%, -50%);\n font-size: 20cqw;\n font-family: monospace;\n font-weight: bold;\n text-align: center;\n width: 100%;\n text-shadow: 0 1px 2px black;\n }\n .unit { font-size: 0.5em; margin-left: 2px; opacity: 0.8; }\n \n canvas { max-width: calc(100% - 32cqw); max-height: calc(100% - 32cqw); pointer-events: none; }\n "]}),g("design:paramtypes",[Lg,xa.ConfigService,xa.AppService,m.ChangeDetectorRef,m.NgZone])],$g);let Hg=class{constructor(t,e,n,i,s){this.statsService=t,this.config=e,this.app=n,this.cdr=i,this.zone=s,this.visible=!1,this.loading=!0,this.currentStats={cpu:0,mem:0,disk:0,netRx:0,netTx:0,custom:[]},this.customMetrics=[],this.styleConfig={background:"rgba(20, 20, 20, 0.85)"},this.timerId=null,this.tabSubscription=null,window.serverStatsBottomBar=this}getCpuColor(){const t=this.currentStats.cpu;return t<50?"#2ecc71":t<80?"#f1c40f":"#e74c3c"}getMemColor(){const t=this.currentStats.mem;return t<50?"#2ecc71":t<80?"#f1c40f":"#e74c3c"}getDiskColor(){const t=this.currentStats.disk;return t<50?"#2ecc71":t<80?"#3498db":"#e74c3c"}getCustomValue(t){return this.currentStats.custom&&this.currentStats.custom[t]?this.currentStats.custom[t].value:"-"}getCustomProgress(t){const e=this.getCustomValue(t),n=parseFloat(e);if(isNaN(n))return 0;const i=this.customMetrics[t].maxValue||100;return Math.min(100,Math.max(0,n/i*100))}ngOnInit(){this.loadConfig(),this.config.ready$.subscribe(()=>{this.loadConfig(),setTimeout(()=>this.checkAndFetch(),100)}),this.config.changed$.subscribe(()=>this.loadConfig()),this.tabSubscription=this.app.activeTabChange.subscribe(()=>{this.checkAndFetch()}),setTimeout(()=>this.checkAndFetch(),100),this.zone.runOutsideAngular(()=>{this.timerId=window.setInterval(()=>{this.zone.run(()=>{this.checkAndFetch()})},3e3)})}loadConfig(){var t;const e=(null===(t=this.config.store.plugin)||void 0===t?void 0:t.serverStats)||{};e.style&&(this.styleConfig=Object.assign(Object.assign({},this.styleConfig),e.style)),this.customMetrics=e.customMetrics||[],this.cdr.detectChanges()}formatSpeed(t){if(0===t)return"0 B/s";const e=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,e)).toFixed(1))+" "+["B/s","K/s","M/s","G/s"][e]}forceUpdate(){this.checkAndFetch()}async checkAndFetch(){var t,e,n,i;const s=null===(e=null===(t=this.config.store.plugin)||void 0===t?void 0:t.serverStats)||void 0===e?void 0:e.enabled;if("bottomBar"!==((null===(i=null===(n=this.config.store.plugin)||void 0===n?void 0:n.serverStats)||void 0===i?void 0:i.displayMode)||"bottomBar"))return void(this.visible&&(this.visible=!1,this.loading=!0,this.cdr.detectChanges()));let a=this.app.activeTab;if(!s||!a)return void(this.visible&&(this.visible=!1,this.loading=!0,this.cdr.detectChanges()));a.focusedTab&&(a=a.focusedTab);const o=a.session;if(o&&this.statsService.isPlatformSupport(o)){this.visible||(this.visible=!0,this.loading=!0,this.cdr.detectChanges());try{const t=await this.statsService.fetchStats(o);this.loading=!1,t&&(this.updateStats(t),this.currentStats=t),this.cdr.detectChanges()}catch(t){this.loading=!1,this.cdr.detectChanges()}}else this.visible&&(this.visible=!1,this.loading=!0,this.cdr.detectChanges())}updateStats(t){this.currentStats=t}ngOnDestroy(){this.timerId&&clearInterval(this.timerId),this.tabSubscription&&this.tabSubscription.unsubscribe()}};var Wg;Hg=u([(0,m.Component)({selector:"server-stats-bottom-bar",template:'\n <div class="stats-container" \n *ngIf="visible"\n [style.background]="styleConfig.background">\n <div class="stat-section" *ngIf="loading">\n <div class="loading-text">Loading...</div>\n </div>\n \n <ng-container *ngIf="!loading">\n <div class="stat-section">\n <div class="stat-label">{{ \'CPU\' | translate }}</div>\n <div class="stat-content">\n <div class="progress-bar-container">\n <div class="progress-bar" [style.width.%]="currentStats.cpu" [style.background-color]="getCpuColor()"></div>\n </div>\n <div class="stat-value">{{currentStats.cpu | number:\'1.0-0\'}}%</div>\n </div>\n </div>\n <div class="stat-separator"></div>\n\n <div class="stat-section">\n <div class="stat-label">{{ \'RAM\' | translate }}</div>\n <div class="stat-content">\n <div class="progress-bar-container">\n <div class="progress-bar" [style.width.%]="currentStats.mem" [style.background-color]="getMemColor()"></div>\n </div>\n <div class="stat-value">{{currentStats.mem | number:\'1.0-0\'}}%</div>\n </div>\n </div>\n <div class="stat-separator"></div>\n\n <div class="stat-section">\n <div class="stat-label">{{ \'DISK\' | translate }}</div>\n <div class="stat-content">\n <div class="progress-bar-container">\n <div class="progress-bar" [style.width.%]="currentStats.disk" [style.background-color]="getDiskColor()"></div>\n </div>\n <div class="stat-value">{{currentStats.disk | number:\'1.0-0\'}}%</div>\n </div>\n </div>\n\n <ng-container *ngFor="let metric of customMetrics; let i = index">\n <div class="stat-separator"></div>\n <div class="stat-section">\n <div class="stat-label">{{ metric.label }}</div>\n \n <div class="stat-content" *ngIf="metric.type === \'progress\'">\n <div class="progress-bar-container">\n <div class="progress-bar" \n [style.width.%]="getCustomProgress(i)" \n [style.background-color]="metric.color || \'#3498db\'"></div>\n </div>\n <div class="stat-value">{{ getCustomValue(i) }}</div>\n </div>\n\n <div class="stat-content" *ngIf="metric.type === \'text\'">\n <div class="stat-value" [style.color]="metric.color || \'inherit\'">\n {{ getCustomValue(i) }} {{ metric.suffix }}\n </div>\n </div>\n </div>\n </ng-container>\n\n <div class="stat-separator"></div>\n\n <div class="stat-section net-section">\n <div class="stat-label">{{ \'NET\' | translate }}</div>\n <div class="net-container">\n <div class="net-row download">\n <span>↓</span> <span class="net-value">{{ formatSpeed(currentStats.netRx) }}</span>\n </div>\n <div class="net-row upload">\n <span>↑</span> <span class="net-value">{{ formatSpeed(currentStats.netTx) }}</span>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n ',styles:["\n :host { display: block; position: absolute; bottom: 0; left: 0; right: 0; z-index: 100; width: 100%; }\n .stats-container {\n position: absolute; bottom: 0; left: 0; right: 0; width: 100%; z-index: 10000; \n backdrop-filter: blur(8px); padding: 4px 12px; display: flex; gap: 12px;\n justify-content: flex-start; align-items: center; border-top: 1px solid rgba(255,255,255,0.15);\n min-height: 28px; max-height: 28px; color: rgba(255,255,255,0.9); user-select: none; font-size: 11px;\n }\n .stat-section { display: flex; align-items: center; gap: 6px; }\n .stat-label { font-weight: 500; color: rgba(255,255,255,0.7); font-size: 12px; line-height: 1; min-width: 24px; }\n .stat-content { display: flex; align-items: center; gap: 6px; }\n .progress-bar-container { height: 6px; background-color: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; width: 50px; }\n .progress-bar { height: 100%; transition: width 0.3s ease, background-color 0.3s ease; border-radius: 3px; }\n .stat-value { font-family: monospace; font-size: 12px; color: rgba(255,255,255,0.9); line-height: 1; white-space: nowrap; text-align: left; }\n .stat-separator { width: 1px; height: 16px; background-color: rgba(255,255,255,0.2); margin: 0 2px; }\n .net-section { min-width: 100px; margin-left: auto; }\n .net-container { display: flex; flex-direction: row; gap: 8px; font-family: monospace; font-size: 10px; align-items: center; }\n .net-row { white-space: nowrap; display: flex; align-items: center; gap: 3px; line-height: 1; }\n .net-value { display: inline-block; min-width: 40px; text-align: left; }\n .download { color: #2ecc71; }\n .upload { color: #e74c3c; }\n .loading-text { color: rgba(255,255,255,0.6); font-size: 10px; font-style: italic; }\n "]}),g("design:paramtypes",[Lg,xa.ConfigService,xa.AppService,m.ChangeDetectorRef,m.NgZone])],Hg);let Ug=class{constructor(t,e){this.platform=t,this.config=e,this.defaultMetric={type:"progress",color:"#00ff00",maxValue:100,suffix:""},this.currentMetric=Object.assign({},this.defaultMetric),this.editingIndex=-1,this.draggedIndex=null,this.isDragging=!1,this.presets=[],this.loadingPresets=!1,this.fetchError=!1}get customMetrics(){return this.config.store.plugin.serverStats.customMetrics||[]}async fetchPresets(){this.loadingPresets=!0,this.fetchError=!1,this.presets=[];try{const t=await fetch("https://raw.githubusercontent.com/kasuganosoras/tabby-server-stats/main/presets.json");if(!t.ok)throw new Error("Network response was not ok");const e=await t.json();if(!Array.isArray(e))throw new Error("Invalid format");this.presets=e}catch(t){console.error("Failed to fetch presets:",t),this.fetchError=!0}finally{this.loadingPresets=!1}}addPreset(t){this.config.store.plugin.serverStats.customMetrics||(this.config.store.plugin.serverStats.customMetrics=[]);const e={id:Date.now().toString()+Math.random().toString().slice(2,5),label:t.label||"New",command:t.command||"",type:t.type||"text",color:t.color||"#00ff00",maxValue:t.maxValue||100,suffix:t.suffix||""};this.config.store.plugin.serverStats.customMetrics.push(e),this.save()}editMetric(t){this.editingIndex=t,this.currentMetric=JSON.parse(JSON.stringify(this.customMetrics[t]))}cancelEdit(){this.editingIndex=-1,this.currentMetric=Object.assign({},this.defaultMetric)}saveMetric(){if(!this.currentMetric.label||!this.currentMetric.command)return;this.config.store.plugin.serverStats.customMetrics||(this.config.store.plugin.serverStats.customMetrics=[]);const t={id:this.currentMetric.id||Date.now().toString(),label:this.currentMetric.label,command:this.currentMetric.command,type:this.currentMetric.type||"text",color:this.currentMetric.color,maxValue:this.currentMetric.maxValue,suffix:this.currentMetric.suffix};-1===this.editingIndex?this.config.store.plugin.serverStats.customMetrics.push(t):(this.config.store.plugin.serverStats.customMetrics[this.editingIndex]=t,this.editingIndex=-1),this.save(),this.currentMetric=Object.assign({},this.defaultMetric)}removeMetric(t){confirm("Are you sure you want to delete this metric?")&&(this.config.store.plugin.serverStats.customMetrics.splice(t,1),this.save(),this.editingIndex===t&&this.cancelEdit())}onDragStart(t){this.draggedIndex=t}onDragOver(t,e){t.preventDefault()}onDrop(t){if(this.isDragging=!1,null===this.draggedIndex||this.draggedIndex===t)return;const e=this.customMetrics,n=e[this.draggedIndex];e.splice(this.draggedIndex,1),e.splice(t,0,n),this.config.store.plugin.serverStats.customMetrics=[...e],this.save(),this.draggedIndex=null}get hexColor(){const t=this.config.store.plugin.serverStats.style.background;if(!t)return"#141414";if(t.startsWith("rgba")){const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(e)return`#${parseInt(e[1]).toString(16).padStart(2,"0")}${parseInt(e[2]).toString(16).padStart(2,"0")}${parseInt(e[3]).toString(16).padStart(2,"0")}`}return t.startsWith("#")?t.substring(0,7):"#141414"}get opacity(){const t=this.config.store.plugin.serverStats.style.background;if(!t)return.9;if(t.startsWith("rgba")){const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(e&&e[4])return parseFloat(e[4])}return 1}setHexColor(t){const e=this.opacity;this.updateColor(t,e)}setOpacity(t){const e=this.hexColor;this.updateColor(e,t)}openGitHubLink(){this.platform.openExternal("https://github.com/kasuganosoras/tabby-server-stats")}updateColor(t,e){const n=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16),s=parseInt(t.slice(5,7),16);this.config.store.plugin.serverStats.style.background=`rgba(${n}, ${i}, ${s}, ${e})`,this.save()}save(){this.config.save()}};Ug=u([(0,m.Component)({template:'\n <h3 translate>Server Stats</h3>\n \n \x3c!-- 显示模式选择 --\x3e\n <div class="form-line">\n <div class="header">\n <div class="title" translate>Display Mode</div>\n <div class="description" translate>Choose between floating panel or bottom bar</div>\n </div>\n <div class="btn-group">\n <input type="radio" class="btn-check" name="displayMode" id="displayModeFloating" \n autocomplete="off" value="floatingPanel"\n [(ngModel)]="config.store.plugin.serverStats.displayMode" \n (ngModelChange)="save()">\n <label class="btn btn-secondary" for="displayModeFloating" translate>Floating Panel</label>\n <input type="radio" class="btn-check" name="displayMode" id="displayModeBottom" \n autocomplete="off" value="bottomBar"\n [(ngModel)]="config.store.plugin.serverStats.displayMode" \n (ngModelChange)="save()">\n <label class="btn btn-secondary" for="displayModeBottom" translate>Bottom Bar</label>\n </div>\n </div>\n\n \x3c!-- 样式配置 --\x3e\n <div class="form-line">\n <div class="header">\n <div class="title" translate>Background Color</div>\n <div class="description" translate>Background color and opacity</div>\n </div>\n <div class="d-flex align-items-center">\n <input type="color" class="form-control form-control-color me-3" \n style="width: 60px;"\n [ngModel]="hexColor" \n (ngModelChange)="setHexColor($event)">\n <span class="text-muted me-2" translate>Opacity</span>\n <input type="range" class="form-range me-2" style="width: 100px" min="0" max="1" step="0.01"\n [ngModel]="opacity" \n (ngModelChange)="setOpacity($event)">\n </div>\n </div>\n\n <div class="separator"></div>\n\n \x3c!-- 预设库区域 --\x3e\n <div class="mt-4 mb-3">\n <div class="d-flex justify-content-between align-items-center mb-2">\n <h4 class="mb-0" translate>Preset Library</h4>\n <button class="btn btn-info btn-sm text-white" (click)="fetchPresets()" [disabled]="loadingPresets">\n <i class="fas fa-cloud-download-alt me-1"></i>\n <span *ngIf="!loadingPresets" translate>Fetch from GitHub</span>\n <span *ngIf="loadingPresets" translate>Loading...</span>\n </button>\n </div>\n <div class="text-muted" style="font-size: 13px;" translate>\n Import commonly used metrics from the community\n </div>\n\n \x3c!-- 预设列表 --\x3e\n <div style="overflow-x: auto; width: 100%;">\n <div class="list-group mt-3 mb-2" *ngIf="presets.length > 0" style="min-width: 450px">\n <div class="list-group-item d-flex align-items-center justify-content-between" *ngFor="let p of presets">\n <div class="d-flex align-items-center" style="width: 90%">\n <span class="badge me-3" [style.background-color]="p.color || \'#666\'">\n {{ (p.type === \'progress\' ? \'Progress Bar\' : \'Text Value\') | translate }}\n </span>\n <div>\n <strong>{{ p.label }}</strong>\n <div class="text-muted" style="font-size: 12px; font-family: monospace;">{{ p.command }}</div>\n </div>\n </div>\n <button class="btn btn-sm btn-success text-white white-space-nowrap add-preset-btn" (click)="addPreset(p)" title="{{ \'Add to my metrics\' | translate }}">\n <i class="fas fa-plus"></i> <span translate>Add</span>\n </button>\n </div>\n </div>\n <div class="text-muted" style="font-size: 13px;" translate>\n <a class="submit-own-preset-btn" href="javascript:void(0);" (click)="openGitHubLink()">{{ \'I want to submit my own preset\' | translate }} <i class="fas fa-external-link-alt"></i></a>\n </div>\n </div>\n <div class="alert alert-warning mt-2" *ngIf="fetchError">\n {{ \'Failed to load presets\' | translate }}\n </div>\n </div>\n\n <div class="separator"></div>\n\n \x3c!-- 自定义指标管理区域 --\x3e\n <div class="mt-4 mb-3">\n <h4 translate>Custom Metrics</h4>\n <div class="text-muted mb-2" style="font-size: 13px;" translate>\n Define custom shell commands to fetch data. The command must output a single value (number or text).\n </div>\n </div>\n\n <div class="list-group mb-3">\n <div class="list-group-item d-flex align-items-center justify-content-between user-select-none custom-metric-item" \n *ngFor="let metric of customMetrics; let i = index"\n draggable="true"\n (dragstart)="onDragStart(i)"\n (dragover)="onDragOver($event, i)"\n (drop)="onDrop(i)"\n [class.opacity-50]="draggedIndex === i && !isDragging"\n style="cursor: grab;">\n \n <div class="d-flex align-items-center" style="flex: 1">\n <i class="fas fa-grip-vertical text-muted me-3" style="cursor: grab"></i>\n \n <span class="badge me-3" [style.background-color]="metric.color || \'#666\'">\n {{ (metric.type === \'progress\' ? \'Progress Bar\' : \'Text Value\') | translate }}\n </span>\n <div>\n <strong>{{ metric.label }}</strong>\n <div class="text-muted" style="font-size: 12px; font-family: monospace;">{{ metric.command }}</div>\n </div>\n </div>\n\n <div class="btn-group">\n <button class="btn btn-sm btn-outline-secondary" (click)="editMetric(i)" title="Edit">\n <i class="fas fa-pen"></i>\n </button>\n <button class="btn btn-sm btn-outline-danger" (click)="removeMetric(i)" title="Remove">\n <i class="fas fa-trash"></i>\n </button>\n </div>\n </div>\n \n <div class="list-group-item text-center text-muted" *ngIf="customMetrics.length === 0" translate>\n No custom metrics defined.\n </div>\n </div>\n\n <div class="card p-3 border">\n <h5 class="mb-3">{{ (editingIndex === -1 ? \'Add New Metric\' : \'Edit Metric\') | translate }}</h5>\n <div class="row g-2">\n <div class="col-md-3">\n <label class="form-label" translate>Label</label>\n <input type="text" class="form-control form-control-sm" [(ngModel)]="currentMetric.label" placeholder="e.g. GPU">\n </div>\n <div class="col-md-3">\n <label class="form-label" translate>Type</label>\n <select class="form-select form-select-sm" [(ngModel)]="currentMetric.type">\n <option value="progress" translate>Progress Bar</option>\n <option value="text" translate>Text Value</option>\n </select>\n </div>\n <div class="col-md-2">\n <label class="form-label" translate>Color</label>\n <input type="color" class="form-control form-control-color form-control-sm w-100" [(ngModel)]="currentMetric.color">\n </div>\n <div class="col-md-2" *ngIf="currentMetric.type === \'progress\'">\n <label class="form-label" translate>Max Value</label>\n <input type="number" class="form-control form-control-sm" [(ngModel)]="currentMetric.maxValue">\n </div>\n <div class="col-md-2" *ngIf="currentMetric.type === \'text\'">\n <label class="form-label" translate>Suffix</label>\n <input type="text" class="form-control form-control-sm" [(ngModel)]="currentMetric.suffix" placeholder="e.g. °C">\n </div>\n <div class="col-md-12">\n <label class="form-label" translate>Command (Shell)</label>\n <div class="input-group input-group-sm">\n <input type="text" class="form-control" [(ngModel)]="currentMetric.command" placeholder="echo 50">\n </div>\n </div>\n <div class="col-md-12 mt-3 text-end">\n <button class="btn btn-secondary btn-sm me-2" *ngIf="editingIndex !== -1" (click)="cancelEdit()" translate>\n Cancel\n </button>\n <button class="btn btn-primary btn-sm text-white" (click)="saveMetric()" [disabled]="!currentMetric.label || !currentMetric.command">\n <i class="fas" [class.fa-plus]="editingIndex === -1" [class.fa-save]="editingIndex !== -1"></i>\n \n {{ (editingIndex === -1 ? \'Add\' : \'Save\') | translate }}\n </button>\n </div>\n </div>\n </div>\n ',styles:["\n .param-input { width: 80px; text-align: right; }\n .user-select-none { user-select: none; }\n .opacity-50 { opacity: 0.5; }\n .separator { height: 1px; background: rgba(0,0,0,0.1); margin: 20px 0; }\n .white-space-nowrap { white-space: nowrap; }\n .add-preset-btn { width: 12%; justify-content: center; }\n .submit-own-preset-btn { color: #00ffc8ff; text-decoration: none; }\n .submit-own-preset-btn:hover { color: #00daaaff; text-decoration: underline; }\n .custom-metric-item { border: 1px solid rgba(100, 100, 100, 0.1); cursor: move; }\n :host-context(.theme-dark) .separator { background: rgba(255,255,255,0.1); }\n "]}),g("design:paramtypes",[xa.PlatformService,xa.ConfigService])],Ug);let qg=class extends Da.SettingsTabProvider{constructor(t){super(),this.translate=t,this.id="server-stats",this.icon="fas fa-server",this.title=this.translate.instant("Server Stats"),setTimeout(()=>this.setTitle(this.translate.instant("Server Stats")),10)}setTitle(t){this.title=t}getComponentType(){return Ug}};var Yg;qg=u([(0,m.Injectable)(),g("design:paramtypes",["function"==typeof(Wg=void 0!==xa.TranslateService&&xa.TranslateService)?Wg:Object])],qg);let Zg=class{constructor(t,e,n,i,s,a){this.floatingRef=null,this.bottomBarRef=null,this.floatingElem=null,this.bottomBarElem=null,e.ready$.subscribe(()=>{setTimeout(()=>{for(const[t,e]of Object.entries(Ng))a.setTranslation(t,e,!0)},1e3)});const o=t=>{if(this.destroyComponents(),"floatingPanel"===t){const t=n.resolveComponentFactory($g);this.floatingRef=t.create(s),i.attachView(this.floatingRef.hostView),this.floatingElem=this.floatingRef.hostView.rootNodes[0],document.body.appendChild(this.floatingElem),window.serverStatsFloating=this.floatingRef.instance,this.floatingRef.changeDetectorRef.detectChanges(),setTimeout(()=>this.floatingRef.instance.checkAndFetch(),100)}else{const t=n.resolveComponentFactory(Hg);this.bottomBarRef=t.create(s),i.attachView(this.bottomBarRef.hostView),this.bottomBarElem=this.bottomBarRef.hostView.rootNodes[0];const e=document.querySelector("app-root > div > .content");e?e.appendChild(this.bottomBarElem):document.body.appendChild(this.bottomBarElem),window.serverStatsBottomBar=this.bottomBarRef.instance,this.bottomBarRef.changeDetectorRef.detectChanges(),setTimeout(()=>this.bottomBarRef.instance.checkAndFetch(),100)}},r=()=>{var t,n;return(null===(n=null===(t=e.store.plugin)||void 0===t?void 0:t.serverStats)||void 0===n?void 0:n.displayMode)||"bottomBar"};e.ready$.subscribe(()=>{setTimeout(()=>{o(r())},500)}),e.changed$.subscribe(()=>{const t=r();(this.floatingRef?"floatingPanel":this.bottomBarRef?"bottomBar":null)!==t&&o(t)})}destroyComponents(){this.floatingRef&&(this.floatingRef.destroy(),this.floatingElem&&this.floatingElem.parentNode&&this.floatingElem.parentNode.removeChild(this.floatingElem),this.floatingRef=null,this.floatingElem=null,delete window.serverStatsFloating),this.bottomBarRef&&(this.bottomBarRef.destroy(),this.bottomBarElem&&this.bottomBarElem.parentNode&&this.bottomBarElem.parentNode.removeChild(this.bottomBarElem),this.bottomBarRef=null,this.bottomBarElem=null,delete window.serverStatsBottomBar)}};Zg=u([(0,m.NgModule)({imports:[b.CommonModule,y.FormsModule,Vg,wa(),_a],declarations:[$g,Hg,Ug],entryComponents:[$g,Hg,Ug],providers:[{provide:xa.ConfigProvider,useClass:Ag,multi:!0},{provide:xa.ToolbarButtonProvider,useClass:Bg,multi:!0},{provide:Da.SettingsTabProvider,useClass:qg,multi:!0},Lg]}),g("design:paramtypes",[xa.AppService,xa.ConfigService,m.ComponentFactoryResolver,m.ApplicationRef,m.Injector,"function"==typeof(Yg=void 0!==xa.TranslateService&&xa.TranslateService)?Yg:Object])],Zg);const Kg=Zg;return p})());
|
|
3
3
|
//# sourceMappingURL=index.js.map
|