@feedmepos/ui-library 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/{segmented-button/FmSegmentedButton.vue.d.ts → button-group/FmButtonGroup.vue.d.ts} +10 -10
- package/dist/components/date-picker/FmDatePicker.vue.d.ts +9 -0
- package/dist/components/date-range-picker/FmDateRangePicker.vue.d.ts +13 -0
- package/dist/components/form/stepper-field/FmStepperField.vue.d.ts +8 -8
- package/dist/federation/FmButtonGroup.vue_vue_type_script_setup_true_lang-658ba5f6.js +1 -0
- package/dist/federation/FmDatePicker-6608acc7.css +1 -0
- package/dist/federation/{FmDateRangePicker-fbfec16c.css → FmDateRangePicker-2b4b8a36.css} +1 -1
- package/dist/federation/{FmSelect-f4606242.css → FmSelect-a5b3f313.css} +1 -1
- package/dist/federation/{FmStepperField-c090d8f0.css → FmStepperField-9d4fae3f.css} +1 -1
- package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-09dbbc0b.js +1 -0
- package/dist/federation/FmTextarea.vue_vue_type_style_index_0_lang-021e2db6.js +1 -0
- package/dist/federation/__federation_expose_FmButtonGroup-3363a7b4.js +1 -0
- package/dist/federation/__federation_expose_FmDatePicker-c542d446.js +1 -0
- package/dist/federation/__federation_expose_FmDateRangePicker-6e0116bd.js +1 -0
- package/dist/federation/__federation_expose_FmSelect-b616883a.js +1 -0
- package/dist/federation/__federation_expose_FmStepperField-bdfe1136.js +1 -0
- package/dist/federation/{__federation_expose_FmTextField-8c2d6628.js → __federation_expose_FmTextField-58939c24.js} +1 -1
- package/dist/federation/{__federation_expose_FmTextarea-5ac95bc3.js → __federation_expose_FmTextarea-5184a353.js} +1 -1
- package/dist/federation/feedmepos-ui-components.js +1 -1
- package/dist/federation/index-389cc317.js +11 -0
- package/dist/feedmepos-ui-library.js +1269 -1253
- package/dist/feedmepos-ui-library.umd.cjs +6 -6
- package/dist/index.d.ts +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/federation/FmDatePicker-750315ee.css +0 -1
- package/dist/federation/FmSegmentedButton.vue_vue_type_script_setup_true_lang-4d380f2f.js +0 -1
- package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-5d5d5bb4.js +0 -1
- package/dist/federation/FmTextarea.vue_vue_type_style_index_0_lang-15e0775a.js +0 -1
- package/dist/federation/__federation_expose_FmDatePicker-d996afce.js +0 -1
- package/dist/federation/__federation_expose_FmDateRangePicker-1d6f07d7.js +0 -1
- package/dist/federation/__federation_expose_FmSegmentedButton-a3067813.js +0 -1
- package/dist/federation/__federation_expose_FmSelect-72ee36cc.js +0 -1
- package/dist/federation/__federation_expose_FmStepperField-7bafc481.js +0 -1
- package/dist/federation/index-863f6b27.js +0 -11
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var ug=Object.defineProperty;var pg=(N,c,
|
|
1
|
+
var ug=Object.defineProperty;var pg=(N,c,Lt)=>c in N?ug(N,c,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):N[c]=Lt;var B=(N,c,Lt)=>(pg(N,typeof c!="symbol"?c+"":c,Lt),Lt);(function(N,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],c):(N=typeof globalThis<"u"?globalThis:N||self,c(N["feedmepos-ui-library"]={},N.Vue,N.VueRouter))})(this,function(N,c,Lt){var Kn;"use strict";const mg="",Ja={class:"content-start flex flex-wrap gap-0 items-start max-w-full p-0"},Qa=["onMouseenter"],tr={key:0},er=c.defineComponent({__name:"FmBreadcrumb",props:{items:{}},setup(n){const t=n,e=Lt.useRoute(),i=Lt.useRouter();c.onMounted(async()=>{await i.isReady();const m=t.items.findIndex(g=>g.route==e.path);m!=-1&&!t.items[m].disabled&&(s.value=m)});const s=c.ref(-1),o=c.ref(-1),a=c.ref(" / "),r=c.ref("... /"),l=c.ref(!1),d=m=>s.value===m?"selected":o.value===m?"hovered":t.items[m].disabled?"disabled":"default",h=m=>{t.items[m].disabled||(s.value=m)},f=m=>m!=t.items.length-1,u=m=>!l.value&&t.items.length>5&&m>=2&&m<t.items.length-2,p=()=>{l.value=!l.value};return(m,g)=>{const b=c.resolveComponent("RouterLink");return c.openBlock(),c.createElementBlock("nav",null,[c.createElementVNode("ul",Ja,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(m.items,(y,_)=>(c.openBlock(),c.createElementBlock("li",{key:_,class:"empty:hidden flex gap-2 items-center justify-center pl-2 pr-0 py-1",onMouseenter:w=>o.value=_,onMouseleave:g[0]||(g[0]=w=>o.value=-1)},[u(_)?_===3&&!l.value?(c.openBlock(),c.createElementBlock("a",{key:1,onClick:p},c.toDisplayString(r.value),1)):c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(b,{key:0,class:c.normalizeClass(d(_)),to:y.disabled?"":y.route,onClick:w=>h(_)},{default:c.withCtx(()=>[c.createElementVNode("span",null,c.toDisplayString(y.label),1),f(_)?(c.openBlock(),c.createElementBlock("span",tr,c.toDisplayString(a.value),1)):c.createCommentVNode("",!0)]),_:2},1032,["class","to","onClick"]))],40,Qa))),128))])])}}}),gg="",nr=/^(#)((?:[A-Fa-f0-9]{3}){1,2})$/,ir=/^rgb[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*(?:,(?![)])|(?=[)]))){3}[)]$/,sr=/^^rgba[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*,){3}\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/,or=/^hsl[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*[)]$/,ar=/^hsla[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*,\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/;function Zn(n){return[nr,ir,sr,or,ar].some(t=>t.test(n))}const rr=c.defineComponent({__name:"FmIcon",props:{name:{type:String,required:!0},color:{type:String,default:"black"},outline:{type:Boolean,default:!1},size:{type:String,default:"md"}},setup(n){const t=n,e=c.computed(()=>{const o=[],a={};return o.push(i()),o.push(s()),Zn(t.color)?a.color=t.color:o.push(`text-fm-color-${t.color}`),{class:o.join(" "),style:a}});function i(){return`fm-icon--${t.outline?"outlined":"rounded"}`}function s(){return`fm-icon--${t.size}`}return(o,a)=>(c.openBlock(),c.createElementBlock("span",c.mergeProps(e.value,{class:"fm-icon"}),c.toDisplayString(t.name),17))}}),bg="",ot=(n,t)=>{const e=n.__vccOpts||n;for(const[i,s]of t)e[i]=s;return e},W=ot(rr,[["__scopeId","data-v-88e86ba4"]]),lr=["disabled","type"],cr={key:1,class:"fm-typo-body-lg-700"},dr=c.defineComponent({__name:"FmButton",props:{variant:{default:"primary"},label:{default:""},icon:{default:""},size:{default:"lg"},disabled:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},iconColor:{default:""},type:{default:"button"}},setup(n){const t=n,e=c.ref(!1),i=c.computed(()=>`${s[t.variant]} ${t.disabled?"cursor-not-allowed":"cursor-pointer"}`),s={primary:"bg-fm-color-primary text-fm-color-typo-white",secondary:"bg-transparent",destructive:"bg-fm-color-system-error-300 text-fm-color-white text-fm-color-typo-white",tertiary:"bg-transparent text-fm-color-primary",fab:"bg-fm-color-primary text-fm-color-white rounded-full text-fm-color-typo-white"};function o(a){e.value=a}return(a,r)=>{const l=c.resolveDirective("wave");return c.withDirectives((c.openBlock(),c.createElementBlock("button",{ref:"buttonEl",class:c.normalizeClass(`
|
|
2
2
|
fm-btn rounded-lg
|
|
3
3
|
${i.value}
|
|
4
4
|
fm-btn--${a.size}
|
|
5
5
|
${a.label?"":`fm-btn--${a.size}--just-icon`}
|
|
6
6
|
fm-btn--${a.variant}
|
|
7
7
|
${a.disabled?"fm-btn--disabled":""}
|
|
8
|
-
`),disabled:a.disabled,type:a.type,onMousedown:r[0]||(r[0]=()=>o(!0)),onMouseup:r[1]||(r[1]=()=>o(!1)),onMouseleave:r[2]||(r[2]=()=>o(!1))},[a.icon?(c.openBlock(),c.createBlock(W,{key:0,name:a.icon,outline:!e.value,color:a.disabled?"neutral-gray-200":a.iconColor??"",size:"md"},null,8,["name","outline","color"])):c.createCommentVNode("",!0),a.label?(c.openBlock(),c.createElementBlock("span",cr,c.toDisplayString(a.label),1)):c.createCommentVNode("",!0)],42,lr)),[[l,!a.disabled]])}}}),yg=""
|
|
8
|
+
`),disabled:a.disabled,type:a.type,onMousedown:r[0]||(r[0]=()=>o(!0)),onMouseup:r[1]||(r[1]=()=>o(!1)),onMouseleave:r[2]||(r[2]=()=>o(!1))},[a.icon?(c.openBlock(),c.createBlock(W,{key:0,name:a.icon,outline:!e.value,color:a.disabled?"neutral-gray-200":a.iconColor??"",size:"md"},null,8,["name","outline","color"])):c.createCommentVNode("",!0),a.label?(c.openBlock(),c.createElementBlock("span",cr,c.toDisplayString(a.label),1)):c.createCommentVNode("",!0)],42,lr)),[[l,!a.disabled]])}}}),yg="",$t=ot(dr,[["__scopeId","data-v-e62833de"]]),hr={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},fr=["v-wave","disabled","onClick","onMousedown"],ur=c.defineComponent({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=l=>{t("update:modelValue",l)},s=c.ref(null),o=l=>{s.value=l},a=l=>l.disabled||e.disabled,r=l=>JSON.stringify(l)===JSON.stringify(e.modelValue);return(l,d)=>(c.openBlock(),c.createElementBlock("div",hr,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.items,(h,f)=>(c.openBlock(),c.createElementBlock("button",{key:f,"v-wave":a(h),class:c.normalizeClass(["border-r flex gap-8 grow hover:bg-fm-color-neutral-gray-200 items-center justify-center last:border-r-0 px-[11px] py-[7px]",{"bg-fm-color-system-warning-100 hover:bg-fm-color-system-warning-100":r(h),"hover:bg-fm-color-neutral-white cursor-not-allowed":a(h)}]),disabled:a(h),onClick:u=>i(h),onMousedown:u=>o(h),onMouseup:d[0]||(d[0]=u=>o(null)),onMouseleave:d[1]||(d[1]=u=>o(null))},[h.icon?(c.openBlock(),c.createBlock(W,{key:0,name:h.icon,size:"md",color:a(h)?"neutral-gray-200":r(h)?"primary":"",outline:JSON.stringify(s.value)!==JSON.stringify(h)&&!r(h)},null,8,["name","color","outline"])):c.createCommentVNode("",!0),h.label?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(["fm-typo-body-lg-700",[a(h)?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},c.toDisplayString(h.label),3)):c.createCommentVNode("",!0)],42,fr))),128))]))}}),pr={class:"grow"},Qi=c.defineComponent({__name:"FmCardTitle",props:{padding:{type:String,default:"p-16"}},setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["fm-card-title",n.padding])},[c.createElementVNode("div",pr,[c.renderSlot(t.$slots,"default")]),c.renderSlot(t.$slots,"actions")],2))}}),mr={class:"fm-typo-title-md-700 grow"},gr=c.defineComponent({__name:"FmCard",props:{title:{type:String,default:void 0},variant:{type:String,default:"elevated"},horizontal:{type:Boolean,default:!1}},setup(n){const t=n,e=c.useSlots();return(i,s)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["fm-card",`${n.variant==="elevated"?"fm-shadow-light-400":"border-1"} ${n.horizontal?"fm-card--horizontal":""}`])},[c.renderSlot(i.$slots,"header",{title:t.title},()=>[n.title||c.unref(e)["header-title"]||c.unref(e)["header-actions"]?(c.openBlock(),c.createBlock(Qi,{key:0},{actions:c.withCtx(()=>[c.renderSlot(i.$slots,"header-actions")]),default:c.withCtx(()=>[c.createElementVNode("div",null,[c.renderSlot(i.$slots,"header-title",{title:t.title},()=>[c.createElementVNode("div",mr,c.toDisplayString(t.title),1)])])]),_:3})):c.createCommentVNode("",!0)]),c.renderSlot(i.$slots,"default"),c.renderSlot(i.$slots,"actions")],2))}}),_g="",br=c.defineComponent({__name:"FmCardActions",props:{alignment:{type:String,default:"right"},padding:{type:String,default:"p-16"}},setup(n){const t=n,e=c.computed(()=>{switch(t.alignment){case"left":return"justify-start";case"right":return"justify-end";case"center":return"justify-center";default:return""}});return(i,s)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["fm-card-actions",`${e.value} ${n.padding}`])},[c.renderSlot(i.$slots,"default")],2))}}),yr=c.defineComponent({__name:"FmCardSection",props:{padding:{type:String,default:"p-16"}},setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["fm-card-section",n.padding])},[c.renderSlot(t.$slots,"default")],2))}});/*!
|
|
9
9
|
* @kurkle/color v0.3.2
|
|
10
10
|
* https://github.com/kurkle/color#readme
|
|
11
11
|
* (c) 2023 Jukka Kurkela
|
|
12
12
|
* Released under the MIT License
|
|
13
|
-
*/function we(n){return n+.5|0}const
|
|
13
|
+
*/function we(n){return n+.5|0}const Nt=(n,t,e)=>Math.max(Math.min(n,e),t);function Ce(n){return Nt(we(n*2.55),0,255)}function Rt(n){return Nt(we(n*255),0,255)}function St(n){return Nt(we(n/2.55)/100,0,1)}function ts(n){return Nt(we(n*100),0,100)}const mt={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},Jn=[..."0123456789ABCDEF"],_r=n=>Jn[n&15],xr=n=>Jn[(n&240)>>4]+Jn[n&15],sn=n=>(n&240)>>4===(n&15),kr=n=>sn(n.r)&&sn(n.g)&&sn(n.b)&&sn(n.a);function wr(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&mt[n[1]]*17,g:255&mt[n[2]]*17,b:255&mt[n[3]]*17,a:t===5?mt[n[4]]*17:255}:(t===7||t===9)&&(e={r:mt[n[1]]<<4|mt[n[2]],g:mt[n[3]]<<4|mt[n[4]],b:mt[n[5]]<<4|mt[n[6]],a:t===9?mt[n[7]]<<4|mt[n[8]]:255})),e}const Cr=(n,t)=>n<255?t(n):"";function Sr(n){var t=kr(n)?_r:xr;return n?"#"+t(n.r)+t(n.g)+t(n.b)+Cr(n.a,t):void 0}const Mr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function es(n,t,e){const i=t*Math.min(e,1-e),s=(o,a=(o+n/30)%12)=>e-i*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)]}function vr(n,t,e){const i=(s,o=(s+n/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function Dr(n,t,e){const i=es(n,1,.5);let s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)i[s]*=1-t-e,i[s]+=t;return i}function Er(n,t,e,i,s){return n===s?(t-e)/i+(t<e?6:0):t===s?(e-n)/i+2:(n-t)/i+4}function Qn(n){const e=n.r/255,i=n.g/255,s=n.b/255,o=Math.max(e,i,s),a=Math.min(e,i,s),r=(o+a)/2;let l,d,h;return o!==a&&(h=o-a,d=r>.5?h/(2-o-a):h/(o+a),l=Er(e,i,s,h,o),l=l*60+.5),[l|0,d||0,r]}function ti(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(Rt)}function ei(n,t,e){return ti(es,n,t,e)}function Br(n,t,e){return ti(Dr,n,t,e)}function Vr(n,t,e){return ti(vr,n,t,e)}function ns(n){return(n%360+360)%360}function Pr(n){const t=Mr.exec(n);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?Ce(+t[5]):Rt(+t[5]));const s=ns(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?i=Br(s,o,a):t[1]==="hsv"?i=Vr(s,o,a):i=ei(s,o,a),{r:i[0],g:i[1],b:i[2],a:e}}function Or(n,t){var e=Qn(n);e[0]=ns(e[0]+t),e=ei(e),n.r=e[0],n.g=e[1],n.b=e[2]}function Tr(n){if(!n)return;const t=Qn(n),e=t[0],i=ts(t[1]),s=ts(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${s}%, ${St(n.a)})`:`hsl(${e}, ${i}%, ${s}%)`}const is={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"},ss={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"};function Fr(){const n={},t=Object.keys(ss),e=Object.keys(is);let i,s,o,a,r;for(i=0;i<t.length;i++){for(a=r=t[i],s=0;s<e.length;s++)o=e[s],r=r.replace(o,is[o]);o=parseInt(ss[a],16),n[r]=[o>>16&255,o>>8&255,o&255]}return n}let on;function Ar(n){on||(on=Fr(),on.transparent=[0,0,0,0]);const t=on[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Lr=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function $r(n){const t=Lr.exec(n);let e=255,i,s,o;if(t){if(t[7]!==i){const a=+t[7];e=t[8]?Ce(a):Nt(a*255,0,255)}return i=+t[1],s=+t[3],o=+t[5],i=255&(t[2]?Ce(i):Nt(i,0,255)),s=255&(t[4]?Ce(s):Nt(s,0,255)),o=255&(t[6]?Ce(o):Nt(o,0,255)),{r:i,g:s,b:o,a:e}}}function Nr(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${St(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const ni=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,fe=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function Rr(n,t,e){const i=fe(St(n.r)),s=fe(St(n.g)),o=fe(St(n.b));return{r:Rt(ni(i+e*(fe(St(t.r))-i))),g:Rt(ni(s+e*(fe(St(t.g))-s))),b:Rt(ni(o+e*(fe(St(t.b))-o))),a:n.a+e*(t.a-n.a)}}function an(n,t,e){if(n){let i=Qn(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=ei(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function os(n,t){return n&&Object.assign(t||{},n)}function as(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=Rt(n[3]))):(t=os(n,{r:0,g:0,b:0,a:1}),t.a=Rt(t.a)),t}function Ir(n){return n.charAt(0)==="r"?$r(n):Pr(n)}class Se{constructor(t){if(t instanceof Se)return t;const e=typeof t;let i;e==="object"?i=as(t):e==="string"&&(i=wr(t)||Ar(t)||Ir(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=os(this._rgb);return t&&(t.a=St(t.a)),t}set rgb(t){this._rgb=as(t)}rgbString(){return this._valid?Nr(this._rgb):void 0}hexString(){return this._valid?Sr(this._rgb):void 0}hslString(){return this._valid?Tr(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,l=i.a-s.a,d=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-d,i.r=255&d*i.r+o*s.r+.5,i.g=255&d*i.g+o*s.g+.5,i.b=255&d*i.b+o*s.b+.5,i.a=a*i.a+(1-a)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=Rr(this._rgb,t._rgb,e)),this}clone(){return new Se(this.rgb)}alpha(t){return this._rgb.a=Rt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=we(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.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 an(this._rgb,2,t),this}darken(t){return an(this._rgb,2,-t),this}saturate(t){return an(this._rgb,1,t),this}desaturate(t){return an(this._rgb,1,-t),this}rotate(t){return Or(this._rgb,t),this}}/*!
|
|
14
14
|
* Chart.js v4.4.0
|
|
15
15
|
* https://www.chartjs.org
|
|
16
16
|
* (c) 2023 Chart.js Contributors
|
|
17
17
|
* Released under the MIT License
|
|
18
|
-
*/function Mt(){}const Nr=(()=>{let n=0;return()=>n++})();function z(n){return n===null||typeof n>"u"}function q(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function I(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function J(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function ft(n,t){return J(n)?n:t}function R(n,t){return typeof n>"u"?t:n}const Rr=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,rs=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function U(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function j(n,t,e,i){let s,o,a;if(q(n))if(o=n.length,i)for(s=o-1;s>=0;s--)t.call(e,n[s],s);else for(s=0;s<o;s++)t.call(e,n[s],s);else if(I(n))for(a=Object.keys(n),o=a.length,s=0;s<o;s++)t.call(e,n[a[s]],a[s])}function rn(n,t){let e,i,s,o;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(s=n[e],o=t[e],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function ln(n){if(q(n))return n.map(ln);if(I(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let s=0;for(;s<i;++s)t[e[s]]=ln(n[e[s]]);return t}return n}function ls(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function Ir(n,t,e,i){if(!ls(n))return;const s=t[n],o=e[n];I(s)&&I(o)?Me(s,o,i):t[n]=ln(o)}function Me(n,t,e){const i=q(t)?t:[t],s=i.length;if(!I(n))return n;e=e||{};const o=e.merger||Ir;let a;for(let r=0;r<s;++r){if(a=i[r],!I(a))continue;const l=Object.keys(a);for(let d=0,h=l.length;d<h;++d)o(l[d],n,a,e)}return n}function ve(n,t){return Me(n,t,{merger:zr})}function zr(n,t,e){if(!ls(n))return;const i=t[n],s=e[n];I(i)&&I(s)?ve(i,s):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=ln(s))}const cs={"":n=>n,x:n=>n.x,y:n=>n.y};function Wr(n){const t=n.split("."),e=[];let i="";for(const s of t)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Hr(n){const t=Wr(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function Rt(n,t){return(cs[t]||(cs[t]=Hr(t)))(n)}function ii(n){return n.charAt(0).toUpperCase()+n.slice(1)}const De=n=>typeof n<"u",It=n=>typeof n=="function",ds=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function jr(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const K=Math.PI,G=2*K,Yr=G+K,cn=Number.POSITIVE_INFINITY,Ur=K/180,et=K/2,Gt=K/4,hs=K*2/3,zt=Math.log10,xt=Math.sign;function Ee(n,t,e){return Math.abs(n-t)<e}function fs(n){const t=Math.round(n);n=Ee(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(zt(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Xr(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((s,o)=>s-o).pop(),t}function fe(n){return!isNaN(parseFloat(n))&&isFinite(n)}function qr(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function us(n,t,e){let i,s,o;for(i=0,s=n.length;i<s;i++)o=n[i][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function yt(n){return n*(K/180)}function si(n){return n*(180/K)}function ps(n){if(!J(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function ms(n,t){const e=t.x-n.x,i=t.y-n.y,s=Math.sqrt(e*e+i*i);let o=Math.atan2(i,e);return o<-.5*K&&(o+=G),{angle:o,distance:s}}function oi(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Kr(n,t){return(n-t+Yr)%G-K}function ut(n){return(n%G+G)%G}function Be(n,t,e,i){const s=ut(n),o=ut(t),a=ut(e),r=ut(o-s),l=ut(a-s),d=ut(s-o),h=ut(s-a);return s===o||s===a||i&&o===a||r>l&&d<h}function it(n,t,e){return Math.max(t,Math.min(e,n))}function Gr(n){return it(n,-32768,32767)}function vt(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function ai(n,t,e){e=e||(a=>n[a]<t);let i=n.length-1,s=0,o;for(;i-s>1;)o=s+i>>1,e(o)?s=o:i=o;return{lo:s,hi:i}}const Dt=(n,t,e,i)=>ai(n,e,i?s=>{const o=n[s][t];return o<e||o===e&&n[s+1][t]===e}:s=>n[s][t]<e),Zr=(n,t,e)=>ai(n,e,i=>n[i][t]>=e);function Jr(n,t,e){let i=0,s=n.length;for(;i<s&&n[i]<t;)i++;for(;s>i&&n[s-1]>e;)s--;return i>0||s<n.length?n.slice(i,s):n}const gs=["push","pop","shift","splice","unshift"];function Qr(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),gs.forEach(e=>{const i="_onData"+ii(e),s=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...o){const a=s.apply(this,o);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...o)}),a}})})}function bs(n,t){const e=n._chartjs;if(!e)return;const i=e.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(gs.forEach(o=>{delete n[o]}),delete n._chartjs)}function ys(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const _s=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function xs(n,t){let e=[],i=!1;return function(...s){e=s,i||(i=!0,_s.call(window,()=>{i=!1,n.apply(t,e)}))}}function tl(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const ri=n=>n==="start"?"left":n==="end"?"right":"center",at=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,el=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function ks(n,t,e){const i=t.length;let s=0,o=i;if(n._sorted){const{iScale:a,_parsed:r}=n,l=a.axis,{min:d,max:h,minDefined:f,maxDefined:u}=a.getUserBounds();f&&(s=it(Math.min(Dt(r,l,d).lo,e?i:Dt(t,l,a.getPixelForValue(d)).lo),0,i-1)),u?o=it(Math.max(Dt(r,a.axis,h,!0).hi+1,e?0:Dt(t,l,a.getPixelForValue(h),!0).hi+1),s,i)-s:o=i-s}return{start:s,count:o}}function ws(n){const{xScale:t,yScale:e,_scaleRanges:i}=n,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=s,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,s),o}const dn=n=>n===0||n===1,Cs=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*G/e)),Ss=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*G/e)+1,Ve={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*et)+1,easeOutSine:n=>Math.sin(n*et),easeInOutSine:n=>-.5*(Math.cos(K*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>dn(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>dn(n)?n:Cs(n,.075,.3),easeOutElastic:n=>dn(n)?n:Ss(n,.075,.3),easeInOutElastic(n){return dn(n)?n:n<.5?.5*Cs(n*2,.1125,.45):.5+.5*Ss(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-Ve.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?Ve.easeInBounce(n*2)*.5:Ve.easeOutBounce(n*2-1)*.5+.5};function li(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ms(n){return li(n)?n:new Se(n)}function ci(n){return li(n)?n:new Se(n).saturate(.5).darken(.1).hexString()}const nl=["x","y","borderWidth","radius","tension"],il=["color","borderColor","backgroundColor"];function sl(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:il},numbers:{type:"number",properties:nl}}),n.describe("animations",{_fallback:"animation"}),n.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=>t|0}}}})}function ol(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const vs=new Map;function al(n,t){t=t||{};const e=n+JSON.stringify(t);let i=vs.get(e);return i||(i=new Intl.NumberFormat(n,t),vs.set(e,i)),i}function Pe(n,t,e){return al(t,e).format(n)}const Ds={values(n){return q(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let s,o=n;if(e.length>1){const d=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(d<1e-4||d>1e15)&&(s="scientific"),o=rl(n,e)}const a=zt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Pe(n,i,l)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(zt(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Ds.numeric.call(this,n,t,e):""}};function rl(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var hn={formatters:Ds};function ll(n){n.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:hn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Zt=Object.create(null),di=Object.create(null);function Oe(n,t){if(!t)return n;const e=t.split(".");for(let i=0,s=e.length;i<s;++i){const o=e[i];n=n[o]||(n[o]=Object.create(null))}return n}function hi(n,t,e){return typeof t=="string"?Me(Oe(n,t),e):Me(Oe(n,""),t)}class cl{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=i=>i.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=(i,s)=>ci(s.backgroundColor),this.hoverBorderColor=(i,s)=>ci(s.borderColor),this.hoverColor=(i,s)=>ci(s.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 hi(this,t,e)}get(t){return Oe(this,t)}describe(t,e){return hi(di,t,e)}override(t,e){return hi(Zt,t,e)}route(t,e,i,s){const o=Oe(this,t),a=Oe(this,i),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],d=a[s];return I(l)?Object.assign({},d,l):R(l,d)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var Q=new cl({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[sl,ol,ll]);function dl(n){return!n||z(n.size)||z(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function fn(n,t,e,i,s){let o=t[s];return o||(o=t[s]=n.measureText(s).width,e.push(s)),o>i&&(i=o),i}function hl(n,t,e,i){i=i||{};let s=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(s=i.data={},o=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let a=0;const r=e.length;let l,d,h,f,u;for(l=0;l<r;l++)if(f=e[l],f!=null&&!q(f))a=fn(n,s,o,a,f);else if(q(f))for(d=0,h=f.length;d<h;d++)u=f[d],u!=null&&!q(u)&&(a=fn(n,s,o,a,u));n.restore();const p=o.length/2;if(p>e.length){for(l=0;l<p;l++)delete s[o[l]];o.splice(0,p)}return a}function Jt(n,t,e){const i=n.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*i)/i+s}function Es(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function fi(n,t,e,i){Bs(n,t,e,i,null)}function Bs(n,t,e,i,s){let o,a,r,l,d,h,f,u;const p=t.pointStyle,m=t.rotation,g=t.radius;let b=(m||0)*Ur;if(p&&typeof p=="object"&&(o=p.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(b),n.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),n.restore();return}if(!(isNaN(g)||g<=0)){switch(n.beginPath(),p){default:s?n.ellipse(e,i,s/2,g,0,0,G):n.arc(e,i,g,0,G),n.closePath();break;case"triangle":h=s?s/2:g,n.moveTo(e+Math.sin(b)*h,i-Math.cos(b)*g),b+=hs,n.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*g),b+=hs,n.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*g),n.closePath();break;case"rectRounded":d=g*.516,l=g-d,a=Math.cos(b+Gt)*l,f=Math.cos(b+Gt)*(s?s/2-d:l),r=Math.sin(b+Gt)*l,u=Math.sin(b+Gt)*(s?s/2-d:l),n.arc(e-f,i-r,d,b-K,b-et),n.arc(e+u,i-a,d,b-et,b),n.arc(e+f,i+r,d,b,b+et),n.arc(e-u,i+a,d,b+et,b+K),n.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*g,h=s?s/2:l,n.rect(e-h,i-l,2*h,2*l);break}b+=Gt;case"rectRot":f=Math.cos(b)*(s?s/2:g),a=Math.cos(b)*g,r=Math.sin(b)*g,u=Math.sin(b)*(s?s/2:g),n.moveTo(e-f,i-r),n.lineTo(e+u,i-a),n.lineTo(e+f,i+r),n.lineTo(e-u,i+a),n.closePath();break;case"crossRot":b+=Gt;case"cross":f=Math.cos(b)*(s?s/2:g),a=Math.cos(b)*g,r=Math.sin(b)*g,u=Math.sin(b)*(s?s/2:g),n.moveTo(e-f,i-r),n.lineTo(e+f,i+r),n.moveTo(e+u,i-a),n.lineTo(e-u,i+a);break;case"star":f=Math.cos(b)*(s?s/2:g),a=Math.cos(b)*g,r=Math.sin(b)*g,u=Math.sin(b)*(s?s/2:g),n.moveTo(e-f,i-r),n.lineTo(e+f,i+r),n.moveTo(e+u,i-a),n.lineTo(e-u,i+a),b+=Gt,f=Math.cos(b)*(s?s/2:g),a=Math.cos(b)*g,r=Math.sin(b)*g,u=Math.sin(b)*(s?s/2:g),n.moveTo(e-f,i-r),n.lineTo(e+f,i+r),n.moveTo(e+u,i-a),n.lineTo(e-u,i+a);break;case"line":a=s?s/2:Math.cos(b)*g,r=Math.sin(b)*g,n.moveTo(e-a,i-r),n.lineTo(e+a,i+r);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(b)*(s?s/2:g),i+Math.sin(b)*g);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function Et(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function un(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function pn(n){n.restore()}function fl(n,t,e,i,s){if(!t)return n.lineTo(e.x,e.y);if(s==="middle"){const o=(t.x+e.x)/2;n.lineTo(o,t.y),n.lineTo(o,e.y)}else s==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function ul(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function pl(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),z(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function ml(n,t,e,i,s){if(s.strikethrough||s.underline){const o=n.measureText(i),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,d=e+o.actualBoundingBoxDescent,h=s.strikethrough?(l+d)/2:d;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(a,h),n.lineTo(r,h),n.stroke()}}function gl(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function Qt(n,t,e,i,s,o={}){const a=q(t)?t:[t],r=o.strokeWidth>0&&o.strokeColor!=="";let l,d;for(n.save(),n.font=s.string,pl(n,o),l=0;l<a.length;++l)d=a[l],o.backdrop&&gl(n,o.backdrop),r&&(o.strokeColor&&(n.strokeStyle=o.strokeColor),z(o.strokeWidth)||(n.lineWidth=o.strokeWidth),n.strokeText(d,e,i,o.maxWidth)),n.fillText(d,e,i,o.maxWidth),ml(n,e,i,d,o),i+=Number(s.lineHeight);n.restore()}function Te(n,t){const{x:e,y:i,w:s,h:o,radius:a}=t;n.arc(e+a.topLeft,i+a.topLeft,a.topLeft,1.5*K,K,!0),n.lineTo(e,i+o-a.bottomLeft),n.arc(e+a.bottomLeft,i+o-a.bottomLeft,a.bottomLeft,K,et,!0),n.lineTo(e+s-a.bottomRight,i+o),n.arc(e+s-a.bottomRight,i+o-a.bottomRight,a.bottomRight,et,0,!0),n.lineTo(e+s,i+a.topRight),n.arc(e+s-a.topRight,i+a.topRight,a.topRight,0,-et,!0),n.lineTo(e+a.topLeft,i)}const bl=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,yl=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function _l(n,t){const e=(""+n).match(bl);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const xl=n=>+n||0;function ui(n,t){const e={},i=I(t),s=i?Object.keys(t):t,o=I(n)?i?a=>R(n[a],n[t[a]]):a=>n[a]:()=>n;for(const a of s)e[a]=xl(o(a));return e}function Vs(n){return ui(n,{top:"y",right:"x",bottom:"y",left:"x"})}function te(n){return ui(n,["topLeft","topRight","bottomLeft","bottomRight"])}function rt(n){const t=Vs(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function nt(n,t){n=n||{},t=t||Q.font;let e=R(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=R(n.style,t.style);i&&!(""+i).match(yl)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:R(n.family,t.family),lineHeight:_l(R(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:R(n.weight,t.weight),string:""};return s.string=dl(s),s}function Fe(n,t,e,i){let s=!0,o,a,r;for(o=0,a=n.length;o<a;++o)if(r=n[o],r!==void 0&&(t!==void 0&&typeof r=="function"&&(r=r(t),s=!1),e!==void 0&&q(r)&&(r=r[e%r.length],s=!1),r!==void 0))return i&&!s&&(i.cacheable=!1),r}function kl(n,t,e){const{min:i,max:s}=n,o=rs(t,(s-i)/2),a=(r,l)=>e&&r===0?0:r+l;return{min:a(i,-Math.abs(o)),max:a(s,o)}}function Wt(n,t){return Object.assign(Object.create(n),t)}function pi(n,t=[""],e,i,s=()=>n[0]){const o=e||n;typeof i>"u"&&(i=As("_fallback",n));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:o,_fallback:i,_getTarget:s,override:r=>pi([r,...n],t,o,i)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete n[0][l],!0},get(r,l){return Os(r,l,()=>Bl(l,t,n,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(r,l){return Ls(r).includes(l)},ownKeys(r){return Ls(r)},set(r,l,d){const h=r._storage||(r._storage=s());return r[l]=h[l]=d,delete r._keys,!0}})}function ue(n,t,e,i){const s={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Ps(n,i),setContext:o=>ue(n,o,e,i),override:o=>ue(n.override(o),t,e,i)};return new Proxy(s,{deleteProperty(o,a){return delete o[a],delete n[a],!0},get(o,a,r){return Os(o,a,()=>Cl(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(n,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,a)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(o,a){return Reflect.has(n,a)},ownKeys(){return Reflect.ownKeys(n)},set(o,a,r){return n[a]=r,delete o[a],!0}})}function Ps(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=n;return{allKeys:s,scriptable:e,indexable:i,isScriptable:It(e)?e:()=>e,isIndexable:It(i)?i:()=>i}}const wl=(n,t)=>n?n+ii(t):t,mi=(n,t)=>I(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Os(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t))return n[t];const i=e();return n[t]=i,i}function Cl(n,t,e){const{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n;let r=i[t];return It(r)&&a.isScriptable(t)&&(r=Sl(t,r,n,e)),q(r)&&r.length&&(r=Ml(t,r,n,a.isIndexable)),mi(t,r)&&(r=ue(r,s,o&&o[t],a)),r}function Sl(n,t,e,i){const{_proxy:s,_context:o,_subProxy:a,_stack:r}=e;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);r.add(n);let l=t(o,a||i);return r.delete(n),mi(n,l)&&(l=gi(s._scopes,s,n,l)),l}function Ml(n,t,e,i){const{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&i(n))return t[o.index%t.length];if(I(t[0])){const l=t,d=s._scopes.filter(h=>h!==l);t=[];for(const h of l){const f=gi(d,s,n,h);t.push(ue(f,o,a&&a[n],r))}}return t}function Ts(n,t,e){return It(n)?n(t,e):n}const vl=(n,t)=>n===!0?t:typeof n=="string"?Rt(t,n):void 0;function Dl(n,t,e,i,s){for(const o of t){const a=vl(e,o);if(a){n.add(a);const r=Ts(a._fallback,e,s);if(typeof r<"u"&&r!==e&&r!==i)return r}else if(a===!1&&typeof i<"u"&&e!==i)return null}return!1}function gi(n,t,e,i){const s=t._rootScopes,o=Ts(t._fallback,e,i),a=[...n,...s],r=new Set;r.add(i);let l=Fs(r,a,e,o||e,i);return l===null||typeof o<"u"&&o!==e&&(l=Fs(r,a,o,l,i),l===null)?!1:pi(Array.from(r),[""],s,o,()=>El(t,e,i))}function Fs(n,t,e,i,s){for(;e;)e=Dl(n,t,e,i,s);return e}function El(n,t,e){const i=n._getTarget();t in i||(i[t]={});const s=i[t];return q(s)&&I(e)?e:s||{}}function Bl(n,t,e,i){let s;for(const o of t)if(s=As(wl(o,n),e),typeof s<"u")return mi(n,s)?gi(e,i,n,s):s}function As(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function Ls(n){let t=n._keys;return t||(t=n._keys=Vl(n._scopes)),t}function Vl(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}function $s(n,t,e,i){const{iScale:s}=n,{key:o="r"}=this._parsing,a=new Array(i);let r,l,d,h;for(r=0,l=i;r<l;++r)d=r+e,h=t[d],a[r]={r:s.parse(Rt(h,o),d)};return a}const Pl=Number.EPSILON||1e-14,pe=(n,t)=>t<n.length&&!n[t].skip&&n[t],Ns=n=>n==="x"?"y":"x";function Ol(n,t,e,i){const s=n.skip?t:n,o=t,a=e.skip?t:e,r=oi(o,s),l=oi(a,o);let d=r/(r+l),h=l/(r+l);d=isNaN(d)?0:d,h=isNaN(h)?0:h;const f=i*d,u=i*h;return{previous:{x:o.x-f*(a.x-s.x),y:o.y-f*(a.y-s.y)},next:{x:o.x+u*(a.x-s.x),y:o.y+u*(a.y-s.y)}}}function Tl(n,t,e){const i=n.length;let s,o,a,r,l,d=pe(n,0);for(let h=0;h<i-1;++h)if(l=d,d=pe(n,h+1),!(!l||!d)){if(Ee(t[h],0,Pl)){e[h]=e[h+1]=0;continue}s=e[h]/t[h],o=e[h+1]/t[h],r=Math.pow(s,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),e[h]=s*a*t[h],e[h+1]=o*a*t[h])}}function Fl(n,t,e="x"){const i=Ns(e),s=n.length;let o,a,r,l=pe(n,0);for(let d=0;d<s;++d){if(a=r,r=l,l=pe(n,d+1),!r)continue;const h=r[e],f=r[i];a&&(o=(h-a[e])/3,r[`cp1${e}`]=h-o,r[`cp1${i}`]=f-o*t[d]),l&&(o=(l[e]-h)/3,r[`cp2${e}`]=h+o,r[`cp2${i}`]=f+o*t[d])}}function Al(n,t="x"){const e=Ns(t),i=n.length,s=Array(i).fill(0),o=Array(i);let a,r,l,d=pe(n,0);for(a=0;a<i;++a)if(r=l,l=d,d=pe(n,a+1),!!l){if(d){const h=d[t]-l[t];s[a]=h!==0?(d[e]-l[e])/h:0}o[a]=r?d?xt(s[a-1])!==xt(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a]}Tl(n,s,o),Fl(n,o,t)}function mn(n,t,e){return Math.max(Math.min(n,e),t)}function Ll(n,t){let e,i,s,o,a,r=Et(n[0],t);for(e=0,i=n.length;e<i;++e)a=o,o=r,r=e<i-1&&Et(n[e+1],t),o&&(s=n[e],a&&(s.cp1x=mn(s.cp1x,t.left,t.right),s.cp1y=mn(s.cp1y,t.top,t.bottom)),r&&(s.cp2x=mn(s.cp2x,t.left,t.right),s.cp2y=mn(s.cp2y,t.top,t.bottom)))}function $l(n,t,e,i,s){let o,a,r,l;if(t.spanGaps&&(n=n.filter(d=>!d.skip)),t.cubicInterpolationMode==="monotone")Al(n,s);else{let d=i?n[n.length-1]:n[0];for(o=0,a=n.length;o<a;++o)r=n[o],l=Ol(d,r,n[Math.min(o+1,a-(i?0:1))%a],t.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,d=r}t.capBezierPoints&&Ll(n,e)}function Rs(){return typeof window<"u"&&typeof document<"u"}function bi(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function gn(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const bn=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function Nl(n,t){return bn(n).getPropertyValue(t)}const Rl=["top","right","bottom","left"];function ee(n,t,e){const i={};e=e?"-"+e:"";for(let s=0;s<4;s++){const o=Rl[s];i[o]=parseFloat(n[t+"-"+o+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Il=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function zl(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:s,offsetY:o}=i;let a=!1,r,l;if(Il(s,o,n.target))r=s,l=o;else{const d=t.getBoundingClientRect();r=i.clientX-d.left,l=i.clientY-d.top,a=!0}return{x:r,y:l,box:a}}function ne(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,s=bn(e),o=s.boxSizing==="border-box",a=ee(s,"padding"),r=ee(s,"border","width"),{x:l,y:d,box:h}=zl(n,e),f=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:p,height:m}=t;return o&&(p-=a.width+r.width,m-=a.height+r.height),{x:Math.round((l-f)/p*e.width/i),y:Math.round((d-u)/m*e.height/i)}}function Wl(n,t,e){let i,s;if(t===void 0||e===void 0){const o=bi(n);if(!o)t=n.clientWidth,e=n.clientHeight;else{const a=o.getBoundingClientRect(),r=bn(o),l=ee(r,"border","width"),d=ee(r,"padding");t=a.width-d.width-l.width,e=a.height-d.height-l.height,i=gn(r.maxWidth,o,"clientWidth"),s=gn(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:i||cn,maxHeight:s||cn}}const yn=n=>Math.round(n*10)/10;function Hl(n,t,e,i){const s=bn(n),o=ee(s,"margin"),a=gn(s.maxWidth,n,"clientWidth")||cn,r=gn(s.maxHeight,n,"clientHeight")||cn,l=Wl(n,t,e);let{width:d,height:h}=l;if(s.boxSizing==="content-box"){const u=ee(s,"border","width"),p=ee(s,"padding");d-=p.width+u.width,h-=p.height+u.height}return d=Math.max(0,d-o.width),h=Math.max(0,i?d/i:h-o.height),d=yn(Math.min(d,a,l.maxWidth)),h=yn(Math.min(h,r,l.maxHeight)),d&&!h&&(h=yn(d/2)),(t!==void 0||e!==void 0)&&i&&l.height&&h>l.height&&(h=l.height,d=yn(Math.floor(h*i))),{width:d,height:h}}function Is(n,t,e){const i=t||1,s=Math.floor(n.height*i),o=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const a=n.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${n.height}px`,a.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||a.height!==s||a.width!==o?(n.currentDevicePixelRatio=i,a.height=s,a.width=o,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const jl=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return n}();function zs(n,t){const e=Nl(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function ie(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Yl(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Ul(n,t,e,i){const s={x:n.cp2x,y:n.cp2y},o={x:t.cp1x,y:t.cp1y},a=ie(n,s,e),r=ie(s,o,e),l=ie(o,t,e),d=ie(a,r,e),h=ie(r,l,e);return ie(d,h,e)}const Xl=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},ql=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function me(n,t,e){return n?Xl(t,e):ql()}function Ws(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function Hs(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function js(n){return n==="angle"?{between:Be,compare:Kr,normalize:ut}:{between:vt,compare:(t,e)=>t-e,normalize:t=>t}}function Ys({start:n,end:t,count:e,loop:i,style:s}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:s}}function Kl(n,t,e){const{property:i,start:s,end:o}=e,{between:a,normalize:r}=js(i),l=t.length;let{start:d,end:h,loop:f}=n,u,p;if(f){for(d+=l,h+=l,u=0,p=l;u<p&&a(r(t[d%l][i]),s,o);++u)d--,h--;d%=l,h%=l}return h<d&&(h+=l),{start:d,end:h,loop:f,style:n.style}}function Us(n,t,e){if(!e)return[n];const{property:i,start:s,end:o}=e,a=t.length,{compare:r,between:l,normalize:d}=js(i),{start:h,end:f,loop:u,style:p}=Kl(n,t,e),m=[];let g=!1,b=null,y,_,w;const x=()=>l(s,w,y)&&r(s,w)!==0,k=()=>r(o,y)===0||l(o,w,y),M=()=>g||x(),v=()=>!g||k();for(let D=h,F=h;D<=f;++D)_=t[D%a],!_.skip&&(y=d(_[i]),y!==w&&(g=l(y,s,o),b===null&&M()&&(b=r(y,s)===0?D:F),b!==null&&v()&&(m.push(Ys({start:b,end:D,loop:u,count:a,style:p})),b=null),F=D,w=y));return b!==null&&m.push(Ys({start:b,end:f,loop:u,count:a,style:p})),m}function Xs(n,t){const e=[],i=n.segments;for(let s=0;s<i.length;s++){const o=Us(i[s],n.points,t);o.length&&e.push(...o)}return e}function Gl(n,t,e,i){let s=0,o=t-1;if(e&&!i)for(;s<t&&!n[s].skip;)s++;for(;s<t&&n[s].skip;)s++;for(s%=t,e&&(o+=s);o>s&&n[o%t].skip;)o--;return o%=t,{start:s,end:o}}function Zl(n,t,e,i){const s=n.length,o=[];let a=t,r=n[t],l;for(l=t+1;l<=e;++l){const d=n[l%s];d.skip||d.stop?r.skip||(i=!1,o.push({start:t%s,end:(l-1)%s,loop:i}),t=a=d.stop?l:null):(a=l,r.skip&&(t=l)),r=d}return a!==null&&o.push({start:t%s,end:a%s,loop:i}),o}function Jl(n,t){const e=n.points,i=n.options.spanGaps,s=e.length;if(!s)return[];const o=!!n._loop,{start:a,end:r}=Gl(e,s,o,i);if(i===!0)return qs(n,[{start:a,end:r,loop:o}],e,t);const l=r<a?r+s:r,d=!!n._fullLoop&&a===0&&r===s-1;return qs(n,Zl(e,a,l,d),e,t)}function qs(n,t,e,i){return!i||!i.setContext||!e?t:Ql(n,t,e,i)}function Ql(n,t,e,i){const s=n._chart.getContext(),o=Ks(n.options),{_datasetIndex:a,options:{spanGaps:r}}=n,l=e.length,d=[];let h=o,f=t[0].start,u=f;function p(m,g,b,y){const _=r?-1:1;if(m!==g){for(m+=l;e[m%l].skip;)m-=_;for(;e[g%l].skip;)g+=_;m%l!==g%l&&(d.push({start:m%l,end:g%l,loop:b,style:y}),h=y,f=g%l)}}for(const m of t){f=r?f:m.start;let g=e[f%l],b;for(u=f+1;u<=m.end;u++){const y=e[u%l];b=Ks(i.setContext(Wt(s,{type:"segment",p0:g,p1:y,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),tc(b,h)&&p(f,u-1,m.loop,h),g=y,h=b}f<u-1&&p(f,u-1,m.loop,h)}return d}function Ks(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function tc(n,t){if(!t)return!1;const e=[],i=function(s,o){return li(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(n,i)!==JSON.stringify(t,i)}/*!
|
|
18
|
+
*/function Mt(){}const zr=(()=>{let n=0;return()=>n++})();function z(n){return n===null||typeof n>"u"}function q(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function I(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function J(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function ft(n,t){return J(n)?n:t}function R(n,t){return typeof n>"u"?t:n}const Wr=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,rs=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function U(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function j(n,t,e,i){let s,o,a;if(q(n))if(o=n.length,i)for(s=o-1;s>=0;s--)t.call(e,n[s],s);else for(s=0;s<o;s++)t.call(e,n[s],s);else if(I(n))for(a=Object.keys(n),o=a.length,s=0;s<o;s++)t.call(e,n[a[s]],a[s])}function rn(n,t){let e,i,s,o;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(s=n[e],o=t[e],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function ln(n){if(q(n))return n.map(ln);if(I(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let s=0;for(;s<i;++s)t[e[s]]=ln(n[e[s]]);return t}return n}function ls(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function Hr(n,t,e,i){if(!ls(n))return;const s=t[n],o=e[n];I(s)&&I(o)?Me(s,o,i):t[n]=ln(o)}function Me(n,t,e){const i=q(t)?t:[t],s=i.length;if(!I(n))return n;e=e||{};const o=e.merger||Hr;let a;for(let r=0;r<s;++r){if(a=i[r],!I(a))continue;const l=Object.keys(a);for(let d=0,h=l.length;d<h;++d)o(l[d],n,a,e)}return n}function ve(n,t){return Me(n,t,{merger:jr})}function jr(n,t,e){if(!ls(n))return;const i=t[n],s=e[n];I(i)&&I(s)?ve(i,s):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=ln(s))}const cs={"":n=>n,x:n=>n.x,y:n=>n.y};function Yr(n){const t=n.split("."),e=[];let i="";for(const s of t)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Ur(n){const t=Yr(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function It(n,t){return(cs[t]||(cs[t]=Ur(t)))(n)}function ii(n){return n.charAt(0).toUpperCase()+n.slice(1)}const De=n=>typeof n<"u",zt=n=>typeof n=="function",ds=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Xr(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const K=Math.PI,G=2*K,qr=G+K,cn=Number.POSITIVE_INFINITY,Kr=K/180,et=K/2,Zt=K/4,hs=K*2/3,Wt=Math.log10,xt=Math.sign;function Ee(n,t,e){return Math.abs(n-t)<e}function fs(n){const t=Math.round(n);n=Ee(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(Wt(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Gr(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((s,o)=>s-o).pop(),t}function ue(n){return!isNaN(parseFloat(n))&&isFinite(n)}function Zr(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function us(n,t,e){let i,s,o;for(i=0,s=n.length;i<s;i++)o=n[i][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function yt(n){return n*(K/180)}function si(n){return n*(180/K)}function ps(n){if(!J(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function ms(n,t){const e=t.x-n.x,i=t.y-n.y,s=Math.sqrt(e*e+i*i);let o=Math.atan2(i,e);return o<-.5*K&&(o+=G),{angle:o,distance:s}}function oi(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Jr(n,t){return(n-t+qr)%G-K}function ut(n){return(n%G+G)%G}function Be(n,t,e,i){const s=ut(n),o=ut(t),a=ut(e),r=ut(o-s),l=ut(a-s),d=ut(s-o),h=ut(s-a);return s===o||s===a||i&&o===a||r>l&&d<h}function it(n,t,e){return Math.max(t,Math.min(e,n))}function Qr(n){return it(n,-32768,32767)}function vt(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function ai(n,t,e){e=e||(a=>n[a]<t);let i=n.length-1,s=0,o;for(;i-s>1;)o=s+i>>1,e(o)?s=o:i=o;return{lo:s,hi:i}}const Dt=(n,t,e,i)=>ai(n,e,i?s=>{const o=n[s][t];return o<e||o===e&&n[s+1][t]===e}:s=>n[s][t]<e),tl=(n,t,e)=>ai(n,e,i=>n[i][t]>=e);function el(n,t,e){let i=0,s=n.length;for(;i<s&&n[i]<t;)i++;for(;s>i&&n[s-1]>e;)s--;return i>0||s<n.length?n.slice(i,s):n}const gs=["push","pop","shift","splice","unshift"];function nl(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),gs.forEach(e=>{const i="_onData"+ii(e),s=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...o){const a=s.apply(this,o);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...o)}),a}})})}function bs(n,t){const e=n._chartjs;if(!e)return;const i=e.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(gs.forEach(o=>{delete n[o]}),delete n._chartjs)}function ys(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const _s=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function xs(n,t){let e=[],i=!1;return function(...s){e=s,i||(i=!0,_s.call(window,()=>{i=!1,n.apply(t,e)}))}}function il(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const ri=n=>n==="start"?"left":n==="end"?"right":"center",at=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,sl=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function ks(n,t,e){const i=t.length;let s=0,o=i;if(n._sorted){const{iScale:a,_parsed:r}=n,l=a.axis,{min:d,max:h,minDefined:f,maxDefined:u}=a.getUserBounds();f&&(s=it(Math.min(Dt(r,l,d).lo,e?i:Dt(t,l,a.getPixelForValue(d)).lo),0,i-1)),u?o=it(Math.max(Dt(r,a.axis,h,!0).hi+1,e?0:Dt(t,l,a.getPixelForValue(h),!0).hi+1),s,i)-s:o=i-s}return{start:s,count:o}}function ws(n){const{xScale:t,yScale:e,_scaleRanges:i}=n,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=s,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,s),o}const dn=n=>n===0||n===1,Cs=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*G/e)),Ss=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*G/e)+1,Ve={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*et)+1,easeOutSine:n=>Math.sin(n*et),easeInOutSine:n=>-.5*(Math.cos(K*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>dn(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>dn(n)?n:Cs(n,.075,.3),easeOutElastic:n=>dn(n)?n:Ss(n,.075,.3),easeInOutElastic(n){return dn(n)?n:n<.5?.5*Cs(n*2,.1125,.45):.5+.5*Ss(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-Ve.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?Ve.easeInBounce(n*2)*.5:Ve.easeOutBounce(n*2-1)*.5+.5};function li(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ms(n){return li(n)?n:new Se(n)}function ci(n){return li(n)?n:new Se(n).saturate(.5).darken(.1).hexString()}const ol=["x","y","borderWidth","radius","tension"],al=["color","borderColor","backgroundColor"];function rl(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:al},numbers:{type:"number",properties:ol}}),n.describe("animations",{_fallback:"animation"}),n.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=>t|0}}}})}function ll(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const vs=new Map;function cl(n,t){t=t||{};const e=n+JSON.stringify(t);let i=vs.get(e);return i||(i=new Intl.NumberFormat(n,t),vs.set(e,i)),i}function Pe(n,t,e){return cl(t,e).format(n)}const Ds={values(n){return q(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let s,o=n;if(e.length>1){const d=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(d<1e-4||d>1e15)&&(s="scientific"),o=dl(n,e)}const a=Wt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Pe(n,i,l)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(Wt(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Ds.numeric.call(this,n,t,e):""}};function dl(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var hn={formatters:Ds};function hl(n){n.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:hn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Jt=Object.create(null),di=Object.create(null);function Oe(n,t){if(!t)return n;const e=t.split(".");for(let i=0,s=e.length;i<s;++i){const o=e[i];n=n[o]||(n[o]=Object.create(null))}return n}function hi(n,t,e){return typeof t=="string"?Me(Oe(n,t),e):Me(Oe(n,""),t)}class fl{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=i=>i.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=(i,s)=>ci(s.backgroundColor),this.hoverBorderColor=(i,s)=>ci(s.borderColor),this.hoverColor=(i,s)=>ci(s.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 hi(this,t,e)}get(t){return Oe(this,t)}describe(t,e){return hi(di,t,e)}override(t,e){return hi(Jt,t,e)}route(t,e,i,s){const o=Oe(this,t),a=Oe(this,i),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],d=a[s];return I(l)?Object.assign({},d,l):R(l,d)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var Q=new fl({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[rl,ll,hl]);function ul(n){return!n||z(n.size)||z(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function fn(n,t,e,i,s){let o=t[s];return o||(o=t[s]=n.measureText(s).width,e.push(s)),o>i&&(i=o),i}function pl(n,t,e,i){i=i||{};let s=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(s=i.data={},o=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let a=0;const r=e.length;let l,d,h,f,u;for(l=0;l<r;l++)if(f=e[l],f!=null&&!q(f))a=fn(n,s,o,a,f);else if(q(f))for(d=0,h=f.length;d<h;d++)u=f[d],u!=null&&!q(u)&&(a=fn(n,s,o,a,u));n.restore();const p=o.length/2;if(p>e.length){for(l=0;l<p;l++)delete s[o[l]];o.splice(0,p)}return a}function Qt(n,t,e){const i=n.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*i)/i+s}function Es(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function fi(n,t,e,i){Bs(n,t,e,i,null)}function Bs(n,t,e,i,s){let o,a,r,l,d,h,f,u;const p=t.pointStyle,m=t.rotation,g=t.radius;let b=(m||0)*Kr;if(p&&typeof p=="object"&&(o=p.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(b),n.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),n.restore();return}if(!(isNaN(g)||g<=0)){switch(n.beginPath(),p){default:s?n.ellipse(e,i,s/2,g,0,0,G):n.arc(e,i,g,0,G),n.closePath();break;case"triangle":h=s?s/2:g,n.moveTo(e+Math.sin(b)*h,i-Math.cos(b)*g),b+=hs,n.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*g),b+=hs,n.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*g),n.closePath();break;case"rectRounded":d=g*.516,l=g-d,a=Math.cos(b+Zt)*l,f=Math.cos(b+Zt)*(s?s/2-d:l),r=Math.sin(b+Zt)*l,u=Math.sin(b+Zt)*(s?s/2-d:l),n.arc(e-f,i-r,d,b-K,b-et),n.arc(e+u,i-a,d,b-et,b),n.arc(e+f,i+r,d,b,b+et),n.arc(e-u,i+a,d,b+et,b+K),n.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*g,h=s?s/2:l,n.rect(e-h,i-l,2*h,2*l);break}b+=Zt;case"rectRot":f=Math.cos(b)*(s?s/2:g),a=Math.cos(b)*g,r=Math.sin(b)*g,u=Math.sin(b)*(s?s/2:g),n.moveTo(e-f,i-r),n.lineTo(e+u,i-a),n.lineTo(e+f,i+r),n.lineTo(e-u,i+a),n.closePath();break;case"crossRot":b+=Zt;case"cross":f=Math.cos(b)*(s?s/2:g),a=Math.cos(b)*g,r=Math.sin(b)*g,u=Math.sin(b)*(s?s/2:g),n.moveTo(e-f,i-r),n.lineTo(e+f,i+r),n.moveTo(e+u,i-a),n.lineTo(e-u,i+a);break;case"star":f=Math.cos(b)*(s?s/2:g),a=Math.cos(b)*g,r=Math.sin(b)*g,u=Math.sin(b)*(s?s/2:g),n.moveTo(e-f,i-r),n.lineTo(e+f,i+r),n.moveTo(e+u,i-a),n.lineTo(e-u,i+a),b+=Zt,f=Math.cos(b)*(s?s/2:g),a=Math.cos(b)*g,r=Math.sin(b)*g,u=Math.sin(b)*(s?s/2:g),n.moveTo(e-f,i-r),n.lineTo(e+f,i+r),n.moveTo(e+u,i-a),n.lineTo(e-u,i+a);break;case"line":a=s?s/2:Math.cos(b)*g,r=Math.sin(b)*g,n.moveTo(e-a,i-r),n.lineTo(e+a,i+r);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(b)*(s?s/2:g),i+Math.sin(b)*g);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function Et(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function un(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function pn(n){n.restore()}function ml(n,t,e,i,s){if(!t)return n.lineTo(e.x,e.y);if(s==="middle"){const o=(t.x+e.x)/2;n.lineTo(o,t.y),n.lineTo(o,e.y)}else s==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function gl(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function bl(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),z(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function yl(n,t,e,i,s){if(s.strikethrough||s.underline){const o=n.measureText(i),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,d=e+o.actualBoundingBoxDescent,h=s.strikethrough?(l+d)/2:d;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(a,h),n.lineTo(r,h),n.stroke()}}function _l(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function te(n,t,e,i,s,o={}){const a=q(t)?t:[t],r=o.strokeWidth>0&&o.strokeColor!=="";let l,d;for(n.save(),n.font=s.string,bl(n,o),l=0;l<a.length;++l)d=a[l],o.backdrop&&_l(n,o.backdrop),r&&(o.strokeColor&&(n.strokeStyle=o.strokeColor),z(o.strokeWidth)||(n.lineWidth=o.strokeWidth),n.strokeText(d,e,i,o.maxWidth)),n.fillText(d,e,i,o.maxWidth),yl(n,e,i,d,o),i+=Number(s.lineHeight);n.restore()}function Te(n,t){const{x:e,y:i,w:s,h:o,radius:a}=t;n.arc(e+a.topLeft,i+a.topLeft,a.topLeft,1.5*K,K,!0),n.lineTo(e,i+o-a.bottomLeft),n.arc(e+a.bottomLeft,i+o-a.bottomLeft,a.bottomLeft,K,et,!0),n.lineTo(e+s-a.bottomRight,i+o),n.arc(e+s-a.bottomRight,i+o-a.bottomRight,a.bottomRight,et,0,!0),n.lineTo(e+s,i+a.topRight),n.arc(e+s-a.topRight,i+a.topRight,a.topRight,0,-et,!0),n.lineTo(e+a.topLeft,i)}const xl=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,kl=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function wl(n,t){const e=(""+n).match(xl);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const Cl=n=>+n||0;function ui(n,t){const e={},i=I(t),s=i?Object.keys(t):t,o=I(n)?i?a=>R(n[a],n[t[a]]):a=>n[a]:()=>n;for(const a of s)e[a]=Cl(o(a));return e}function Vs(n){return ui(n,{top:"y",right:"x",bottom:"y",left:"x"})}function ee(n){return ui(n,["topLeft","topRight","bottomLeft","bottomRight"])}function rt(n){const t=Vs(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function nt(n,t){n=n||{},t=t||Q.font;let e=R(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=R(n.style,t.style);i&&!(""+i).match(kl)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:R(n.family,t.family),lineHeight:wl(R(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:R(n.weight,t.weight),string:""};return s.string=ul(s),s}function Fe(n,t,e,i){let s=!0,o,a,r;for(o=0,a=n.length;o<a;++o)if(r=n[o],r!==void 0&&(t!==void 0&&typeof r=="function"&&(r=r(t),s=!1),e!==void 0&&q(r)&&(r=r[e%r.length],s=!1),r!==void 0))return i&&!s&&(i.cacheable=!1),r}function Sl(n,t,e){const{min:i,max:s}=n,o=rs(t,(s-i)/2),a=(r,l)=>e&&r===0?0:r+l;return{min:a(i,-Math.abs(o)),max:a(s,o)}}function Ht(n,t){return Object.assign(Object.create(n),t)}function pi(n,t=[""],e,i,s=()=>n[0]){const o=e||n;typeof i>"u"&&(i=As("_fallback",n));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:o,_fallback:i,_getTarget:s,override:r=>pi([r,...n],t,o,i)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete n[0][l],!0},get(r,l){return Os(r,l,()=>Ol(l,t,n,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(r,l){return Ls(r).includes(l)},ownKeys(r){return Ls(r)},set(r,l,d){const h=r._storage||(r._storage=s());return r[l]=h[l]=d,delete r._keys,!0}})}function pe(n,t,e,i){const s={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Ps(n,i),setContext:o=>pe(n,o,e,i),override:o=>pe(n.override(o),t,e,i)};return new Proxy(s,{deleteProperty(o,a){return delete o[a],delete n[a],!0},get(o,a,r){return Os(o,a,()=>vl(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(n,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,a)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(o,a){return Reflect.has(n,a)},ownKeys(){return Reflect.ownKeys(n)},set(o,a,r){return n[a]=r,delete o[a],!0}})}function Ps(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=n;return{allKeys:s,scriptable:e,indexable:i,isScriptable:zt(e)?e:()=>e,isIndexable:zt(i)?i:()=>i}}const Ml=(n,t)=>n?n+ii(t):t,mi=(n,t)=>I(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Os(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t))return n[t];const i=e();return n[t]=i,i}function vl(n,t,e){const{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n;let r=i[t];return zt(r)&&a.isScriptable(t)&&(r=Dl(t,r,n,e)),q(r)&&r.length&&(r=El(t,r,n,a.isIndexable)),mi(t,r)&&(r=pe(r,s,o&&o[t],a)),r}function Dl(n,t,e,i){const{_proxy:s,_context:o,_subProxy:a,_stack:r}=e;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);r.add(n);let l=t(o,a||i);return r.delete(n),mi(n,l)&&(l=gi(s._scopes,s,n,l)),l}function El(n,t,e,i){const{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&i(n))return t[o.index%t.length];if(I(t[0])){const l=t,d=s._scopes.filter(h=>h!==l);t=[];for(const h of l){const f=gi(d,s,n,h);t.push(pe(f,o,a&&a[n],r))}}return t}function Ts(n,t,e){return zt(n)?n(t,e):n}const Bl=(n,t)=>n===!0?t:typeof n=="string"?It(t,n):void 0;function Vl(n,t,e,i,s){for(const o of t){const a=Bl(e,o);if(a){n.add(a);const r=Ts(a._fallback,e,s);if(typeof r<"u"&&r!==e&&r!==i)return r}else if(a===!1&&typeof i<"u"&&e!==i)return null}return!1}function gi(n,t,e,i){const s=t._rootScopes,o=Ts(t._fallback,e,i),a=[...n,...s],r=new Set;r.add(i);let l=Fs(r,a,e,o||e,i);return l===null||typeof o<"u"&&o!==e&&(l=Fs(r,a,o,l,i),l===null)?!1:pi(Array.from(r),[""],s,o,()=>Pl(t,e,i))}function Fs(n,t,e,i,s){for(;e;)e=Vl(n,t,e,i,s);return e}function Pl(n,t,e){const i=n._getTarget();t in i||(i[t]={});const s=i[t];return q(s)&&I(e)?e:s||{}}function Ol(n,t,e,i){let s;for(const o of t)if(s=As(Ml(o,n),e),typeof s<"u")return mi(n,s)?gi(e,i,n,s):s}function As(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function Ls(n){let t=n._keys;return t||(t=n._keys=Tl(n._scopes)),t}function Tl(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}function $s(n,t,e,i){const{iScale:s}=n,{key:o="r"}=this._parsing,a=new Array(i);let r,l,d,h;for(r=0,l=i;r<l;++r)d=r+e,h=t[d],a[r]={r:s.parse(It(h,o),d)};return a}const Fl=Number.EPSILON||1e-14,me=(n,t)=>t<n.length&&!n[t].skip&&n[t],Ns=n=>n==="x"?"y":"x";function Al(n,t,e,i){const s=n.skip?t:n,o=t,a=e.skip?t:e,r=oi(o,s),l=oi(a,o);let d=r/(r+l),h=l/(r+l);d=isNaN(d)?0:d,h=isNaN(h)?0:h;const f=i*d,u=i*h;return{previous:{x:o.x-f*(a.x-s.x),y:o.y-f*(a.y-s.y)},next:{x:o.x+u*(a.x-s.x),y:o.y+u*(a.y-s.y)}}}function Ll(n,t,e){const i=n.length;let s,o,a,r,l,d=me(n,0);for(let h=0;h<i-1;++h)if(l=d,d=me(n,h+1),!(!l||!d)){if(Ee(t[h],0,Fl)){e[h]=e[h+1]=0;continue}s=e[h]/t[h],o=e[h+1]/t[h],r=Math.pow(s,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),e[h]=s*a*t[h],e[h+1]=o*a*t[h])}}function $l(n,t,e="x"){const i=Ns(e),s=n.length;let o,a,r,l=me(n,0);for(let d=0;d<s;++d){if(a=r,r=l,l=me(n,d+1),!r)continue;const h=r[e],f=r[i];a&&(o=(h-a[e])/3,r[`cp1${e}`]=h-o,r[`cp1${i}`]=f-o*t[d]),l&&(o=(l[e]-h)/3,r[`cp2${e}`]=h+o,r[`cp2${i}`]=f+o*t[d])}}function Nl(n,t="x"){const e=Ns(t),i=n.length,s=Array(i).fill(0),o=Array(i);let a,r,l,d=me(n,0);for(a=0;a<i;++a)if(r=l,l=d,d=me(n,a+1),!!l){if(d){const h=d[t]-l[t];s[a]=h!==0?(d[e]-l[e])/h:0}o[a]=r?d?xt(s[a-1])!==xt(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a]}Ll(n,s,o),$l(n,o,t)}function mn(n,t,e){return Math.max(Math.min(n,e),t)}function Rl(n,t){let e,i,s,o,a,r=Et(n[0],t);for(e=0,i=n.length;e<i;++e)a=o,o=r,r=e<i-1&&Et(n[e+1],t),o&&(s=n[e],a&&(s.cp1x=mn(s.cp1x,t.left,t.right),s.cp1y=mn(s.cp1y,t.top,t.bottom)),r&&(s.cp2x=mn(s.cp2x,t.left,t.right),s.cp2y=mn(s.cp2y,t.top,t.bottom)))}function Il(n,t,e,i,s){let o,a,r,l;if(t.spanGaps&&(n=n.filter(d=>!d.skip)),t.cubicInterpolationMode==="monotone")Nl(n,s);else{let d=i?n[n.length-1]:n[0];for(o=0,a=n.length;o<a;++o)r=n[o],l=Al(d,r,n[Math.min(o+1,a-(i?0:1))%a],t.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,d=r}t.capBezierPoints&&Rl(n,e)}function Rs(){return typeof window<"u"&&typeof document<"u"}function bi(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function gn(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const bn=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function zl(n,t){return bn(n).getPropertyValue(t)}const Wl=["top","right","bottom","left"];function ne(n,t,e){const i={};e=e?"-"+e:"";for(let s=0;s<4;s++){const o=Wl[s];i[o]=parseFloat(n[t+"-"+o+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Hl=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function jl(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:s,offsetY:o}=i;let a=!1,r,l;if(Hl(s,o,n.target))r=s,l=o;else{const d=t.getBoundingClientRect();r=i.clientX-d.left,l=i.clientY-d.top,a=!0}return{x:r,y:l,box:a}}function ie(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,s=bn(e),o=s.boxSizing==="border-box",a=ne(s,"padding"),r=ne(s,"border","width"),{x:l,y:d,box:h}=jl(n,e),f=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:p,height:m}=t;return o&&(p-=a.width+r.width,m-=a.height+r.height),{x:Math.round((l-f)/p*e.width/i),y:Math.round((d-u)/m*e.height/i)}}function Yl(n,t,e){let i,s;if(t===void 0||e===void 0){const o=bi(n);if(!o)t=n.clientWidth,e=n.clientHeight;else{const a=o.getBoundingClientRect(),r=bn(o),l=ne(r,"border","width"),d=ne(r,"padding");t=a.width-d.width-l.width,e=a.height-d.height-l.height,i=gn(r.maxWidth,o,"clientWidth"),s=gn(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:i||cn,maxHeight:s||cn}}const yn=n=>Math.round(n*10)/10;function Ul(n,t,e,i){const s=bn(n),o=ne(s,"margin"),a=gn(s.maxWidth,n,"clientWidth")||cn,r=gn(s.maxHeight,n,"clientHeight")||cn,l=Yl(n,t,e);let{width:d,height:h}=l;if(s.boxSizing==="content-box"){const u=ne(s,"border","width"),p=ne(s,"padding");d-=p.width+u.width,h-=p.height+u.height}return d=Math.max(0,d-o.width),h=Math.max(0,i?d/i:h-o.height),d=yn(Math.min(d,a,l.maxWidth)),h=yn(Math.min(h,r,l.maxHeight)),d&&!h&&(h=yn(d/2)),(t!==void 0||e!==void 0)&&i&&l.height&&h>l.height&&(h=l.height,d=yn(Math.floor(h*i))),{width:d,height:h}}function Is(n,t,e){const i=t||1,s=Math.floor(n.height*i),o=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const a=n.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${n.height}px`,a.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||a.height!==s||a.width!==o?(n.currentDevicePixelRatio=i,a.height=s,a.width=o,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Xl=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return n}();function zs(n,t){const e=zl(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function se(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function ql(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Kl(n,t,e,i){const s={x:n.cp2x,y:n.cp2y},o={x:t.cp1x,y:t.cp1y},a=se(n,s,e),r=se(s,o,e),l=se(o,t,e),d=se(a,r,e),h=se(r,l,e);return se(d,h,e)}const Gl=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},Zl=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function ge(n,t,e){return n?Gl(t,e):Zl()}function Ws(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function Hs(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function js(n){return n==="angle"?{between:Be,compare:Jr,normalize:ut}:{between:vt,compare:(t,e)=>t-e,normalize:t=>t}}function Ys({start:n,end:t,count:e,loop:i,style:s}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:s}}function Jl(n,t,e){const{property:i,start:s,end:o}=e,{between:a,normalize:r}=js(i),l=t.length;let{start:d,end:h,loop:f}=n,u,p;if(f){for(d+=l,h+=l,u=0,p=l;u<p&&a(r(t[d%l][i]),s,o);++u)d--,h--;d%=l,h%=l}return h<d&&(h+=l),{start:d,end:h,loop:f,style:n.style}}function Us(n,t,e){if(!e)return[n];const{property:i,start:s,end:o}=e,a=t.length,{compare:r,between:l,normalize:d}=js(i),{start:h,end:f,loop:u,style:p}=Jl(n,t,e),m=[];let g=!1,b=null,y,_,w;const x=()=>l(s,w,y)&&r(s,w)!==0,k=()=>r(o,y)===0||l(o,w,y),M=()=>g||x(),v=()=>!g||k();for(let D=h,F=h;D<=f;++D)_=t[D%a],!_.skip&&(y=d(_[i]),y!==w&&(g=l(y,s,o),b===null&&M()&&(b=r(y,s)===0?D:F),b!==null&&v()&&(m.push(Ys({start:b,end:D,loop:u,count:a,style:p})),b=null),F=D,w=y));return b!==null&&m.push(Ys({start:b,end:f,loop:u,count:a,style:p})),m}function Xs(n,t){const e=[],i=n.segments;for(let s=0;s<i.length;s++){const o=Us(i[s],n.points,t);o.length&&e.push(...o)}return e}function Ql(n,t,e,i){let s=0,o=t-1;if(e&&!i)for(;s<t&&!n[s].skip;)s++;for(;s<t&&n[s].skip;)s++;for(s%=t,e&&(o+=s);o>s&&n[o%t].skip;)o--;return o%=t,{start:s,end:o}}function tc(n,t,e,i){const s=n.length,o=[];let a=t,r=n[t],l;for(l=t+1;l<=e;++l){const d=n[l%s];d.skip||d.stop?r.skip||(i=!1,o.push({start:t%s,end:(l-1)%s,loop:i}),t=a=d.stop?l:null):(a=l,r.skip&&(t=l)),r=d}return a!==null&&o.push({start:t%s,end:a%s,loop:i}),o}function ec(n,t){const e=n.points,i=n.options.spanGaps,s=e.length;if(!s)return[];const o=!!n._loop,{start:a,end:r}=Ql(e,s,o,i);if(i===!0)return qs(n,[{start:a,end:r,loop:o}],e,t);const l=r<a?r+s:r,d=!!n._fullLoop&&a===0&&r===s-1;return qs(n,tc(e,a,l,d),e,t)}function qs(n,t,e,i){return!i||!i.setContext||!e?t:nc(n,t,e,i)}function nc(n,t,e,i){const s=n._chart.getContext(),o=Ks(n.options),{_datasetIndex:a,options:{spanGaps:r}}=n,l=e.length,d=[];let h=o,f=t[0].start,u=f;function p(m,g,b,y){const _=r?-1:1;if(m!==g){for(m+=l;e[m%l].skip;)m-=_;for(;e[g%l].skip;)g+=_;m%l!==g%l&&(d.push({start:m%l,end:g%l,loop:b,style:y}),h=y,f=g%l)}}for(const m of t){f=r?f:m.start;let g=e[f%l],b;for(u=f+1;u<=m.end;u++){const y=e[u%l];b=Ks(i.setContext(Ht(s,{type:"segment",p0:g,p1:y,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),ic(b,h)&&p(f,u-1,m.loop,h),g=y,h=b}f<u-1&&p(f,u-1,m.loop,h)}return d}function Ks(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function ic(n,t){if(!t)return!1;const e=[],i=function(s,o){return li(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(n,i)!==JSON.stringify(t,i)}/*!
|
|
19
19
|
* Chart.js v4.4.0
|
|
20
20
|
* https://www.chartjs.org
|
|
21
21
|
* (c) 2023 Chart.js Contributors
|
|
22
22
|
* Released under the MIT License
|
|
23
|
-
*/class ec{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const o=e.listeners[s],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=_s.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const o=i.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),o.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}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((i,s)=>Math.max(i,s._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 i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Bt=new ec;const Gs="transparent",nc={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=Ms(n||Gs),s=i.valid&&Ms(t||Gs);return s&&s.valid?s.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class ic{constructor(t,e,i,s){const o=e[i];s=Fe([t.to,s,o,t.from]);const a=Fe([t.from,o,s]);this._active=!0,this._fn=t.fn||nc[t.type||typeof a],this._easing=Ve[t.easing]||Ve.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=i,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],o=i-this._start,a=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Fe([t.to,e,s,t.from]),this._from=Fe([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e<i),!this._active){this._target[s]=r,this._notify(!0);return}if(e<0){this._target[s]=o;return}l=e/i%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][e]()}}class Zs{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!I(t))return;const e=Object.keys(Q.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!I(o))return;const a={};for(const r of e)a[r]=o[r];(q(o.properties)&&o.properties||[s]).forEach(r=>{(r===s||!i.has(r))&&i.set(r,a)})})}_animateOptions(t,e){const i=e.options,s=oc(t,i);if(!s)return[];const o=this._createAnimations(s,i);return i.$shared&&sc(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,s=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const d=a[l];if(d.charAt(0)==="$")continue;if(d==="options"){s.push(...this._animateOptions(t,e));continue}const h=e[d];let f=o[d];const u=i.get(d);if(f)if(u&&f.active()){f.update(u,h,r);continue}else f.cancel();if(!u||!u.duration){t[d]=h;continue}o[d]=f=new ic(u,t,d,h),s.push(f)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return Bt.add(this._chart,i),!0}}function sc(n,t){const e=[],i=Object.keys(t);for(let s=0;s<i.length;s++){const o=n[i[s]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function oc(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Js(n,t){const e=n&&n.options||{},i=e.reverse,s=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:i?o:s,end:i?s:o}}function ac(n,t,e){if(e===!1)return!1;const i=Js(n,e),s=Js(t,e);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function rc(n){let t,e,i,s;return I(n)?(t=n.top,e=n.right,i=n.bottom,s=n.left):t=e=i=s=n,{top:t,right:e,bottom:i,left:s,disabled:n===!1}}function Qs(n,t){const e=[],i=n._getSortedDatasetMetas(t);let s,o;for(s=0,o=i.length;s<o;++s)e.push(i[s].index);return e}function to(n,t,e,i={}){const s=n.keys,o=i.mode==="single";let a,r,l,d;if(t!==null){for(a=0,r=s.length;a<r;++a){if(l=+s[a],l===e){if(i.all)continue;break}d=n.values[l],J(d)&&(o||t===0||xt(t)===xt(d))&&(t+=d)}return t}}function lc(n){const t=Object.keys(n),e=new Array(t.length);let i,s,o;for(i=0,s=t.length;i<s;++i)o=t[i],e[i]={x:o,y:n[o]};return e}function eo(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function cc(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function dc(n){const{min:t,max:e,minDefined:i,maxDefined:s}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function hc(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function no(n,t,e,i){for(const s of t.getMatchingVisibleMetas(i).reverse()){const o=n[s.index];if(e&&o>0||!e&&o<0)return s.index}return null}function io(n,t){const{chart:e,_cachedMeta:i}=n,s=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=i,l=o.axis,d=a.axis,h=cc(o,a,i),f=t.length;let u;for(let p=0;p<f;++p){const m=t[p],{[l]:g,[d]:b}=m,y=m._stacks||(m._stacks={});u=y[d]=hc(s,h,g),u[r]=b,u._top=no(u,a,!0,i.type),u._bottom=no(u,a,!1,i.type);const _=u._visualValues||(u._visualValues={});_[r]=b}}function yi(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function fc(n,t){return Wt(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function uc(n,t,e){return Wt(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Ae(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const s of t){const o=s._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e],o[i]._visualValues!==void 0&&o[i]._visualValues[e]!==void 0&&delete o[i]._visualValues[e]}}}const _i=n=>n==="reset"||n==="none",so=(n,t)=>t?n:Object.assign({},n),pc=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:Qs(e,!0),values:null};class _t{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=eo(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&&Ae(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(f,u,p,m)=>f==="x"?u:f==="r"?m:p,o=e.xAxisID=R(i.xAxisID,yi(t,"x")),a=e.yAxisID=R(i.yAxisID,yi(t,"y")),r=e.rAxisID=R(i.rAxisID,yi(t,"r")),l=e.indexAxis,d=e.iAxisID=s(l,o,a,r),h=e.vAxisID=s(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(d),e.vScale=this.getScaleForId(h)}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&&bs(this._data,this),t._stacked&&Ae(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(I(e))this._data=lc(e);else if(i!==e){if(i){bs(i,this);const s=this._cachedMeta;Ae(s),s._parsed=[]}e&&Object.isExtensible(e)&&Qr(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const o=e._stacked;e._stacked=eo(e.vScale,e),e.stack!==i.stack&&(s=!0,Ae(e),e.stack=i.stack),this._resyncElements(t),(s||o!==e._stacked)&&io(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:o,_stacked:a}=i,r=o.axis;let l=t===0&&e===s.length?!0:i._sorted,d=t>0&&i._parsed[t-1],h,f,u;if(this._parsing===!1)i._parsed=s,i._sorted=!0,u=s;else{q(s[t])?u=this.parseArrayData(i,s,t,e):I(s[t])?u=this.parseObjectData(i,s,t,e):u=this.parsePrimitiveData(i,s,t,e);const p=()=>f[r]===null||d&&f[r]<d[r];for(h=0;h<e;++h)i._parsed[h+t]=f=u[h],l&&(p()&&(l=!1),d=f);i._sorted=l}a&&io(this,u)}parsePrimitiveData(t,e,i,s){const{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,d=o.getLabels(),h=o===a,f=new Array(s);let u,p,m;for(u=0,p=s;u<p;++u)m=u+i,f[u]={[r]:h||o.parse(d[m],m),[l]:a.parse(e[m],m)};return f}parseArrayData(t,e,i,s){const{xScale:o,yScale:a}=t,r=new Array(s);let l,d,h,f;for(l=0,d=s;l<d;++l)h=l+i,f=e[h],r[l]={x:o.parse(f[0],h),y:a.parse(f[1],h)};return r}parseObjectData(t,e,i,s){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,d=new Array(s);let h,f,u,p;for(h=0,f=s;h<f;++h)u=h+i,p=e[u],d[h]={x:o.parse(Rt(p,r),u),y:a.parse(Rt(p,l),u)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const s=this.chart,o=this._cachedMeta,a=e[t.axis],r={keys:Qs(s,!0),values:e._stacks[t.axis]._visualValues};return to(r,a,o.index,{mode:i})}updateRangeFromParsed(t,e,i,s){const o=i[e.axis];let a=o===null?NaN:o;const r=s&&i._stacks[e.axis];s&&r&&(s.values=r,a=to(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,o=i._sorted&&t===i.iScale,a=s.length,r=this._getOtherScale(t),l=pc(e,i,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:f}=dc(r);let u,p;function m(){p=s[u];const g=p[r.axis];return!J(p[t.axis])||h>g||f<g}for(u=0;u<a&&!(!m()&&(this.updateRangeFromParsed(d,t,p,l),o));++u);if(o){for(u=a-1;u>=0;--u)if(!m()){this.updateRangeFromParsed(d,t,p,l);break}}return d}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,o,a;for(s=0,o=e.length;s<o;++s)a=e[s][t.axis],J(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=rc(R(this.options.clip,ac(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],o=e.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||s.length-r,d=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,o,r,l),h=r;h<r+l;++h){const f=s[h];f.hidden||(f.active&&d?a.push(f):f.draw(t,o))}for(h=0;h<a.length;++h)a[h].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=uc(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=fc(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const s=e==="active",o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&De(i);if(r)return so(r,l);const d=this.chart.config,h=d.datasetElementScopeKeys(this._type,t),f=s?[`${t}Hover`,"hover",t,""]:[t,""],u=d.getOptionScopes(this.getDataset(),h),p=Object.keys(Q.elements[t]),m=()=>this.getContext(i,s,e),g=d.resolveNamedOptions(u,p,m,f);return g.$shared&&(g.$shared=l,o[a]=Object.freeze(so(g,l))),g}_resolveAnimations(t,e,i){const s=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(s.options.animation!==!1){const h=this.chart.config,f=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),f);l=h.createResolver(u,this.getContext(t,i,e))}const d=new Zs(s,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||_i(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,o=this.getSharedOptions(i),a=this.includeOptions(e,o)||o!==s;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:a}}updateElement(t,e,i,s){_i(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!_i(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const o=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"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,i=this._cachedMeta.data;for(const[r,l,d]of this._syncList)this[r](l,d);this._syncList=[];const s=i.length,o=e.length,a=Math.min(o,s);a&&this.parse(0,a),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,e,i=!0){const s=this._cachedMeta,o=s.data,a=t+e;let r;const l=d=>{for(d.length+=e,r=d.length-1;r>=a;r--)d[r]=d[r-e]};for(l(o),r=t;r<a;++r)o[r]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,e),i&&this.updateElements(o,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,e);i._stacked&&Ae(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,s]=t;this[e](i,s)}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 i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}B(_t,"defaults",{}),B(_t,"datasetElementType",null),B(_t,"dataElementType",null);function mc(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let s=0,o=e.length;s<o;s++)i=i.concat(e[s].controller.getAllParsedValues(n));n._cache.$bar=ys(i.sort((s,o)=>s-o))}return n._cache.$bar}function gc(n){const t=n.iScale,e=mc(t,n.type);let i=t._length,s,o,a,r;const l=()=>{a===32767||a===-32768||(De(r)&&(i=Math.min(i,Math.abs(a-r)||i)),r=a)};for(s=0,o=e.length;s<o;++s)a=t.getPixelForValue(e[s]),l();for(r=void 0,s=0,o=t.ticks.length;s<o;++s)a=t.getPixelForTick(s),l();return i}function bc(n,t,e,i){const s=e.barThickness;let o,a;return z(s)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=s*i,a=1),{chunk:o/i,ratio:a,start:t.pixels[n]-o/2}}function yc(n,t,e,i){const s=t.pixels,o=s[n];let a=n>0?s[n-1]:null,r=n<s.length-1?s[n+1]:null;const l=e.categoryPercentage;a===null&&(a=o-(r===null?t.end-t.start:r-o)),r===null&&(r=o+o-a);const d=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/i,ratio:e.barPercentage,start:d}}function _c(n,t,e,i){const s=e.parse(n[0],i),o=e.parse(n[1],i),a=Math.min(s,o),r=Math.max(s,o);let l=a,d=r;Math.abs(a)>Math.abs(r)&&(l=r,d=a),t[e.axis]=d,t._custom={barStart:l,barEnd:d,start:s,end:o,min:a,max:r}}function oo(n,t,e,i){return q(n)?_c(n,t,e,i):t[e.axis]=e.parse(n,i),t}function ao(n,t,e,i){const s=n.iScale,o=n.vScale,a=s.getLabels(),r=s===o,l=[];let d,h,f,u;for(d=e,h=e+i;d<h;++d)u=t[d],f={},f[s.axis]=r||s.parse(a[d],d),l.push(oo(u,f,o,d));return l}function xi(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function xc(n,t,e){return n!==0?xt(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function kc(n){let t,e,i,s,o;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(s="end",o="start"):(s="start",o="end"),{start:e,end:i,reverse:t,top:s,bottom:o}}function wc(n,t,e,i){let s=t.borderSkipped;const o={};if(!s){n.borderSkipped=o;return}if(s===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:r,reverse:l,top:d,bottom:h}=kc(n);s==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?s=d:(e._bottom||0)===i?s=h:(o[ro(h,a,r,l)]=!0,s=d)),o[ro(s,a,r,l)]=!0,n.borderSkipped=o}function ro(n,t,e,i){return i?(n=Cc(n,t,e),n=lo(n,e,t)):n=lo(n,t,e),n}function Cc(n,t,e){return n===t?e:n===e?t:n}function lo(n,t,e){return n==="start"?t:n==="end"?e:n}function Sc(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class _n extends _t{parsePrimitiveData(t,e,i,s){return ao(t,e,i,s)}parseArrayData(t,e,i,s){return ao(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,d=o.axis==="x"?r:l,h=a.axis==="x"?r:l,f=[];let u,p,m,g;for(u=i,p=i+s;u<p;++u)g=e[u],m={},m[o.axis]=o.parse(Rt(g,d),u),f.push(oo(Rt(g,h),m,a,u));return f}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:s}=e,o=this.getParsed(t),a=o._custom,r=xi(a)?"["+a.start+", "+a.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){const o=s==="reset",{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),d=r.isHorizontal(),h=this._getRuler(),{sharedOptions:f,includeOptions:u}=this._getSharedOptions(e,s);for(let p=e;p<e+i;p++){const m=this.getParsed(p),g=o||z(m[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),b=this._calculateBarIndexPixels(p,h),y=(m._stacks||{})[r.axis],_={horizontal:d,base:g.base,enableBorderRadius:!y||xi(m._custom)||a===y._top||a===y._bottom,x:d?g.head:b.center,y:d?b.center:g.head,height:d?b.size:Math.abs(g.size),width:d?Math.abs(g.size):b.size};u&&(_.options=f||this.resolveDataElementOptions(p,t[p].active?"active":s));const w=_.options||t[p].options;wc(_,w,y,a),Sc(_,w,h.ratio),this.updateElement(t[p],p,_,s)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=i.options.stacked,a=[],r=l=>{const d=l.controller.getParsed(e),h=d&&d[l.vScale.axis];if(z(h)||isNaN(h))return!0};for(const l of s)if(!(e!==void 0&&r(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),o=e!==void 0?s.indexOf(e):-1;return o===-1?s.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let o,a;for(o=0,a=e.data.length;o<a;++o)s.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const r=t.barThickness;return{min:r||gc(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),d=l._custom,h=xi(d);let f=l[e.axis],u=0,p=i?this.applyStack(e,l,i):f,m,g;p!==f&&(u=p-f,p=f),h&&(f=d.barStart,p=d.barEnd-d.barStart,f!==0&&xt(f)!==xt(d.barEnd)&&(u=0),u+=f);const b=!z(o)&&!h?o:u;let y=e.getPixelForValue(b);if(this.chart.getDataVisibility(t)?m=e.getPixelForValue(u+p):m=y,g=m-y,Math.abs(g)<a){g=xc(g,e,r)*a,f===r&&(y-=g/2);const _=e.getPixelForDecimal(0),w=e.getPixelForDecimal(1),x=Math.min(_,w),k=Math.max(_,w);y=Math.max(Math.min(y,k),x),m=y+g,i&&!h&&(l._stacks[e.axis]._visualValues[s]=e.getValueForPixel(m)-e.getValueForPixel(y))}if(y===e.getPixelForValue(r)){const _=xt(g)*e.getLineWidthForValue(r)/2;y+=_,g-=_}return{size:g,base:y,head:m,center:m+g/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,o=s.skipNull,a=R(s.maxBarThickness,1/0);let r,l;if(e.grouped){const d=o?this._getStackCount(t):e.stackCount,h=s.barThickness==="flex"?yc(t,e,s,d):bc(t,e,s,d),f=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=h.start+h.chunk*f+h.chunk/2,l=Math.min(a,h.chunk*h.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let o=0;for(;o<s;++o)this.getParsed(o)[e.axis]!==null&&i[o].draw(this._ctx)}}B(_n,"id","bar"),B(_n,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),B(_n,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class xn extends _t{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){const o=super.parsePrimitiveData(t,e,i,s);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+i).radius;return o}parseArrayData(t,e,i,s){const o=super.parseArrayData(t,e,i,s);for(let a=0;a<o.length;a++){const r=e[i+a];o[a]._custom=R(r[2],this.resolveDataElementOptions(a+i).radius)}return o}parseObjectData(t,e,i,s){const o=super.parseObjectData(t,e,i,s);for(let a=0;a<o.length;a++){const r=e[i+a];o[a]._custom=R(r&&r.r&&+r.r,this.resolveDataElementOptions(a+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:o}=e,a=this.getParsed(t),r=s.getLabelForValue(a.x),l=o.getLabelForValue(a.y),d=a._custom;return{label:i[t]||"",value:"("+r+", "+l+(d?", "+d:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const o=s==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:d}=this._getSharedOptions(e,s),h=a.axis,f=r.axis;for(let u=e;u<e+i;u++){const p=t[u],m=!o&&this.getParsed(u),g={},b=g[h]=o?a.getPixelForDecimal(.5):a.getPixelForValue(m[h]),y=g[f]=o?r.getBasePixel():r.getPixelForValue(m[f]);g.skip=isNaN(b)||isNaN(y),d&&(g.options=l||this.resolveDataElementOptions(u,p.active?"active":s),o&&(g.options.radius=0)),this.updateElement(p,u,g,s)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const o=s.radius;return e!=="active"&&(s.radius=0),s.radius+=R(i&&i._custom,o),s}}B(xn,"id","bubble"),B(xn,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),B(xn,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Mc(n,t,e){let i=1,s=1,o=0,a=0;if(t<G){const r=n,l=r+t,d=Math.cos(r),h=Math.sin(r),f=Math.cos(l),u=Math.sin(l),p=(w,x,k)=>Be(w,r,l,!0)?1:Math.max(x,x*e,k,k*e),m=(w,x,k)=>Be(w,r,l,!0)?-1:Math.min(x,x*e,k,k*e),g=p(0,d,f),b=p(et,h,u),y=m(K,d,f),_=m(K+et,h,u);i=(g-y)/2,s=(b-_)/2,o=-(g+y)/2,a=-(b+_)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:a}}class se extends _t{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 i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let o=l=>+i[l];if(I(i[t])){const{key:l="value"}=this._parsing;o=d=>+Rt(i[d],l)}let a,r;for(a=t,r=t+e;a<r;++a)s._parsed[a]=o(a)}}_getRotation(){return yt(this.options.rotation-90)}_getCircumference(){return yt(this.options.circumference)}_getRotationExtents(){let t=G,e=-G;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,o=s._getRotation(),a=s._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,o=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-a)/2,0),l=Math.min(Rr(this.options.cutout,r),1),d=this._getRingWeight(this.index),{circumference:h,rotation:f}=this._getRotationExtents(),{ratioX:u,ratioY:p,offsetX:m,offsetY:g}=Mc(f,h,l),b=(i.width-a)/u,y=(i.height-a)/p,_=Math.max(Math.min(b,y)/2,0),w=rs(this.options.radius,_),x=Math.max(w*l,0),k=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=g*w,s.total=this.calculateTotal(),this.outerRadius=w-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*d,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/G)}updateElements(t,e,i,s){const o=s==="reset",a=this.chart,r=a.chartArea,d=a.options.animation,h=(r.left+r.right)/2,f=(r.top+r.bottom)/2,u=o&&d.animateScale,p=u?0:this.innerRadius,m=u?0:this.outerRadius,{sharedOptions:g,includeOptions:b}=this._getSharedOptions(e,s);let y=this._getRotation(),_;for(_=0;_<e;++_)y+=this._circumference(_,o);for(_=e;_<e+i;++_){const w=this._circumference(_,o),x=t[_],k={x:h+this.offsetX,y:f+this.offsetY,startAngle:y,endAngle:y+w,circumference:w,outerRadius:m,innerRadius:p};b&&(k.options=g||this.resolveDataElementOptions(_,x.active?"active":s)),y+=w,this.updateElement(x,_,k,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,s;for(s=0;s<e.length;s++){const o=t._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?G*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=Pe(e._parsed[t],i.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,o,a,r,l;if(!t){for(s=0,o=i.data.datasets.length;s<o;++s)if(i.isDatasetVisible(s)){a=i.getDatasetMeta(s),t=a.data,r=a.controller;break}}if(!t)return 0;for(s=0,o=t.length;s<o;++s)l=r.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){const o=this.resolveDataElementOptions(i);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(R(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}B(se,"id","doughnut"),B(se,"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"}),B(se,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),B(se,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class kn extends _t{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:l}=ks(e,s,a);this._drawStart=r,this._drawCount=l,ws(e)&&(r=0,l=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=s;const d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:d},t),this.updateElements(s,r,l,t)}updateElements(t,e,i,s){const o=s==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:d}=this._cachedMeta,{sharedOptions:h,includeOptions:f}=this._getSharedOptions(e,s),u=a.axis,p=r.axis,{spanGaps:m,segment:g}=this.options,b=fe(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||s==="none",_=e+i,w=t.length;let x=e>0&&this.getParsed(e-1);for(let k=0;k<w;++k){const M=t[k],v=y?M:{};if(k<e||k>=_){v.skip=!0;continue}const D=this.getParsed(k),F=z(D[p]),T=v[u]=a.getPixelForValue(D[u],k),P=v[p]=o||F?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,D,l):D[p],k);v.skip=isNaN(T)||isNaN(P)||F,v.stop=k>0&&Math.abs(D[u]-x[u])>b,g&&(v.parsed=D,v.raw=d.data[k]),f&&(v.options=h||this.resolveDataElementOptions(k,M.active?"active":s)),y||this.updateElement(M,k,v,s),x=D}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const o=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}B(kn,"id","line"),B(kn,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),B(kn,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Le extends _t{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=Pe(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,e,i,s){return $s.bind(this)(t,e,i,s)}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((i,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(s/2,0),a=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,s){const o=s==="reset",a=this.chart,l=a.options.animation,d=this._cachedMeta.rScale,h=d.xCenter,f=d.yCenter,u=d.getIndexAngle(0)-.5*K;let p=u,m;const g=360/this.countVisibleElements();for(m=0;m<e;++m)p+=this._computeAngle(m,s,g);for(m=e;m<e+i;m++){const b=t[m];let y=p,_=p+this._computeAngle(m,s,g),w=a.getDataVisibility(m)?d.getDistanceFromCenterForValue(this.getParsed(m).r):0;p=_,o&&(l.animateScale&&(w=0),l.animateRotate&&(y=_=u));const x={x:h,y:f,innerRadius:0,outerRadius:w,startAngle:y,endAngle:_,options:this.resolveDataElementOptions(m,b.active?"active":s)};this.updateElement(b,m,x,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?yt(this.resolveDataElementOptions(t,e).angle||i):0}}B(Le,"id","polarArea"),B(Le,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),B(Le,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ki extends se{}B(ki,"id","pie"),B(ki,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class wn extends _t{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return $s.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],o=e.iScale.getLabels();if(i.points=s,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const r={_loop:!0,_fullLoop:o.length===s.length,options:a};this.updateElement(i,void 0,r,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const o=this._cachedMeta.rScale,a=s==="reset";for(let r=e;r<e+i;r++){const l=t[r],d=this.resolveDataElementOptions(r,l.active?"active":s),h=o.getPointPositionForValue(r,this.getParsed(r).r),f=a?o.xCenter:h.x,u=a?o.yCenter:h.y,p={x:f,y:u,angle:h.angle,skip:isNaN(f)||isNaN(u),options:d};this.updateElement(l,r,p,s)}}}B(wn,"id","radar"),B(wn,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),B(wn,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Cn extends _t{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:o}=e,a=this.getParsed(t),r=s.getLabelForValue(a.x),l=o.getLabelForValue(a.y);return{label:i[t]||"",value:"("+r+", "+l+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled;let{start:o,count:a}=ks(e,i,s);if(this._drawStart=o,this._drawCount=a,ws(e)&&(o=0,a=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:r,_dataset:l}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!l._decimated,r.points=i;const d=this.resolveDatasetElementOptions(t);d.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:d},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,s){const o=s==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:d}=this._cachedMeta,h=this.resolveDataElementOptions(e,s),f=this.getSharedOptions(h),u=this.includeOptions(s,f),p=a.axis,m=r.axis,{spanGaps:g,segment:b}=this.options,y=fe(g)?g:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||s==="none";let w=e>0&&this.getParsed(e-1);for(let x=e;x<e+i;++x){const k=t[x],M=this.getParsed(x),v=_?k:{},D=z(M[m]),F=v[p]=a.getPixelForValue(M[p],x),T=v[m]=o||D?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,M,l):M[m],x);v.skip=isNaN(F)||isNaN(T)||D,v.stop=x>0&&Math.abs(M[p]-w[p])>y,b&&(v.parsed=M,v.raw=d.data[x]),u&&(v.options=f||this.resolveDataElementOptions(x,k.active?"active":s)),_||this.updateElement(k,x,v,s),w=M}this.updateSharedOptions(f,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,o,a)/2}}B(Cn,"id","scatter"),B(Cn,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),B(Cn,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var vc=Object.freeze({__proto__:null,BarController:_n,BubbleController:xn,DoughnutController:se,LineController:kn,PieController:ki,PolarAreaController:Le,RadarController:wn,ScatterController:Cn});function oe(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class wi{constructor(t){B(this,"options");this.options=t||{}}static override(t){Object.assign(wi.prototype,t)}init(){}formats(){return oe()}parse(){return oe()}format(){return oe()}add(){return oe()}diff(){return oe()}startOf(){return oe()}endOf(){return oe()}}var Dc={_date:wi};function Ec(n,t,e,i){const{controller:s,data:o,_sorted:a}=n,r=s._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const l=r._reversePixels?Zr:Dt;if(i){if(s._sharedOptions){const d=o[0],h=typeof d.getRange=="function"&&d.getRange(t);if(h){const f=l(o,t,e-h),u=l(o,t,e+h);return{lo:f.lo,hi:u.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function $e(n,t,e,i,s){const o=n.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r<l;++r){const{index:d,data:h}=o[r],{lo:f,hi:u}=Ec(o[r],t,a,s);for(let p=f;p<=u;++p){const m=h[p];m.skip||i(m,d,p)}}}function Bc(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,s){const o=t?Math.abs(i.x-s.x):0,a=e?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function Ci(n,t,e,i,s){const o=[];return!s&&!n.isPointInArea(t)||$e(n,e,t,function(r,l,d){!s&&!Et(r,n.chartArea,0)||r.inRange(t.x,t.y,i)&&o.push({element:r,datasetIndex:l,index:d})},!0),o}function Vc(n,t,e,i){let s=[];function o(a,r,l){const{startAngle:d,endAngle:h}=a.getProps(["startAngle","endAngle"],i),{angle:f}=ms(a,{x:t.x,y:t.y});Be(f,d,h)&&s.push({element:a,datasetIndex:r,index:l})}return $e(n,e,t,o),s}function Pc(n,t,e,i,s,o){let a=[];const r=Bc(e);let l=Number.POSITIVE_INFINITY;function d(h,f,u){const p=h.inRange(t.x,t.y,s);if(i&&!p)return;const m=h.getCenterPoint(s);if(!(!!o||n.isPointInArea(m))&&!p)return;const b=r(t,m);b<l?(a=[{element:h,datasetIndex:f,index:u}],l=b):b===l&&a.push({element:h,datasetIndex:f,index:u})}return $e(n,e,t,d),a}function Si(n,t,e,i,s,o){return!o&&!n.isPointInArea(t)?[]:e==="r"&&!i?Vc(n,t,e,s):Pc(n,t,e,i,s,o)}function co(n,t,e,i,s){const o=[],a=e==="x"?"inXRange":"inYRange";let r=!1;return $e(n,e,t,(l,d,h)=>{l[a](t[e],s)&&(o.push({element:l,datasetIndex:d,index:h}),r=r||l.inRange(t.x,t.y,s))}),i&&!r?[]:o}var Oc={evaluateInteractionItems:$e,modes:{index(n,t,e,i){const s=ne(t,n),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?Ci(n,s,o,i,a):Si(n,s,o,!1,i,a),l=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(d=>{const h=r[0].index,f=d.data[h];f&&!f.skip&&l.push({element:f,datasetIndex:d.index,index:h})}),l):[]},dataset(n,t,e,i){const s=ne(t,n),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?Ci(n,s,o,i,a):Si(n,s,o,!1,i,a);if(r.length>0){const l=r[0].datasetIndex,d=n.getDatasetMeta(l).data;r=[];for(let h=0;h<d.length;++h)r.push({element:d[h],datasetIndex:l,index:h})}return r},point(n,t,e,i){const s=ne(t,n),o=e.axis||"xy",a=e.includeInvisible||!1;return Ci(n,s,o,i,a)},nearest(n,t,e,i){const s=ne(t,n),o=e.axis||"xy",a=e.includeInvisible||!1;return Si(n,s,o,e.intersect,i,a)},x(n,t,e,i){const s=ne(t,n);return co(n,s,"x",e.intersect,i)},y(n,t,e,i){const s=ne(t,n);return co(n,s,"y",e.intersect,i)}}};const ho=["left","top","right","bottom"];function Ne(n,t){return n.filter(e=>e.pos===t)}function fo(n,t){return n.filter(e=>ho.indexOf(e.pos)===-1&&e.box.axis===t)}function Re(n,t){return n.sort((e,i)=>{const s=t?i:e,o=t?e:i;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Tc(n){const t=[];let e,i,s,o,a,r;for(e=0,i=(n||[]).length;e<i;++e)s=n[e],{position:o,options:{stack:a,stackWeight:r=1}}=s,t.push({index:e,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&o+a,stackWeight:r});return t}function Fc(n){const t={};for(const e of n){const{stack:i,pos:s,stackWeight:o}=e;if(!i||!ho.includes(s))continue;const a=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function Ac(n,t){const e=Fc(n),{vBoxMaxWidth:i,hBoxMaxHeight:s}=t;let o,a,r;for(o=0,a=n.length;o<a;++o){r=n[o];const{fullSize:l}=r.box,d=e[r.stack],h=d&&r.stackWeight/d.weight;r.horizontal?(r.width=h?h*i:l&&t.availableWidth,r.height=s):(r.width=i,r.height=h?h*s:l&&t.availableHeight)}return e}function Lc(n){const t=Tc(n),e=Re(t.filter(d=>d.box.fullSize),!0),i=Re(Ne(t,"left"),!0),s=Re(Ne(t,"right")),o=Re(Ne(t,"top"),!0),a=Re(Ne(t,"bottom")),r=fo(t,"x"),l=fo(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:s.concat(l).concat(a).concat(r),chartArea:Ne(t,"chartArea"),vertical:i.concat(s).concat(l),horizontal:o.concat(a).concat(r)}}function uo(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function po(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function $c(n,t,e,i){const{pos:s,box:o}=e,a=n.maxPadding;if(!I(s)){e.size&&(n[s]-=e.size);const f=i[e.stack]||{size:0,count:1};f.size=Math.max(f.size,e.horizontal?o.height:o.width),e.size=f.size/f.count,n[s]+=e.size}o.getPadding&&po(a,o.getPadding());const r=Math.max(0,t.outerWidth-uo(a,n,"left","right")),l=Math.max(0,t.outerHeight-uo(a,n,"top","bottom")),d=r!==n.w,h=l!==n.h;return n.w=r,n.h=l,e.horizontal?{same:d,other:h}:{same:h,other:d}}function Nc(n){const t=n.maxPadding;function e(i){const s=Math.max(t[i]-n[i],0);return n[i]+=s,s}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function Rc(n,t){const e=t.maxPadding;function i(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return i(n?["left","right"]:["top","bottom"])}function Ie(n,t,e,i){const s=[];let o,a,r,l,d,h;for(o=0,a=n.length,d=0;o<a;++o){r=n[o],l=r.box,l.update(r.width||t.w,r.height||t.h,Rc(r.horizontal,t));const{same:f,other:u}=$c(t,e,r,i);d|=f&&s.length,h=h||u,l.fullSize||s.push(r)}return d&&Ie(s,t,e,i)||h}function Sn(n,t,e,i,s){n.top=e,n.left=t,n.right=t+i,n.bottom=e+s,n.width=i,n.height=s}function mo(n,t,e,i){const s=e.padding;let{x:o,y:a}=t;for(const r of n){const l=r.box,d=i[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/d.weight||1;if(r.horizontal){const f=t.w*h,u=d.size||l.height;De(d.start)&&(a=d.start),l.fullSize?Sn(l,s.left,a,e.outerWidth-s.right-s.left,u):Sn(l,t.left+d.placed,a,f,u),d.start=a,d.placed+=f,a=l.bottom}else{const f=t.h*h,u=d.size||l.width;De(d.start)&&(o=d.start),l.fullSize?Sn(l,o,s.top,u,e.outerHeight-s.bottom-s.top):Sn(l,o,t.top+d.placed,u,f),d.start=o,d.placed+=f,o=l.right}}t.x=o,t.y=a}var lt={addBox(n,t){n.boxes||(n.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const s=rt(n.options.layout.padding),o=Math.max(t-s.width,0),a=Math.max(e-s.height,0),r=Lc(n.boxes),l=r.vertical,d=r.horizontal;j(n.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},s);po(u,rt(i));const p=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),m=Ac(l.concat(d),f);Ie(r.fullSize,p,f,m),Ie(l,p,f,m),Ie(d,p,f,m)&&Ie(l,p,f,m),Nc(p),mo(r.leftAndTop,p,f,m),p.x+=p.w,p.y+=p.h,mo(r.rightAndBottom,p,f,m),n.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},j(r.chartArea,g=>{const b=g.box;Object.assign(b,n.chartArea),b.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class go{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class Ic extends go{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Mn="$chartjs",zc={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},bo=n=>n===null||n==="";function Wc(n,t){const e=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[Mn]={initial:{height:i,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",bo(s)){const o=zs(n,"width");o!==void 0&&(n.width=o)}if(bo(i))if(n.style.height==="")n.height=n.width/(t||2);else{const o=zs(n,"height");o!==void 0&&(n.height=o)}return n}const yo=jl?{passive:!0}:!1;function Hc(n,t,e){n.addEventListener(t,e,yo)}function jc(n,t,e){n.canvas.removeEventListener(t,e,yo)}function Yc(n,t){const e=zc[n.type]||n.type,{x:i,y:s}=ne(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function vn(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Uc(n,t,e){const i=n.canvas,s=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||vn(r.addedNodes,i),a=a&&!vn(r.removedNodes,i);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function Xc(n,t,e){const i=n.canvas,s=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||vn(r.removedNodes,i),a=a&&!vn(r.addedNodes,i);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const ze=new Map;let _o=0;function xo(){const n=window.devicePixelRatio;n!==_o&&(_o=n,ze.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function qc(n,t){ze.size||window.addEventListener("resize",xo),ze.set(n,t)}function Kc(n){ze.delete(n),ze.size||window.removeEventListener("resize",xo)}function Gc(n,t,e){const i=n.canvas,s=i&&bi(i);if(!s)return;const o=xs((r,l)=>{const d=s.clientWidth;e(r,l),d<s.clientWidth&&e()},window),a=new ResizeObserver(r=>{const l=r[0],d=l.contentRect.width,h=l.contentRect.height;d===0&&h===0||o(d,h)});return a.observe(s),qc(n,o),a}function Mi(n,t,e){e&&e.disconnect(),t==="resize"&&Kc(n)}function Zc(n,t,e){const i=n.canvas,s=xs(o=>{n.ctx!==null&&e(Yc(o,n))},n);return Hc(i,t,s),s}class Jc extends go{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Wc(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Mn])return!1;const i=e[Mn].initial;["height","width"].forEach(o=>{const a=i[o];z(a)?e.removeAttribute(o):e.setAttribute(o,a)});const s=i.style||{};return Object.keys(s).forEach(o=>{e.style[o]=s[o]}),e.width=e.width,delete e[Mn],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),a={attach:Uc,detach:Xc,resize:Gc}[e]||Zc;s[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Mi,detach:Mi,resize:Mi}[e]||jc)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return Hl(t,e,i,s)}isAttached(t){const e=bi(t);return!!(e&&e.isConnected)}}function Qc(n){return!Rs()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?Ic:Jc}let Vt=(Kn=class{constructor(){B(this,"x");B(this,"y");B(this,"active",!1);B(this,"options");B(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return fe(this.x)&&fe(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach(o=>{s[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),s}},B(Kn,"defaults",{}),B(Kn,"defaultRoutes"),Kn);function td(n,t){const e=n.options.ticks,i=ed(n),s=Math.min(e.maxTicksLimit||i,i),o=e.major.enabled?id(t):[],a=o.length,r=o[0],l=o[a-1],d=[];if(a>s)return sd(t,d,o,a/s),d;const h=nd(o,t,s);if(a>0){let f,u;const p=a>1?Math.round((l-r)/(a-1)):null;for(Dn(t,d,h,z(p)?0:r-p,r),f=0,u=a-1;f<u;f++)Dn(t,d,h,o[f],o[f+1]);return Dn(t,d,h,l,z(p)?t.length:l+p),d}return Dn(t,d,h),d}function ed(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),s=n._maxLength/e;return Math.floor(Math.min(i,s))}function nd(n,t,e){const i=od(n),s=t.length/e;if(!i)return Math.max(s,1);const o=Xr(i);for(let a=0,r=o.length-1;a<r;a++){const l=o[a];if(l>s)return l}return Math.max(s,1)}function id(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function sd(n,t,e,i){let s=0,o=e[0],a;for(i=Math.ceil(i),a=0;a<n.length;a++)a===o&&(t.push(n[a]),s++,o=e[s*i])}function Dn(n,t,e,i,s){const o=R(i,0),a=Math.min(R(s,n.length),n.length);let r=0,l,d,h;for(e=Math.ceil(e),s&&(l=s-i,e=l/Math.floor(l/e)),h=o;h<0;)r++,h=Math.round(o+r*e);for(d=Math.max(o,0);d<a;d++)d===h&&(t.push(n[d]),r++,h=Math.round(o+r*e))}function od(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const ad=n=>n==="left"?"right":n==="right"?"left":n,ko=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,wo=(n,t)=>Math.min(t||n,n);function Co(n,t){const e=[],i=n.length/t,s=n.length;let o=0;for(;o<s;o+=i)e.push(n[Math.floor(o)]);return e}function rd(n,t,e){const i=n.ticks.length,s=Math.min(t,i-1),o=n._startPixel,a=n._endPixel,r=1e-6;let l=n.getPixelForTick(s),d;if(!(e&&(i===1?d=Math.max(l-o,a-l):t===0?d=(n.getPixelForTick(1)-l)/2:d=(l-n.getPixelForTick(s-1))/2,l+=s<t?d:-d,l<o-r||l>a+r)))return l}function ld(n,t){j(n,e=>{const i=e.gc,s=i.length/2;let o;if(s>t){for(o=0;o<s;++o)delete e.data[i[o]];i.splice(0,s)}})}function We(n){return n.drawTicks?n.tickLength:0}function So(n,t){if(!n.display)return 0;const e=nt(n.font,t),i=rt(n.padding);return(q(n.text)?n.text.length:1)*e.lineHeight+i.height}function cd(n,t){return Wt(n,{scale:t,type:"scale"})}function dd(n,t,e){return Wt(n,{tick:e,index:t,type:"tick"})}function hd(n,t,e){let i=ri(n);return(e&&t!=="right"||!e&&t==="right")&&(i=ad(i)),i}function fd(n,t,e,i){const{top:s,left:o,bottom:a,right:r,chart:l}=n,{chartArea:d,scales:h}=l;let f=0,u,p,m;const g=a-s,b=r-o;if(n.isHorizontal()){if(p=at(i,o,r),I(e)){const y=Object.keys(e)[0],_=e[y];m=h[y].getPixelForValue(_)+g-t}else e==="center"?m=(d.bottom+d.top)/2+g-t:m=ko(n,e,t);u=r-o}else{if(I(e)){const y=Object.keys(e)[0],_=e[y];p=h[y].getPixelForValue(_)-b+t}else e==="center"?p=(d.left+d.right)/2-b+t:p=ko(n,e,t);m=at(i,a,s),f=e==="left"?-et:et}return{titleX:p,titleY:m,maxWidth:u,rotation:f}}class ae extends Vt{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:i,_suggestedMax:s}=this;return t=ft(t,Number.POSITIVE_INFINITY),e=ft(e,Number.NEGATIVE_INFINITY),i=ft(i,Number.POSITIVE_INFINITY),s=ft(s,Number.NEGATIVE_INFINITY),{min:ft(t,i),max:ft(e,s),minDefined:J(t),maxDefined:J(e)}}getMinMax(t){let{min:e,max:i,minDefined:s,maxDefined:o}=this.getUserBounds(),a;if(s&&o)return{min:e,max:i};const r=this.getMatchingVisibleMetas();for(let l=0,d=r.length;l<d;++l)a=r[l].controller.getMinMax(this,t),s||(e=Math.min(e,a.min)),o||(i=Math.max(i,a.max));return e=o&&e>i?i:e,i=s&&e>i?e:i,{min:ft(e,ft(i,e)),max:ft(i,ft(e,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(){U(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=kl(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?Co(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=td(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){U(this.options.afterUpdate,[this])}beforeSetDimensions(){U(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(){U(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),U(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){U(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,o;for(i=0,s=t.length;i<s;i++)o=t[i],o.label=U(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){U(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){U(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=wo(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,o=e.maxRotation;let a=s,r,l,d;if(!this._isVisible()||!e.display||s>=o||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const h=this._getLabelSizes(),f=h.widest.width,u=h.highest.height,p=it(this.chart.width-f,0,this.maxWidth);r=t.offset?this.maxWidth/i:p/(i-1),f+6>r&&(r=p/(i-(t.offset?.5:1)),l=this.maxHeight-We(t.grid)-e.padding-So(t.title,this.chart.options.font),d=Math.sqrt(f*f+u*u),a=si(Math.min(Math.asin(it((h.highest.height+6)/r,-1,1)),Math.asin(it(l/d,-1,1))-Math.asin(it(u/d,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){U(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){U(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=So(s,e.options.font);if(r?(t.width=this.maxWidth,t.height=We(o)+l):(t.height=this.maxHeight,t.width=We(o)+l),i.display&&this.ticks.length){const{first:d,last:h,widest:f,highest:u}=this._getLabelSizes(),p=i.padding*2,m=yt(this.labelRotation),g=Math.cos(m),b=Math.sin(m);if(r){const y=i.mirror?0:b*f.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+y+p)}else{const y=i.mirror?0:g*f.width+b*u.height;t.width=Math.min(this.maxWidth,t.width+y+p)}this._calculatePadding(d,h,b,g)}}this._handleMargins(),r?(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,i,s){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,d=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,p=0;l?d?(u=s*t.width,p=i*e.height):(u=i*t.height,p=s*e.width):o==="start"?p=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,p=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((p-f+a)*this.width/(this.width-f),0)}else{let h=e.height/2,f=t.height/2;o==="start"?(h=0,f=t.height):o==="end"&&(h=e.height,f=0),this.paddingTop=h+a,this.paddingBottom=f+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(){U(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)z(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Co(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:s,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(e/wo(e,i));let d=0,h=0,f,u,p,m,g,b,y,_,w,x,k;for(f=0;f<e;f+=l){if(m=t[f].label,g=this._resolveTickFontOptions(f),s.font=b=g.string,y=o[b]=o[b]||{data:{},gc:[]},_=g.lineHeight,w=x=0,!z(m)&&!q(m))w=fn(s,y.data,y.gc,w,m),x=_;else if(q(m))for(u=0,p=m.length;u<p;++u)k=m[u],!z(k)&&!q(k)&&(w=fn(s,y.data,y.gc,w,k),x+=_);a.push(w),r.push(x),d=Math.max(w,d),h=Math.max(x,h)}ld(o,e);const M=a.indexOf(d),v=r.indexOf(h),D=F=>({width:a[F]||0,height:r[F]||0});return{first:D(0),last:D(e-1),widest:D(M),highest:D(v),widths:a,heights:r}}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 Gr(this._alignToPixels?Jt(this.chart,e,0):e)}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 i=e[t];return i.$context||(i.$context=dd(this.getContext(),t,i))}return this.$context||(this.$context=cd(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=yt(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*i>r*s?r/i:l/s:l*s<r*i?l/i:r/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:o,position:a,border:r}=s,l=o.offset,d=this.isHorizontal(),f=this.ticks.length+(l?1:0),u=We(o),p=[],m=r.setContext(this.getContext()),g=m.display?m.width:0,b=g/2,y=function(C){return Jt(i,C,g)};let _,w,x,k,M,v,D,F,T,P,L,X;if(a==="top")_=y(this.bottom),v=this.bottom-u,F=_-b,P=y(t.top)+b,X=t.bottom;else if(a==="bottom")_=y(this.top),P=t.top,X=y(t.bottom)-b,v=_+b,F=this.top+u;else if(a==="left")_=y(this.right),M=this.right-u,D=_-b,T=y(t.left)+b,L=t.right;else if(a==="right")_=y(this.left),T=t.left,L=y(t.right)-b,M=_+b,D=this.left+u;else if(e==="x"){if(a==="center")_=y((t.top+t.bottom)/2+.5);else if(I(a)){const C=Object.keys(a)[0],E=a[C];_=y(this.chart.scales[C].getPixelForValue(E))}P=t.top,X=t.bottom,v=_+b,F=v+u}else if(e==="y"){if(a==="center")_=y((t.left+t.right)/2);else if(I(a)){const C=Object.keys(a)[0],E=a[C];_=y(this.chart.scales[C].getPixelForValue(E))}M=_-b,D=M-u,T=t.left,L=t.right}const O=R(s.ticks.maxTicksLimit,f),S=Math.max(1,Math.ceil(f/O));for(w=0;w<f;w+=S){const C=this.getContext(w),E=o.setContext(C),V=r.setContext(C),A=E.lineWidth,$=E.color,H=V.dash||[],Y=V.dashOffset,Z=E.tickWidth,tt=E.tickColor,st=E.tickBorderDash||[],bt=E.tickBorderDashOffset;x=rd(this,w,l),x!==void 0&&(k=Jt(i,x,A),d?M=D=T=L=k:v=F=P=X=k,p.push({tx1:M,ty1:v,tx2:D,ty2:F,x1:T,y1:P,x2:L,y2:X,width:A,color:$,borderDash:H,borderDashOffset:Y,tickWidth:Z,tickColor:tt,tickBorderDash:st,tickBorderDashOffset:bt}))}return this._ticksLength=f,this._borderValue=_,p}_computeLabelItems(t){const e=this.axis,i=this.options,{position:s,ticks:o}=i,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:d,padding:h,mirror:f}=o,u=We(i.grid),p=u+h,m=f?-h:p,g=-yt(this.labelRotation),b=[];let y,_,w,x,k,M,v,D,F,T,P,L,X="middle";if(s==="top")M=this.bottom-m,v=this._getXAxisLabelAlignment();else if(s==="bottom")M=this.top+m,v=this._getXAxisLabelAlignment();else if(s==="left"){const S=this._getYAxisLabelAlignment(u);v=S.textAlign,k=S.x}else if(s==="right"){const S=this._getYAxisLabelAlignment(u);v=S.textAlign,k=S.x}else if(e==="x"){if(s==="center")M=(t.top+t.bottom)/2+p;else if(I(s)){const S=Object.keys(s)[0],C=s[S];M=this.chart.scales[S].getPixelForValue(C)+p}v=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")k=(t.left+t.right)/2-p;else if(I(s)){const S=Object.keys(s)[0],C=s[S];k=this.chart.scales[S].getPixelForValue(C)}v=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?X="top":l==="end"&&(X="bottom"));const O=this._getLabelSizes();for(y=0,_=r.length;y<_;++y){w=r[y],x=w.label;const S=o.setContext(this.getContext(y));D=this.getPixelForTick(y)+o.labelOffset,F=this._resolveTickFontOptions(y),T=F.lineHeight,P=q(x)?x.length:1;const C=P/2,E=S.color,V=S.textStrokeColor,A=S.textStrokeWidth;let $=v;a?(k=D,v==="inner"&&(y===_-1?$=this.options.reverse?"left":"right":y===0?$=this.options.reverse?"right":"left":$="center"),s==="top"?d==="near"||g!==0?L=-P*T+T/2:d==="center"?L=-O.highest.height/2-C*T+T:L=-O.highest.height+T/2:d==="near"||g!==0?L=T/2:d==="center"?L=O.highest.height/2-C*T:L=O.highest.height-P*T,f&&(L*=-1),g!==0&&!S.showLabelBackdrop&&(k+=T/2*Math.sin(g))):(M=D,L=(1-P)*T/2);let H;if(S.showLabelBackdrop){const Y=rt(S.backdropPadding),Z=O.heights[y],tt=O.widths[y];let st=L-Y.top,bt=0-Y.left;switch(X){case"middle":st-=Z/2;break;case"bottom":st-=Z;break}switch(v){case"center":bt-=tt/2;break;case"right":bt-=tt;break}H={left:bt,top:st,width:tt+Y.width,height:Z+Y.height,color:S.backdropColor}}b.push({label:x,font:F,textOffset:L,options:{rotation:g,color:E,strokeColor:V,strokeWidth:A,textAlign:$,textBaseline:X,translation:[k,M],backdrop:H}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-yt(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let d,h;return e==="left"?s?(h=this.right+o,i==="near"?d="left":i==="center"?(d="center",h+=l/2):(d="right",h+=l)):(h=this.right-r,i==="near"?d="right":i==="center"?(d="center",h-=l/2):(d="left",h=this.left)):e==="right"?s?(h=this.left+o,i==="near"?d="right":i==="center"?(d="center",h-=l/2):(d="left",h-=l)):(h=this.left+r,i==="near"?d="left":i==="center"?(d="center",h+=l/2):(d="right",h=this.right)):d="right",{textAlign:d,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex(o=>o.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,d,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(d.x,d.y),i.stroke(),i.restore())};if(e.display)for(o=0,a=s.length;o<a;++o){const l=s[o];e.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:s}}=this,o=i.setContext(this.getContext()),a=i.display?o.width:0;if(!a)return;const r=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let d,h,f,u;this.isHorizontal()?(d=Jt(t,this.left,a)-a/2,h=Jt(t,this.right,r)+r/2,f=u=l):(f=Jt(t,this.top,a)-a/2,u=Jt(t,this.bottom,r)+r/2,d=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(d,f),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&un(i,s);const o=this.getLabelItems(t);for(const a of o){const r=a.options,l=a.font,d=a.label,h=a.textOffset;Qt(i,d,0,h,l,r)}s&&pn(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;const o=nt(i.font),a=rt(i.padding),r=i.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||I(e)?(l+=a.bottom,q(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:d,titleY:h,maxWidth:f,rotation:u}=fd(this,l,e,r);Qt(t,i.text,0,0,o,{color:i.color,maxWidth:f,rotation:u,textAlign:hd(r,e,s),textBaseline:"middle",translation:[d,h]})}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,i=R(t.grid&&t.grid.z,-1),s=R(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ae.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let o,a;for(o=0,a=e.length;o<a;++o){const r=e[o];r[i]===this.id&&(!t||r.type===t)&&s.push(r)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return nt(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class En{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,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 i;md(e)&&(i=this.register(e));const s=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,ud(t,a,i),this.override&&Q.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in Q[s]&&(delete Q[s][i],this.override&&delete Zt[i])}}function ud(n,t,e){const i=Me(Object.create(null),[e?Q.get(e):{},Q.get(t),n.defaults]);Q.set(t,i),n.defaultRoutes&&pd(t,n.defaultRoutes),n.descriptors&&Q.describe(t,n.descriptors)}function pd(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),s=i.pop(),o=[n].concat(i).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");Q.route(o,s,l,r)})}function md(n){return"id"in n&&"defaults"in n}class gd{constructor(){this.controllers=new En(_t,"datasets",!0),this.elements=new En(Vt,"elements"),this.plugins=new En(Object,"plugins"),this.scales=new En(ae,"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,i){[...e].forEach(s=>{const o=i||this._getRegistryForType(s);i||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):j(s,a=>{const r=i||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,i){const s=ii(t);U(i["before"+s],[],i),e[t](i),U(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var kt=new gd;class bd{constructor(){this._init=[]}notify(t,e,i,s){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=s?this._descriptors(t).filter(s):this._descriptors(t),a=this._notify(o,t,e,i);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,i,s){s=s||{};for(const o of t){const a=o.plugin,r=a[i],l=[e,s,o.options];if(U(r,l,a)===!1&&s.cancelable)return!1}return!0}invalidate(){z(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 i=t&&t.config,s=R(i.options&&i.options.plugins,{}),o=yd(i);return s===!1&&!e?[]:xd(t,o,s,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,s=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function yd(n){const t={},e=[],i=Object.keys(kt.plugins.items);for(let o=0;o<i.length;o++)e.push(kt.getPlugin(i[o]));const s=n.plugins||[];for(let o=0;o<s.length;o++){const a=s[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function _d(n,t){return!t&&n===!1?null:n===!0?{}:n}function xd(n,{plugins:t,localIds:e},i,s){const o=[],a=n.getContext();for(const r of t){const l=r.id,d=_d(i[l],s);d!==null&&o.push({plugin:r,options:kd(n.config,{plugin:r,local:e[l]},d,a)})}return o}function kd(n,{plugin:t,local:e},i,s){const o=n.pluginScopeKeys(t),a=n.getOptionScopes(i,o);return e&&t.defaults&&a.push(t.defaults),n.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function vi(n,t){const e=Q.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function wd(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function Cd(n,t){return n===t?"_index_":"_value_"}function Mo(n){if(n==="x"||n==="y"||n==="r")return n}function Sd(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function Di(n,...t){if(Mo(n))return n;for(const e of t){const i=e.axis||Sd(e.position)||n.length>1&&Mo(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function vo(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function Md(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(e.length)return vo(n,"x",e[0])||vo(n,"y",e[0])}return{}}function vd(n,t){const e=Zt[n.type]||{scales:{}},i=t.scales||{},s=vi(n.type,t),o=Object.create(null);return Object.keys(i).forEach(a=>{const r=i[a];if(!I(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Di(a,r,Md(a,n),Q.scales[r.type]),d=Cd(l,s),h=e.scales||{};o[a]=ve(Object.create(null),[{axis:l},r,h[l],h[d]])}),n.data.datasets.forEach(a=>{const r=a.type||n.type,l=a.indexAxis||vi(r,t),h=(Zt[r]||{}).scales||{};Object.keys(h).forEach(f=>{const u=wd(f,l),p=a[u+"AxisID"]||u;o[p]=o[p]||Object.create(null),ve(o[p],[{axis:u},i[p],h[f]])})}),Object.keys(o).forEach(a=>{const r=o[a];ve(r,[Q.scales[r.type],Q.scale])}),o}function Do(n){const t=n.options||(n.options={});t.plugins=R(t.plugins,{}),t.scales=vd(n,t)}function Eo(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Dd(n){return n=n||{},n.data=Eo(n.data),Do(n),n}const Bo=new Map,Vo=new Set;function Bn(n,t){let e=Bo.get(n);return e||(e=t(),Bo.set(n,e),Vo.add(e)),e}const He=(n,t,e)=>{const i=Rt(t,e);i!==void 0&&n.add(i)};class Ed{constructor(t){this._config=Dd(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=Eo(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(),Do(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Bn(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Bn(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Bn(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Bn(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:o}=this,a=this._cachedScopes(t,i),r=a.get(e);if(r)return r;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(f=>He(l,t,f))),h.forEach(f=>He(l,s,f)),h.forEach(f=>He(l,Zt[o]||{},f)),h.forEach(f=>He(l,Q,f)),h.forEach(f=>He(l,di,f))});const d=Array.from(l);return d.length===0&&d.push(Object.create(null)),Vo.has(e)&&a.set(e,d),d}chartOptionScopes(){const{options:t,type:e}=this;return[t,Zt[e]||{},Q.datasets[e]||{},{type:e},Q,di]}resolveNamedOptions(t,e,i,s=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=Po(this._resolverCache,t,s);let l=a;if(Vd(a,e)){o.$shared=!1,i=It(i)?i():i;const d=this.createResolver(t,i,r);l=ue(a,i,d)}for(const d of e)o[d]=l[d];return o}createResolver(t,e,i=[""],s){const{resolver:o}=Po(this._resolverCache,t,i);return I(e)?ue(o,e,void 0,s):o}}function Po(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const s=e.join();let o=i.get(s);return o||(o={resolver:pi(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,o)),o}const Bd=n=>I(n)&&Object.getOwnPropertyNames(n).reduce((t,e)=>t||It(n[e]),!1);function Vd(n,t){const{isScriptable:e,isIndexable:i}=Ps(n);for(const s of t){const o=e(s),a=i(s),r=(a||o)&&n[s];if(o&&(It(r)||Bd(r))||a&&q(r))return!0}return!1}var Pd="4.4.0";const Od=["top","bottom","left","right","chartArea"];function Oo(n,t){return n==="top"||n==="bottom"||Od.indexOf(n)===-1&&t==="x"}function To(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function Fo(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),U(e&&e.onComplete,[n],t)}function Td(n){const t=n.chart,e=t.options.animation;U(e&&e.onProgress,[n],t)}function Ao(n){return Rs()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Vn={},Lo=n=>{const t=Ao(n);return Object.values(Vn).filter(e=>e.canvas===t).pop()};function Fd(n,t,e){const i=Object.keys(n);for(const s of i){const o=+s;if(o>=t){const a=n[s];delete n[s],(e>0||o>t)&&(n[o+e]=a)}}}function Ad(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}function Pn(n,t,e){return n.options.clip?n[e]:t[e]}function Ld(n,t){const{xScale:e,yScale:i}=n;return e&&i?{left:Pn(e,t,"left"),right:Pn(e,t,"right"),top:Pn(i,t,"top"),bottom:Pn(i,t,"bottom")}:t}class Pt{static register(...t){kt.add(...t),$o()}static unregister(...t){kt.remove(...t),$o()}constructor(t,e){const i=this.config=new Ed(e),s=Ao(t),o=Lo(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Qc(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,a.aspectRatio),l=r&&r.canvas,d=l&&l.height,h=l&&l.width;if(this.id=Nr(),this.ctx=r,this.canvas=l,this.width=h,this.height=d,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 bd,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=tl(f=>this.update(f),a.resizeDelay||0),this._dataChanges=[],Vn[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Bt.listen(this,"complete",Fo),Bt.listen(this,"progress",Td),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:o}=this;return z(t)?e&&o?o:s?i/s: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 kt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Is(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Es(this.canvas,this.ctx),this}stop(){return Bt.stop(this),this}resize(t,e){Bt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,t,e,o),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Is(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),U(i.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};j(e,(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=Di(a,r),d=l==="r",h=l==="x";return{options:r,dposition:d?"chartArea":h?"bottom":"left",dtype:d?"radialLinear":h?"category":"linear"}}))),j(o,a=>{const r=a.options,l=r.id,d=Di(l,r),h=R(r.type,a.dtype);(r.position===void 0||Oo(r.position,d)!==Oo(a.dposition))&&(r.position=a.dposition),s[l]=!0;let f=null;if(l in i&&i[l].type===h)f=i[l];else{const u=kt.getScale(h);f=new u({id:l,type:h,ctx:this.ctx,chart:this}),i[f.id]=f}f.init(r,t)}),j(s,(a,r)=>{a||delete i[r]}),j(i,a=>{lt.configure(this,a,a.options),lt.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((s,o)=>s.index-o.index),i>e){for(let s=e;s<i;++s)this._destroyDatasetMeta(s);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(To("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,s)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const o=e[i];let a=this.getDatasetMeta(i);const r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(i),a=this.getDatasetMeta(i)),a.type=r,a.indexAxis=o.indexAxis||vi(r,this.options),a.order=o.order||0,a.index=i,a.label=""+o.label,a.visible=this.isDatasetVisible(i),a.controller)a.controller.updateIndex(i),a.controller.linkScales();else{const l=kt.getController(r),{datasetElementType:d,dataElementType:h}=Q.datasets[r];Object.assign(l,{dataElementType:kt.getElement(h),datasetElementType:d&&kt.getElement(d)}),a.controller=new l(this,i),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){j(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 i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let d=0,h=this.data.datasets.length;d<h;d++){const{controller:f}=this.getDatasetMeta(d),u=!s&&o.indexOf(f)===-1;f.buildOrUpdateElements(u),a=Math.max(+f.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),s||j(o,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(To("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){j(this.scales,t=>{lt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!ds(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:o}of e){const a=i==="_removeElements"?-o:o;Fd(t,s,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),s=i(0);for(let o=1;o<e;o++)if(!ds(s,i(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;lt.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],j(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,It(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Bt.has(this)?this.attached&&!Bt.running(this)&&Bt.start(this):(this.draw(),Fo({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resize(i,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)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,i=[];let s,o;for(s=0,o=e.length;s<o;++s){const a=e[s];(!t||a.visible)&&i.push(a)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)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,i=t._clip,s=!i.disabled,o=Ld(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(s&&un(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),s&&pn(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Et(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const o=Oc.modes[e];return typeof o=="function"?o(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter(o=>o&&o._dataset===e).pop();return s||(s={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},i.push(s)),s}getContext(){return this.$context||(this.$context=Wt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,s);De(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(o,{visible:i}),this.update(r=>r.datasetIndex===t?s: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(),Bt.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(),Es(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Vn[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,i=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},s=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};j(this.options.events,o=>i(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(l,d)=>{e.addEventListener(this,l,d),t[l]=d},s=(l,d)=>{t[l]&&(e.removeEventListener(this,l,d),delete t[l])},o=(l,d)=>{this.canvas&&this.resize(l,d)};let a;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",o),i("detach",a)};a=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){j(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},j(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];const d=a&&this.getDatasetMeta(a.datasetIndex).controller;d&&d[s+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:o,index:a})=>{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!rn(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const s=this.options.hover,o=(l,d)=>l.filter(h=>!d.some(f=>h.datasetIndex===f.datasetIndex&&h.index===f.index)),a=o(e,t),r=i?t:o(t,e);a.length&&this.updateHoverStyle(a,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:o}=this,a=e,r=this._getActiveElements(t,s,i,a),l=jr(t),d=Ad(t,this._lastEvent,i,l);i&&(this._lastEvent=null,U(o.onHover,[t,r,this],this),l&&U(o.onClick,[t,r,this],this));const h=!rn(r,s);return(h||e)&&(this._active=r,this._updateHoverStyles(r,s,e)),this._lastEvent=d,h}_getActiveElements(t,e,i,s){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}}B(Pt,"defaults",Q),B(Pt,"instances",Vn),B(Pt,"overrides",Zt),B(Pt,"registry",kt),B(Pt,"version",Pd),B(Pt,"getChart",Lo);function $o(){return j(Pt.instances,n=>n._plugins.invalidate())}function $d(n,t,e){const{startAngle:i,pixelMargin:s,x:o,y:a,outerRadius:r,innerRadius:l}=t;let d=s/r;n.beginPath(),n.arc(o,a,r,i-d,e+d),l>s?(d=s/l,n.arc(o,a,l,e+d,i-d,!0)):n.arc(o,a,s,e+et,i-et),n.closePath(),n.clip()}function Nd(n){return ui(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Rd(n,t,e,i){const s=Nd(n.options.borderRadius),o=(e-t)/2,a=Math.min(o,i*t/2),r=l=>{const d=(e-Math.min(o,l))*i/2;return it(l,0,Math.min(o,d))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:it(s.innerStart,0,a),innerEnd:it(s.innerEnd,0,a)}}function ge(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function On(n,t,e,i,s,o){const{x:a,y:r,startAngle:l,pixelMargin:d,innerRadius:h}=t,f=Math.max(t.outerRadius+i+e-d,0),u=h>0?h+i+e+d:0;let p=0;const m=s-l;if(i){const S=h>0?h-i:0,C=f>0?f-i:0,E=(S+C)/2,V=E!==0?m*E/(E+i):m;p=(m-V)/2}const g=Math.max(.001,m*f-e/K)/f,b=(m-g)/2,y=l+b+p,_=s-b-p,{outerStart:w,outerEnd:x,innerStart:k,innerEnd:M}=Rd(t,u,f,_-y),v=f-w,D=f-x,F=y+w/v,T=_-x/D,P=u+k,L=u+M,X=y+k/P,O=_-M/L;if(n.beginPath(),o){const S=(F+T)/2;if(n.arc(a,r,f,F,S),n.arc(a,r,f,S,T),x>0){const A=ge(D,T,a,r);n.arc(A.x,A.y,x,T,_+et)}const C=ge(L,_,a,r);if(n.lineTo(C.x,C.y),M>0){const A=ge(L,O,a,r);n.arc(A.x,A.y,M,_+et,O+Math.PI)}const E=(_-M/u+(y+k/u))/2;if(n.arc(a,r,u,_-M/u,E,!0),n.arc(a,r,u,E,y+k/u,!0),k>0){const A=ge(P,X,a,r);n.arc(A.x,A.y,k,X+Math.PI,y-et)}const V=ge(v,y,a,r);if(n.lineTo(V.x,V.y),w>0){const A=ge(v,F,a,r);n.arc(A.x,A.y,w,y-et,F)}}else{n.moveTo(a,r);const S=Math.cos(F)*f+a,C=Math.sin(F)*f+r;n.lineTo(S,C);const E=Math.cos(T)*f+a,V=Math.sin(T)*f+r;n.lineTo(E,V)}n.closePath()}function Id(n,t,e,i,s){const{fullCircles:o,startAngle:a,circumference:r}=t;let l=t.endAngle;if(o){On(n,t,e,i,l,s);for(let d=0;d<o;++d)n.fill();isNaN(r)||(l=a+(r%G||G))}return On(n,t,e,i,l,s),n.fill(),l}function zd(n,t,e,i,s){const{fullCircles:o,startAngle:a,circumference:r,options:l}=t,{borderWidth:d,borderJoinStyle:h,borderDash:f,borderDashOffset:u}=l,p=l.borderAlign==="inner";if(!d)return;n.setLineDash(f||[]),n.lineDashOffset=u,p?(n.lineWidth=d*2,n.lineJoin=h||"round"):(n.lineWidth=d,n.lineJoin=h||"bevel");let m=t.endAngle;if(o){On(n,t,e,i,m,s);for(let g=0;g<o;++g)n.stroke();isNaN(r)||(m=a+(r%G||G))}p&&$d(n,t,m),o||(On(n,t,e,i,m,s),n.stroke())}class je extends Vt{constructor(e){super();B(this,"circumference");B(this,"endAngle");B(this,"fullCircles");B(this,"innerRadius");B(this,"outerRadius");B(this,"pixelMargin");B(this,"startAngle");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,e&&Object.assign(this,e)}inRange(e,i,s){const o=this.getProps(["x","y"],s),{angle:a,distance:r}=ms(o,{x:e,y:i}),{startAngle:l,endAngle:d,innerRadius:h,outerRadius:f,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),p=(this.options.spacing+this.options.borderWidth)/2,g=R(u,d-l)>=G||Be(a,l,d),b=vt(r,h+p,f+p);return g&&b}getCenterPoint(e){const{x:i,y:s,startAngle:o,endAngle:a,innerRadius:r,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:d,spacing:h}=this.options,f=(o+a)/2,u=(r+l+h+d)/2;return{x:i+Math.cos(f)*u,y:s+Math.sin(f)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:s}=this,o=(i.offset||0)/4,a=(i.spacing||0)/2,r=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>G?Math.floor(s/G):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);const d=1-Math.sin(Math.min(K,s||0)),h=o*d;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,Id(e,this,h,a,r),zd(e,this,h,a,r),e.restore()}}B(je,"id","arc"),B(je,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),B(je,"defaultRoutes",{backgroundColor:"backgroundColor"}),B(je,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function No(n,t,e=t){n.lineCap=R(e.borderCapStyle,t.borderCapStyle),n.setLineDash(R(e.borderDash,t.borderDash)),n.lineDashOffset=R(e.borderDashOffset,t.borderDashOffset),n.lineJoin=R(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=R(e.borderWidth,t.borderWidth),n.strokeStyle=R(e.borderColor,t.borderColor)}function Wd(n,t,e){n.lineTo(e.x,e.y)}function Hd(n){return n.stepped?fl:n.tension||n.cubicInterpolationMode==="monotone"?ul:Wd}function Ro(n,t,e={}){const i=n.length,{start:s=0,end:o=i-1}=e,{start:a,end:r}=t,l=Math.max(s,a),d=Math.min(o,r),h=s<a&&o<a||s>r&&o>r;return{count:i,start:l,loop:t.loop,ilen:d<l&&!h?i+d-l:d-l}}function jd(n,t,e,i){const{points:s,options:o}=t,{count:a,start:r,loop:l,ilen:d}=Ro(s,e,i),h=Hd(o);let{move:f=!0,reverse:u}=i||{},p,m,g;for(p=0;p<=d;++p)m=s[(r+(u?d-p:p))%a],!m.skip&&(f?(n.moveTo(m.x,m.y),f=!1):h(n,g,m,u,o.stepped),g=m);return l&&(m=s[(r+(u?d:0))%a],h(n,g,m,u,o.stepped)),!!l}function Yd(n,t,e,i){const s=t.points,{count:o,start:a,ilen:r}=Ro(s,e,i),{move:l=!0,reverse:d}=i||{};let h=0,f=0,u,p,m,g,b,y;const _=x=>(a+(d?r-x:x))%o,w=()=>{g!==b&&(n.lineTo(h,b),n.lineTo(h,g),n.lineTo(h,y))};for(l&&(p=s[_(0)],n.moveTo(p.x,p.y)),u=0;u<=r;++u){if(p=s[_(u)],p.skip)continue;const x=p.x,k=p.y,M=x|0;M===m?(k<g?g=k:k>b&&(b=k),h=(f*h+x)/++f):(w(),n.lineTo(x,k),m=M,f=0,g=b=k),y=k}w()}function Ei(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Yd:jd}function Ud(n){return n.stepped?Yl:n.tension||n.cubicInterpolationMode==="monotone"?Ul:ie}function Xd(n,t,e,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,i)&&s.closePath()),No(n,t.options),n.stroke(s)}function qd(n,t,e,i){const{segments:s,options:o}=t,a=Ei(t);for(const r of s)No(n,o,r.style),n.beginPath(),a(n,t,r,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const Kd=typeof Path2D=="function";function Gd(n,t,e,i){Kd&&!t.options.segment?Xd(n,t,e,i):qd(n,t,e,i)}class Ht extends Vt{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 i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;$l(this._points,i,t,s,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=Jl(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,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],o=this.points,a=Xs(this,{property:e,start:s,end:s});if(!a.length)return;const r=[],l=Ud(i);let d,h;for(d=0,h=a.length;d<h;++d){const{start:f,end:u}=a[d],p=o[f],m=o[u];if(p===m){r.push(p);continue}const g=Math.abs((s-p[e])/(m[e]-p[e])),b=l(p,m,g,i.stepped);b[e]=t[e],r.push(b)}return r.length===1?r[0]:r}pathSegment(t,e,i){return Ei(this)(t,this,e,i)}path(t,e,i){const s=this.segments,o=Ei(this);let a=this._loop;e=e||0,i=i||this.points.length-e;for(const r of s)a&=o(t,this,r,{start:e,end:e+i-1});return!!a}draw(t,e,i,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Gd(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}B(Ht,"id","line"),B(Ht,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),B(Ht,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),B(Ht,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Io(n,t,e,i){const s=n.options,{[e]:o}=n.getProps([e],i);return Math.abs(t-o)<s.radius+s.hitRadius}class Tn extends Vt{constructor(e){super();B(this,"parsed");B(this,"skip");B(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,s){const o=this.options,{x:a,y:r}=this.getProps(["x","y"],s);return Math.pow(e-a,2)+Math.pow(i-r,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,i){return Io(this,e,"x",i)}inYRange(e,i){return Io(this,e,"y",i)}getCenterPoint(e){const{x:i,y:s}=this.getProps(["x","y"],e);return{x:i,y:s}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const s=i&&e.borderWidth||0;return(i+s)*2}draw(e,i){const s=this.options;this.skip||s.radius<.1||!Et(this,i,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,fi(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}B(Tn,"id","point"),B(Tn,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),B(Tn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function zo(n,t){const{x:e,y:i,base:s,width:o,height:a}=n.getProps(["x","y","base","width","height"],t);let r,l,d,h,f;return n.horizontal?(f=a/2,r=Math.min(e,s),l=Math.max(e,s),d=i-f,h=i+f):(f=o/2,r=e-f,l=e+f,d=Math.min(i,s),h=Math.max(i,s)),{left:r,top:d,right:l,bottom:h}}function jt(n,t,e,i){return n?0:it(t,e,i)}function Zd(n,t,e){const i=n.options.borderWidth,s=n.borderSkipped,o=Vs(i);return{t:jt(s.top,o.top,0,e),r:jt(s.right,o.right,0,t),b:jt(s.bottom,o.bottom,0,e),l:jt(s.left,o.left,0,t)}}function Jd(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,o=te(s),a=Math.min(t,e),r=n.borderSkipped,l=i||I(s);return{topLeft:jt(!l||r.top||r.left,o.topLeft,0,a),topRight:jt(!l||r.top||r.right,o.topRight,0,a),bottomLeft:jt(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:jt(!l||r.bottom||r.right,o.bottomRight,0,a)}}function Qd(n){const t=zo(n),e=t.right-t.left,i=t.bottom-t.top,s=Zd(n,e/2,i/2),o=Jd(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:o},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Bi(n,t,e,i){const s=t===null,o=e===null,r=n&&!(s&&o)&&zo(n,i);return r&&(s||vt(t,r.left,r.right))&&(o||vt(e,r.top,r.bottom))}function th(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function eh(n,t){n.rect(t.x,t.y,t.w,t.h)}function Vi(n,t,e={}){const i=n.x!==e.x?-t:0,s=n.y!==e.y?-t:0,o=(n.x+n.w!==e.x+e.w?t:0)-i,a=(n.y+n.h!==e.y+e.h?t:0)-s;return{x:n.x+i,y:n.y+s,w:n.w+o,h:n.h+a,radius:n.radius}}class Fn extends Vt{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:i,backgroundColor:s}}=this,{inner:o,outer:a}=Qd(this),r=th(a.radius)?Te:eh;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,Vi(a,e,o)),t.clip(),r(t,Vi(o,-e,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,Vi(o,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return Bi(this,t,e,i)}inXRange(t,e){return Bi(this,t,null,e)}inYRange(t,e){return Bi(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+s)/2:e,y:o?i:(i+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}B(Fn,"id","bar"),B(Fn,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),B(Fn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var nh=Object.freeze({__proto__:null,ArcElement:je,BarElement:Fn,LineElement:Ht,PointElement:Tn});const Pi=["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)"],Wo=Pi.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function Ho(n){return Pi[n%Pi.length]}function jo(n){return Wo[n%Wo.length]}function ih(n,t){return n.borderColor=Ho(t),n.backgroundColor=jo(t),++t}function sh(n,t){return n.backgroundColor=n.data.map(()=>Ho(t++)),t}function oh(n,t){return n.backgroundColor=n.data.map(()=>jo(t++)),t}function ah(n){let t=0;return(e,i)=>{const s=n.getDatasetMeta(i).controller;s instanceof se?t=sh(e,t):s instanceof Le?t=oh(e,t):s&&(t=ih(e,t))}}function Yo(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function rh(n){return n&&(n.borderColor||n.backgroundColor)}var lh={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:i},options:s}=n.config,{elements:o}=s;if(!e.forceOverride&&(Yo(i)||rh(s)||o&&Yo(o)))return;const a=ah(n);i.forEach(a)}};function ch(n,t,e,i,s){const o=s.samples||i;if(o>=e)return n.slice(t,t+e);const a=[],r=(e-2)/(o-2);let l=0;const d=t+e-1;let h=t,f,u,p,m,g;for(a[l++]=n[h],f=0;f<o-2;f++){let b=0,y=0,_;const w=Math.floor((f+1)*r)+1+t,x=Math.min(Math.floor((f+2)*r)+1,e)+t,k=x-w;for(_=w;_<x;_++)b+=n[_].x,y+=n[_].y;b/=k,y/=k;const M=Math.floor(f*r)+1+t,v=Math.min(Math.floor((f+1)*r)+1,e)+t,{x:D,y:F}=n[h];for(p=m=-1,_=M;_<v;_++)m=.5*Math.abs((D-b)*(n[_].y-F)-(D-n[_].x)*(y-F)),m>p&&(p=m,u=n[_],g=_);a[l++]=u,h=g}return a[l++]=n[d],a}function dh(n,t,e,i){let s=0,o=0,a,r,l,d,h,f,u,p,m,g;const b=[],y=t+e-1,_=n[t].x,x=n[y].x-_;for(a=t;a<t+e;++a){r=n[a],l=(r.x-_)/x*i,d=r.y;const k=l|0;if(k===h)d<m?(m=d,f=a):d>g&&(g=d,u=a),s=(o*s+r.x)/++o;else{const M=a-1;if(!z(f)&&!z(u)){const v=Math.min(f,u),D=Math.max(f,u);v!==p&&v!==M&&b.push({...n[v],x:s}),D!==p&&D!==M&&b.push({...n[D],x:s})}a>0&&M!==p&&b.push(n[M]),b.push(r),h=k,o=0,m=g=d,f=u=p=a}}return b}function Uo(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Xo(n){n.data.datasets.forEach(t=>{Uo(t)})}function hh(n,t){const e=t.length;let i=0,s;const{iScale:o}=n,{min:a,max:r,minDefined:l,maxDefined:d}=o.getUserBounds();return l&&(i=it(Dt(t,o.axis,a).lo,0,e-1)),d?s=it(Dt(t,o.axis,r).hi+1,i,e)-i:s=e-i,{start:i,count:s}}var fh={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Xo(n);return}const i=n.width;n.data.datasets.forEach((s,o)=>{const{_data:a,indexAxis:r}=s,l=n.getDatasetMeta(o),d=a||s.data;if(Fe([r,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const h=n.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||n.options.parsing)return;let{start:f,count:u}=hh(l,d);const p=e.threshold||4*i;if(u<=p){Uo(s);return}z(a)&&(s._data=d,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let m;switch(e.algorithm){case"lttb":m=ch(d,f,u,i,e);break;case"min-max":m=dh(d,f,u,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=m})},destroy(n){Xo(n)}};function uh(n,t,e){const i=n.segments,s=n.points,o=t.points,a=[];for(const r of i){let{start:l,end:d}=r;d=Ti(l,d,s);const h=Oi(e,s[l],s[d],r.loop);if(!t.segments){a.push({source:r,target:h,start:s[l],end:s[d]});continue}const f=Xs(t,h);for(const u of f){const p=Oi(e,o[u.start],o[u.end],u.loop),m=Us(r,s,p);for(const g of m)a.push({source:g,target:u,start:{[e]:qo(h,p,"start",Math.max)},end:{[e]:qo(h,p,"end",Math.min)}})}}return a}function Oi(n,t,e,i){if(i)return;let s=t[n],o=e[n];return n==="angle"&&(s=ut(s),o=ut(o)),{property:n,start:s,end:o}}function ph(n,t){const{x:e=null,y:i=null}=n||{},s=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=Ti(a,r,s);const l=s[a],d=s[r];i!==null?(o.push({x:l.x,y:i}),o.push({x:d.x,y:i})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:d.y}))}),o}function Ti(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function qo(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function Ko(n,t){let e=[],i=!1;return q(n)?(i=!0,e=n):e=ph(n,t),e.length?new Ht({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Go(n){return n&&n.fill!==!1}function mh(n,t,e){let s=n[t].fill;const o=[t];let a;if(!e)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!J(s))return s;if(a=n[s],!a)return!1;if(a.visible)return s;o.push(s),s=a.fill}return!1}function gh(n,t,e){const i=xh(n);if(I(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return J(s)&&Math.floor(s)===s?bh(i[0],t,s,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function bh(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function yh(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:I(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function _h(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:I(n)?i=n.value:i=t.getBaseValue(),i}function xh(n){const t=n.options,e=t.fill;let i=R(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function kh(n){const{scale:t,index:e,line:i}=n,s=[],o=i.segments,a=i.points,r=wh(t,e);r.push(Ko({x:null,y:t.bottom},i));for(let l=0;l<o.length;l++){const d=o[l];for(let h=d.start;h<=d.end;h++)Ch(s,a[h],r)}return new Ht({points:s,options:{}})}function wh(n,t){const e=[],i=n.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const o=i[s];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function Ch(n,t,e){const i=[];for(let s=0;s<e.length;s++){const o=e[s],{first:a,last:r,point:l}=Sh(o,t,"x");if(!(!l||a&&r)){if(a)i.unshift(l);else if(n.push(l),!r)break}}n.push(...i)}function Sh(n,t,e){const i=n.interpolate(t,e);if(!i)return{};const s=i[e],o=n.segments,a=n.points;let r=!1,l=!1;for(let d=0;d<o.length;d++){const h=o[d],f=a[h.start][e],u=a[h.end][e];if(vt(s,f,u)){r=s===f,l=s===u;break}}return{first:r,last:l,point:i}}class Zo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:s,y:o,radius:a}=this;return e=e||{start:0,end:G},t.arc(s,o,a,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:s}=this,o=t.angle;return{x:e+Math.cos(o)*s,y:i+Math.sin(o)*s,angle:o}}}function Mh(n){const{chart:t,fill:e,line:i}=n;if(J(e))return vh(t,e);if(e==="stack")return kh(n);if(e==="shape")return!0;const s=Dh(n);return s instanceof Zo?s:Ko(s,i)}function vh(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function Dh(n){return(n.scale||{}).getPointPositionForValue?Bh(n):Eh(n)}function Eh(n){const{scale:t={},fill:e}=n,i=yh(e,t);if(J(i)){const s=t.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function Bh(n){const{scale:t,fill:e}=n,i=t.options,s=t.getLabels().length,o=i.reverse?t.max:t.min,a=_h(e,t,o),r=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,o);return new Zo({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(a)})}for(let l=0;l<s;++l)r.push(t.getPointPositionForValue(l,a));return r}function Fi(n,t,e){const i=Mh(t),{line:s,scale:o,axis:a}=t,r=s.options,l=r.fill,d=r.backgroundColor,{above:h=d,below:f=d}=l||{};i&&s.points.length&&(un(n,e),Vh(n,{line:s,target:i,above:h,below:f,area:e,scale:o,axis:a}),pn(n))}function Vh(n,t){const{line:e,target:i,above:s,below:o,area:a,scale:r}=t,l=e._loop?"angle":t.axis;n.save(),l==="x"&&o!==s&&(Jo(n,i,a.top),Qo(n,{line:e,target:i,color:s,scale:r,property:l}),n.restore(),n.save(),Jo(n,i,a.bottom)),Qo(n,{line:e,target:i,color:o,scale:r,property:l}),n.restore()}function Jo(n,t,e){const{segments:i,points:s}=t;let o=!0,a=!1;n.beginPath();for(const r of i){const{start:l,end:d}=r,h=s[l],f=s[Ti(l,d,s)];o?(n.moveTo(h.x,h.y),o=!1):(n.lineTo(h.x,e),n.lineTo(h.x,h.y)),a=!!t.pathSegment(n,r,{move:a}),a?n.closePath():n.lineTo(f.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function Qo(n,t){const{line:e,target:i,property:s,color:o,scale:a}=t,r=uh(e,i,s);for(const{source:l,target:d,start:h,end:f}of r){const{style:{backgroundColor:u=o}={}}=l,p=i!==!0;n.save(),n.fillStyle=u,Ph(n,a,p&&Oi(s,h,f)),n.beginPath();const m=!!e.pathSegment(n,l);let g;if(p){m?n.closePath():ta(n,i,f,s);const b=!!i.pathSegment(n,d,{move:m,reverse:!0});g=m&&b,g||ta(n,i,h,s)}n.closePath(),n.fill(g?"evenodd":"nonzero"),n.restore()}}function Ph(n,t,e){const{top:i,bottom:s}=t.chart.chartArea,{property:o,start:a,end:r}=e||{};o==="x"&&(n.beginPath(),n.rect(a,i,r-a,s-i),n.clip())}function ta(n,t,e,i){const s=t.interpolate(e,i);s&&n.lineTo(s.x,s.y)}var Oh={id:"filler",afterDatasetsUpdate(n,t,e){const i=(n.data.datasets||[]).length,s=[];let o,a,r,l;for(a=0;a<i;++a)o=n.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof Ht&&(l={visible:n.isDatasetVisible(a),index:a,fill:gh(r,a,i),chart:n,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,s.push(l);for(a=0;a<i;++a)l=s[a],!(!l||l.fill===!1)&&(l.fill=mh(s,a,e.propagate))},beforeDraw(n,t,e){const i=e.drawTime==="beforeDraw",s=n.getSortedVisibleDatasetMetas(),o=n.chartArea;for(let a=s.length-1;a>=0;--a){const r=s[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),i&&r.fill&&Fi(n.ctx,r,o))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const o=i[s].$filler;Go(o)&&Fi(n.ctx,o,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!Go(i)||e.drawTime!=="beforeDatasetDraw"||Fi(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ea=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},Th=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class na extends Vt{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,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,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=U(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,s=nt(i.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=ea(i,o);let d,h;e.font=s.string,this.isHorizontal()?(d=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,d=this._fitCols(a,s,r,l)+10),this.width=Math.min(d,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],d=this.lineWidths=[0],h=s+r;let f=t;o.textAlign="left",o.textBaseline="middle";let u=-1,p=-h;return this.legendItems.forEach((m,g)=>{const b=i+e/2+o.measureText(m.text).width;(g===0||d[d.length-1]+b+2*r>a)&&(f+=h,d[d.length-(g>0?0:1)]=0,p+=h,u++),l[g]={left:0,top:p,row:u,width:b,height:s},d[d.length-1]+=b+r}),f}_fitCols(t,e,i,s){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],d=this.columnSizes=[],h=a-t;let f=r,u=0,p=0,m=0,g=0;return this.legendItems.forEach((b,y)=>{const{itemWidth:_,itemHeight:w}=Fh(i,e,o,b,s);y>0&&p+w+2*r>h&&(f+=u+r,d.push({width:u,height:p}),m+=u+r,g++,u=p=0),l[y]={left:m,top:p,col:g,width:_,height:w},u=Math.max(u,_),p+=w+r}),f+=u,d.push({width:u,height:p}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:o}}=this,a=me(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=at(i,this.left+s,this.right-this.lineWidths[r]);for(const d of e)r!==d.row&&(r=d.row,l=at(i,this.left+s,this.right-this.lineWidths[r])),d.top+=this.top+t+s,d.left=a.leftForLtr(a.x(l),d.width),l+=d.width+s}else{let r=0,l=at(i,this.top+t+s,this.bottom-this.columnSizes[r].height);for(const d of e)d.col!==r&&(r=d.col,l=at(i,this.top+t+s,this.bottom-this.columnSizes[r].height)),d.top=l,d.left+=this.left+s,d.left=a.leftForLtr(a.x(d.left),d.width),l+=d.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;un(t,this),this._draw(),pn(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:o,labels:a}=t,r=Q.color,l=me(t.rtl,this.left,this.width),d=nt(a.font),{padding:h}=a,f=d.size,u=f/2;let p;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=d.string;const{boxWidth:m,boxHeight:g,itemHeight:b}=ea(a,f),y=function(M,v,D){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;s.save();const F=R(D.lineWidth,1);if(s.fillStyle=R(D.fillStyle,r),s.lineCap=R(D.lineCap,"butt"),s.lineDashOffset=R(D.lineDashOffset,0),s.lineJoin=R(D.lineJoin,"miter"),s.lineWidth=F,s.strokeStyle=R(D.strokeStyle,r),s.setLineDash(R(D.lineDash,[])),a.usePointStyle){const T={radius:g*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:F},P=l.xPlus(M,m/2),L=v+u;Bs(s,T,P,L,a.pointStyleWidth&&m)}else{const T=v+Math.max((f-g)/2,0),P=l.leftForLtr(M,m),L=te(D.borderRadius);s.beginPath(),Object.values(L).some(X=>X!==0)?Te(s,{x:P,y:T,w:m,h:g,radius:L}):s.rect(P,T,m,g),s.fill(),F!==0&&s.stroke()}s.restore()},_=function(M,v,D){Qt(s,D.text,M,v+b/2,d,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?p={x:at(o,this.left+h,this.right-i[0]),y:this.top+h+x,line:0}:p={x:this.left+h,y:at(o,this.top+x+h,this.bottom-e[0].height),line:0},Ws(this.ctx,t.textDirection);const k=b+h;this.legendItems.forEach((M,v)=>{s.strokeStyle=M.fontColor,s.fillStyle=M.fontColor;const D=s.measureText(M.text).width,F=l.textAlign(M.textAlign||(M.textAlign=a.textAlign)),T=m+u+D;let P=p.x,L=p.y;l.setWidth(this.width),w?v>0&&P+T+h>this.right&&(L=p.y+=k,p.line++,P=p.x=at(o,this.left+h,this.right-i[p.line])):v>0&&L+k>this.bottom&&(P=p.x=P+e[p.line].width+h,p.line++,L=p.y=at(o,this.top+x+h,this.bottom-e[p.line].height));const X=l.x(P);if(y(X,L,M),P=el(F,P+m+u,w?P+T:this.right,t.rtl),_(l.x(P),L,M),w)p.x+=T+h;else if(typeof M.text!="string"){const O=d.lineHeight;p.y+=ia(M,O)+h}else p.y+=k}),Hs(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=nt(e.font),s=rt(e.padding);if(!e.display)return;const o=me(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=i.size/2,d=s.top+l;let h,f=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+d,f=at(t.align,f,this.right-u);else{const m=this.columnSizes.reduce((g,b)=>Math.max(g,b.height),0);h=d+at(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=at(r,f,f+u);a.textAlign=o.textAlign(ri(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,Qt(a,e.text,p,h,i)}_computeTitleHeight(){const t=this.options.title,e=nt(t.font),i=rt(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,o;if(vt(t,this.left,this.right)&&vt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(s=o[i],vt(t,s.left,s.left+s.width)&&vt(e,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!$h(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,o=Th(s,i);s&&!o&&U(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!o&&U(e.onHover,[t,i,this],this)}else i&&U(e.onClick,[t,i,this],this)}}function Fh(n,t,e,i,s){const o=Ah(i,n,t,e),a=Lh(s,i,t.lineHeight);return{itemWidth:o,itemHeight:a}}function Ah(n,t,e,i){let s=n.text;return s&&typeof s!="string"&&(s=s.reduce((o,a)=>o.length>a.length?o:a)),t+e.size/2+i.measureText(s).width}function Lh(n,t,e){let i=n;return typeof t.text!="string"&&(i=ia(t,e)),i}function ia(n,t){const e=n.text?n.text.length:0;return t*e}function $h(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var Nh={id:"legend",_element:na,start(n,t,e){const i=n.legend=new na({ctx:n.ctx,options:e,chart:n});lt.configure(n,i,e),lt.addBox(n,i)},stop(n){lt.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;lt.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,s=e.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:s,color:o,useBorderRadius:a,borderRadius:r}}=n.legend.options;return n._getSortedDatasetMetas().map(l=>{const d=l.controller.getStyle(e?0:void 0),h=rt(d.borderWidth);return{text:t[l.index].label,fillStyle:d.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:d.borderColor,pointStyle:i||d.pointStyle,rotation:d.rotation,textAlign:s||d.textAlign,borderRadius:a&&(r||d.borderRadius),datasetIndex:l.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class Ai extends Vt{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 i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const s=q(i.text)?i.text.length:1;this._padding=rt(i.padding);const o=s*nt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:s,right:o,options:a}=this,r=a.align;let l=0,d,h,f;return this.isHorizontal()?(h=at(r,i,o),f=e+t,d=o-i):(a.position==="left"?(h=i+t,f=at(r,s,e),l=K*-.5):(h=o-t,f=at(r,e,s),l=K*.5),d=s-e),{titleX:h,titleY:f,maxWidth:d,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=nt(e.font),o=i.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:d}=this._drawArgs(o);Qt(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:d,textAlign:ri(e.align),textBaseline:"middle",translation:[a,r]})}}function Rh(n,t){const e=new Ai({ctx:n.ctx,options:t,chart:n});lt.configure(n,e,t),lt.addBox(n,e),n.titleBlock=e}var Ih={id:"title",_element:Ai,start(n,t,e){Rh(n,e)},stop(n){const t=n.titleBlock;lt.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;lt.configure(n,i,e),i.options=e},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 An=new WeakMap;var zh={id:"subtitle",start(n,t,e){const i=new Ai({ctx:n.ctx,options:e,chart:n});lt.configure(n,i,e),lt.addBox(n,i),An.set(n,i)},stop(n){lt.removeBox(n,An.get(n)),An.delete(n)},beforeUpdate(n,t,e){const i=An.get(n);lt.configure(n,i,e),i.options=e},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 Ye={average(n){if(!n.length)return!1;let t,e,i=0,s=0,o=0;for(t=0,e=n.length;t<e;++t){const a=n[t].element;if(a&&a.hasValue()){const r=a.tooltipPosition();i+=r.x,s+=r.y,++o}}return{x:i/o,y:s/o}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,s=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=n.length;o<a;++o){const l=n[o].element;if(l&&l.hasValue()){const d=l.getCenterPoint(),h=oi(t,d);h<s&&(s=h,r=l)}}if(r){const l=r.tooltipPosition();e=l.x,i=l.y}return{x:e,y:i}}};function wt(n,t){return t&&(q(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function Ot(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
23
|
+
*/class sc{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const o=e.listeners[s],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=_s.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const o=i.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),o.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}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((i,s)=>Math.max(i,s._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 i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Bt=new sc;const Gs="transparent",oc={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=Ms(n||Gs),s=i.valid&&Ms(t||Gs);return s&&s.valid?s.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class ac{constructor(t,e,i,s){const o=e[i];s=Fe([t.to,s,o,t.from]);const a=Fe([t.from,o,s]);this._active=!0,this._fn=t.fn||oc[t.type||typeof a],this._easing=Ve[t.easing]||Ve.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=i,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],o=i-this._start,a=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Fe([t.to,e,s,t.from]),this._from=Fe([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e<i),!this._active){this._target[s]=r,this._notify(!0);return}if(e<0){this._target[s]=o;return}l=e/i%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][e]()}}class Zs{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!I(t))return;const e=Object.keys(Q.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!I(o))return;const a={};for(const r of e)a[r]=o[r];(q(o.properties)&&o.properties||[s]).forEach(r=>{(r===s||!i.has(r))&&i.set(r,a)})})}_animateOptions(t,e){const i=e.options,s=lc(t,i);if(!s)return[];const o=this._createAnimations(s,i);return i.$shared&&rc(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,s=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const d=a[l];if(d.charAt(0)==="$")continue;if(d==="options"){s.push(...this._animateOptions(t,e));continue}const h=e[d];let f=o[d];const u=i.get(d);if(f)if(u&&f.active()){f.update(u,h,r);continue}else f.cancel();if(!u||!u.duration){t[d]=h;continue}o[d]=f=new ac(u,t,d,h),s.push(f)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return Bt.add(this._chart,i),!0}}function rc(n,t){const e=[],i=Object.keys(t);for(let s=0;s<i.length;s++){const o=n[i[s]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function lc(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Js(n,t){const e=n&&n.options||{},i=e.reverse,s=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:i?o:s,end:i?s:o}}function cc(n,t,e){if(e===!1)return!1;const i=Js(n,e),s=Js(t,e);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function dc(n){let t,e,i,s;return I(n)?(t=n.top,e=n.right,i=n.bottom,s=n.left):t=e=i=s=n,{top:t,right:e,bottom:i,left:s,disabled:n===!1}}function Qs(n,t){const e=[],i=n._getSortedDatasetMetas(t);let s,o;for(s=0,o=i.length;s<o;++s)e.push(i[s].index);return e}function to(n,t,e,i={}){const s=n.keys,o=i.mode==="single";let a,r,l,d;if(t!==null){for(a=0,r=s.length;a<r;++a){if(l=+s[a],l===e){if(i.all)continue;break}d=n.values[l],J(d)&&(o||t===0||xt(t)===xt(d))&&(t+=d)}return t}}function hc(n){const t=Object.keys(n),e=new Array(t.length);let i,s,o;for(i=0,s=t.length;i<s;++i)o=t[i],e[i]={x:o,y:n[o]};return e}function eo(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function fc(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function uc(n){const{min:t,max:e,minDefined:i,maxDefined:s}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function pc(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function no(n,t,e,i){for(const s of t.getMatchingVisibleMetas(i).reverse()){const o=n[s.index];if(e&&o>0||!e&&o<0)return s.index}return null}function io(n,t){const{chart:e,_cachedMeta:i}=n,s=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=i,l=o.axis,d=a.axis,h=fc(o,a,i),f=t.length;let u;for(let p=0;p<f;++p){const m=t[p],{[l]:g,[d]:b}=m,y=m._stacks||(m._stacks={});u=y[d]=pc(s,h,g),u[r]=b,u._top=no(u,a,!0,i.type),u._bottom=no(u,a,!1,i.type);const _=u._visualValues||(u._visualValues={});_[r]=b}}function yi(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function mc(n,t){return Ht(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function gc(n,t,e){return Ht(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Ae(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const s of t){const o=s._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e],o[i]._visualValues!==void 0&&o[i]._visualValues[e]!==void 0&&delete o[i]._visualValues[e]}}}const _i=n=>n==="reset"||n==="none",so=(n,t)=>t?n:Object.assign({},n),bc=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:Qs(e,!0),values:null};class _t{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=eo(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&&Ae(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(f,u,p,m)=>f==="x"?u:f==="r"?m:p,o=e.xAxisID=R(i.xAxisID,yi(t,"x")),a=e.yAxisID=R(i.yAxisID,yi(t,"y")),r=e.rAxisID=R(i.rAxisID,yi(t,"r")),l=e.indexAxis,d=e.iAxisID=s(l,o,a,r),h=e.vAxisID=s(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(d),e.vScale=this.getScaleForId(h)}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&&bs(this._data,this),t._stacked&&Ae(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(I(e))this._data=hc(e);else if(i!==e){if(i){bs(i,this);const s=this._cachedMeta;Ae(s),s._parsed=[]}e&&Object.isExtensible(e)&&nl(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const o=e._stacked;e._stacked=eo(e.vScale,e),e.stack!==i.stack&&(s=!0,Ae(e),e.stack=i.stack),this._resyncElements(t),(s||o!==e._stacked)&&io(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:o,_stacked:a}=i,r=o.axis;let l=t===0&&e===s.length?!0:i._sorted,d=t>0&&i._parsed[t-1],h,f,u;if(this._parsing===!1)i._parsed=s,i._sorted=!0,u=s;else{q(s[t])?u=this.parseArrayData(i,s,t,e):I(s[t])?u=this.parseObjectData(i,s,t,e):u=this.parsePrimitiveData(i,s,t,e);const p=()=>f[r]===null||d&&f[r]<d[r];for(h=0;h<e;++h)i._parsed[h+t]=f=u[h],l&&(p()&&(l=!1),d=f);i._sorted=l}a&&io(this,u)}parsePrimitiveData(t,e,i,s){const{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,d=o.getLabels(),h=o===a,f=new Array(s);let u,p,m;for(u=0,p=s;u<p;++u)m=u+i,f[u]={[r]:h||o.parse(d[m],m),[l]:a.parse(e[m],m)};return f}parseArrayData(t,e,i,s){const{xScale:o,yScale:a}=t,r=new Array(s);let l,d,h,f;for(l=0,d=s;l<d;++l)h=l+i,f=e[h],r[l]={x:o.parse(f[0],h),y:a.parse(f[1],h)};return r}parseObjectData(t,e,i,s){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,d=new Array(s);let h,f,u,p;for(h=0,f=s;h<f;++h)u=h+i,p=e[u],d[h]={x:o.parse(It(p,r),u),y:a.parse(It(p,l),u)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const s=this.chart,o=this._cachedMeta,a=e[t.axis],r={keys:Qs(s,!0),values:e._stacks[t.axis]._visualValues};return to(r,a,o.index,{mode:i})}updateRangeFromParsed(t,e,i,s){const o=i[e.axis];let a=o===null?NaN:o;const r=s&&i._stacks[e.axis];s&&r&&(s.values=r,a=to(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,o=i._sorted&&t===i.iScale,a=s.length,r=this._getOtherScale(t),l=bc(e,i,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:f}=uc(r);let u,p;function m(){p=s[u];const g=p[r.axis];return!J(p[t.axis])||h>g||f<g}for(u=0;u<a&&!(!m()&&(this.updateRangeFromParsed(d,t,p,l),o));++u);if(o){for(u=a-1;u>=0;--u)if(!m()){this.updateRangeFromParsed(d,t,p,l);break}}return d}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,o,a;for(s=0,o=e.length;s<o;++s)a=e[s][t.axis],J(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=dc(R(this.options.clip,cc(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],o=e.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||s.length-r,d=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,o,r,l),h=r;h<r+l;++h){const f=s[h];f.hidden||(f.active&&d?a.push(f):f.draw(t,o))}for(h=0;h<a.length;++h)a[h].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=gc(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=mc(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const s=e==="active",o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&De(i);if(r)return so(r,l);const d=this.chart.config,h=d.datasetElementScopeKeys(this._type,t),f=s?[`${t}Hover`,"hover",t,""]:[t,""],u=d.getOptionScopes(this.getDataset(),h),p=Object.keys(Q.elements[t]),m=()=>this.getContext(i,s,e),g=d.resolveNamedOptions(u,p,m,f);return g.$shared&&(g.$shared=l,o[a]=Object.freeze(so(g,l))),g}_resolveAnimations(t,e,i){const s=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(s.options.animation!==!1){const h=this.chart.config,f=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),f);l=h.createResolver(u,this.getContext(t,i,e))}const d=new Zs(s,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||_i(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,o=this.getSharedOptions(i),a=this.includeOptions(e,o)||o!==s;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:a}}updateElement(t,e,i,s){_i(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!_i(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const o=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"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,i=this._cachedMeta.data;for(const[r,l,d]of this._syncList)this[r](l,d);this._syncList=[];const s=i.length,o=e.length,a=Math.min(o,s);a&&this.parse(0,a),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,e,i=!0){const s=this._cachedMeta,o=s.data,a=t+e;let r;const l=d=>{for(d.length+=e,r=d.length-1;r>=a;r--)d[r]=d[r-e]};for(l(o),r=t;r<a;++r)o[r]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,e),i&&this.updateElements(o,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,e);i._stacked&&Ae(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,s]=t;this[e](i,s)}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 i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}B(_t,"defaults",{}),B(_t,"datasetElementType",null),B(_t,"dataElementType",null);function yc(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let s=0,o=e.length;s<o;s++)i=i.concat(e[s].controller.getAllParsedValues(n));n._cache.$bar=ys(i.sort((s,o)=>s-o))}return n._cache.$bar}function _c(n){const t=n.iScale,e=yc(t,n.type);let i=t._length,s,o,a,r;const l=()=>{a===32767||a===-32768||(De(r)&&(i=Math.min(i,Math.abs(a-r)||i)),r=a)};for(s=0,o=e.length;s<o;++s)a=t.getPixelForValue(e[s]),l();for(r=void 0,s=0,o=t.ticks.length;s<o;++s)a=t.getPixelForTick(s),l();return i}function xc(n,t,e,i){const s=e.barThickness;let o,a;return z(s)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=s*i,a=1),{chunk:o/i,ratio:a,start:t.pixels[n]-o/2}}function kc(n,t,e,i){const s=t.pixels,o=s[n];let a=n>0?s[n-1]:null,r=n<s.length-1?s[n+1]:null;const l=e.categoryPercentage;a===null&&(a=o-(r===null?t.end-t.start:r-o)),r===null&&(r=o+o-a);const d=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/i,ratio:e.barPercentage,start:d}}function wc(n,t,e,i){const s=e.parse(n[0],i),o=e.parse(n[1],i),a=Math.min(s,o),r=Math.max(s,o);let l=a,d=r;Math.abs(a)>Math.abs(r)&&(l=r,d=a),t[e.axis]=d,t._custom={barStart:l,barEnd:d,start:s,end:o,min:a,max:r}}function oo(n,t,e,i){return q(n)?wc(n,t,e,i):t[e.axis]=e.parse(n,i),t}function ao(n,t,e,i){const s=n.iScale,o=n.vScale,a=s.getLabels(),r=s===o,l=[];let d,h,f,u;for(d=e,h=e+i;d<h;++d)u=t[d],f={},f[s.axis]=r||s.parse(a[d],d),l.push(oo(u,f,o,d));return l}function xi(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function Cc(n,t,e){return n!==0?xt(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Sc(n){let t,e,i,s,o;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(s="end",o="start"):(s="start",o="end"),{start:e,end:i,reverse:t,top:s,bottom:o}}function Mc(n,t,e,i){let s=t.borderSkipped;const o={};if(!s){n.borderSkipped=o;return}if(s===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:r,reverse:l,top:d,bottom:h}=Sc(n);s==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?s=d:(e._bottom||0)===i?s=h:(o[ro(h,a,r,l)]=!0,s=d)),o[ro(s,a,r,l)]=!0,n.borderSkipped=o}function ro(n,t,e,i){return i?(n=vc(n,t,e),n=lo(n,e,t)):n=lo(n,t,e),n}function vc(n,t,e){return n===t?e:n===e?t:n}function lo(n,t,e){return n==="start"?t:n==="end"?e:n}function Dc(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class _n extends _t{parsePrimitiveData(t,e,i,s){return ao(t,e,i,s)}parseArrayData(t,e,i,s){return ao(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,d=o.axis==="x"?r:l,h=a.axis==="x"?r:l,f=[];let u,p,m,g;for(u=i,p=i+s;u<p;++u)g=e[u],m={},m[o.axis]=o.parse(It(g,d),u),f.push(oo(It(g,h),m,a,u));return f}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:s}=e,o=this.getParsed(t),a=o._custom,r=xi(a)?"["+a.start+", "+a.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){const o=s==="reset",{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),d=r.isHorizontal(),h=this._getRuler(),{sharedOptions:f,includeOptions:u}=this._getSharedOptions(e,s);for(let p=e;p<e+i;p++){const m=this.getParsed(p),g=o||z(m[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),b=this._calculateBarIndexPixels(p,h),y=(m._stacks||{})[r.axis],_={horizontal:d,base:g.base,enableBorderRadius:!y||xi(m._custom)||a===y._top||a===y._bottom,x:d?g.head:b.center,y:d?b.center:g.head,height:d?b.size:Math.abs(g.size),width:d?Math.abs(g.size):b.size};u&&(_.options=f||this.resolveDataElementOptions(p,t[p].active?"active":s));const w=_.options||t[p].options;Mc(_,w,y,a),Dc(_,w,h.ratio),this.updateElement(t[p],p,_,s)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=i.options.stacked,a=[],r=l=>{const d=l.controller.getParsed(e),h=d&&d[l.vScale.axis];if(z(h)||isNaN(h))return!0};for(const l of s)if(!(e!==void 0&&r(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),o=e!==void 0?s.indexOf(e):-1;return o===-1?s.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let o,a;for(o=0,a=e.data.length;o<a;++o)s.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const r=t.barThickness;return{min:r||_c(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),d=l._custom,h=xi(d);let f=l[e.axis],u=0,p=i?this.applyStack(e,l,i):f,m,g;p!==f&&(u=p-f,p=f),h&&(f=d.barStart,p=d.barEnd-d.barStart,f!==0&&xt(f)!==xt(d.barEnd)&&(u=0),u+=f);const b=!z(o)&&!h?o:u;let y=e.getPixelForValue(b);if(this.chart.getDataVisibility(t)?m=e.getPixelForValue(u+p):m=y,g=m-y,Math.abs(g)<a){g=Cc(g,e,r)*a,f===r&&(y-=g/2);const _=e.getPixelForDecimal(0),w=e.getPixelForDecimal(1),x=Math.min(_,w),k=Math.max(_,w);y=Math.max(Math.min(y,k),x),m=y+g,i&&!h&&(l._stacks[e.axis]._visualValues[s]=e.getValueForPixel(m)-e.getValueForPixel(y))}if(y===e.getPixelForValue(r)){const _=xt(g)*e.getLineWidthForValue(r)/2;y+=_,g-=_}return{size:g,base:y,head:m,center:m+g/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,o=s.skipNull,a=R(s.maxBarThickness,1/0);let r,l;if(e.grouped){const d=o?this._getStackCount(t):e.stackCount,h=s.barThickness==="flex"?kc(t,e,s,d):xc(t,e,s,d),f=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=h.start+h.chunk*f+h.chunk/2,l=Math.min(a,h.chunk*h.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let o=0;for(;o<s;++o)this.getParsed(o)[e.axis]!==null&&i[o].draw(this._ctx)}}B(_n,"id","bar"),B(_n,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),B(_n,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class xn extends _t{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){const o=super.parsePrimitiveData(t,e,i,s);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+i).radius;return o}parseArrayData(t,e,i,s){const o=super.parseArrayData(t,e,i,s);for(let a=0;a<o.length;a++){const r=e[i+a];o[a]._custom=R(r[2],this.resolveDataElementOptions(a+i).radius)}return o}parseObjectData(t,e,i,s){const o=super.parseObjectData(t,e,i,s);for(let a=0;a<o.length;a++){const r=e[i+a];o[a]._custom=R(r&&r.r&&+r.r,this.resolveDataElementOptions(a+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:o}=e,a=this.getParsed(t),r=s.getLabelForValue(a.x),l=o.getLabelForValue(a.y),d=a._custom;return{label:i[t]||"",value:"("+r+", "+l+(d?", "+d:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const o=s==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:d}=this._getSharedOptions(e,s),h=a.axis,f=r.axis;for(let u=e;u<e+i;u++){const p=t[u],m=!o&&this.getParsed(u),g={},b=g[h]=o?a.getPixelForDecimal(.5):a.getPixelForValue(m[h]),y=g[f]=o?r.getBasePixel():r.getPixelForValue(m[f]);g.skip=isNaN(b)||isNaN(y),d&&(g.options=l||this.resolveDataElementOptions(u,p.active?"active":s),o&&(g.options.radius=0)),this.updateElement(p,u,g,s)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const o=s.radius;return e!=="active"&&(s.radius=0),s.radius+=R(i&&i._custom,o),s}}B(xn,"id","bubble"),B(xn,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),B(xn,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Ec(n,t,e){let i=1,s=1,o=0,a=0;if(t<G){const r=n,l=r+t,d=Math.cos(r),h=Math.sin(r),f=Math.cos(l),u=Math.sin(l),p=(w,x,k)=>Be(w,r,l,!0)?1:Math.max(x,x*e,k,k*e),m=(w,x,k)=>Be(w,r,l,!0)?-1:Math.min(x,x*e,k,k*e),g=p(0,d,f),b=p(et,h,u),y=m(K,d,f),_=m(K+et,h,u);i=(g-y)/2,s=(b-_)/2,o=-(g+y)/2,a=-(b+_)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:a}}class oe extends _t{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 i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let o=l=>+i[l];if(I(i[t])){const{key:l="value"}=this._parsing;o=d=>+It(i[d],l)}let a,r;for(a=t,r=t+e;a<r;++a)s._parsed[a]=o(a)}}_getRotation(){return yt(this.options.rotation-90)}_getCircumference(){return yt(this.options.circumference)}_getRotationExtents(){let t=G,e=-G;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,o=s._getRotation(),a=s._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,o=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-a)/2,0),l=Math.min(Wr(this.options.cutout,r),1),d=this._getRingWeight(this.index),{circumference:h,rotation:f}=this._getRotationExtents(),{ratioX:u,ratioY:p,offsetX:m,offsetY:g}=Ec(f,h,l),b=(i.width-a)/u,y=(i.height-a)/p,_=Math.max(Math.min(b,y)/2,0),w=rs(this.options.radius,_),x=Math.max(w*l,0),k=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=g*w,s.total=this.calculateTotal(),this.outerRadius=w-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*d,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/G)}updateElements(t,e,i,s){const o=s==="reset",a=this.chart,r=a.chartArea,d=a.options.animation,h=(r.left+r.right)/2,f=(r.top+r.bottom)/2,u=o&&d.animateScale,p=u?0:this.innerRadius,m=u?0:this.outerRadius,{sharedOptions:g,includeOptions:b}=this._getSharedOptions(e,s);let y=this._getRotation(),_;for(_=0;_<e;++_)y+=this._circumference(_,o);for(_=e;_<e+i;++_){const w=this._circumference(_,o),x=t[_],k={x:h+this.offsetX,y:f+this.offsetY,startAngle:y,endAngle:y+w,circumference:w,outerRadius:m,innerRadius:p};b&&(k.options=g||this.resolveDataElementOptions(_,x.active?"active":s)),y+=w,this.updateElement(x,_,k,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,s;for(s=0;s<e.length;s++){const o=t._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?G*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=Pe(e._parsed[t],i.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,o,a,r,l;if(!t){for(s=0,o=i.data.datasets.length;s<o;++s)if(i.isDatasetVisible(s)){a=i.getDatasetMeta(s),t=a.data,r=a.controller;break}}if(!t)return 0;for(s=0,o=t.length;s<o;++s)l=r.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){const o=this.resolveDataElementOptions(i);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(R(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}B(oe,"id","doughnut"),B(oe,"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"}),B(oe,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),B(oe,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class kn extends _t{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:l}=ks(e,s,a);this._drawStart=r,this._drawCount=l,ws(e)&&(r=0,l=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=s;const d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:d},t),this.updateElements(s,r,l,t)}updateElements(t,e,i,s){const o=s==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:d}=this._cachedMeta,{sharedOptions:h,includeOptions:f}=this._getSharedOptions(e,s),u=a.axis,p=r.axis,{spanGaps:m,segment:g}=this.options,b=ue(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||s==="none",_=e+i,w=t.length;let x=e>0&&this.getParsed(e-1);for(let k=0;k<w;++k){const M=t[k],v=y?M:{};if(k<e||k>=_){v.skip=!0;continue}const D=this.getParsed(k),F=z(D[p]),T=v[u]=a.getPixelForValue(D[u],k),P=v[p]=o||F?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,D,l):D[p],k);v.skip=isNaN(T)||isNaN(P)||F,v.stop=k>0&&Math.abs(D[u]-x[u])>b,g&&(v.parsed=D,v.raw=d.data[k]),f&&(v.options=h||this.resolveDataElementOptions(k,M.active?"active":s)),y||this.updateElement(M,k,v,s),x=D}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const o=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}B(kn,"id","line"),B(kn,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),B(kn,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Le extends _t{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=Pe(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,e,i,s){return $s.bind(this)(t,e,i,s)}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((i,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(s/2,0),a=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,s){const o=s==="reset",a=this.chart,l=a.options.animation,d=this._cachedMeta.rScale,h=d.xCenter,f=d.yCenter,u=d.getIndexAngle(0)-.5*K;let p=u,m;const g=360/this.countVisibleElements();for(m=0;m<e;++m)p+=this._computeAngle(m,s,g);for(m=e;m<e+i;m++){const b=t[m];let y=p,_=p+this._computeAngle(m,s,g),w=a.getDataVisibility(m)?d.getDistanceFromCenterForValue(this.getParsed(m).r):0;p=_,o&&(l.animateScale&&(w=0),l.animateRotate&&(y=_=u));const x={x:h,y:f,innerRadius:0,outerRadius:w,startAngle:y,endAngle:_,options:this.resolveDataElementOptions(m,b.active?"active":s)};this.updateElement(b,m,x,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?yt(this.resolveDataElementOptions(t,e).angle||i):0}}B(Le,"id","polarArea"),B(Le,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),B(Le,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ki extends oe{}B(ki,"id","pie"),B(ki,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class wn extends _t{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return $s.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],o=e.iScale.getLabels();if(i.points=s,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const r={_loop:!0,_fullLoop:o.length===s.length,options:a};this.updateElement(i,void 0,r,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const o=this._cachedMeta.rScale,a=s==="reset";for(let r=e;r<e+i;r++){const l=t[r],d=this.resolveDataElementOptions(r,l.active?"active":s),h=o.getPointPositionForValue(r,this.getParsed(r).r),f=a?o.xCenter:h.x,u=a?o.yCenter:h.y,p={x:f,y:u,angle:h.angle,skip:isNaN(f)||isNaN(u),options:d};this.updateElement(l,r,p,s)}}}B(wn,"id","radar"),B(wn,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),B(wn,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Cn extends _t{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:o}=e,a=this.getParsed(t),r=s.getLabelForValue(a.x),l=o.getLabelForValue(a.y);return{label:i[t]||"",value:"("+r+", "+l+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled;let{start:o,count:a}=ks(e,i,s);if(this._drawStart=o,this._drawCount=a,ws(e)&&(o=0,a=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:r,_dataset:l}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!l._decimated,r.points=i;const d=this.resolveDatasetElementOptions(t);d.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:d},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,s){const o=s==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:d}=this._cachedMeta,h=this.resolveDataElementOptions(e,s),f=this.getSharedOptions(h),u=this.includeOptions(s,f),p=a.axis,m=r.axis,{spanGaps:g,segment:b}=this.options,y=ue(g)?g:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||s==="none";let w=e>0&&this.getParsed(e-1);for(let x=e;x<e+i;++x){const k=t[x],M=this.getParsed(x),v=_?k:{},D=z(M[m]),F=v[p]=a.getPixelForValue(M[p],x),T=v[m]=o||D?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,M,l):M[m],x);v.skip=isNaN(F)||isNaN(T)||D,v.stop=x>0&&Math.abs(M[p]-w[p])>y,b&&(v.parsed=M,v.raw=d.data[x]),u&&(v.options=f||this.resolveDataElementOptions(x,k.active?"active":s)),_||this.updateElement(k,x,v,s),w=M}this.updateSharedOptions(f,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,o,a)/2}}B(Cn,"id","scatter"),B(Cn,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),B(Cn,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Bc=Object.freeze({__proto__:null,BarController:_n,BubbleController:xn,DoughnutController:oe,LineController:kn,PieController:ki,PolarAreaController:Le,RadarController:wn,ScatterController:Cn});function ae(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class wi{constructor(t){B(this,"options");this.options=t||{}}static override(t){Object.assign(wi.prototype,t)}init(){}formats(){return ae()}parse(){return ae()}format(){return ae()}add(){return ae()}diff(){return ae()}startOf(){return ae()}endOf(){return ae()}}var Vc={_date:wi};function Pc(n,t,e,i){const{controller:s,data:o,_sorted:a}=n,r=s._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const l=r._reversePixels?tl:Dt;if(i){if(s._sharedOptions){const d=o[0],h=typeof d.getRange=="function"&&d.getRange(t);if(h){const f=l(o,t,e-h),u=l(o,t,e+h);return{lo:f.lo,hi:u.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function $e(n,t,e,i,s){const o=n.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r<l;++r){const{index:d,data:h}=o[r],{lo:f,hi:u}=Pc(o[r],t,a,s);for(let p=f;p<=u;++p){const m=h[p];m.skip||i(m,d,p)}}}function Oc(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,s){const o=t?Math.abs(i.x-s.x):0,a=e?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function Ci(n,t,e,i,s){const o=[];return!s&&!n.isPointInArea(t)||$e(n,e,t,function(r,l,d){!s&&!Et(r,n.chartArea,0)||r.inRange(t.x,t.y,i)&&o.push({element:r,datasetIndex:l,index:d})},!0),o}function Tc(n,t,e,i){let s=[];function o(a,r,l){const{startAngle:d,endAngle:h}=a.getProps(["startAngle","endAngle"],i),{angle:f}=ms(a,{x:t.x,y:t.y});Be(f,d,h)&&s.push({element:a,datasetIndex:r,index:l})}return $e(n,e,t,o),s}function Fc(n,t,e,i,s,o){let a=[];const r=Oc(e);let l=Number.POSITIVE_INFINITY;function d(h,f,u){const p=h.inRange(t.x,t.y,s);if(i&&!p)return;const m=h.getCenterPoint(s);if(!(!!o||n.isPointInArea(m))&&!p)return;const b=r(t,m);b<l?(a=[{element:h,datasetIndex:f,index:u}],l=b):b===l&&a.push({element:h,datasetIndex:f,index:u})}return $e(n,e,t,d),a}function Si(n,t,e,i,s,o){return!o&&!n.isPointInArea(t)?[]:e==="r"&&!i?Tc(n,t,e,s):Fc(n,t,e,i,s,o)}function co(n,t,e,i,s){const o=[],a=e==="x"?"inXRange":"inYRange";let r=!1;return $e(n,e,t,(l,d,h)=>{l[a](t[e],s)&&(o.push({element:l,datasetIndex:d,index:h}),r=r||l.inRange(t.x,t.y,s))}),i&&!r?[]:o}var Ac={evaluateInteractionItems:$e,modes:{index(n,t,e,i){const s=ie(t,n),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?Ci(n,s,o,i,a):Si(n,s,o,!1,i,a),l=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(d=>{const h=r[0].index,f=d.data[h];f&&!f.skip&&l.push({element:f,datasetIndex:d.index,index:h})}),l):[]},dataset(n,t,e,i){const s=ie(t,n),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?Ci(n,s,o,i,a):Si(n,s,o,!1,i,a);if(r.length>0){const l=r[0].datasetIndex,d=n.getDatasetMeta(l).data;r=[];for(let h=0;h<d.length;++h)r.push({element:d[h],datasetIndex:l,index:h})}return r},point(n,t,e,i){const s=ie(t,n),o=e.axis||"xy",a=e.includeInvisible||!1;return Ci(n,s,o,i,a)},nearest(n,t,e,i){const s=ie(t,n),o=e.axis||"xy",a=e.includeInvisible||!1;return Si(n,s,o,e.intersect,i,a)},x(n,t,e,i){const s=ie(t,n);return co(n,s,"x",e.intersect,i)},y(n,t,e,i){const s=ie(t,n);return co(n,s,"y",e.intersect,i)}}};const ho=["left","top","right","bottom"];function Ne(n,t){return n.filter(e=>e.pos===t)}function fo(n,t){return n.filter(e=>ho.indexOf(e.pos)===-1&&e.box.axis===t)}function Re(n,t){return n.sort((e,i)=>{const s=t?i:e,o=t?e:i;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Lc(n){const t=[];let e,i,s,o,a,r;for(e=0,i=(n||[]).length;e<i;++e)s=n[e],{position:o,options:{stack:a,stackWeight:r=1}}=s,t.push({index:e,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&o+a,stackWeight:r});return t}function $c(n){const t={};for(const e of n){const{stack:i,pos:s,stackWeight:o}=e;if(!i||!ho.includes(s))continue;const a=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function Nc(n,t){const e=$c(n),{vBoxMaxWidth:i,hBoxMaxHeight:s}=t;let o,a,r;for(o=0,a=n.length;o<a;++o){r=n[o];const{fullSize:l}=r.box,d=e[r.stack],h=d&&r.stackWeight/d.weight;r.horizontal?(r.width=h?h*i:l&&t.availableWidth,r.height=s):(r.width=i,r.height=h?h*s:l&&t.availableHeight)}return e}function Rc(n){const t=Lc(n),e=Re(t.filter(d=>d.box.fullSize),!0),i=Re(Ne(t,"left"),!0),s=Re(Ne(t,"right")),o=Re(Ne(t,"top"),!0),a=Re(Ne(t,"bottom")),r=fo(t,"x"),l=fo(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:s.concat(l).concat(a).concat(r),chartArea:Ne(t,"chartArea"),vertical:i.concat(s).concat(l),horizontal:o.concat(a).concat(r)}}function uo(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function po(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function Ic(n,t,e,i){const{pos:s,box:o}=e,a=n.maxPadding;if(!I(s)){e.size&&(n[s]-=e.size);const f=i[e.stack]||{size:0,count:1};f.size=Math.max(f.size,e.horizontal?o.height:o.width),e.size=f.size/f.count,n[s]+=e.size}o.getPadding&&po(a,o.getPadding());const r=Math.max(0,t.outerWidth-uo(a,n,"left","right")),l=Math.max(0,t.outerHeight-uo(a,n,"top","bottom")),d=r!==n.w,h=l!==n.h;return n.w=r,n.h=l,e.horizontal?{same:d,other:h}:{same:h,other:d}}function zc(n){const t=n.maxPadding;function e(i){const s=Math.max(t[i]-n[i],0);return n[i]+=s,s}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function Wc(n,t){const e=t.maxPadding;function i(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return i(n?["left","right"]:["top","bottom"])}function Ie(n,t,e,i){const s=[];let o,a,r,l,d,h;for(o=0,a=n.length,d=0;o<a;++o){r=n[o],l=r.box,l.update(r.width||t.w,r.height||t.h,Wc(r.horizontal,t));const{same:f,other:u}=Ic(t,e,r,i);d|=f&&s.length,h=h||u,l.fullSize||s.push(r)}return d&&Ie(s,t,e,i)||h}function Sn(n,t,e,i,s){n.top=e,n.left=t,n.right=t+i,n.bottom=e+s,n.width=i,n.height=s}function mo(n,t,e,i){const s=e.padding;let{x:o,y:a}=t;for(const r of n){const l=r.box,d=i[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/d.weight||1;if(r.horizontal){const f=t.w*h,u=d.size||l.height;De(d.start)&&(a=d.start),l.fullSize?Sn(l,s.left,a,e.outerWidth-s.right-s.left,u):Sn(l,t.left+d.placed,a,f,u),d.start=a,d.placed+=f,a=l.bottom}else{const f=t.h*h,u=d.size||l.width;De(d.start)&&(o=d.start),l.fullSize?Sn(l,o,s.top,u,e.outerHeight-s.bottom-s.top):Sn(l,o,t.top+d.placed,u,f),d.start=o,d.placed+=f,o=l.right}}t.x=o,t.y=a}var lt={addBox(n,t){n.boxes||(n.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const s=rt(n.options.layout.padding),o=Math.max(t-s.width,0),a=Math.max(e-s.height,0),r=Rc(n.boxes),l=r.vertical,d=r.horizontal;j(n.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},s);po(u,rt(i));const p=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),m=Nc(l.concat(d),f);Ie(r.fullSize,p,f,m),Ie(l,p,f,m),Ie(d,p,f,m)&&Ie(l,p,f,m),zc(p),mo(r.leftAndTop,p,f,m),p.x+=p.w,p.y+=p.h,mo(r.rightAndBottom,p,f,m),n.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},j(r.chartArea,g=>{const b=g.box;Object.assign(b,n.chartArea),b.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class go{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class Hc extends go{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Mn="$chartjs",jc={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},bo=n=>n===null||n==="";function Yc(n,t){const e=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[Mn]={initial:{height:i,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",bo(s)){const o=zs(n,"width");o!==void 0&&(n.width=o)}if(bo(i))if(n.style.height==="")n.height=n.width/(t||2);else{const o=zs(n,"height");o!==void 0&&(n.height=o)}return n}const yo=Xl?{passive:!0}:!1;function Uc(n,t,e){n.addEventListener(t,e,yo)}function Xc(n,t,e){n.canvas.removeEventListener(t,e,yo)}function qc(n,t){const e=jc[n.type]||n.type,{x:i,y:s}=ie(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function vn(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Kc(n,t,e){const i=n.canvas,s=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||vn(r.addedNodes,i),a=a&&!vn(r.removedNodes,i);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function Gc(n,t,e){const i=n.canvas,s=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||vn(r.removedNodes,i),a=a&&!vn(r.addedNodes,i);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const ze=new Map;let _o=0;function xo(){const n=window.devicePixelRatio;n!==_o&&(_o=n,ze.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function Zc(n,t){ze.size||window.addEventListener("resize",xo),ze.set(n,t)}function Jc(n){ze.delete(n),ze.size||window.removeEventListener("resize",xo)}function Qc(n,t,e){const i=n.canvas,s=i&&bi(i);if(!s)return;const o=xs((r,l)=>{const d=s.clientWidth;e(r,l),d<s.clientWidth&&e()},window),a=new ResizeObserver(r=>{const l=r[0],d=l.contentRect.width,h=l.contentRect.height;d===0&&h===0||o(d,h)});return a.observe(s),Zc(n,o),a}function Mi(n,t,e){e&&e.disconnect(),t==="resize"&&Jc(n)}function td(n,t,e){const i=n.canvas,s=xs(o=>{n.ctx!==null&&e(qc(o,n))},n);return Uc(i,t,s),s}class ed extends go{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Yc(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Mn])return!1;const i=e[Mn].initial;["height","width"].forEach(o=>{const a=i[o];z(a)?e.removeAttribute(o):e.setAttribute(o,a)});const s=i.style||{};return Object.keys(s).forEach(o=>{e.style[o]=s[o]}),e.width=e.width,delete e[Mn],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),a={attach:Kc,detach:Gc,resize:Qc}[e]||td;s[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Mi,detach:Mi,resize:Mi}[e]||Xc)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return Ul(t,e,i,s)}isAttached(t){const e=bi(t);return!!(e&&e.isConnected)}}function nd(n){return!Rs()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?Hc:ed}let Vt=(Kn=class{constructor(){B(this,"x");B(this,"y");B(this,"active",!1);B(this,"options");B(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return ue(this.x)&&ue(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach(o=>{s[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),s}},B(Kn,"defaults",{}),B(Kn,"defaultRoutes"),Kn);function id(n,t){const e=n.options.ticks,i=sd(n),s=Math.min(e.maxTicksLimit||i,i),o=e.major.enabled?ad(t):[],a=o.length,r=o[0],l=o[a-1],d=[];if(a>s)return rd(t,d,o,a/s),d;const h=od(o,t,s);if(a>0){let f,u;const p=a>1?Math.round((l-r)/(a-1)):null;for(Dn(t,d,h,z(p)?0:r-p,r),f=0,u=a-1;f<u;f++)Dn(t,d,h,o[f],o[f+1]);return Dn(t,d,h,l,z(p)?t.length:l+p),d}return Dn(t,d,h),d}function sd(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),s=n._maxLength/e;return Math.floor(Math.min(i,s))}function od(n,t,e){const i=ld(n),s=t.length/e;if(!i)return Math.max(s,1);const o=Gr(i);for(let a=0,r=o.length-1;a<r;a++){const l=o[a];if(l>s)return l}return Math.max(s,1)}function ad(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function rd(n,t,e,i){let s=0,o=e[0],a;for(i=Math.ceil(i),a=0;a<n.length;a++)a===o&&(t.push(n[a]),s++,o=e[s*i])}function Dn(n,t,e,i,s){const o=R(i,0),a=Math.min(R(s,n.length),n.length);let r=0,l,d,h;for(e=Math.ceil(e),s&&(l=s-i,e=l/Math.floor(l/e)),h=o;h<0;)r++,h=Math.round(o+r*e);for(d=Math.max(o,0);d<a;d++)d===h&&(t.push(n[d]),r++,h=Math.round(o+r*e))}function ld(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const cd=n=>n==="left"?"right":n==="right"?"left":n,ko=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,wo=(n,t)=>Math.min(t||n,n);function Co(n,t){const e=[],i=n.length/t,s=n.length;let o=0;for(;o<s;o+=i)e.push(n[Math.floor(o)]);return e}function dd(n,t,e){const i=n.ticks.length,s=Math.min(t,i-1),o=n._startPixel,a=n._endPixel,r=1e-6;let l=n.getPixelForTick(s),d;if(!(e&&(i===1?d=Math.max(l-o,a-l):t===0?d=(n.getPixelForTick(1)-l)/2:d=(l-n.getPixelForTick(s-1))/2,l+=s<t?d:-d,l<o-r||l>a+r)))return l}function hd(n,t){j(n,e=>{const i=e.gc,s=i.length/2;let o;if(s>t){for(o=0;o<s;++o)delete e.data[i[o]];i.splice(0,s)}})}function We(n){return n.drawTicks?n.tickLength:0}function So(n,t){if(!n.display)return 0;const e=nt(n.font,t),i=rt(n.padding);return(q(n.text)?n.text.length:1)*e.lineHeight+i.height}function fd(n,t){return Ht(n,{scale:t,type:"scale"})}function ud(n,t,e){return Ht(n,{tick:e,index:t,type:"tick"})}function pd(n,t,e){let i=ri(n);return(e&&t!=="right"||!e&&t==="right")&&(i=cd(i)),i}function md(n,t,e,i){const{top:s,left:o,bottom:a,right:r,chart:l}=n,{chartArea:d,scales:h}=l;let f=0,u,p,m;const g=a-s,b=r-o;if(n.isHorizontal()){if(p=at(i,o,r),I(e)){const y=Object.keys(e)[0],_=e[y];m=h[y].getPixelForValue(_)+g-t}else e==="center"?m=(d.bottom+d.top)/2+g-t:m=ko(n,e,t);u=r-o}else{if(I(e)){const y=Object.keys(e)[0],_=e[y];p=h[y].getPixelForValue(_)-b+t}else e==="center"?p=(d.left+d.right)/2-b+t:p=ko(n,e,t);m=at(i,a,s),f=e==="left"?-et:et}return{titleX:p,titleY:m,maxWidth:u,rotation:f}}class re extends Vt{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:i,_suggestedMax:s}=this;return t=ft(t,Number.POSITIVE_INFINITY),e=ft(e,Number.NEGATIVE_INFINITY),i=ft(i,Number.POSITIVE_INFINITY),s=ft(s,Number.NEGATIVE_INFINITY),{min:ft(t,i),max:ft(e,s),minDefined:J(t),maxDefined:J(e)}}getMinMax(t){let{min:e,max:i,minDefined:s,maxDefined:o}=this.getUserBounds(),a;if(s&&o)return{min:e,max:i};const r=this.getMatchingVisibleMetas();for(let l=0,d=r.length;l<d;++l)a=r[l].controller.getMinMax(this,t),s||(e=Math.min(e,a.min)),o||(i=Math.max(i,a.max));return e=o&&e>i?i:e,i=s&&e>i?e:i,{min:ft(e,ft(i,e)),max:ft(i,ft(e,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(){U(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Sl(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?Co(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=id(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){U(this.options.afterUpdate,[this])}beforeSetDimensions(){U(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(){U(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),U(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){U(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,o;for(i=0,s=t.length;i<s;i++)o=t[i],o.label=U(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){U(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){U(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=wo(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,o=e.maxRotation;let a=s,r,l,d;if(!this._isVisible()||!e.display||s>=o||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const h=this._getLabelSizes(),f=h.widest.width,u=h.highest.height,p=it(this.chart.width-f,0,this.maxWidth);r=t.offset?this.maxWidth/i:p/(i-1),f+6>r&&(r=p/(i-(t.offset?.5:1)),l=this.maxHeight-We(t.grid)-e.padding-So(t.title,this.chart.options.font),d=Math.sqrt(f*f+u*u),a=si(Math.min(Math.asin(it((h.highest.height+6)/r,-1,1)),Math.asin(it(l/d,-1,1))-Math.asin(it(u/d,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){U(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){U(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=So(s,e.options.font);if(r?(t.width=this.maxWidth,t.height=We(o)+l):(t.height=this.maxHeight,t.width=We(o)+l),i.display&&this.ticks.length){const{first:d,last:h,widest:f,highest:u}=this._getLabelSizes(),p=i.padding*2,m=yt(this.labelRotation),g=Math.cos(m),b=Math.sin(m);if(r){const y=i.mirror?0:b*f.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+y+p)}else{const y=i.mirror?0:g*f.width+b*u.height;t.width=Math.min(this.maxWidth,t.width+y+p)}this._calculatePadding(d,h,b,g)}}this._handleMargins(),r?(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,i,s){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,d=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,p=0;l?d?(u=s*t.width,p=i*e.height):(u=i*t.height,p=s*e.width):o==="start"?p=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,p=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((p-f+a)*this.width/(this.width-f),0)}else{let h=e.height/2,f=t.height/2;o==="start"?(h=0,f=t.height):o==="end"&&(h=e.height,f=0),this.paddingTop=h+a,this.paddingBottom=f+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(){U(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)z(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Co(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:s,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(e/wo(e,i));let d=0,h=0,f,u,p,m,g,b,y,_,w,x,k;for(f=0;f<e;f+=l){if(m=t[f].label,g=this._resolveTickFontOptions(f),s.font=b=g.string,y=o[b]=o[b]||{data:{},gc:[]},_=g.lineHeight,w=x=0,!z(m)&&!q(m))w=fn(s,y.data,y.gc,w,m),x=_;else if(q(m))for(u=0,p=m.length;u<p;++u)k=m[u],!z(k)&&!q(k)&&(w=fn(s,y.data,y.gc,w,k),x+=_);a.push(w),r.push(x),d=Math.max(w,d),h=Math.max(x,h)}hd(o,e);const M=a.indexOf(d),v=r.indexOf(h),D=F=>({width:a[F]||0,height:r[F]||0});return{first:D(0),last:D(e-1),widest:D(M),highest:D(v),widths:a,heights:r}}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 Qr(this._alignToPixels?Qt(this.chart,e,0):e)}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 i=e[t];return i.$context||(i.$context=ud(this.getContext(),t,i))}return this.$context||(this.$context=fd(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=yt(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*i>r*s?r/i:l/s:l*s<r*i?l/i:r/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:o,position:a,border:r}=s,l=o.offset,d=this.isHorizontal(),f=this.ticks.length+(l?1:0),u=We(o),p=[],m=r.setContext(this.getContext()),g=m.display?m.width:0,b=g/2,y=function(C){return Qt(i,C,g)};let _,w,x,k,M,v,D,F,T,P,L,X;if(a==="top")_=y(this.bottom),v=this.bottom-u,F=_-b,P=y(t.top)+b,X=t.bottom;else if(a==="bottom")_=y(this.top),P=t.top,X=y(t.bottom)-b,v=_+b,F=this.top+u;else if(a==="left")_=y(this.right),M=this.right-u,D=_-b,T=y(t.left)+b,L=t.right;else if(a==="right")_=y(this.left),T=t.left,L=y(t.right)-b,M=_+b,D=this.left+u;else if(e==="x"){if(a==="center")_=y((t.top+t.bottom)/2+.5);else if(I(a)){const C=Object.keys(a)[0],E=a[C];_=y(this.chart.scales[C].getPixelForValue(E))}P=t.top,X=t.bottom,v=_+b,F=v+u}else if(e==="y"){if(a==="center")_=y((t.left+t.right)/2);else if(I(a)){const C=Object.keys(a)[0],E=a[C];_=y(this.chart.scales[C].getPixelForValue(E))}M=_-b,D=M-u,T=t.left,L=t.right}const O=R(s.ticks.maxTicksLimit,f),S=Math.max(1,Math.ceil(f/O));for(w=0;w<f;w+=S){const C=this.getContext(w),E=o.setContext(C),V=r.setContext(C),A=E.lineWidth,$=E.color,H=V.dash||[],Y=V.dashOffset,Z=E.tickWidth,tt=E.tickColor,st=E.tickBorderDash||[],bt=E.tickBorderDashOffset;x=dd(this,w,l),x!==void 0&&(k=Qt(i,x,A),d?M=D=T=L=k:v=F=P=X=k,p.push({tx1:M,ty1:v,tx2:D,ty2:F,x1:T,y1:P,x2:L,y2:X,width:A,color:$,borderDash:H,borderDashOffset:Y,tickWidth:Z,tickColor:tt,tickBorderDash:st,tickBorderDashOffset:bt}))}return this._ticksLength=f,this._borderValue=_,p}_computeLabelItems(t){const e=this.axis,i=this.options,{position:s,ticks:o}=i,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:d,padding:h,mirror:f}=o,u=We(i.grid),p=u+h,m=f?-h:p,g=-yt(this.labelRotation),b=[];let y,_,w,x,k,M,v,D,F,T,P,L,X="middle";if(s==="top")M=this.bottom-m,v=this._getXAxisLabelAlignment();else if(s==="bottom")M=this.top+m,v=this._getXAxisLabelAlignment();else if(s==="left"){const S=this._getYAxisLabelAlignment(u);v=S.textAlign,k=S.x}else if(s==="right"){const S=this._getYAxisLabelAlignment(u);v=S.textAlign,k=S.x}else if(e==="x"){if(s==="center")M=(t.top+t.bottom)/2+p;else if(I(s)){const S=Object.keys(s)[0],C=s[S];M=this.chart.scales[S].getPixelForValue(C)+p}v=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")k=(t.left+t.right)/2-p;else if(I(s)){const S=Object.keys(s)[0],C=s[S];k=this.chart.scales[S].getPixelForValue(C)}v=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?X="top":l==="end"&&(X="bottom"));const O=this._getLabelSizes();for(y=0,_=r.length;y<_;++y){w=r[y],x=w.label;const S=o.setContext(this.getContext(y));D=this.getPixelForTick(y)+o.labelOffset,F=this._resolveTickFontOptions(y),T=F.lineHeight,P=q(x)?x.length:1;const C=P/2,E=S.color,V=S.textStrokeColor,A=S.textStrokeWidth;let $=v;a?(k=D,v==="inner"&&(y===_-1?$=this.options.reverse?"left":"right":y===0?$=this.options.reverse?"right":"left":$="center"),s==="top"?d==="near"||g!==0?L=-P*T+T/2:d==="center"?L=-O.highest.height/2-C*T+T:L=-O.highest.height+T/2:d==="near"||g!==0?L=T/2:d==="center"?L=O.highest.height/2-C*T:L=O.highest.height-P*T,f&&(L*=-1),g!==0&&!S.showLabelBackdrop&&(k+=T/2*Math.sin(g))):(M=D,L=(1-P)*T/2);let H;if(S.showLabelBackdrop){const Y=rt(S.backdropPadding),Z=O.heights[y],tt=O.widths[y];let st=L-Y.top,bt=0-Y.left;switch(X){case"middle":st-=Z/2;break;case"bottom":st-=Z;break}switch(v){case"center":bt-=tt/2;break;case"right":bt-=tt;break}H={left:bt,top:st,width:tt+Y.width,height:Z+Y.height,color:S.backdropColor}}b.push({label:x,font:F,textOffset:L,options:{rotation:g,color:E,strokeColor:V,strokeWidth:A,textAlign:$,textBaseline:X,translation:[k,M],backdrop:H}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-yt(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let d,h;return e==="left"?s?(h=this.right+o,i==="near"?d="left":i==="center"?(d="center",h+=l/2):(d="right",h+=l)):(h=this.right-r,i==="near"?d="right":i==="center"?(d="center",h-=l/2):(d="left",h=this.left)):e==="right"?s?(h=this.left+o,i==="near"?d="right":i==="center"?(d="center",h-=l/2):(d="left",h-=l)):(h=this.left+r,i==="near"?d="left":i==="center"?(d="center",h+=l/2):(d="right",h=this.right)):d="right",{textAlign:d,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex(o=>o.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,d,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(d.x,d.y),i.stroke(),i.restore())};if(e.display)for(o=0,a=s.length;o<a;++o){const l=s[o];e.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:s}}=this,o=i.setContext(this.getContext()),a=i.display?o.width:0;if(!a)return;const r=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let d,h,f,u;this.isHorizontal()?(d=Qt(t,this.left,a)-a/2,h=Qt(t,this.right,r)+r/2,f=u=l):(f=Qt(t,this.top,a)-a/2,u=Qt(t,this.bottom,r)+r/2,d=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(d,f),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&un(i,s);const o=this.getLabelItems(t);for(const a of o){const r=a.options,l=a.font,d=a.label,h=a.textOffset;te(i,d,0,h,l,r)}s&&pn(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;const o=nt(i.font),a=rt(i.padding),r=i.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||I(e)?(l+=a.bottom,q(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:d,titleY:h,maxWidth:f,rotation:u}=md(this,l,e,r);te(t,i.text,0,0,o,{color:i.color,maxWidth:f,rotation:u,textAlign:pd(r,e,s),textBaseline:"middle",translation:[d,h]})}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,i=R(t.grid&&t.grid.z,-1),s=R(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==re.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let o,a;for(o=0,a=e.length;o<a;++o){const r=e[o];r[i]===this.id&&(!t||r.type===t)&&s.push(r)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return nt(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class En{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,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 i;yd(e)&&(i=this.register(e));const s=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,gd(t,a,i),this.override&&Q.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in Q[s]&&(delete Q[s][i],this.override&&delete Jt[i])}}function gd(n,t,e){const i=Me(Object.create(null),[e?Q.get(e):{},Q.get(t),n.defaults]);Q.set(t,i),n.defaultRoutes&&bd(t,n.defaultRoutes),n.descriptors&&Q.describe(t,n.descriptors)}function bd(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),s=i.pop(),o=[n].concat(i).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");Q.route(o,s,l,r)})}function yd(n){return"id"in n&&"defaults"in n}class _d{constructor(){this.controllers=new En(_t,"datasets",!0),this.elements=new En(Vt,"elements"),this.plugins=new En(Object,"plugins"),this.scales=new En(re,"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,i){[...e].forEach(s=>{const o=i||this._getRegistryForType(s);i||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):j(s,a=>{const r=i||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,i){const s=ii(t);U(i["before"+s],[],i),e[t](i),U(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var kt=new _d;class xd{constructor(){this._init=[]}notify(t,e,i,s){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=s?this._descriptors(t).filter(s):this._descriptors(t),a=this._notify(o,t,e,i);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,i,s){s=s||{};for(const o of t){const a=o.plugin,r=a[i],l=[e,s,o.options];if(U(r,l,a)===!1&&s.cancelable)return!1}return!0}invalidate(){z(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 i=t&&t.config,s=R(i.options&&i.options.plugins,{}),o=kd(i);return s===!1&&!e?[]:Cd(t,o,s,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,s=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function kd(n){const t={},e=[],i=Object.keys(kt.plugins.items);for(let o=0;o<i.length;o++)e.push(kt.getPlugin(i[o]));const s=n.plugins||[];for(let o=0;o<s.length;o++){const a=s[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function wd(n,t){return!t&&n===!1?null:n===!0?{}:n}function Cd(n,{plugins:t,localIds:e},i,s){const o=[],a=n.getContext();for(const r of t){const l=r.id,d=wd(i[l],s);d!==null&&o.push({plugin:r,options:Sd(n.config,{plugin:r,local:e[l]},d,a)})}return o}function Sd(n,{plugin:t,local:e},i,s){const o=n.pluginScopeKeys(t),a=n.getOptionScopes(i,o);return e&&t.defaults&&a.push(t.defaults),n.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function vi(n,t){const e=Q.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Md(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function vd(n,t){return n===t?"_index_":"_value_"}function Mo(n){if(n==="x"||n==="y"||n==="r")return n}function Dd(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function Di(n,...t){if(Mo(n))return n;for(const e of t){const i=e.axis||Dd(e.position)||n.length>1&&Mo(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function vo(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function Ed(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(e.length)return vo(n,"x",e[0])||vo(n,"y",e[0])}return{}}function Bd(n,t){const e=Jt[n.type]||{scales:{}},i=t.scales||{},s=vi(n.type,t),o=Object.create(null);return Object.keys(i).forEach(a=>{const r=i[a];if(!I(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Di(a,r,Ed(a,n),Q.scales[r.type]),d=vd(l,s),h=e.scales||{};o[a]=ve(Object.create(null),[{axis:l},r,h[l],h[d]])}),n.data.datasets.forEach(a=>{const r=a.type||n.type,l=a.indexAxis||vi(r,t),h=(Jt[r]||{}).scales||{};Object.keys(h).forEach(f=>{const u=Md(f,l),p=a[u+"AxisID"]||u;o[p]=o[p]||Object.create(null),ve(o[p],[{axis:u},i[p],h[f]])})}),Object.keys(o).forEach(a=>{const r=o[a];ve(r,[Q.scales[r.type],Q.scale])}),o}function Do(n){const t=n.options||(n.options={});t.plugins=R(t.plugins,{}),t.scales=Bd(n,t)}function Eo(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Vd(n){return n=n||{},n.data=Eo(n.data),Do(n),n}const Bo=new Map,Vo=new Set;function Bn(n,t){let e=Bo.get(n);return e||(e=t(),Bo.set(n,e),Vo.add(e)),e}const He=(n,t,e)=>{const i=It(t,e);i!==void 0&&n.add(i)};class Pd{constructor(t){this._config=Vd(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=Eo(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(),Do(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Bn(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Bn(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Bn(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Bn(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:o}=this,a=this._cachedScopes(t,i),r=a.get(e);if(r)return r;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(f=>He(l,t,f))),h.forEach(f=>He(l,s,f)),h.forEach(f=>He(l,Jt[o]||{},f)),h.forEach(f=>He(l,Q,f)),h.forEach(f=>He(l,di,f))});const d=Array.from(l);return d.length===0&&d.push(Object.create(null)),Vo.has(e)&&a.set(e,d),d}chartOptionScopes(){const{options:t,type:e}=this;return[t,Jt[e]||{},Q.datasets[e]||{},{type:e},Q,di]}resolveNamedOptions(t,e,i,s=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=Po(this._resolverCache,t,s);let l=a;if(Td(a,e)){o.$shared=!1,i=zt(i)?i():i;const d=this.createResolver(t,i,r);l=pe(a,i,d)}for(const d of e)o[d]=l[d];return o}createResolver(t,e,i=[""],s){const{resolver:o}=Po(this._resolverCache,t,i);return I(e)?pe(o,e,void 0,s):o}}function Po(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const s=e.join();let o=i.get(s);return o||(o={resolver:pi(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,o)),o}const Od=n=>I(n)&&Object.getOwnPropertyNames(n).reduce((t,e)=>t||zt(n[e]),!1);function Td(n,t){const{isScriptable:e,isIndexable:i}=Ps(n);for(const s of t){const o=e(s),a=i(s),r=(a||o)&&n[s];if(o&&(zt(r)||Od(r))||a&&q(r))return!0}return!1}var Fd="4.4.0";const Ad=["top","bottom","left","right","chartArea"];function Oo(n,t){return n==="top"||n==="bottom"||Ad.indexOf(n)===-1&&t==="x"}function To(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function Fo(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),U(e&&e.onComplete,[n],t)}function Ld(n){const t=n.chart,e=t.options.animation;U(e&&e.onProgress,[n],t)}function Ao(n){return Rs()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Vn={},Lo=n=>{const t=Ao(n);return Object.values(Vn).filter(e=>e.canvas===t).pop()};function $d(n,t,e){const i=Object.keys(n);for(const s of i){const o=+s;if(o>=t){const a=n[s];delete n[s],(e>0||o>t)&&(n[o+e]=a)}}}function Nd(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}function Pn(n,t,e){return n.options.clip?n[e]:t[e]}function Rd(n,t){const{xScale:e,yScale:i}=n;return e&&i?{left:Pn(e,t,"left"),right:Pn(e,t,"right"),top:Pn(i,t,"top"),bottom:Pn(i,t,"bottom")}:t}class Pt{static register(...t){kt.add(...t),$o()}static unregister(...t){kt.remove(...t),$o()}constructor(t,e){const i=this.config=new Pd(e),s=Ao(t),o=Lo(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||nd(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,a.aspectRatio),l=r&&r.canvas,d=l&&l.height,h=l&&l.width;if(this.id=zr(),this.ctx=r,this.canvas=l,this.width=h,this.height=d,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 xd,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=il(f=>this.update(f),a.resizeDelay||0),this._dataChanges=[],Vn[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Bt.listen(this,"complete",Fo),Bt.listen(this,"progress",Ld),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:o}=this;return z(t)?e&&o?o:s?i/s: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 kt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Is(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Es(this.canvas,this.ctx),this}stop(){return Bt.stop(this),this}resize(t,e){Bt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,t,e,o),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Is(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),U(i.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};j(e,(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=Di(a,r),d=l==="r",h=l==="x";return{options:r,dposition:d?"chartArea":h?"bottom":"left",dtype:d?"radialLinear":h?"category":"linear"}}))),j(o,a=>{const r=a.options,l=r.id,d=Di(l,r),h=R(r.type,a.dtype);(r.position===void 0||Oo(r.position,d)!==Oo(a.dposition))&&(r.position=a.dposition),s[l]=!0;let f=null;if(l in i&&i[l].type===h)f=i[l];else{const u=kt.getScale(h);f=new u({id:l,type:h,ctx:this.ctx,chart:this}),i[f.id]=f}f.init(r,t)}),j(s,(a,r)=>{a||delete i[r]}),j(i,a=>{lt.configure(this,a,a.options),lt.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((s,o)=>s.index-o.index),i>e){for(let s=e;s<i;++s)this._destroyDatasetMeta(s);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(To("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,s)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const o=e[i];let a=this.getDatasetMeta(i);const r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(i),a=this.getDatasetMeta(i)),a.type=r,a.indexAxis=o.indexAxis||vi(r,this.options),a.order=o.order||0,a.index=i,a.label=""+o.label,a.visible=this.isDatasetVisible(i),a.controller)a.controller.updateIndex(i),a.controller.linkScales();else{const l=kt.getController(r),{datasetElementType:d,dataElementType:h}=Q.datasets[r];Object.assign(l,{dataElementType:kt.getElement(h),datasetElementType:d&&kt.getElement(d)}),a.controller=new l(this,i),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){j(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 i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let d=0,h=this.data.datasets.length;d<h;d++){const{controller:f}=this.getDatasetMeta(d),u=!s&&o.indexOf(f)===-1;f.buildOrUpdateElements(u),a=Math.max(+f.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),s||j(o,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(To("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){j(this.scales,t=>{lt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!ds(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:o}of e){const a=i==="_removeElements"?-o:o;$d(t,s,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),s=i(0);for(let o=1;o<e;o++)if(!ds(s,i(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;lt.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],j(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,zt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Bt.has(this)?this.attached&&!Bt.running(this)&&Bt.start(this):(this.draw(),Fo({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resize(i,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)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,i=[];let s,o;for(s=0,o=e.length;s<o;++s){const a=e[s];(!t||a.visible)&&i.push(a)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)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,i=t._clip,s=!i.disabled,o=Rd(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(s&&un(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),s&&pn(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Et(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const o=Ac.modes[e];return typeof o=="function"?o(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter(o=>o&&o._dataset===e).pop();return s||(s={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},i.push(s)),s}getContext(){return this.$context||(this.$context=Ht(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,s);De(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(o,{visible:i}),this.update(r=>r.datasetIndex===t?s: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(),Bt.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(),Es(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Vn[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,i=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},s=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};j(this.options.events,o=>i(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(l,d)=>{e.addEventListener(this,l,d),t[l]=d},s=(l,d)=>{t[l]&&(e.removeEventListener(this,l,d),delete t[l])},o=(l,d)=>{this.canvas&&this.resize(l,d)};let a;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",o),i("detach",a)};a=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){j(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},j(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];const d=a&&this.getDatasetMeta(a.datasetIndex).controller;d&&d[s+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:o,index:a})=>{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!rn(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const s=this.options.hover,o=(l,d)=>l.filter(h=>!d.some(f=>h.datasetIndex===f.datasetIndex&&h.index===f.index)),a=o(e,t),r=i?t:o(t,e);a.length&&this.updateHoverStyle(a,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:o}=this,a=e,r=this._getActiveElements(t,s,i,a),l=Xr(t),d=Nd(t,this._lastEvent,i,l);i&&(this._lastEvent=null,U(o.onHover,[t,r,this],this),l&&U(o.onClick,[t,r,this],this));const h=!rn(r,s);return(h||e)&&(this._active=r,this._updateHoverStyles(r,s,e)),this._lastEvent=d,h}_getActiveElements(t,e,i,s){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}}B(Pt,"defaults",Q),B(Pt,"instances",Vn),B(Pt,"overrides",Jt),B(Pt,"registry",kt),B(Pt,"version",Fd),B(Pt,"getChart",Lo);function $o(){return j(Pt.instances,n=>n._plugins.invalidate())}function Id(n,t,e){const{startAngle:i,pixelMargin:s,x:o,y:a,outerRadius:r,innerRadius:l}=t;let d=s/r;n.beginPath(),n.arc(o,a,r,i-d,e+d),l>s?(d=s/l,n.arc(o,a,l,e+d,i-d,!0)):n.arc(o,a,s,e+et,i-et),n.closePath(),n.clip()}function zd(n){return ui(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Wd(n,t,e,i){const s=zd(n.options.borderRadius),o=(e-t)/2,a=Math.min(o,i*t/2),r=l=>{const d=(e-Math.min(o,l))*i/2;return it(l,0,Math.min(o,d))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:it(s.innerStart,0,a),innerEnd:it(s.innerEnd,0,a)}}function be(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function On(n,t,e,i,s,o){const{x:a,y:r,startAngle:l,pixelMargin:d,innerRadius:h}=t,f=Math.max(t.outerRadius+i+e-d,0),u=h>0?h+i+e+d:0;let p=0;const m=s-l;if(i){const S=h>0?h-i:0,C=f>0?f-i:0,E=(S+C)/2,V=E!==0?m*E/(E+i):m;p=(m-V)/2}const g=Math.max(.001,m*f-e/K)/f,b=(m-g)/2,y=l+b+p,_=s-b-p,{outerStart:w,outerEnd:x,innerStart:k,innerEnd:M}=Wd(t,u,f,_-y),v=f-w,D=f-x,F=y+w/v,T=_-x/D,P=u+k,L=u+M,X=y+k/P,O=_-M/L;if(n.beginPath(),o){const S=(F+T)/2;if(n.arc(a,r,f,F,S),n.arc(a,r,f,S,T),x>0){const A=be(D,T,a,r);n.arc(A.x,A.y,x,T,_+et)}const C=be(L,_,a,r);if(n.lineTo(C.x,C.y),M>0){const A=be(L,O,a,r);n.arc(A.x,A.y,M,_+et,O+Math.PI)}const E=(_-M/u+(y+k/u))/2;if(n.arc(a,r,u,_-M/u,E,!0),n.arc(a,r,u,E,y+k/u,!0),k>0){const A=be(P,X,a,r);n.arc(A.x,A.y,k,X+Math.PI,y-et)}const V=be(v,y,a,r);if(n.lineTo(V.x,V.y),w>0){const A=be(v,F,a,r);n.arc(A.x,A.y,w,y-et,F)}}else{n.moveTo(a,r);const S=Math.cos(F)*f+a,C=Math.sin(F)*f+r;n.lineTo(S,C);const E=Math.cos(T)*f+a,V=Math.sin(T)*f+r;n.lineTo(E,V)}n.closePath()}function Hd(n,t,e,i,s){const{fullCircles:o,startAngle:a,circumference:r}=t;let l=t.endAngle;if(o){On(n,t,e,i,l,s);for(let d=0;d<o;++d)n.fill();isNaN(r)||(l=a+(r%G||G))}return On(n,t,e,i,l,s),n.fill(),l}function jd(n,t,e,i,s){const{fullCircles:o,startAngle:a,circumference:r,options:l}=t,{borderWidth:d,borderJoinStyle:h,borderDash:f,borderDashOffset:u}=l,p=l.borderAlign==="inner";if(!d)return;n.setLineDash(f||[]),n.lineDashOffset=u,p?(n.lineWidth=d*2,n.lineJoin=h||"round"):(n.lineWidth=d,n.lineJoin=h||"bevel");let m=t.endAngle;if(o){On(n,t,e,i,m,s);for(let g=0;g<o;++g)n.stroke();isNaN(r)||(m=a+(r%G||G))}p&&Id(n,t,m),o||(On(n,t,e,i,m,s),n.stroke())}class je extends Vt{constructor(e){super();B(this,"circumference");B(this,"endAngle");B(this,"fullCircles");B(this,"innerRadius");B(this,"outerRadius");B(this,"pixelMargin");B(this,"startAngle");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,e&&Object.assign(this,e)}inRange(e,i,s){const o=this.getProps(["x","y"],s),{angle:a,distance:r}=ms(o,{x:e,y:i}),{startAngle:l,endAngle:d,innerRadius:h,outerRadius:f,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),p=(this.options.spacing+this.options.borderWidth)/2,g=R(u,d-l)>=G||Be(a,l,d),b=vt(r,h+p,f+p);return g&&b}getCenterPoint(e){const{x:i,y:s,startAngle:o,endAngle:a,innerRadius:r,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:d,spacing:h}=this.options,f=(o+a)/2,u=(r+l+h+d)/2;return{x:i+Math.cos(f)*u,y:s+Math.sin(f)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:s}=this,o=(i.offset||0)/4,a=(i.spacing||0)/2,r=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>G?Math.floor(s/G):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);const d=1-Math.sin(Math.min(K,s||0)),h=o*d;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,Hd(e,this,h,a,r),jd(e,this,h,a,r),e.restore()}}B(je,"id","arc"),B(je,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),B(je,"defaultRoutes",{backgroundColor:"backgroundColor"}),B(je,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function No(n,t,e=t){n.lineCap=R(e.borderCapStyle,t.borderCapStyle),n.setLineDash(R(e.borderDash,t.borderDash)),n.lineDashOffset=R(e.borderDashOffset,t.borderDashOffset),n.lineJoin=R(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=R(e.borderWidth,t.borderWidth),n.strokeStyle=R(e.borderColor,t.borderColor)}function Yd(n,t,e){n.lineTo(e.x,e.y)}function Ud(n){return n.stepped?ml:n.tension||n.cubicInterpolationMode==="monotone"?gl:Yd}function Ro(n,t,e={}){const i=n.length,{start:s=0,end:o=i-1}=e,{start:a,end:r}=t,l=Math.max(s,a),d=Math.min(o,r),h=s<a&&o<a||s>r&&o>r;return{count:i,start:l,loop:t.loop,ilen:d<l&&!h?i+d-l:d-l}}function Xd(n,t,e,i){const{points:s,options:o}=t,{count:a,start:r,loop:l,ilen:d}=Ro(s,e,i),h=Ud(o);let{move:f=!0,reverse:u}=i||{},p,m,g;for(p=0;p<=d;++p)m=s[(r+(u?d-p:p))%a],!m.skip&&(f?(n.moveTo(m.x,m.y),f=!1):h(n,g,m,u,o.stepped),g=m);return l&&(m=s[(r+(u?d:0))%a],h(n,g,m,u,o.stepped)),!!l}function qd(n,t,e,i){const s=t.points,{count:o,start:a,ilen:r}=Ro(s,e,i),{move:l=!0,reverse:d}=i||{};let h=0,f=0,u,p,m,g,b,y;const _=x=>(a+(d?r-x:x))%o,w=()=>{g!==b&&(n.lineTo(h,b),n.lineTo(h,g),n.lineTo(h,y))};for(l&&(p=s[_(0)],n.moveTo(p.x,p.y)),u=0;u<=r;++u){if(p=s[_(u)],p.skip)continue;const x=p.x,k=p.y,M=x|0;M===m?(k<g?g=k:k>b&&(b=k),h=(f*h+x)/++f):(w(),n.lineTo(x,k),m=M,f=0,g=b=k),y=k}w()}function Ei(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?qd:Xd}function Kd(n){return n.stepped?ql:n.tension||n.cubicInterpolationMode==="monotone"?Kl:se}function Gd(n,t,e,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,i)&&s.closePath()),No(n,t.options),n.stroke(s)}function Zd(n,t,e,i){const{segments:s,options:o}=t,a=Ei(t);for(const r of s)No(n,o,r.style),n.beginPath(),a(n,t,r,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const Jd=typeof Path2D=="function";function Qd(n,t,e,i){Jd&&!t.options.segment?Gd(n,t,e,i):Zd(n,t,e,i)}class jt extends Vt{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 i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Il(this._points,i,t,s,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=ec(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,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],o=this.points,a=Xs(this,{property:e,start:s,end:s});if(!a.length)return;const r=[],l=Kd(i);let d,h;for(d=0,h=a.length;d<h;++d){const{start:f,end:u}=a[d],p=o[f],m=o[u];if(p===m){r.push(p);continue}const g=Math.abs((s-p[e])/(m[e]-p[e])),b=l(p,m,g,i.stepped);b[e]=t[e],r.push(b)}return r.length===1?r[0]:r}pathSegment(t,e,i){return Ei(this)(t,this,e,i)}path(t,e,i){const s=this.segments,o=Ei(this);let a=this._loop;e=e||0,i=i||this.points.length-e;for(const r of s)a&=o(t,this,r,{start:e,end:e+i-1});return!!a}draw(t,e,i,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Qd(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}B(jt,"id","line"),B(jt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),B(jt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),B(jt,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Io(n,t,e,i){const s=n.options,{[e]:o}=n.getProps([e],i);return Math.abs(t-o)<s.radius+s.hitRadius}class Tn extends Vt{constructor(e){super();B(this,"parsed");B(this,"skip");B(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,s){const o=this.options,{x:a,y:r}=this.getProps(["x","y"],s);return Math.pow(e-a,2)+Math.pow(i-r,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,i){return Io(this,e,"x",i)}inYRange(e,i){return Io(this,e,"y",i)}getCenterPoint(e){const{x:i,y:s}=this.getProps(["x","y"],e);return{x:i,y:s}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const s=i&&e.borderWidth||0;return(i+s)*2}draw(e,i){const s=this.options;this.skip||s.radius<.1||!Et(this,i,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,fi(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}B(Tn,"id","point"),B(Tn,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),B(Tn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function zo(n,t){const{x:e,y:i,base:s,width:o,height:a}=n.getProps(["x","y","base","width","height"],t);let r,l,d,h,f;return n.horizontal?(f=a/2,r=Math.min(e,s),l=Math.max(e,s),d=i-f,h=i+f):(f=o/2,r=e-f,l=e+f,d=Math.min(i,s),h=Math.max(i,s)),{left:r,top:d,right:l,bottom:h}}function Yt(n,t,e,i){return n?0:it(t,e,i)}function th(n,t,e){const i=n.options.borderWidth,s=n.borderSkipped,o=Vs(i);return{t:Yt(s.top,o.top,0,e),r:Yt(s.right,o.right,0,t),b:Yt(s.bottom,o.bottom,0,e),l:Yt(s.left,o.left,0,t)}}function eh(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,o=ee(s),a=Math.min(t,e),r=n.borderSkipped,l=i||I(s);return{topLeft:Yt(!l||r.top||r.left,o.topLeft,0,a),topRight:Yt(!l||r.top||r.right,o.topRight,0,a),bottomLeft:Yt(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:Yt(!l||r.bottom||r.right,o.bottomRight,0,a)}}function nh(n){const t=zo(n),e=t.right-t.left,i=t.bottom-t.top,s=th(n,e/2,i/2),o=eh(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:o},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Bi(n,t,e,i){const s=t===null,o=e===null,r=n&&!(s&&o)&&zo(n,i);return r&&(s||vt(t,r.left,r.right))&&(o||vt(e,r.top,r.bottom))}function ih(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function sh(n,t){n.rect(t.x,t.y,t.w,t.h)}function Vi(n,t,e={}){const i=n.x!==e.x?-t:0,s=n.y!==e.y?-t:0,o=(n.x+n.w!==e.x+e.w?t:0)-i,a=(n.y+n.h!==e.y+e.h?t:0)-s;return{x:n.x+i,y:n.y+s,w:n.w+o,h:n.h+a,radius:n.radius}}class Fn extends Vt{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:i,backgroundColor:s}}=this,{inner:o,outer:a}=nh(this),r=ih(a.radius)?Te:sh;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,Vi(a,e,o)),t.clip(),r(t,Vi(o,-e,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,Vi(o,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return Bi(this,t,e,i)}inXRange(t,e){return Bi(this,t,null,e)}inYRange(t,e){return Bi(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+s)/2:e,y:o?i:(i+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}B(Fn,"id","bar"),B(Fn,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),B(Fn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var oh=Object.freeze({__proto__:null,ArcElement:je,BarElement:Fn,LineElement:jt,PointElement:Tn});const Pi=["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)"],Wo=Pi.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function Ho(n){return Pi[n%Pi.length]}function jo(n){return Wo[n%Wo.length]}function ah(n,t){return n.borderColor=Ho(t),n.backgroundColor=jo(t),++t}function rh(n,t){return n.backgroundColor=n.data.map(()=>Ho(t++)),t}function lh(n,t){return n.backgroundColor=n.data.map(()=>jo(t++)),t}function ch(n){let t=0;return(e,i)=>{const s=n.getDatasetMeta(i).controller;s instanceof oe?t=rh(e,t):s instanceof Le?t=lh(e,t):s&&(t=ah(e,t))}}function Yo(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function dh(n){return n&&(n.borderColor||n.backgroundColor)}var hh={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:i},options:s}=n.config,{elements:o}=s;if(!e.forceOverride&&(Yo(i)||dh(s)||o&&Yo(o)))return;const a=ch(n);i.forEach(a)}};function fh(n,t,e,i,s){const o=s.samples||i;if(o>=e)return n.slice(t,t+e);const a=[],r=(e-2)/(o-2);let l=0;const d=t+e-1;let h=t,f,u,p,m,g;for(a[l++]=n[h],f=0;f<o-2;f++){let b=0,y=0,_;const w=Math.floor((f+1)*r)+1+t,x=Math.min(Math.floor((f+2)*r)+1,e)+t,k=x-w;for(_=w;_<x;_++)b+=n[_].x,y+=n[_].y;b/=k,y/=k;const M=Math.floor(f*r)+1+t,v=Math.min(Math.floor((f+1)*r)+1,e)+t,{x:D,y:F}=n[h];for(p=m=-1,_=M;_<v;_++)m=.5*Math.abs((D-b)*(n[_].y-F)-(D-n[_].x)*(y-F)),m>p&&(p=m,u=n[_],g=_);a[l++]=u,h=g}return a[l++]=n[d],a}function uh(n,t,e,i){let s=0,o=0,a,r,l,d,h,f,u,p,m,g;const b=[],y=t+e-1,_=n[t].x,x=n[y].x-_;for(a=t;a<t+e;++a){r=n[a],l=(r.x-_)/x*i,d=r.y;const k=l|0;if(k===h)d<m?(m=d,f=a):d>g&&(g=d,u=a),s=(o*s+r.x)/++o;else{const M=a-1;if(!z(f)&&!z(u)){const v=Math.min(f,u),D=Math.max(f,u);v!==p&&v!==M&&b.push({...n[v],x:s}),D!==p&&D!==M&&b.push({...n[D],x:s})}a>0&&M!==p&&b.push(n[M]),b.push(r),h=k,o=0,m=g=d,f=u=p=a}}return b}function Uo(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Xo(n){n.data.datasets.forEach(t=>{Uo(t)})}function ph(n,t){const e=t.length;let i=0,s;const{iScale:o}=n,{min:a,max:r,minDefined:l,maxDefined:d}=o.getUserBounds();return l&&(i=it(Dt(t,o.axis,a).lo,0,e-1)),d?s=it(Dt(t,o.axis,r).hi+1,i,e)-i:s=e-i,{start:i,count:s}}var mh={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Xo(n);return}const i=n.width;n.data.datasets.forEach((s,o)=>{const{_data:a,indexAxis:r}=s,l=n.getDatasetMeta(o),d=a||s.data;if(Fe([r,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const h=n.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||n.options.parsing)return;let{start:f,count:u}=ph(l,d);const p=e.threshold||4*i;if(u<=p){Uo(s);return}z(a)&&(s._data=d,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let m;switch(e.algorithm){case"lttb":m=fh(d,f,u,i,e);break;case"min-max":m=uh(d,f,u,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=m})},destroy(n){Xo(n)}};function gh(n,t,e){const i=n.segments,s=n.points,o=t.points,a=[];for(const r of i){let{start:l,end:d}=r;d=Ti(l,d,s);const h=Oi(e,s[l],s[d],r.loop);if(!t.segments){a.push({source:r,target:h,start:s[l],end:s[d]});continue}const f=Xs(t,h);for(const u of f){const p=Oi(e,o[u.start],o[u.end],u.loop),m=Us(r,s,p);for(const g of m)a.push({source:g,target:u,start:{[e]:qo(h,p,"start",Math.max)},end:{[e]:qo(h,p,"end",Math.min)}})}}return a}function Oi(n,t,e,i){if(i)return;let s=t[n],o=e[n];return n==="angle"&&(s=ut(s),o=ut(o)),{property:n,start:s,end:o}}function bh(n,t){const{x:e=null,y:i=null}=n||{},s=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=Ti(a,r,s);const l=s[a],d=s[r];i!==null?(o.push({x:l.x,y:i}),o.push({x:d.x,y:i})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:d.y}))}),o}function Ti(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function qo(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function Ko(n,t){let e=[],i=!1;return q(n)?(i=!0,e=n):e=bh(n,t),e.length?new jt({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Go(n){return n&&n.fill!==!1}function yh(n,t,e){let s=n[t].fill;const o=[t];let a;if(!e)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!J(s))return s;if(a=n[s],!a)return!1;if(a.visible)return s;o.push(s),s=a.fill}return!1}function _h(n,t,e){const i=Ch(n);if(I(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return J(s)&&Math.floor(s)===s?xh(i[0],t,s,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function xh(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function kh(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:I(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function wh(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:I(n)?i=n.value:i=t.getBaseValue(),i}function Ch(n){const t=n.options,e=t.fill;let i=R(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function Sh(n){const{scale:t,index:e,line:i}=n,s=[],o=i.segments,a=i.points,r=Mh(t,e);r.push(Ko({x:null,y:t.bottom},i));for(let l=0;l<o.length;l++){const d=o[l];for(let h=d.start;h<=d.end;h++)vh(s,a[h],r)}return new jt({points:s,options:{}})}function Mh(n,t){const e=[],i=n.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const o=i[s];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function vh(n,t,e){const i=[];for(let s=0;s<e.length;s++){const o=e[s],{first:a,last:r,point:l}=Dh(o,t,"x");if(!(!l||a&&r)){if(a)i.unshift(l);else if(n.push(l),!r)break}}n.push(...i)}function Dh(n,t,e){const i=n.interpolate(t,e);if(!i)return{};const s=i[e],o=n.segments,a=n.points;let r=!1,l=!1;for(let d=0;d<o.length;d++){const h=o[d],f=a[h.start][e],u=a[h.end][e];if(vt(s,f,u)){r=s===f,l=s===u;break}}return{first:r,last:l,point:i}}class Zo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:s,y:o,radius:a}=this;return e=e||{start:0,end:G},t.arc(s,o,a,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:s}=this,o=t.angle;return{x:e+Math.cos(o)*s,y:i+Math.sin(o)*s,angle:o}}}function Eh(n){const{chart:t,fill:e,line:i}=n;if(J(e))return Bh(t,e);if(e==="stack")return Sh(n);if(e==="shape")return!0;const s=Vh(n);return s instanceof Zo?s:Ko(s,i)}function Bh(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function Vh(n){return(n.scale||{}).getPointPositionForValue?Oh(n):Ph(n)}function Ph(n){const{scale:t={},fill:e}=n,i=kh(e,t);if(J(i)){const s=t.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function Oh(n){const{scale:t,fill:e}=n,i=t.options,s=t.getLabels().length,o=i.reverse?t.max:t.min,a=wh(e,t,o),r=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,o);return new Zo({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(a)})}for(let l=0;l<s;++l)r.push(t.getPointPositionForValue(l,a));return r}function Fi(n,t,e){const i=Eh(t),{line:s,scale:o,axis:a}=t,r=s.options,l=r.fill,d=r.backgroundColor,{above:h=d,below:f=d}=l||{};i&&s.points.length&&(un(n,e),Th(n,{line:s,target:i,above:h,below:f,area:e,scale:o,axis:a}),pn(n))}function Th(n,t){const{line:e,target:i,above:s,below:o,area:a,scale:r}=t,l=e._loop?"angle":t.axis;n.save(),l==="x"&&o!==s&&(Jo(n,i,a.top),Qo(n,{line:e,target:i,color:s,scale:r,property:l}),n.restore(),n.save(),Jo(n,i,a.bottom)),Qo(n,{line:e,target:i,color:o,scale:r,property:l}),n.restore()}function Jo(n,t,e){const{segments:i,points:s}=t;let o=!0,a=!1;n.beginPath();for(const r of i){const{start:l,end:d}=r,h=s[l],f=s[Ti(l,d,s)];o?(n.moveTo(h.x,h.y),o=!1):(n.lineTo(h.x,e),n.lineTo(h.x,h.y)),a=!!t.pathSegment(n,r,{move:a}),a?n.closePath():n.lineTo(f.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function Qo(n,t){const{line:e,target:i,property:s,color:o,scale:a}=t,r=gh(e,i,s);for(const{source:l,target:d,start:h,end:f}of r){const{style:{backgroundColor:u=o}={}}=l,p=i!==!0;n.save(),n.fillStyle=u,Fh(n,a,p&&Oi(s,h,f)),n.beginPath();const m=!!e.pathSegment(n,l);let g;if(p){m?n.closePath():ta(n,i,f,s);const b=!!i.pathSegment(n,d,{move:m,reverse:!0});g=m&&b,g||ta(n,i,h,s)}n.closePath(),n.fill(g?"evenodd":"nonzero"),n.restore()}}function Fh(n,t,e){const{top:i,bottom:s}=t.chart.chartArea,{property:o,start:a,end:r}=e||{};o==="x"&&(n.beginPath(),n.rect(a,i,r-a,s-i),n.clip())}function ta(n,t,e,i){const s=t.interpolate(e,i);s&&n.lineTo(s.x,s.y)}var Ah={id:"filler",afterDatasetsUpdate(n,t,e){const i=(n.data.datasets||[]).length,s=[];let o,a,r,l;for(a=0;a<i;++a)o=n.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof jt&&(l={visible:n.isDatasetVisible(a),index:a,fill:_h(r,a,i),chart:n,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,s.push(l);for(a=0;a<i;++a)l=s[a],!(!l||l.fill===!1)&&(l.fill=yh(s,a,e.propagate))},beforeDraw(n,t,e){const i=e.drawTime==="beforeDraw",s=n.getSortedVisibleDatasetMetas(),o=n.chartArea;for(let a=s.length-1;a>=0;--a){const r=s[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),i&&r.fill&&Fi(n.ctx,r,o))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const o=i[s].$filler;Go(o)&&Fi(n.ctx,o,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!Go(i)||e.drawTime!=="beforeDatasetDraw"||Fi(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ea=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},Lh=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class na extends Vt{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,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,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=U(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,s=nt(i.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=ea(i,o);let d,h;e.font=s.string,this.isHorizontal()?(d=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,d=this._fitCols(a,s,r,l)+10),this.width=Math.min(d,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],d=this.lineWidths=[0],h=s+r;let f=t;o.textAlign="left",o.textBaseline="middle";let u=-1,p=-h;return this.legendItems.forEach((m,g)=>{const b=i+e/2+o.measureText(m.text).width;(g===0||d[d.length-1]+b+2*r>a)&&(f+=h,d[d.length-(g>0?0:1)]=0,p+=h,u++),l[g]={left:0,top:p,row:u,width:b,height:s},d[d.length-1]+=b+r}),f}_fitCols(t,e,i,s){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],d=this.columnSizes=[],h=a-t;let f=r,u=0,p=0,m=0,g=0;return this.legendItems.forEach((b,y)=>{const{itemWidth:_,itemHeight:w}=$h(i,e,o,b,s);y>0&&p+w+2*r>h&&(f+=u+r,d.push({width:u,height:p}),m+=u+r,g++,u=p=0),l[y]={left:m,top:p,col:g,width:_,height:w},u=Math.max(u,_),p+=w+r}),f+=u,d.push({width:u,height:p}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:o}}=this,a=ge(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=at(i,this.left+s,this.right-this.lineWidths[r]);for(const d of e)r!==d.row&&(r=d.row,l=at(i,this.left+s,this.right-this.lineWidths[r])),d.top+=this.top+t+s,d.left=a.leftForLtr(a.x(l),d.width),l+=d.width+s}else{let r=0,l=at(i,this.top+t+s,this.bottom-this.columnSizes[r].height);for(const d of e)d.col!==r&&(r=d.col,l=at(i,this.top+t+s,this.bottom-this.columnSizes[r].height)),d.top=l,d.left+=this.left+s,d.left=a.leftForLtr(a.x(d.left),d.width),l+=d.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;un(t,this),this._draw(),pn(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:o,labels:a}=t,r=Q.color,l=ge(t.rtl,this.left,this.width),d=nt(a.font),{padding:h}=a,f=d.size,u=f/2;let p;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=d.string;const{boxWidth:m,boxHeight:g,itemHeight:b}=ea(a,f),y=function(M,v,D){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;s.save();const F=R(D.lineWidth,1);if(s.fillStyle=R(D.fillStyle,r),s.lineCap=R(D.lineCap,"butt"),s.lineDashOffset=R(D.lineDashOffset,0),s.lineJoin=R(D.lineJoin,"miter"),s.lineWidth=F,s.strokeStyle=R(D.strokeStyle,r),s.setLineDash(R(D.lineDash,[])),a.usePointStyle){const T={radius:g*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:F},P=l.xPlus(M,m/2),L=v+u;Bs(s,T,P,L,a.pointStyleWidth&&m)}else{const T=v+Math.max((f-g)/2,0),P=l.leftForLtr(M,m),L=ee(D.borderRadius);s.beginPath(),Object.values(L).some(X=>X!==0)?Te(s,{x:P,y:T,w:m,h:g,radius:L}):s.rect(P,T,m,g),s.fill(),F!==0&&s.stroke()}s.restore()},_=function(M,v,D){te(s,D.text,M,v+b/2,d,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?p={x:at(o,this.left+h,this.right-i[0]),y:this.top+h+x,line:0}:p={x:this.left+h,y:at(o,this.top+x+h,this.bottom-e[0].height),line:0},Ws(this.ctx,t.textDirection);const k=b+h;this.legendItems.forEach((M,v)=>{s.strokeStyle=M.fontColor,s.fillStyle=M.fontColor;const D=s.measureText(M.text).width,F=l.textAlign(M.textAlign||(M.textAlign=a.textAlign)),T=m+u+D;let P=p.x,L=p.y;l.setWidth(this.width),w?v>0&&P+T+h>this.right&&(L=p.y+=k,p.line++,P=p.x=at(o,this.left+h,this.right-i[p.line])):v>0&&L+k>this.bottom&&(P=p.x=P+e[p.line].width+h,p.line++,L=p.y=at(o,this.top+x+h,this.bottom-e[p.line].height));const X=l.x(P);if(y(X,L,M),P=sl(F,P+m+u,w?P+T:this.right,t.rtl),_(l.x(P),L,M),w)p.x+=T+h;else if(typeof M.text!="string"){const O=d.lineHeight;p.y+=ia(M,O)+h}else p.y+=k}),Hs(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=nt(e.font),s=rt(e.padding);if(!e.display)return;const o=ge(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=i.size/2,d=s.top+l;let h,f=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+d,f=at(t.align,f,this.right-u);else{const m=this.columnSizes.reduce((g,b)=>Math.max(g,b.height),0);h=d+at(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=at(r,f,f+u);a.textAlign=o.textAlign(ri(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,te(a,e.text,p,h,i)}_computeTitleHeight(){const t=this.options.title,e=nt(t.font),i=rt(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,o;if(vt(t,this.left,this.right)&&vt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(s=o[i],vt(t,s.left,s.left+s.width)&&vt(e,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!Ih(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,o=Lh(s,i);s&&!o&&U(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!o&&U(e.onHover,[t,i,this],this)}else i&&U(e.onClick,[t,i,this],this)}}function $h(n,t,e,i,s){const o=Nh(i,n,t,e),a=Rh(s,i,t.lineHeight);return{itemWidth:o,itemHeight:a}}function Nh(n,t,e,i){let s=n.text;return s&&typeof s!="string"&&(s=s.reduce((o,a)=>o.length>a.length?o:a)),t+e.size/2+i.measureText(s).width}function Rh(n,t,e){let i=n;return typeof t.text!="string"&&(i=ia(t,e)),i}function ia(n,t){const e=n.text?n.text.length:0;return t*e}function Ih(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var zh={id:"legend",_element:na,start(n,t,e){const i=n.legend=new na({ctx:n.ctx,options:e,chart:n});lt.configure(n,i,e),lt.addBox(n,i)},stop(n){lt.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;lt.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,s=e.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:s,color:o,useBorderRadius:a,borderRadius:r}}=n.legend.options;return n._getSortedDatasetMetas().map(l=>{const d=l.controller.getStyle(e?0:void 0),h=rt(d.borderWidth);return{text:t[l.index].label,fillStyle:d.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:d.borderColor,pointStyle:i||d.pointStyle,rotation:d.rotation,textAlign:s||d.textAlign,borderRadius:a&&(r||d.borderRadius),datasetIndex:l.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class Ai extends Vt{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 i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const s=q(i.text)?i.text.length:1;this._padding=rt(i.padding);const o=s*nt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:s,right:o,options:a}=this,r=a.align;let l=0,d,h,f;return this.isHorizontal()?(h=at(r,i,o),f=e+t,d=o-i):(a.position==="left"?(h=i+t,f=at(r,s,e),l=K*-.5):(h=o-t,f=at(r,e,s),l=K*.5),d=s-e),{titleX:h,titleY:f,maxWidth:d,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=nt(e.font),o=i.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:d}=this._drawArgs(o);te(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:d,textAlign:ri(e.align),textBaseline:"middle",translation:[a,r]})}}function Wh(n,t){const e=new Ai({ctx:n.ctx,options:t,chart:n});lt.configure(n,e,t),lt.addBox(n,e),n.titleBlock=e}var Hh={id:"title",_element:Ai,start(n,t,e){Wh(n,e)},stop(n){const t=n.titleBlock;lt.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;lt.configure(n,i,e),i.options=e},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 An=new WeakMap;var jh={id:"subtitle",start(n,t,e){const i=new Ai({ctx:n.ctx,options:e,chart:n});lt.configure(n,i,e),lt.addBox(n,i),An.set(n,i)},stop(n){lt.removeBox(n,An.get(n)),An.delete(n)},beforeUpdate(n,t,e){const i=An.get(n);lt.configure(n,i,e),i.options=e},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 Ye={average(n){if(!n.length)return!1;let t,e,i=0,s=0,o=0;for(t=0,e=n.length;t<e;++t){const a=n[t].element;if(a&&a.hasValue()){const r=a.tooltipPosition();i+=r.x,s+=r.y,++o}}return{x:i/o,y:s/o}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,s=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=n.length;o<a;++o){const l=n[o].element;if(l&&l.hasValue()){const d=l.getCenterPoint(),h=oi(t,d);h<s&&(s=h,r=l)}}if(r){const l=r.tooltipPosition();e=l.x,i=l.y}return{x:e,y:i}}};function wt(n,t){return t&&(q(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function Ot(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
24
24
|
`)>-1?n.split(`
|
|
25
|
-
`):n}function Wh(n,t){const{element:e,datasetIndex:i,index:s}=t,o=n.getDatasetMeta(i).controller,{label:a,value:r}=o.getLabelAndValue(s);return{chart:n,label:a,parsed:o.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:e}}function sa(n,t){const e=n.chart.ctx,{body:i,footer:s,title:o}=n,{boxWidth:a,boxHeight:r}=t,l=nt(t.bodyFont),d=nt(t.titleFont),h=nt(t.footerFont),f=o.length,u=s.length,p=i.length,m=rt(t.padding);let g=m.height,b=0,y=i.reduce((x,k)=>x+k.before.length+k.lines.length+k.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,f&&(g+=f*d.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),y){const x=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;g+=p*x+(y-p)*l.lineHeight+(y-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0;const w=function(x){b=Math.max(b,e.measureText(x).width+_)};return e.save(),e.font=d.string,j(n.title,w),e.font=l.string,j(n.beforeBody.concat(n.afterBody),w),_=t.displayColors?a+2+t.boxPadding:0,j(i,x=>{j(x.before,w),j(x.lines,w),j(x.after,w)}),_=0,e.font=h.string,j(n.footer,w),e.restore(),b+=m.width,{width:b,height:g}}function Hh(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function jh(n,t,e,i){const{x:s,width:o}=i,a=e.caretSize+e.caretPadding;if(n==="left"&&s+o+a>t.width||n==="right"&&s-o-a<0)return!0}function Yh(n,t,e,i){const{x:s,width:o}=e,{width:a,chartArea:{left:r,right:l}}=n;let d="center";return i==="center"?d=s<=(r+l)/2?"left":"right":s<=o/2?d="left":s>=a-o/2&&(d="right"),jh(d,n,t,e)&&(d="center"),d}function oa(n,t,e){const i=e.yAlign||t.yAlign||Hh(n,e);return{xAlign:e.xAlign||t.xAlign||Yh(n,t,e,i),yAlign:i}}function Uh(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Xh(n,t,e){let{y:i,height:s}=n;return t==="top"?i+=e:t==="bottom"?i-=s+e:i-=s/2,i}function aa(n,t,e,i){const{caretSize:s,caretPadding:o,cornerRadius:a}=n,{xAlign:r,yAlign:l}=e,d=s+o,{topLeft:h,topRight:f,bottomLeft:u,bottomRight:p}=te(a);let m=Uh(t,r);const g=Xh(t,l,d);return l==="center"?r==="left"?m+=d:r==="right"&&(m-=d):r==="left"?m-=Math.max(h,u)+s:r==="right"&&(m+=Math.max(f,p)+s),{x:it(m,0,i.width-t.width),y:it(g,0,i.height-t.height)}}function Ln(n,t,e){const i=rt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function ra(n){return wt([],Ot(n))}function qh(n,t,e){return Wt(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function la(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const ca={beforeTitle:Mt,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:Mt,beforeBody:Mt,beforeLabel:Mt,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return z(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.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(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Mt,afterBody:Mt,beforeFooter:Mt,footer:Mt,afterFooter:Mt};function ct(n,t,e,i){const s=n[t].call(e,i);return typeof s>"u"?ca[t].call(e,i):s}class Li extends Vt{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,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,o=new Zs(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=qh(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,s=ct(i,"beforeTitle",this,t),o=ct(i,"title",this,t),a=ct(i,"afterTitle",this,t);let r=[];return r=wt(r,Ot(s)),r=wt(r,Ot(o)),r=wt(r,Ot(a)),r}getBeforeBody(t,e){return ra(ct(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,s=[];return j(t,o=>{const a={before:[],lines:[],after:[]},r=la(i,o);wt(a.before,Ot(ct(r,"beforeLabel",this,o))),wt(a.lines,ct(r,"label",this,o)),wt(a.after,Ot(ct(r,"afterLabel",this,o))),s.push(a)}),s}getAfterBody(t,e){return ra(ct(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=ct(i,"beforeFooter",this,t),o=ct(i,"footer",this,t),a=ct(i,"afterFooter",this,t);let r=[];return r=wt(r,Ot(s)),r=wt(r,Ot(o)),r=wt(r,Ot(a)),r}_createItems(t){const e=this._active,i=this.chart.data,s=[],o=[],a=[];let r=[],l,d;for(l=0,d=e.length;l<d;++l)r.push(Wh(this.chart,e[l]));return t.filter&&(r=r.filter((h,f,u)=>t.filter(h,f,u,i))),t.itemSort&&(r=r.sort((h,f)=>t.itemSort(h,f,i))),j(r,h=>{const f=la(t.callbacks,h);s.push(ct(f,"labelColor",this,h)),o.push(ct(f,"labelPointStyle",this,h)),a.push(ct(f,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let o,a=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const r=Ye[i.position].call(this,s,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const l=this._size=sa(this,i),d=Object.assign({},r,l),h=oa(this.chart,i,d),f=aa(i,d,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const o=this.getCaretPosition(t,i,s);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:o}=this,{caretSize:a,cornerRadius:r}=i,{topLeft:l,topRight:d,bottomLeft:h,bottomRight:f}=te(r),{x:u,y:p}=t,{width:m,height:g}=e;let b,y,_,w,x,k;return o==="center"?(x=p+g/2,s==="left"?(b=u,y=b-a,w=x+a,k=x-a):(b=u+m,y=b+a,w=x-a,k=x+a),_=b):(s==="left"?y=u+Math.max(l,h)+a:s==="right"?y=u+m-Math.max(d,f)-a:y=this.caretX,o==="top"?(w=p,x=w-a,b=y-a,_=y+a):(w=p+g,x=w+a,b=y+a,_=y-a),k=w),{x1:b,x2:y,x3:_,y1:w,y2:x,y3:k}}drawTitle(t,e,i){const s=this.title,o=s.length;let a,r,l;if(o){const d=me(i.rtl,this.x,this.width);for(t.x=Ln(this,i.titleAlign,i),e.textAlign=d.textAlign(i.titleAlign),e.textBaseline="middle",a=nt(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(s[l],d.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,s,o){const a=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:l,boxWidth:d}=o,h=nt(o.bodyFont),f=Ln(this,"left",o),u=s.x(f),p=l<h.lineHeight?(h.lineHeight-l)/2:0,m=e.y+p;if(o.usePointStyle){const g={radius:Math.min(d,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},b=s.leftForLtr(u,d)+d/2,y=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,fi(t,g,b,y),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,fi(t,g,b,y)}else{t.lineWidth=I(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 g=s.leftForLtr(u,d),b=s.leftForLtr(s.xPlus(u,1),d-2),y=te(a.borderRadius);Object.values(y).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Te(t,{x:g,y:m,w:d,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Te(t,{x:b,y:m+1,w:d-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,m,d,l),t.strokeRect(g,m,d,l),t.fillStyle=a.backgroundColor,t.fillRect(b,m+1,d-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:d,boxPadding:h}=i,f=nt(i.bodyFont);let u=f.lineHeight,p=0;const m=me(i.rtl,this.x,this.width),g=function(D){e.fillText(D,m.x(t.x+p),t.y+u/2),t.y+=u+o},b=m.textAlign(a);let y,_,w,x,k,M,v;for(e.textAlign=a,e.textBaseline="middle",e.font=f.string,t.x=Ln(this,b,i),e.fillStyle=i.bodyColor,j(this.beforeBody,g),p=r&&b!=="right"?a==="center"?d/2+h:d+2+h:0,x=0,M=s.length;x<M;++x){for(y=s[x],_=this.labelTextColors[x],e.fillStyle=_,j(y.before,g),w=y.lines,r&&w.length&&(this._drawColorBox(e,t,x,m,i),u=Math.max(f.lineHeight,l)),k=0,v=w.length;k<v;++k)g(w[k]),u=f.lineHeight;j(y.after,g)}p=0,u=f.lineHeight,j(this.afterBody,g),t.y-=o}drawFooter(t,e,i){const s=this.footer,o=s.length;let a,r;if(o){const l=me(i.rtl,this.x,this.width);for(t.x=Ln(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=nt(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(s[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:d,height:h}=i,{topLeft:f,topRight:u,bottomLeft:p,bottomRight:m}=te(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(r+f,l),a==="top"&&this.drawCaret(t,e,i,s),e.lineTo(r+d-u,l),e.quadraticCurveTo(r+d,l,r+d,l+u),a==="center"&&o==="right"&&this.drawCaret(t,e,i,s),e.lineTo(r+d,l+h-m),e.quadraticCurveTo(r+d,l+h,r+d-m,l+h),a==="bottom"&&this.drawCaret(t,e,i,s),e.lineTo(r+p,l+h),e.quadraticCurveTo(r,l+h,r,l+h-p),a==="center"&&o==="left"&&this.drawCaret(t,e,i,s),e.lineTo(r,l+f),e.quadraticCurveTo(r,l,r+f,l),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,o=i&&i.y;if(s||o){const a=Ye[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=sa(this,t),l=Object.assign({},a,this._size),d=oa(e,t,l),h=aa(t,l,d,e);(s._to!==h.x||o._to!==h.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=rt(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,s,e),Ws(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Hs(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map(({datasetIndex:r,index:l})=>{const d=this.chart.getDatasetMeta(r);if(!d)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:d.data[l],index:l}}),o=!rn(i,s),a=this._positionChanged(s,e);(o||a)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,i),r=this._positionChanged(a,t),l=e||!rn(a,o)||r;return l&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return e;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:i,caretY:s,options:o}=this,a=Ye[o.position].call(this,t,e);return a!==!1&&(i!==a.x||s!==a.y)}}B(Li,"positioners",Ye);var Kh={id:"tooltip",_element:Li,positioners:Ye,afterInit(n,t,e){e&&(n.tooltip=new Li({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.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:(n,t)=>t.bodyFont.size,boxWidth:(n,t)=>t.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:ca},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Gh=Object.freeze({__proto__:null,Colors:lh,Decimation:fh,Filler:Oh,Legend:Nh,SubTitle:zh,Title:Ih,Tooltip:Kh});const Zh=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Jh(n,t,e,i){const s=n.indexOf(t);if(s===-1)return Zh(n,t,e,i);const o=n.lastIndexOf(t);return s!==o?e:s}const Qh=(n,t)=>n===null?null:it(Math.round(n),0,t);function da(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class $i extends ae{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:s,label:o}of e)i[s]===o&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(z(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:Jh(i,t,R(e,t),this._addedLabels),Qh(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let a=t;a<=e;a++)s.push({value:a});return s}getLabelForValue(t){return da.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?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}}B($i,"id","category"),B($i,"defaults",{ticks:{callback:da}});function tf(n,t){const e=[],{bounds:s,step:o,min:a,max:r,precision:l,count:d,maxTicks:h,maxDigits:f,includeBounds:u}=n,p=o||1,m=h-1,{min:g,max:b}=t,y=!z(a),_=!z(r),w=!z(d),x=(b-g)/(f+1);let k=fs((b-g)/m/p)*p,M,v,D,F;if(k<1e-14&&!y&&!_)return[{value:g},{value:b}];F=Math.ceil(b/k)-Math.floor(g/k),F>m&&(k=fs(F*k/m/p)*p),z(l)||(M=Math.pow(10,l),k=Math.ceil(k*M)/M),s==="ticks"?(v=Math.floor(g/k)*k,D=Math.ceil(b/k)*k):(v=g,D=b),y&&_&&o&&qr((r-a)/o,k/1e3)?(F=Math.round(Math.min((r-a)/k,h)),k=(r-a)/F,v=a,D=r):w?(v=y?a:v,D=_?r:D,F=d-1,k=(D-v)/F):(F=(D-v)/k,Ee(F,Math.round(F),k/1e3)?F=Math.round(F):F=Math.ceil(F));const T=Math.max(ps(k),ps(v));M=Math.pow(10,z(l)?T:l),v=Math.round(v*M)/M,D=Math.round(D*M)/M;let P=0;for(y&&(u&&v!==a?(e.push({value:a}),v<a&&P++,Ee(Math.round((v+P*k)*M)/M,a,ha(a,x,n))&&P++):v<a&&P++);P<F;++P){const L=Math.round((v+P*k)*M)/M;if(_&&L>r)break;e.push({value:L})}return _&&u&&D!==r?e.length&&Ee(e[e.length-1].value,r,ha(r,x,n))?e[e.length-1].value=r:e.push({value:r}):(!_||D===r)&&e.push({value:D}),e}function ha(n,t,{horizontal:e,minRotation:i}){const s=yt(i),o=(e?Math.sin(s):Math.cos(s))||.001,a=.75*t*(""+n).length;return Math.min(t/o,a)}class $n extends ae{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 z(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:o}=this;const a=l=>s=e?s:l,r=l=>o=i?o:l;if(t){const l=xt(s),d=xt(o);l<0&&d<0?r(0):l>0&&d>0&&a(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,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:e.includeBounds!==!1},o=this._range||this,a=tf(s,o);return t.bounds==="ticks"&&us(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Pe(t,this.chart.options.locale,this.options.ticks.format)}}class Ni extends $n{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=J(t)?t:0,this.max=J(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=yt(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}B(Ni,"id","linear"),B(Ni,"defaults",{ticks:{callback:hn.formatters.numeric}});const Ue=n=>Math.floor(zt(n)),re=(n,t)=>Math.pow(10,Ue(n)+t);function fa(n){return n/Math.pow(10,Ue(n))===1}function ua(n,t,e){const i=Math.pow(10,e),s=Math.floor(n/i);return Math.ceil(t/i)-s}function ef(n,t){const e=t-n;let i=Ue(e);for(;ua(n,t,i)>10;)i++;for(;ua(n,t,i)<10;)i--;return Math.min(i,Ue(n))}function nf(n,{min:t,max:e}){t=ft(n.min,t);const i=[],s=Ue(t);let o=ef(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),l=s>o?Math.pow(10,s):0,d=Math.round((t-l)*a)/a,h=Math.floor((t-l)/r/10)*r*10;let f=Math.floor((d-h)/Math.pow(10,o)),u=ft(n.min,Math.round((l+h+f*Math.pow(10,o))*a)/a);for(;u<e;)i.push({value:u,major:fa(u),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,a=o>=0?1:a),u=Math.round((l+h+f*Math.pow(10,o))*a)/a;const p=ft(n.max,u);return i.push({value:p,major:fa(p),significand:f}),i}class Ri extends ae{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=$n.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return J(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=J(t)?Math.max(0,t):null,this.max=J(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!J(this._userMin)&&(this.min=t===re(this.min,0)?re(this.min,-1):re(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const o=r=>i=t?i:r,a=r=>s=e?s:r;i===s&&(i<=0?(o(1),a(10)):(o(re(i,-1)),a(re(s,1)))),i<=0&&o(re(s,-1)),s<=0&&a(re(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=nf(e,this);return t.bounds==="ticks"&&us(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Pe(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=zt(t),this._valueRange=zt(this.max)-zt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(zt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}B(Ri,"id","logarithmic"),B(Ri,"defaults",{ticks:{callback:hn.formatters.logarithmic,major:{enabled:!0}}});function Ii(n){const t=n.ticks;if(t.display&&n.display){const e=rt(t.backdropPadding);return R(t.font&&t.font.size,Q.font.size)+e.height}return 0}function sf(n,t,e){return e=q(e)?e:[e],{w:hl(n,t.string,e),h:e.length*t.lineHeight}}function pa(n,t,e,i,s){return n===i||n===s?{start:t-e/2,end:t+e/2}:n<i||n>s?{start:t-e,end:t}:{start:t,end:t+e}}function of(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],s=[],o=n._pointLabels.length,a=n.options.pointLabels,r=a.centerPointLabels?K/o:0;for(let l=0;l<o;l++){const d=a.setContext(n.getPointLabelContext(l));s[l]=d.padding;const h=n.getPointPosition(l,n.drawingArea+s[l],r),f=nt(d.font),u=sf(n.ctx,f,n._pointLabels[l]);i[l]=u;const p=ut(n.getIndexAngle(l)+r),m=Math.round(si(p)),g=pa(m,h.x,u.w,0,180),b=pa(m,h.y,u.h,90,270);af(e,t,p,g,b)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=cf(n,i,s)}function af(n,t,e,i,s){const o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let r=0,l=0;i.start<t.l?(r=(t.l-i.start)/o,n.l=Math.min(n.l,t.l-r)):i.end>t.r&&(r=(i.end-t.r)/o,n.r=Math.max(n.r,t.r+r)),s.start<t.t?(l=(t.t-s.start)/a,n.t=Math.min(n.t,t.t-l)):s.end>t.b&&(l=(s.end-t.b)/a,n.b=Math.max(n.b,t.b+l))}function rf(n,t,e){const i=n.drawingArea,{extra:s,additionalAngle:o,padding:a,size:r}=e,l=n.getPointPosition(t,i+s+a,o),d=Math.round(si(ut(l.angle+et))),h=ff(l.y,r.h,d),f=df(d),u=hf(l.x,r.w,f);return{visible:!0,x:l.x,y:h,textAlign:f,left:u,top:h,right:u+r.w,bottom:h+r.h}}function lf(n,t){if(!t)return!0;const{left:e,top:i,right:s,bottom:o}=n;return!(Et({x:e,y:i},t)||Et({x:e,y:o},t)||Et({x:s,y:i},t)||Et({x:s,y:o},t))}function cf(n,t,e){const i=[],s=n._pointLabels.length,o=n.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:Ii(o)/2,additionalAngle:a?K/s:0};let d;for(let h=0;h<s;h++){l.padding=e[h],l.size=t[h];const f=rf(n,h,l);i.push(f),r==="auto"&&(f.visible=lf(f,d),f.visible&&(d=f))}return i}function df(n){return n===0||n===180?"center":n<180?"left":"right"}function hf(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function ff(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function uf(n,t,e){const{left:i,top:s,right:o,bottom:a}=e,{backdropColor:r}=t;if(!z(r)){const l=te(t.borderRadius),d=rt(t.backdropPadding);n.fillStyle=r;const h=i-d.left,f=s-d.top,u=o-i+d.width,p=a-s+d.height;Object.values(l).some(m=>m!==0)?(n.beginPath(),Te(n,{x:h,y:f,w:u,h:p,radius:l}),n.fill()):n.fillRect(h,f,u,p)}}function pf(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let s=t-1;s>=0;s--){const o=n._pointLabelItems[s];if(!o.visible)continue;const a=i.setContext(n.getPointLabelContext(s));uf(e,a,o);const r=nt(a.font),{x:l,y:d,textAlign:h}=o;Qt(e,n._pointLabels[s],l,d+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function ma(n,t,e,i){const{ctx:s}=n;if(e)s.arc(n.xCenter,n.yCenter,t,0,G);else{let o=n.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let a=1;a<i;a++)o=n.getPointPosition(a,t),s.lineTo(o.x,o.y)}}function mf(n,t,e,i,s){const o=n.ctx,a=t.circular,{color:r,lineWidth:l}=t;!a&&!i||!r||!l||e<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),ma(n,e,a,i),o.closePath(),o.stroke(),o.restore())}function gf(n,t,e){return Wt(n,{label:e,index:t,type:"pointLabel"})}class Xe extends $n{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=rt(Ii(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=J(t)&&!isNaN(t)?t:0,this.max=J(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ii(this.options))}generateTickLabels(t){$n.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const s=U(this.options.pointLabels.callback,[e,i],this);return s||s===0?s:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?of(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){const e=G/(this._pointLabels.length||1),i=this.options.startAngle||0;return ut(t*e+yt(i))}getDistanceFromCenterForValue(t){if(z(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(z(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 i=e[t];return gf(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const s=this.getIndexAngle(t)-et+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}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:i,right:s,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),ma(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:s,border:o}=e,a=this._pointLabels.length;let r,l,d;if(e.pointLabels.display&&pf(this,a),s.display&&this.ticks.forEach((h,f)=>{if(f!==0){l=this.getDistanceFromCenterForValue(h.value);const u=this.getContext(f),p=s.setContext(u),m=o.setContext(u);mf(this,p,l,a,m)}}),i.display){for(t.save(),r=a-1;r>=0;r--){const h=i.setContext(this.getPointLabelContext(r)),{color:f,lineWidth:u}=h;!u||!f||(t.lineWidth=u,t.strokeStyle=f,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),d=this.getPointPosition(r,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(d.x,d.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;const d=i.setContext(this.getContext(l)),h=nt(d.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),d.showLabelBackdrop){t.font=h.string,a=t.measureText(r.label).width,t.fillStyle=d.backdropColor;const f=rt(d.backdropPadding);t.fillRect(-a/2-f.left,-o-h.size/2-f.top,a+f.width,h.size+f.height)}Qt(t,r.label,0,-o,h,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),t.restore()}drawTitle(){}}B(Xe,"id","radialLinear"),B(Xe,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:hn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),B(Xe,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),B(Xe,"descriptors",{angleLines:{_fallback:"grid"}});const Nn={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}},dt=Object.keys(Nn);function ga(n,t){return n-t}function ba(n,t){if(z(t))return null;const e=n._adapter,{parser:i,round:s,isoWeekday:o}=n._parseOpts;let a=t;return typeof i=="function"&&(a=i(a)),J(a)||(a=typeof i=="string"?e.parse(a,i):e.parse(a)),a===null?null:(s&&(a=s==="week"&&(fe(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,s)),+a)}function ya(n,t,e,i){const s=dt.length;for(let o=dt.indexOf(n);o<s-1;++o){const a=Nn[dt[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(r*a.size))<=i)return dt[o]}return dt[s-1]}function bf(n,t,e,i,s){for(let o=dt.length-1;o>=dt.indexOf(e);o--){const a=dt[o];if(Nn[a].common&&n._adapter.diff(s,i,a)>=t-1)return a}return dt[e?dt.indexOf(e):0]}function yf(n){for(let t=dt.indexOf(n)+1,e=dt.length;t<e;++t)if(Nn[dt[t]].common)return dt[t]}function _a(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:s}=ai(e,t),o=e[i]>=t?e[i]:e[s];n[o]=!0}}function _f(n,t,e,i){const s=n._adapter,o=+s.startOf(t[0].value,i),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+s.add(r,1,i))l=e[r],l>=0&&(t[l].major=!0);return t}function xa(n,t,e){const i=[],s={},o=t.length;let a,r;for(a=0;a<o;++a)r=t[a],s[r]=a,i.push({value:r,major:!1});return o===0||!e?i:_f(n,i,s,e)}class qe extends ae{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 i=t.time||(t.time={}),s=this._adapter=new Dc._date(t.adapters.date);s.init(e),ve(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:ba(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(d){!a&&!isNaN(d.min)&&(s=Math.min(s,d.min)),!r&&!isNaN(d.max)&&(o=Math.max(o,d.max))}(!a||!r)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=J(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),o=J(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,a=this.max,r=Jr(s,o,a);return this._unit=e.unit||(i.autoSkip?ya(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):bf(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:yf(this._unit),this.initOffsets(s),t.reverse&&r.reverse(),xa(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=it(e,0,a),i=it(i,0,a),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,o=s.time,a=o.unit||ya(o.minUnit,e,i,this._getLabelCapacity(e)),r=R(s.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,d=fe(l)||l===!0,h={};let f=e,u,p;if(d&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,d?"day":a),t.diff(i,e,a)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+a);const m=s.ticks.source==="data"&&this.getDataTimestamps();for(u=f,p=0;u<i;u=+t.add(u,r,a),p++)_a(h,u,m);return(u===i||s.bounds==="ticks"||p===1)&&_a(h,u,m),Object.keys(h).sort(ga).map(g=>+g)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const s=this.options.time.displayFormats,o=this._unit,a=e||s[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,s){const o=this.options,a=o.ticks.callback;if(a)return U(a,[t,e,i],this);const r=o.time.displayFormats,l=this._unit,d=this._majorUnit,h=l&&r[l],f=d&&r[d],u=i[e],p=d&&f&&u&&u.major;return this._adapter.format(t,s||(p?f:h))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,s=yt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(s),a=Math.sin(s),r=this._resolveTickFontOptions(0).size;return{w:i*o+r*a,h:i*a+r*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,xa(this,[t],this._majorUnit),s),a=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,i=s.length;e<i;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(ba(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ys(t.sort(ga))}}B(qe,"id","time"),B(qe,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Rn(n,t,e){let i=0,s=n.length-1,o,a,r,l;e?(t>=n[i].pos&&t<=n[s].pos&&({lo:i,hi:s}=Dt(n,"pos",t)),{pos:o,time:r}=n[i],{pos:a,time:l}=n[s]):(t>=n[i].time&&t<=n[s].time&&({lo:i,hi:s}=Dt(n,"time",t)),{time:o,pos:r}=n[i],{time:a,pos:l}=n[s]);const d=a-o;return d?r+(l-r)*(t-o)/d:r}class zi extends qe{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=Rn(e,this.min),this._tableRange=Rn(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],o=[];let a,r,l,d,h;for(a=0,r=t.length;a<r;++a)d=t[a],d>=e&&d<=i&&s.push(d);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,r=s.length;a<r;++a)h=s[a+1],l=s[a-1],d=s[a],Math.round((h+l)/2)!==d&&o.push({time:d,pos:a/(r-1)});return o}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Rn(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Rn(this._table,i*this._tableRange+this._minPos,!0)}}B(zi,"id","timeseries"),B(zi,"defaults",qe.defaults);var xf=Object.freeze({__proto__:null,CategoryScale:$i,LinearScale:Ni,LogarithmicScale:Ri,RadialLinearScale:Xe,TimeScale:qe,TimeSeriesScale:zi});const kf=[vc,nh,Gh,xf];Pt.register(...kf);const wf={class:"px-24 py-16"},Cf={class:"flex flex-col gap-8"},Sf={class:"fm-color-typo-primary fm-typo-body-lg-400"},Mf={class:"fm-color-typo-secondary fm-typo-body-md-400"},vf={class:"px-6"},Df=c.defineComponent({__name:"FmLine",props:{name:{},paragraph:{},datasets:{},xAxis:{}},setup(n){const t=n,e=c.ref(null);let i=null;c.watch([()=>t.xAxis,()=>t.datasets],()=>{i&&(i.data.datasets=t.datasets,i.data.labels=t.xAxis.categories,i.update())});function s(d,h){const f=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(d);if(f)return`rgba(${parseInt(f[1],16)},${parseInt(f[2],16)},${parseInt(f[3],16)},${h})`;if(d.startsWith("rgb")){const u=d.split(",");if(u.length===3)return[...u.slice(0,2),u[2].replace(")",`,${h})`)].join(",");if(u.length===4)return[...u.slice(0,3),`${h})`].join(",")}return""}function o(d){const h=getComputedStyle(document.documentElement).getPropertyValue(`--${d}`)||d;return h.startsWith("rgb")||h.startsWith("#")?h:null}function a({context:d,color:h}){const{ctx:f,chartArea:u}=d.chart;if(!u)return;const p=f==null?void 0:f.createLinearGradient(0,0,0,u.height);return p.addColorStop(0,s(h,.5)),p.addColorStop(1,s(h,0)),p}const r=c.computed(()=>({labels:t.xAxis.categories,datasets:t.datasets.map(d=>{const h=o(d.color)??"";return{...d,backgroundColor:h?f=>a({context:f,color:h}):"",borderColor:h,borderDash:d.dash?[5,5]:void 0,tension:.1}})}));function l(){e.value&&(i=new Pt(e.value,{type:"line",data:r.value,options:{plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},beginAtZero:!0},y:{grid:{display:!0},beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return c.onMounted(()=>{l()}),(d,h)=>(c.openBlock(),c.createElementBlock("div",wf,[c.createElementVNode("div",Cf,[c.createElementVNode("div",Sf,c.toDisplayString(d.name),1),c.createElementVNode("div",Mf,c.toDisplayString(d.paragraph),1)]),c.createElementVNode("div",vf,[c.createElementVNode("canvas",{ref_key:"canvas",ref:e},null,512)])]))}});var Ef=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ka={exports:{}};(function(n,t){(function(e,i){n.exports=i()})(Ef,function(){var e=1e3,i=6e4,s=36e5,o="millisecond",a="second",r="minute",l="hour",d="day",h="week",f="month",u="quarter",p="year",m="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var S=["th","st","nd","rd"],C=O%100;return"["+O+(S[(C-20)%10]||S[C]||S[0])+"]"}},w=function(O,S,C){var E=String(O);return!E||E.length>=S?O:""+Array(S+1-E.length).join(C)+O},x={s:w,z:function(O){var S=-O.utcOffset(),C=Math.abs(S),E=Math.floor(C/60),V=C%60;return(S<=0?"+":"-")+w(E,2,"0")+":"+w(V,2,"0")},m:function O(S,C){if(S.date()<C.date())return-O(C,S);var E=12*(C.year()-S.year())+(C.month()-S.month()),V=S.clone().add(E,f),A=C-V<0,$=S.clone().add(E+(A?-1:1),f);return+(-(E+(C-V)/(A?V-$:$-V))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:f,y:p,w:h,d,D:m,h:l,m:r,s:a,ms:o,Q:u}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},k="en",M={};M[k]=_;var v="$isDayjsObject",D=function(O){return O instanceof L||!(!O||!O[v])},F=function O(S,C,E){var V;if(!S)return k;if(typeof S=="string"){var A=S.toLowerCase();M[A]&&(V=A),C&&(M[A]=C,V=A);var $=S.split("-");if(!V&&$.length>1)return O($[0])}else{var H=S.name;M[H]=S,V=H}return!E&&V&&(k=V),V||!E&&k},T=function(O,S){if(D(O))return O.clone();var C=typeof S=="object"?S:{};return C.date=O,C.args=arguments,new L(C)},P=x;P.l=F,P.i=D,P.w=function(O,S){return T(O,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var L=function(){function O(C){this.$L=F(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[v]=!0}var S=O.prototype;return S.parse=function(C){this.$d=function(E){var V=E.date,A=E.utc;if(V===null)return new Date(NaN);if(P.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var $=V.match(b);if($){var H=$[2]-1||0,Y=($[7]||"0").substring(0,3);return A?new Date(Date.UTC($[1],H,$[3]||1,$[4]||0,$[5]||0,$[6]||0,Y)):new Date($[1],H,$[3]||1,$[4]||0,$[5]||0,$[6]||0,Y)}}return new Date(V)}(C),this.init()},S.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},S.$utils=function(){return P},S.isValid=function(){return this.$d.toString()!==g},S.isSame=function(C,E){var V=T(C);return this.startOf(E)<=V&&V<=this.endOf(E)},S.isAfter=function(C,E){return T(C)<this.startOf(E)},S.isBefore=function(C,E){return this.endOf(E)<T(C)},S.$g=function(C,E,V){return P.u(C)?this[E]:this.set(V,C)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(C,E){var V=this,A=!!P.u(E)||E,$=P.p(C),H=function(de,ht){var Kt=P.w(V.$u?Date.UTC(V.$y,ht,de):new Date(V.$y,ht,de),V);return A?Kt:Kt.endOf(d)},Y=function(de,ht){return P.w(V.toDate()[de].apply(V.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ht)),V)},Z=this.$W,tt=this.$M,st=this.$D,bt="set"+(this.$u?"UTC":"");switch($){case p:return A?H(1,0):H(31,11);case f:return A?H(1,tt):H(0,tt+1);case h:var ce=this.$locale().weekStart||0,en=(Z<ce?Z+7:Z)-ce;return H(A?st-en:st+(6-en),tt);case d:case m:return Y(bt+"Hours",0);case l:return Y(bt+"Minutes",1);case r:return Y(bt+"Seconds",2);case a:return Y(bt+"Milliseconds",3);default:return this.clone()}},S.endOf=function(C){return this.startOf(C,!1)},S.$set=function(C,E){var V,A=P.p(C),$="set"+(this.$u?"UTC":""),H=(V={},V[d]=$+"Date",V[m]=$+"Date",V[f]=$+"Month",V[p]=$+"FullYear",V[l]=$+"Hours",V[r]=$+"Minutes",V[a]=$+"Seconds",V[o]=$+"Milliseconds",V)[A],Y=A===d?this.$D+(E-this.$W):E;if(A===f||A===p){var Z=this.clone().set(m,1);Z.$d[H](Y),Z.init(),this.$d=Z.set(m,Math.min(this.$D,Z.daysInMonth())).$d}else H&&this.$d[H](Y);return this.init(),this},S.set=function(C,E){return this.clone().$set(C,E)},S.get=function(C){return this[P.p(C)]()},S.add=function(C,E){var V,A=this;C=Number(C);var $=P.p(E),H=function(tt){var st=T(A);return P.w(st.date(st.date()+Math.round(tt*C)),A)};if($===f)return this.set(f,this.$M+C);if($===p)return this.set(p,this.$y+C);if($===d)return H(1);if($===h)return H(7);var Y=(V={},V[r]=i,V[l]=s,V[a]=e,V)[$]||1,Z=this.$d.getTime()+C*Y;return P.w(Z,this)},S.subtract=function(C,E){return this.add(-1*C,E)},S.format=function(C){var E=this,V=this.$locale();if(!this.isValid())return V.invalidDate||g;var A=C||"YYYY-MM-DDTHH:mm:ssZ",$=P.z(this),H=this.$H,Y=this.$m,Z=this.$M,tt=V.weekdays,st=V.months,bt=V.meridiem,ce=function(ht,Kt,nn,Gn){return ht&&(ht[Kt]||ht(E,A))||nn[Kt].slice(0,Gn)},en=function(ht){return P.s(H%12||12,ht,"0")},de=bt||function(ht,Kt,nn){var Gn=ht<12?"AM":"PM";return nn?Gn.toLowerCase():Gn};return A.replace(y,function(ht,Kt){return Kt||function(nn){switch(nn){case"YY":return String(E.$y).slice(-2);case"YYYY":return P.s(E.$y,4,"0");case"M":return Z+1;case"MM":return P.s(Z+1,2,"0");case"MMM":return ce(V.monthsShort,Z,st,3);case"MMMM":return ce(st,Z);case"D":return E.$D;case"DD":return P.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return ce(V.weekdaysMin,E.$W,tt,2);case"ddd":return ce(V.weekdaysShort,E.$W,tt,3);case"dddd":return tt[E.$W];case"H":return String(H);case"HH":return P.s(H,2,"0");case"h":return en(1);case"hh":return en(2);case"a":return de(H,Y,!0);case"A":return de(H,Y,!1);case"m":return String(Y);case"mm":return P.s(Y,2,"0");case"s":return String(E.$s);case"ss":return P.s(E.$s,2,"0");case"SSS":return P.s(E.$ms,3,"0");case"Z":return $}return null}(ht)||$.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(C,E,V){var A,$=this,H=P.p(E),Y=T(C),Z=(Y.utcOffset()-this.utcOffset())*i,tt=this-Y,st=function(){return P.m($,Y)};switch(H){case p:A=st()/12;break;case f:A=st();break;case u:A=st()/3;break;case h:A=(tt-Z)/6048e5;break;case d:A=(tt-Z)/864e5;break;case l:A=tt/s;break;case r:A=tt/i;break;case a:A=tt/e;break;default:A=tt}return V?A:P.a(A)},S.daysInMonth=function(){return this.endOf(f).$D},S.$locale=function(){return M[this.$L]},S.locale=function(C,E){if(!C)return this.$L;var V=this.clone(),A=F(C,E,!0);return A&&(V.$L=A),V},S.clone=function(){return P.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},O}(),X=L.prototype;return T.prototype=X,[["$ms",o],["$s",a],["$m",r],["$H",l],["$W",d],["$M",f],["$y",p],["$D",m]].forEach(function(O){X[O[1]]=function(S){return this.$g(S,O[0],O[1])}}),T.extend=function(O,S){return O.$i||(O(S,L,T),O.$i=!0),T},T.locale=F,T.isDayjs=D,T.unix=function(O){return T(1e3*O)},T.en=M[k],T.Ls=M,T.p={},T})})(ka);var Vf=ka.exports;const be=Bf(Vf),Pf={class:"relative"},Of={class:"w-full"},Tf={class:"flex h-10 justify-between p-2"},Ff={class:"fm-typo-body-lg-400"},Af={class:"flex gap-1 items-center justify-center"},Lf={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},$f=["onClick"],Nf=c.defineComponent({__name:"FmDatePicker",props:{label:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref([]),s=c.ref(null),o=c.ref(!1),a=c.ref(be()),r=c.ref(null),l=c.ref(null),d=g=>{s.value=g,t("update:modelValue",g.format("YYYY-MM-DD")),o.value=!1},h=()=>{i.value=[];const g=be(a.value).startOf("month"),b=g.endOf("month"),y=g.month();let _=g.startOf("week"),w=[];for(;_.isBefore(b.endOf("week"));)_.day()===0&&w.length>0&&(i.value.push(w),w=[]),w.push({date:_,isCurrentMonth:_.month()===y}),_=_.add(1,"day");w.length>0&&i.value.push(w)},f=()=>{e.disabled||(o.value=!o.value,requestAnimationFrame(()=>{var b;const g=(b=r.value)==null?void 0:b.getBoundingClientRect();l.value.style.top=`${g.height+4}px`,l.value.style.left="0px"}))},u=g=>{const b=g.path||g.composedPath();for(const y of b)if(y==r.value||y==l.value)return;o.value=!1},p=g=>{a.value=g?a.value.add(1,"month"):a.value.subtract(1,"month"),h()},m=c.computed(()=>Array.from(Array(7),(g,b)=>be().day(b).format("ddd")));return c.onMounted(()=>{window.addEventListener("click",u),h()}),c.onUnmounted(()=>{window.removeEventListener("click",u)}),(g,b)=>{var y;return c.openBlock(),c.createElementBlock("div",Pf,[c.createElementVNode("label",{ref_key:"buttonEl",ref:r,onClick:f},[c.createElementVNode("div",{class:c.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},c.toDisplayString(e.label),3),c.createElementVNode("div",{class:c.normalizeClass(["fm-date-picker__container",{"fm-date-picker__container--opened":o.value,"fm-date-picker__container--disabled":e.disabled}])},[c.createElementVNode("div",{class:c.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},c.toDisplayString(((y=s.value)==null?void 0:y.format("D MMM YYYY"))??"DD MM YYYY"),3)],2)],512),c.createElementVNode("div",{ref_key:"dropdownEl",ref:l,class:c.normalizeClass(["absolute bg-fm-color-white fm-calendar gap-6 p-3 rounded-lg shadow-light-neutral-300 w-[360px]",[o.value?"block":"hidden"]])},[c.createElementVNode("div",Of,[c.createElementVNode("div",Tf,[c.createElementVNode("div",Ff,c.toDisplayString(a.value.format("MMMM YYYY")),1),c.createElementVNode("div",Af,[c.createVNode(W,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:b[0]||(b[0]=()=>p(!1))}),c.createVNode(W,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:b[1]||(b[1]=()=>p(!0))})])]),c.createElementVNode("div",null,[c.createElementVNode("div",Lf,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(m.value,_=>(c.openBlock(),c.createElementBlock("div",{key:_,class:"fm-calendar__cell"},c.toDisplayString(_),1))),128))]),c.createElementVNode("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(_,w)=>(c.openBlock(),c.createElementBlock("div",{key:w,class:"fm-calendar__row fm-typo-body-lg-400"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(_,x=>(c.openBlock(),c.createElementBlock("div",{key:x.date.date(),class:"fm-calendar__cell"},[x.isCurrentMonth?(c.openBlock(),c.createElementBlock("button",{key:0,class:c.normalizeClass(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":s.value===x.date}]),onClick:()=>d(x.date)},c.toDisplayString(x.date.date()),11,$f)):c.createCommentVNode("",!0)]))),128))]))),128))])])])],2)])}}}),xg="",Rf=ot(Nf,[["__scopeId","data-v-2698ae54"]]),If=n=>(c.pushScopeId("data-v-02a11da6"),n=n(),c.popScopeId(),n),zf={class:"flex gap-1 items-center relative w-full"},Wf=If(()=>c.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),Hf={class:"w-full"},jf={class:"flex h-10 justify-between p-2"},Yf={class:"fm-typo-body-lg-400"},Uf={class:"flex gap-1 items-center justify-center"},Xf={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},qf=["onClick"],Kf=c.defineComponent({__name:"FmDateRangePicker",props:{label:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref([]),s=c.ref({startDate:null,endDate:null}),o=c.ref(!1),a=c.ref(be()),r=c.ref(null),l=c.ref(null),d=c.ref(null),h=y=>{var _,w;if(s.value.startDate&&s.value.endDate){s.value={startDate:null,endDate:null},t("update:modelValue",{startDate:null,endDate:null});return}if(!s.value.startDate&&!s.value.endDate)s.value.startDate=y;else if(y.isBefore(s.value.startDate)){const x=s.value.startDate;s.value={startDate:y,endDate:x}}else s.value.endDate=y;t("update:modelValue",{startDate:(_=s.value.startDate)==null?void 0:_.format("YYYY-MM-DD"),endDate:(w=s.value.endDate)==null?void 0:w.format("YYYY-MM-DD")}),s.value.startDate&&s.value.endDate&&(o.value=!1)},f=()=>{i.value=[];const y=be(a.value).startOf("month"),_=y.endOf("month"),w=y.month();let x=y.startOf("week"),k=[];for(;x.isBefore(_.endOf("week"));)x.day()===0&&k.length>0&&(i.value.push(k),k=[]),k.push({date:x,isCurrentMonth:x.month()===w}),x=x.add(1,"day");k.length>0&&i.value.push(k)},u=()=>{e.disabled||(o.value=!o.value,requestAnimationFrame(()=>{var _;const y=(_=r.value)==null?void 0:_.getBoundingClientRect();d.value.style.top=`${y.height+4}px`,d.value.style.left="0px"}))},p=y=>{const _=y.path||y.composedPath();for(const w of _)if(w==r.value||w==l.value||w==d.value)return;o.value=!1},m=y=>{a.value=y?a.value.add(1,"month"):a.value.subtract(1,"month"),f()},g=c.computed(()=>Array.from(Array(7),(y,_)=>be().day(_).format("ddd"))),b=y=>{var _,w,x,k;return{"fm-calendar__cell__button--selected":((_=s.value.startDate)==null?void 0:_.isSame(y))&&!s.value.endDate||((w=s.value.endDate)==null?void 0:w.isSame(y))&&!s.value.startDate,"fm-calendar__cell__button--selected-start":((x=s.value.startDate)==null?void 0:x.isSame(y))&&s.value.endDate,"fm-calendar__cell__button--selected-end":((k=s.value.endDate)==null?void 0:k.isSame(y))&&s.value.startDate,"fm-calendar__cell__button--selected-between":s.value.startDate&&s.value.endDate&&y.isAfter(s.value.startDate)&&y.isBefore(s.value.endDate)}};return c.onMounted(()=>{window.addEventListener("click",p),f()}),c.onUnmounted(()=>{window.removeEventListener("click",p)}),(y,_)=>{var w,x;return c.openBlock(),c.createElementBlock("div",zf,[c.createElementVNode("label",{ref_key:"startButtonEl",ref:r,class:"w-full",onClick:u},[c.createElementVNode("div",{class:c.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},c.toDisplayString(e.label),3),c.createElementVNode("div",{class:c.normalizeClass(["fm-date-picker__container",{"fm-date-picker__container--opened":o.value,"fm-date-picker__container--disabled":e.disabled}])},[c.createElementVNode("div",{class:c.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.value.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},c.toDisplayString(((w=s.value.startDate)==null?void 0:w.format("D MMM YYYY"))??"DD MM YYYY"),3)],2)],512),Wf,c.createElementVNode("label",{ref_key:"endButtonEl",ref:l,class:"w-full",onClick:u},[c.createElementVNode("div",{class:c.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},c.toDisplayString(e.label),3),c.createElementVNode("div",{class:c.normalizeClass(["fm-date-picker__container",{"fm-date-picker__container--opened":o.value,"fm-date-picker__container--disabled":e.disabled}])},[c.createElementVNode("div",{class:c.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.value.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},c.toDisplayString(((x=s.value.endDate)==null?void 0:x.format("D MMM YYYY"))??"DD MM YYYY"),3)],2)],512),c.createElementVNode("div",{ref_key:"dropdownEl",ref:d,class:c.normalizeClass(["absolute bg-fm-color-white fm-calendar gap-6 p-3 rounded-lg shadow-light-300 w-[360px]",[o.value?"block":"hidden"]])},[c.createElementVNode("div",Hf,[c.createElementVNode("div",jf,[c.createElementVNode("div",Yf,c.toDisplayString(a.value.format("MMMM YYYY")),1),c.createElementVNode("div",Uf,[c.createVNode(W,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:_[0]||(_[0]=()=>m(!1))}),c.createVNode(W,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:_[1]||(_[1]=()=>m(!0))})])]),c.createElementVNode("div",null,[c.createElementVNode("div",Xf,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(g.value,k=>(c.openBlock(),c.createElementBlock("div",{key:k,class:"fm-calendar__cell"},c.toDisplayString(k),1))),128))]),c.createElementVNode("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(k,M)=>(c.openBlock(),c.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-body-lg-400"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(k,v=>(c.openBlock(),c.createElementBlock("div",{key:v.date.date(),class:"fm-calendar__cell"},[v.isCurrentMonth?(c.openBlock(),c.createElementBlock("button",{key:0,class:c.normalizeClass(["fm-calendar__cell__button",b(v.date)]),onClick:()=>h(v.date)},c.toDisplayString(v.date.date()),11,qf)):c.createCommentVNode("",!0)]))),128))]))),128))])])])],2)])}}}),kg="",Gf=ot(Kf,[["__scopeId","data-v-02a11da6"]]),Zf={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},Jf={class:"flex gap-8 items-center sm:flex-col-reverse xs:flex-col-reverse"},Qf=c.defineComponent({__name:"FmDialog",props:{modelValue:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},minWidth:{default:280},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(null),s=o=>{e.overlay&&i.value&&o.target===i.value&&t("update:modelValue",!1)};return(o,a)=>(c.openBlock(),c.createBlock(c.Transition,null,{default:c.withCtx(()=>[o.modelValue?(c.openBlock(),c.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:i,class:c.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":o.overlay}),onClick:a[1]||(a[1]=r=>s(r))},[c.createElementVNode("div",{class:c.normalizeClass(`fm-dialog min-w-[${o.minWidth}px]`)},[c.createElementVNode("div",Zf,[c.renderSlot(o.$slots,"dialog-header"),o.closeButton?(c.openBlock(),c.createBlock(W,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:a[0]||(a[0]=r=>t("update:modelValue",!1))})):c.createCommentVNode("",!0)]),c.renderSlot(o.$slots,"dialog-content"),c.createElementVNode("div",Jf,[c.renderSlot(o.$slots,"dialog-footer")])],2)],2)):c.createCommentVNode("",!0)]),_:3}))}}),wg="",tu={class:"fm-checkbox"},eu={class:"fm-checkbox--wrapper"},nu={class:"fm-checkbox__input--container"},iu=["checked","disabled","indeterminate"],su={key:0,class:"fm-checkbox__label-container"},ou={class:"fm-typo-body-lg-400"},au={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},wa=c.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:Boolean},label:{},sublabel:{default:""},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.computed(()=>e.indeterminate?"remove":e.modelValue?"check_small":"");function s(){e.disabled||t("update:modelValue",!e.modelValue)}return(o,a)=>(c.openBlock(),c.createElementBlock("div",tu,[c.createElementVNode("label",eu,[c.createElementVNode("div",nu,[c.createElementVNode("input",{class:c.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":o.modelValue}),type:"checkbox",checked:e.modelValue,disabled:e.disabled,indeterminate:e.indeterminate,onClick:s},null,10,iu),e.indeterminate||e.modelValue?(c.openBlock(),c.createBlock(W,{key:0,class:"fm-checkbox__input--checkmark",name:i.value,size:"md",color:"#FFFFFF"},null,8,["name"])):c.createCommentVNode("",!0)]),e.label?(c.openBlock(),c.createElementBlock("div",su,[c.renderSlot(o.$slots,"label"),c.createElementVNode("div",ou,c.toDisplayString(e.label),1),e.sublabel?(c.openBlock(),c.createElementBlock("div",au,c.toDisplayString(e.sublabel),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)])]))}}),Cg="",ru={class:"w-full"},lu=c.defineComponent({__name:"FmField",props:{leadingIcon:{default:""},trailingIcon:{default:""},activeClass:{default:""},disabled:{type:Boolean,default:!1},iconColor:{default:"black"}},setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass({"fm-field":!0,"fm-field--disabled":t.disabled,activeClass:t.activeClass})},[c.createVNode(W,{name:t.leadingIcon,size:"md",color:t.disabled?"disabled":t.iconColor},null,8,["name","color"]),c.createElementVNode("div",ru,[c.renderSlot(t.$slots,"default",{},void 0,!0)]),c.createVNode(W,{name:t.trailingIcon,size:"md",color:t.disabled?"disabled":t.iconColor},null,8,["name","color"])],2))}}),Sg="",Ca=ot(lu,[["__scopeId","data-v-fae4e7ce"]]),Sa=Symbol.for("fm:form"),Ma=Symbol.for("fm:radio-group"),cu=["onSubmit","onReset"],du=c.defineComponent({__name:"FmForm",setup(n){const t=c.ref([]),e=c.ref(0),i=()=>{t.value.forEach(o=>{o.validate()})},s=()=>{t.value.forEach(o=>{o.resetValue(),o.resetValidation()})};return c.provide(Sa,{register({validate:o,resetValidation:a,resetValue:r}){return t.value.push({componentId:e.value,validate:o,resetValidation:a,resetValue:r}),e.value++},unregister(o){t.value.filter(a=>a.componentId!==o)}}),(o,a)=>(c.openBlock(),c.createElementBlock("form",{onSubmit:c.withModifiers(i,["prevent"]),onReset:c.withModifiers(s,["prevent"])},[c.renderSlot(o.$slots,"default")],40,cu))}}),hu={class:"fm-radio-btn"},fu={class:"fm-radio-btn__input--container"},uu=["value","disabled","checked"],pu={class:"py-8"},mu={class:"fm-typo-body-lg-400"},gu={key:0,class:"fm-typo-body-md-400 text-fm-color-typo-secondary"},bu=c.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(),s=c.inject(Ma,null),o=()=>{r.value||(s?s.updateValue(e.value):t("update:modelValue",e.value))},a=()=>{i.value&&s&&(i.value.checked=s.groupValue.value===e.value)};c.onMounted(()=>{s&&s.register(a)});const r=c.computed(()=>s?s.getDisabled():e.disabled);return(l,d)=>{const h=c.resolveDirective("wave");return c.openBlock(),c.createElementBlock("div",hu,[c.createElementVNode("label",{class:c.normalizeClass({"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":r.value,"cursor-pointer":!r.value}),onClick:o},[c.withDirectives((c.openBlock(),c.createElementBlock("div",fu,[c.createElementVNode("input",{ref_key:"inputEl",ref:i,class:"fm-radio-btn__input--btn",type:"radio",value:l.value,disabled:r.value,checked:l.value===l.modelValue},null,8,uu)])),[[h,!r.value]]),c.createElementVNode("div",pu,[c.renderSlot(l.$slots,"label",{},()=>[c.createElementVNode("div",mu,c.toDisplayString(l.label),1),l.sublabel?(c.openBlock(),c.createElementBlock("div",gu,c.toDisplayString(l.sublabel),1)):c.createCommentVNode("",!0)],!0)])],2)])}}}),Mg="",yu=ot(bu,[["__scopeId","data-v-94f94580"]]);function In(n,t,e,i=null,s=null){const o=c.ref(),a=c.inject(Sa,null),r=c.ref(!0),l=(d=s)=>{r.value=!0,t(),d&&typeof d=="function"&&d(),e("update:modelValue",i)};return c.onMounted(()=>{a&&(o.value=a.register({validate:n,resetValidation:t,resetValue:l}))}),c.onUnmounted(()=>{a&&a.unregister(o.value)}),{isPristine:r,resetValue:l}}function zn(n){const t=c.ref([]);function e(){const s=[];if(n.rules&&n.rules.length>0)for(const o of n.rules){const r=(typeof o=="function"?o:()=>o)(n.modelValue);r!==!0&&s.push(r)}return t.value=s,t.value}function i(){t.value=[]}return{validate:e,resetValidation:i,errorMessages:t}}const _u={class:"fm-text-field__helper-container fm-typo-body-sm-400 text-fm-color-typo-secondary"},xu={key:0},ku={key:1},wu=c.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},helperText:{default:""},disabled:{type:Boolean,default:!1},label:{},rules:{default:()=>[n=>!!n||"This field is required"]}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(),s=c.ref([]),o=()=>{i.value=null,s.value.forEach(h=>h())},{validate:a,errorMessages:r,resetValidation:l}=zn(e),{isPristine:d}=In(a,l,t,"",o);return c.provide(Ma,{groupValue:i,getDisabled:()=>e.disabled,register(h){s.value.push(h)},updateValue(h){i.value=h,s.value.forEach(f=>f()),t("update:modelValue",h)}}),c.watch(()=>e.modelValue,()=>{d.value=!1,i.value=e.modelValue,s.value.forEach(h=>h())}),(h,f)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass({"flex items-center gap-16 justify-start":h.inline})},[c.renderSlot(h.$slots,"default"),c.createElementVNode("div",_u,[c.unref(r).length===0?(c.openBlock(),c.createElementBlock("div",xu,[c.renderSlot(h.$slots,"helper-text",{},()=>[c.createTextVNode(c.toDisplayString(h.helperText),1)])])):(c.openBlock(),c.createElementBlock("div",ku,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(r),u=>(c.openBlock(),c.createElementBlock("div",{key:u,class:"flex gap-4 items-center text-fm-color-typo-error"},[c.createVNode(W,{name:"error",color:"#FF3B30",size:"sm"}),c.createElementVNode("span",null,c.toDisplayString(u),1)]))),128))]))])],2))}});function Cu(n){for(;n;){if(Su(n))return n;n=n.parentElement}return document.scrollingElement}function Su(n){if(!n||n.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(n);return t.overflowY==="scroll"||t.overflowY==="auto"&&n.scrollHeight>n.clientHeight}class Mu{constructor(t,e){B(this,"onScroll");B(this,"scrollParent");this.onScroll=e,this.scrollParent=Cu(t)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const vu={class:"relative"},Du=c.defineComponent({__name:"FmMenu",props:{isOpen:{type:Boolean,default:!1},placement:{default:"bottom-left"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(n,{expose:t,emit:e}){const i=n,s=c.ref(!1),o=c.ref(null),a=c.ref(null);let r;t({show:()=>{s.value||(s.value=!0,e("dropdown-changed",s.value))},hide:()=>{s.value&&(s.value=!1,e("dropdown-changed",s.value))}});const l=()=>{i.disabled||(s.value=!s.value,d(),e("dropdown-changed",s.value))},d=()=>{requestAnimationFrame(()=>{var m,g;const u=(m=a.value)==null?void 0:m.getBoundingClientRect(),p=(g=o.value)==null?void 0:g.getBoundingClientRect();i.placement.includes("bottom")?a.value.style.top=`${p.bottom+4}px`:i.placement.includes("top")&&(a.value.style.top=`${p.top-u.height-4}px`),i.placement.includes("left")?a.value.style.left=`${p.left}px`:i.placement.includes("center")?a.value.style.left=`${p.left+p.width/2-u.width/2}px`:i.placement.includes("right")&&(a.value.style.left=`${p.right-u.width}px`)})},h=u=>{if(!s.value)return;const p=u.path||u.composedPath();for(const m of p)if(m==o.value||m==a.value)return;s.value=!1,e("dropdown-changed",s.value)},f=()=>{e("dropdown-changed",!1)};return c.watch(()=>i.isOpen,u=>s.value=u),c.onMounted(()=>{s.value=i.isOpen,window.addEventListener("click",h),r=new Mu(o.value,f),r.bindScroll()}),c.onUnmounted(()=>{window.removeEventListener("click",h),r.unbindScroll()}),(u,p)=>(c.openBlock(),c.createElementBlock("div",vu,[c.createElementVNode("div",{ref_key:"buttonEl",ref:o,class:"fm-menu",onClick:l},[c.renderSlot(u.$slots,"menu-button",{},void 0,!0)],512),(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[c.createElementVNode("div",{ref_key:"dropdownEl",ref:a,class:c.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":s.value})},[c.renderSlot(u.$slots,"menu-content",{},void 0,!0)],2)]))]))}}),vg="",Wi=ot(Du,[["__scopeId","data-v-d9e79ca4"]]),Eu={class:"fm-menu-item--left"},Bu={key:0,class:"fm-menu-item--right"},Vu=c.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dividerPlacement:{default:null}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=o=>{o.preventDefault(),!e.disabled&&t("update:modelValue",!e.modelValue)},s=()=>{t("update:modelValue",e.modelValue)};return(o,a)=>(c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("div",{class:c.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":o.modelValue&&!o.hasCheckbox,"fm-menu-item--disabled":o.disabled}),onClick:i},[c.createElementVNode("div",Eu,[!o.hasCheckbox&&o.icon?(c.openBlock(),c.createBlock(W,{key:0,name:o.icon,size:"md",color:o.disabled?"#C7C7CC":o.modelValue?"#FF7823":"#1C1C1E"},null,8,["name","color"])):c.createCommentVNode("",!0),o.hasCheckbox?(c.openBlock(),c.createBlock(wa,{key:1,"model-value":o.modelValue,name:"something",label:"",sublabel:"",value:"",indeterminate:!1,disabled:o.disabled,"onUpdate:modelValue":s,onClick:a[0]||(a[0]=r=>r.preventDefault())},null,8,["model-value","disabled"])):c.createCommentVNode("",!0),c.renderSlot(o.$slots,"label",{},()=>[c.createElementVNode("div",null,[c.createElementVNode("div",{class:c.normalizeClass(`fm-typo-body-lg-400 ${o.disabled?"fm-color-typo-disabled":"fm-color-typo-primary"}`)},c.toDisplayString(o.label),3),o.sublabel?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(`fm-typo-body-md-400 ${o.disabled?"fm-color-typo-disabled":"fm-color-typo-secondary"}`)},c.toDisplayString(o.sublabel),3)):c.createCommentVNode("",!0)])],!0)]),o.expandable?(c.openBlock(),c.createElementBlock("div",Bu,[c.createVNode(W,{name:"chevron_right",size:"md",color:o.disabled?"#C7C7CC":"#AEAEB2"},null,8,["color"])])):c.createCommentVNode("",!0)],2)]))}}),Dg="",va=ot(Vu,[["__scopeId","data-v-94ed27b3"]]),Pu={class:"w-[280px]"},Ou=c.defineComponent({__name:"FmSelect",props:{modelValue:{},label:{},items:{},disabled:{type:Boolean,default:!1},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-left"},placeholder:{default:""}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(!1),s=(l,d)=>{if(e.multiselect){let h=[];l?h=[...c.toRaw(e.modelValue),d.value]:(h=[...e.modelValue],h=h.filter(f=>JSON.stringify(c.toRaw(f))!==JSON.stringify(d.value))),t("update:modelValue",h)}else i.value=!1,t("update:modelValue",d.value)},o=c.computed(()=>{const l=a.value.map(d=>d.label).join(", ");return l===""?e.placeholder:l}),a=c.computed(()=>e.multiselect?e.items.filter(l=>c.toRaw(e.modelValue).some(d=>r(d,l.value))):e.items.filter(l=>r(e.modelValue,l.value))),r=(l,d)=>JSON.stringify(l)===JSON.stringify(d);return(l,d)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("label",null,[c.renderSlot(l.$slots,"label",{},()=>[l.label?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["fm-typo-body-lg-400 mb-4",{"fm-typo-body-lg-400":!0,"text-fm-color-typo-primary":!l.disabled,"text-fm-color-typo-disabled":l.disabled}])},c.toDisplayString(l.label),3)):c.createCommentVNode("",!0)],!0)]),c.createVNode(Wi,{disabled:l.disabled,"is-open":i.value,placement:l.placement,onDropdownChanged:d[0]||(d[0]=h=>i.value=h)},{"menu-button":c.withCtx(()=>[c.createElementVNode("label",{class:c.normalizeClass([`${l.disabled?"cursor-not-allowed":"cursor-pointer"} fm-select`])},[c.createElementVNode("div",{class:c.normalizeClass({"fm-select__container":!0,"fm-select__container--expanded":i.value,"fm-select__container--disabled":l.disabled})},[c.createElementVNode("div",{class:c.normalizeClass({"fm-typo-body-lg-400 w-full h-full overflow-hidden text-ellipsis whitespace-nowrap":!0,"text-fm-color-typo-tertiary":!l.modelValue,"text-fm-color-typo-primary":!!l.modelValue})},c.toDisplayString(o.value),3),c.createVNode(W,{name:i.value?"expand_less":"expand_more",size:"md",color:l.disabled?"#C7C7CC":"black"},null,8,["name","color"])],2)],2)]),"menu-content":c.withCtx(()=>[c.createElementVNode("div",Pu,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.items,h=>(c.openBlock(),c.createBlock(va,{key:h.value,"has-checkbox":l.multiselect,label:h.label,value:h.value,"model-value":a.value.some(f=>r(f.value,h.value)),"onUpdate:modelValue":f=>s(f,h)},null,8,["has-checkbox","label","value","model-value","onUpdate:modelValue"]))),128))])]),_:1},8,["disabled","is-open","placement"])],64))}}),Eg="",Tu=ot(Ou,[["__scopeId","data-v-79b78ec6"]]),Fu={class:"fm-stepper-field"},Au={class:"fm-typo-body-lg-400 text-fm-color-typo-primary"},Lu={key:0},$u=["inputMode","value","placeholder","required","readOnly"],Nu={key:0},Ru={key:0,class:"fm-stepper-field__stepper__container"},Iu={class:"fm-stepper-field__helper-container fm-typo-body-sm-400 text-fm-color-typo-secondary"},zu={key:0},Wu={key:1},Hu=c.defineComponent({__name:"FmStepperField",props:{label:{default:""},modelValue:{},required:{type:Boolean},disabled:{type:Boolean},placeholder:{default:""},helperText:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},step:{default:1},min:{default:0},max:{},leadingIcon:{default:""},trailingIcon:{default:""},useGrouping:{type:Boolean,default:!0},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},rules:{default:()=>[]},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,{validate:i,errorMessages:s,resetValidation:o}=zn(e),{isPristine:a}=In(i,o,t,null),r=c.ref(null),l=c.ref(!1),d=c.ref(!0);let h;const f=c.ref(""),u=x=>{if(x!==""){const k=+x.replace(/,/g,"");return isNaN(k)?null:k}return null},p=x=>h.format(x),m=x=>x>e.max?e.max:x<e.min?e.min:x,g=(x,k)=>{x.preventDefault(),a.value=!1;let v=(u(f.value)??0)+k;v=m(v),d.value=i().length===0,f.value=p(v),b()},b=()=>{const x=u(f.value);t("update:modelValue",x)},y=()=>{const x=u(f.value);x&&(f.value=p(m(x))),d.value=i().length===0,l.value=!1,b()},_=()=>{var k;const x=u((k=r.value)==null?void 0:k.value);f.value=x?p(x):""},w=x=>{if(![...Array(10).keys()].map(k=>k.toString()).includes(x.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(x.key)){x.preventDefault();return}};return c.watch(()=>e.modelValue,x=>{f.value=x?p(x):"",d.value=i().length===0}),c.onMounted(()=>{h=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping})}),(x,k)=>(c.openBlock(),c.createElementBlock("label",Fu,[c.createElementVNode("div",Au,[c.renderSlot(x.$slots,"label",{},()=>[c.createTextVNode(c.toDisplayString(x.label),1)],!0)]),c.createElementVNode("div",{class:c.normalizeClass({"fm-stepper-field__container":!0,"fm-stepper-field__container--focused":l.value,"fm-stepper-field__container--invalid":!d.value&&!!x.modelValue,"fm-stepper-field__container--valid":x.showValidBorder&&d.value&&!!x.modelValue})},[c.renderSlot(x.$slots,"prepend",{},()=>[x.prependText?(c.openBlock(),c.createElementBlock("div",Lu,c.toDisplayString(x.prependText),1)):c.createCommentVNode("",!0),x.leadingIcon?(c.openBlock(),c.createBlock(W,{key:1,name:x.leadingIcon,size:"md",color:x.disabled?"#C7C7CC":"#1C1C1E"},null,8,["name","color"])):c.createCommentVNode("",!0)],!0),c.createElementVNode("input",{ref_key:"inputEl",ref:r,class:"fm-stepper-field--input",type:"text",inputMode:x.inputmode,value:f.value,placeholder:x.placeholder,required:x.required,readOnly:x.readonly,onInput:_,onFocus:k[0]||(k[0]=()=>l.value=!0),onBlur:y,onKeydown:w},null,40,$u),c.renderSlot(x.$slots,"append",{},()=>[c.createElementVNode("div",{class:c.normalizeClass({"mr-32":x.showSteppers})},[x.appendText?(c.openBlock(),c.createElementBlock("div",Nu,c.toDisplayString(x.appendText),1)):c.createCommentVNode("",!0),x.trailingIcon?(c.openBlock(),c.createBlock(W,{key:1,name:x.trailingIcon,size:"md",color:x.disabled?"#C7C7CC":"#1C1C1E"},null,8,["name","color"])):c.createCommentVNode("",!0)],2)],!0),x.showSteppers?(c.openBlock(),c.createElementBlock("div",Ru,[c.createElementVNode("div",{class:"fm-stepper-field__stepper__item",onMousedown:k[1]||(k[1]=M=>g(M,x.step))},[c.createVNode(W,{name:"expand_less",size:"md",color:x.disabled?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32),c.createElementVNode("div",{class:"fm-stepper-field__stepper__item",onMousedown:k[2]||(k[2]=M=>g(M,-x.step))},[c.createVNode(W,{name:"expand_more",size:"md",color:x.disabled?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32)])):c.createCommentVNode("",!0)],2),c.createElementVNode("div",Iu,[c.unref(s).length===0?(c.openBlock(),c.createElementBlock("div",zu,[c.renderSlot(x.$slots,"helper-text",{},()=>[c.createTextVNode(c.toDisplayString(x.helperText),1)],!0)])):(c.openBlock(),c.createElementBlock("div",Wu,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(s),M=>(c.openBlock(),c.createElementBlock("div",{key:M,class:"flex gap-4 items-center text-fm-color-typo-error"},[c.createVNode(W,{name:"error",color:"#FF3B30",size:"sm"}),c.createElementVNode("span",null,c.toDisplayString(M),1)]))),128))]))])]))}}),Bg="",ju=ot(Hu,[["__scopeId","data-v-9b88b1c9"]]),Yu={class:"cursor-pointer fm-switch__container"},Uu={key:0},Xu={class:"fm-typo-body-lg-400"},qu={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Ku={class:"fm-switch__input--container"},Gu=["checked","value","disabled"],Zu={key:1},Ju={class:"fm-typo-body-lg-400"},Qu={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},tp=c.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{},disabled:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=()=>{e.disabled||t("update:modelValue",!e.modelValue)};return(s,o)=>(c.openBlock(),c.createElementBlock("label",Yu,[s.labelPlacement==="left"?(c.openBlock(),c.createElementBlock("div",Uu,[c.renderSlot(s.$slots,"label",{},void 0,!0),c.createElementVNode("div",Xu,c.toDisplayString(s.label),1),s.sublabel?(c.openBlock(),c.createElementBlock("div",qu,c.toDisplayString(s.sublabel),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),c.createElementVNode("div",Ku,[c.createElementVNode("input",{checked:s.modelValue,class:"fm-switch__input--btn",type:"checkbox",value:s.value,disabled:s.disabled,onClick:i},null,8,Gu),c.createElementVNode("div",{class:c.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":s.showIcon})},[s.showIcon?(c.openBlock(),c.createBlock(W,{key:0,name:s.modelValue?"check":"close",size:"sm",color:s.disabled?"#C7C7CC":s.modelValue?"#1C1C1E":"#FFFFFF"},null,8,["name","color"])):c.createCommentVNode("",!0)],2)]),s.labelPlacement==="right"?(c.openBlock(),c.createElementBlock("div",Zu,[c.createElementVNode("div",Ju,c.toDisplayString(s.label),1),s.sublabel?(c.openBlock(),c.createElementBlock("div",Qu,c.toDisplayString(s.sublabel),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)]))}}),Vg="",ep=ot(tp,[["__scopeId","data-v-77ad1e00"]]),np={class:"fm-text-field"},ip={class:"fm-text-field--label"},sp={key:0},op=["value","inputMode","type","placeholder","required","minlength","maxlength","disabled","readOnly"],ap={key:0},rp={class:"fm-text-field__helper-container fm-typo-body-sm-400 text-fm-color-typo-secondary"},lp={key:0},cp={key:1};var Da=(n=>(n.required="*",n.optional="(optional)",n))(Da||{});const dp=c.defineComponent({__name:"FmTextField",props:{required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:""},helperText:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},leadingIcon:{default:()=>({name:"",color:""})},trailingIcon:{default:()=>({name:"",color:""})},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},label:{},modelValue:{},rules:{default:()=>[]}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(!1),{validate:s,errorMessages:o,resetValidation:a}=zn(e),{isPristine:r}=In(s,a,t,""),l=h=>{r.value=!1,h.target.value||a(),t("update:modelValue",h.target.value)};c.watch(()=>e.modelValue,()=>{r.value||s()});const d=c.computed(()=>o.value.length===0);return(h,f)=>(c.openBlock(),c.createElementBlock("label",np,[c.createElementVNode("div",null,[c.createElementVNode("div",ip,[c.renderSlot(h.$slots,"label"),c.createElementVNode("span",{class:c.normalizeClass({"fm-typo-body-lg-400":!0,"text-fm-color-typo-primary":!h.disabled,"text-fm-color-typo-disabled":h.disabled})},c.toDisplayString(h.label),3),h.labelMark!=="none"?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass({"fm-color-typo-tertiary fm-typo-body-md-400":h.labelMark==="optional","fm-color-typo-error fm-typo-body-lg-700":h.labelMark==="required"})},c.toDisplayString(Da[h.labelMark]),3)):c.createCommentVNode("",!0)])]),c.createElementVNode("div",{class:c.normalizeClass({"fm-text-field__container":!0,"fm-text-field__container--focused":i.value,"fm-text-field__container--invalid":!!h.modelValue&&!d.value,"fm-text-field__container--valid":h.showValidBorder&&h.showSuccess&&!!h.modelValue&&d.value,"fm-text-field__container--disabled":h.disabled})},[c.renderSlot(h.$slots,"prepend",{},()=>[h.prependText?(c.openBlock(),c.createElementBlock("div",sp,c.toDisplayString(h.prependText),1)):c.createCommentVNode("",!0),h.leadingIcon.name?(c.openBlock(),c.createBlock(W,{key:1,name:h.leadingIcon.name,size:"md",color:h.leadingIcon.color??(h.disabled?"#C7C7CC":"#1C1C1E")},null,8,["name","color"])):c.createCommentVNode("",!0)]),c.createElementVNode("input",{class:c.normalizeClass({"fm-text-field--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!h.disabled,"fm-color-typo-disabled":h.disabled}),value:h.modelValue,inputMode:h.inputmode,type:h.inputmode,placeholder:h.placeholder,required:h.required,minlength:h.minLength,maxlength:h.maxLength,disabled:h.disabled,readOnly:h.readonly,onInput:l,onFocus:f[0]||(f[0]=()=>i.value=!0),onBlur:f[1]||(f[1]=()=>i.value=!1)},null,42,op),c.renderSlot(h.$slots,"append",{},()=>[h.appendText?(c.openBlock(),c.createElementBlock("div",ap,c.toDisplayString(h.appendText),1)):c.createCommentVNode("",!0),h.trailingIcon.name?(c.openBlock(),c.createBlock(W,{key:1,name:h.trailingIcon.name,size:"md",color:h.trailingIcon.color??(h.disabled?"#C7C7CC":"#1C1C1E")},null,8,["name","color"])):c.createCommentVNode("",!0)])],2),c.createElementVNode("div",rp,[c.unref(o).length===0?(c.openBlock(),c.createElementBlock("div",lp,[c.renderSlot(h.$slots,"helper-text",{},()=>[c.createTextVNode(c.toDisplayString(h.helperText),1)])])):(c.openBlock(),c.createElementBlock("div",cp,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(o),u=>(c.openBlock(),c.createElementBlock("div",{key:u,class:"flex gap-4 items-center text-fm-color-typo-error"},[c.createVNode(W,{name:"error",color:"#FF3B30",size:"sm"}),c.createElementVNode("span",null,c.toDisplayString(u),1)]))),128))])),c.createElementVNode("div",{class:c.normalizeClass({"fm-color-typo-disabled":h.disabled})},c.toDisplayString(h.maxLength?`${h.modelValue.length} / ${h.maxLength}`:""),3)])]))}}),Pg="",hp={class:"fm-textarea"},fp={htmlFor:"{this.name}"},up={class:"fm-textarea--label"},pp=["value","placeholder","required","minlength","maxlength","readOnly","disabled"],mp={class:"fm-color-typo-secondary fm-textarea__helper-container fm-typo-body-sm-400"},gp={key:0},bp={key:1};var Ea=(n=>(n.required="*",n.optional="(optional)",n))(Ea||{});const yp=c.defineComponent({__name:"FmTextarea",props:{label:{default:""},modelValue:{default:""},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:""},helperText:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(!1),{validate:s,errorMessages:o,resetValidation:a}=zn(e),{isPristine:r}=In(s,a,t,""),l=h=>{r.value=!1,t("update:modelValue",h.target.value)},d=c.computed(()=>o.value.length===0);return c.watch(()=>e.modelValue,()=>{r.value||s()}),(h,f)=>(c.openBlock(),c.createElementBlock("div",hp,[c.createElementVNode("label",fp,[c.createElementVNode("div",up,[c.renderSlot(h.$slots,"label"),c.createElementVNode("span",{class:c.normalizeClass({"fm-typo-body-lg-400":!0,"fm-color-typo-primary":!h.disabled,"fm-color-typo-disabled":h.disabled})},c.toDisplayString(h.label),3),h.labelMark!=="none"?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass({"fm-color-typo-tertiary fm-typo-body-md-400":h.labelMark==="optional","fm-color-typo-error fm-typo-body-lg-700":h.labelMark==="required"})},c.toDisplayString(Ea[h.labelMark]),3)):c.createCommentVNode("",!0)])]),c.createElementVNode("div",{class:c.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":i.value,"fm-textarea__container--invalid":!!h.modelValue&&!d.value,"fm-textarea__container--valid":h.showValidBorder&&h.showSuccess&&!!h.modelValue&&d.value,"fm-textarea__container--disabled":h.disabled})},[c.createElementVNode("textarea",{class:c.normalizeClass({"fm-textarea--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!h.disabled,"fm-color-typo-disabled":h.disabled}),value:h.modelValue,placeholder:h.placeholder,required:h.required,minlength:h.minLength,maxlength:h.maxLength,readOnly:h.readonly,disabled:h.disabled,onInput:l,onFocus:f[0]||(f[0]=()=>i.value=!0),onBlur:f[1]||(f[1]=()=>i.value=!1)},null,42,pp)],2),c.createElementVNode("div",mp,[c.unref(o).length===0?(c.openBlock(),c.createElementBlock("div",gp,[c.renderSlot(h.$slots,"helper-text",{},()=>[c.createTextVNode(c.toDisplayString(h.helperText),1)])])):(c.openBlock(),c.createElementBlock("div",bp,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(o),u=>(c.openBlock(),c.createElementBlock("div",{key:u,class:"flex gap-4 items-center text-fm-color-typo-error"},[c.createVNode(W,{name:"error",color:"#FF3B30",size:"sm"}),c.createElementVNode("span",null,c.toDisplayString(u),1)]))),128))])),c.createElementVNode("div",{class:c.normalizeClass({"fm-color-typo-disabled":h.disabled})},c.toDisplayString(h.maxLength?`${h.modelValue.length} / ${h.maxLength}`:""),3)])]))}}),Og="",_p=c.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass({"fm-list--separator":t.separator,activeClass:t.activeClass})},[c.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),Tg="",xp=ot(_p,[["__scopeId","data-v-884ba127"]]),kp=c.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},activeClass:{default:""}},setup(n){const t=n;return(e,i)=>{const s=c.resolveDirective("wave");return c.withDirectives((c.openBlock(),c.createBlock(t.tag,{class:c.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":e.disabled,"cursor-pointer":e.clickable&&!e.disabled,"cursor-not-allowed":e.clickable&&e.disabled,activeClass:e.activeClass})},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["class"])),[[s,e.clickable&&!e.disabled]])}}}),Fg="",wp=ot(kp,[["__scopeId","data-v-f565b558"]]),Cp={key:0,class:"h-6 relative w-6"},Sp=["data-progress"],Mp={key:1,class:"basis-0 flex-col gap-1 grow inline-flex items-start justify-start shrink"},vp={class:"fm-typo-body-xl-700 self-stretch text-zinc-900"},Dp={class:"fm-typo-body-sm-400 self-stretch text-neutral-500"},Ep=c.defineComponent({__name:"FmProgressIndicatorMobile",props:{totalSteps:{type:Number,required:!0},currentStep:{type:Number,required:!0},titleText:{type:String,required:!0},supportingText:{type:String,default:void 0}},setup(n){const t=n,e=c.ref(null),i=c.computed(()=>`${t.currentStep/t.totalSteps*360}deg`),s=c.computed(()=>`${t.currentStep} of ${t.totalSteps}`),o=a=>{e.value.style.setProperty("--progress",a),e.value.setAttribute("content-text",s.value)};return c.onMounted(()=>{o(i.value)}),c.watch(i,async a=>{o(a)}),(a,r)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(`bg-white gap-3 inline-flex items-center justify-start px-4 py-2 shadow ${n.titleText?"w-full":"w-max"}`)},[n.titleText?(c.openBlock(),c.createElementBlock("div",Cp,[c.createVNode(W,{class:"cursor-pointer",name:"close",outline:!0,size:"md",color:"text-fm-color-neutral-black"})])):c.createCommentVNode("",!0),c.createElementVNode("div",{ref_key:"progress",ref:e,class:"fm-progress","data-progress":i.value},null,8,Sp),n.titleText?(c.openBlock(),c.createElementBlock("div",Mp,[c.createElementVNode("div",vp,c.toDisplayString(n.titleText),1),c.createElementVNode("div",Dp,c.toDisplayString(n.supportingText),1)])):c.createCommentVNode("",!0)],2))}}),Ag="",Bp={class:"flex gap-2 items-start justify-end p-0 self-stretch"},Vp={key:0,class:"bg-white flex flex-col gap-5 p-6 w-1/3"},Pp={class:"lg:hidden md:hidden"},Op={key:0,class:c.normalizeClass("fm-pi-form--mobile")},Tp={class:"bg-white flex gap-10 p-6"},Fp={class:"flex gap-2 items-start justify-end p-0 self-stretch"},Ap=c.defineComponent({__name:"FmProgressIndicatorGroup",props:{orientation:{type:String,default:"horizontal"},steps:{type:Array,required:!0},nextButtonLabel:{type:String,default:"Next"},previousButtonLabel:{type:String,default:"Back"},submitButtonLabel:{type:String,default:"Submit"}},setup(n){const t=n,e=c.ref([...t.steps]),i=c.computed(()=>e.value.length),s=c.ref(0),o=c.computed(()=>e.value[s.value]);c.onMounted(()=>{for(let f=0;f<i.value;f++)e.value[f].status=f===0?"active":"default"}),c.watch(s,async(f,u)=>{if(u!=i.value)if(f<i.value)e.value[f].status="active";else{const p=e.value[u].submitForm;p&&e.value.filter(g=>g.status==="error").length===0&&(s.value=0,p())}});const a=c.computed(()=>o.value.validateStep),r=c.computed(()=>{const f=o.value.validateStep;return f?f():!0}),l=f=>{a.value?r.value?(o.value.status="completed",s.value=f):o.value.status="error":d(f)},d=f=>{o.value.status="completed",s.value=f},h=c.computed(()=>{const f=o.value.validateStep;return f?!f():!1});return(f,u)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:c.normalizeClass(`hidden md:block lg:block container--${n.orientation}`)},[c.createElementVNode("div",{class:c.normalizeClass(`flex justify-start fm-pi-container--${n.orientation}`)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.value,(p,m)=>(c.openBlock(),c.createBlock(Ba,{key:m,orientation:n.orientation,"title-text":p.titleText,"supporting-text":p.supportingText,status:p.status,onValidateStep:g=>l(m)},null,8,["orientation","title-text","supporting-text","status","onValidateStep"]))),128))],2),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(Object.keys(f.$slots),p=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:p},[`step${s.value+1}`===p?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(`flex fm-pi-form--${n.orientation}`)},[c.createElementVNode("div",{class:c.normalizeClass(`bg-white flex flex-col gap-10 p-6 ${f.$slots.card?"w-2/3":"w-full"}`)},[c.createElementVNode("form",{class:"flex flex-col gap-2 p-0 self-stretch",onSubmit:u[1]||(u[1]=c.withModifiers(m=>l(s.value+1),["prevent"]))},[c.renderSlot(f.$slots,p,{class:"gap-0 items-start p-0 self-stretch"}),c.createElementVNode("div",Bp,[p!="step1"?(c.openBlock(),c.createBlock(Lt,{key:0,type:"button",label:n.previousButtonLabel,variant:"tertiary",onClick:u[0]||(u[0]=c.withModifiers(m=>l(s.value-1),["stop"]))},null,8,["label"])):c.createCommentVNode("",!0),c.createVNode(Lt,{variant:"primary",disabled:h.value,label:s.value!=e.value.length-1?n.nextButtonLabel:n.submitButtonLabel,type:"submit"},null,8,["disabled","label"])])],32)],2),f.$slots.card?(c.openBlock(),c.createElementBlock("div",Vp,[c.renderSlot(f.$slots,"card")])):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0)],64))),128))],2),c.createElementVNode("div",Pp,[c.createVNode(Ep,{"title-text":o.value.titleText,"supporting-text":o.value.supportingText,"total-steps":i.value,"current-step":s.value+1},null,8,["title-text","supporting-text","total-steps","current-step"]),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(Object.keys(f.$slots),p=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:p},[`step${s.value+1}`===p?(c.openBlock(),c.createElementBlock("div",Op,[c.createElementVNode("div",Tp,[c.createElementVNode("form",{class:"flex flex-col gap-2 p-0 self-stretch w-full",onSubmit:u[3]||(u[3]=c.withModifiers(m=>l(s.value+1),["prevent"]))},[c.renderSlot(f.$slots,p,{class:"gap-0 items-start p-0 self-stretch"}),c.createElementVNode("div",Fp,[p!="step1"?(c.openBlock(),c.createBlock(Lt,{key:0,type:"button",label:n.previousButtonLabel,variant:"tertiary",onClick:u[2]||(u[2]=c.withModifiers(m=>l(s.value-1),["stop"]))},null,8,["label"])):c.createCommentVNode("",!0),c.createVNode(Lt,{variant:"primary",disabled:h.value,label:s.value!=e.value.length-1?n.nextButtonLabel:n.submitButtonLabel,type:"submit"},null,8,["disabled","label"])])],32)])])):c.createCommentVNode("",!0)],64))),128))])],64))}}),Lg="",ye=n=>(c.pushScopeId("data-v-6b01e659"),n=n(),c.popScopeId(),n),Lp={class:"flex gap-3 hover:cursor-pointer items-start pl-1 pr-5 py-0 self-stretch"},$p={key:0,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},Np=[ye(()=>c.createElementVNode("circle",{cx:"12",cy:"12",r:"11",stroke:"#AEAEB2","stroke-width":"2"},null,-1))],Rp={key:1,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},Ip=[ye(()=>c.createElementVNode("circle",{cx:"12",cy:"12",r:"10",fill:"#FF7823",stroke:"#FF7823","stroke-width":"4"},null,-1))],zp={key:2,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},Wp=[ye(()=>c.createElementVNode("path",{d:"M9.9998 13.6L15.8998 7.70005C16.0831 7.51672 16.3165 7.42505 16.5998 7.42505C16.8831 7.42505 17.1165 7.51672 17.2998 7.70005C17.4831 7.88338 17.5748 8.11672 17.5748 8.40005C17.5748 8.68338 17.4831 8.91672 17.2998 9.10005L10.6998 15.7C10.4998 15.9 10.2665 16 9.9998 16C9.73314 16 9.4998 15.9 9.2998 15.7L6.6998 13.1C6.51647 12.9167 6.4248 12.6834 6.4248 12.4C6.4248 12.1167 6.51647 11.8834 6.6998 11.7C6.88314 11.5167 7.11647 11.425 7.3998 11.425C7.68314 11.425 7.91647 11.5167 8.0998 11.7L9.9998 13.6Z",fill:"#FF7823"},null,-1)),ye(()=>c.createElementVNode("path",{d:"M1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12Z",stroke:"#FF7823","stroke-width":"2"},null,-1))],Hp={key:3,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},jp=[ye(()=>c.createElementVNode("path",{d:"M2.72479 21C2.54146 21 2.37479 20.9542 2.22479 20.8625C2.07479 20.7708 1.95812 20.65 1.87479 20.5C1.79146 20.35 1.74562 20.1875 1.73729 20.0125C1.72896 19.8375 1.77479 19.6667 1.87479 19.5L11.1248 3.5C11.2248 3.33333 11.354 3.20833 11.5123 3.125C11.6706 3.04167 11.8331 3 11.9998 3C12.1665 3 12.329 3.04167 12.4873 3.125C12.6456 3.20833 12.7748 3.33333 12.8748 3.5L22.1248 19.5C22.2248 19.6667 22.2706 19.8375 22.2623 20.0125C22.254 20.1875 22.2081 20.35 22.1248 20.5C22.0415 20.65 21.9248 20.7708 21.7748 20.8625C21.6248 20.9542 21.4581 21 21.2748 21H2.72479ZM4.44979 19H19.5498L11.9998 6L4.44979 19ZM11.9998 18C12.2831 18 12.5206 17.9042 12.7123 17.7125C12.904 17.5208 12.9998 17.2833 12.9998 17C12.9998 16.7167 12.904 16.4792 12.7123 16.2875C12.5206 16.0958 12.2831 16 11.9998 16C11.7165 16 11.479 16.0958 11.2873 16.2875C11.0956 16.4792 10.9998 16.7167 10.9998 17C10.9998 17.2833 11.0956 17.5208 11.2873 17.7125C11.479 17.9042 11.7165 18 11.9998 18ZM11.9998 15C12.2831 15 12.5206 14.9042 12.7123 14.7125C12.904 14.5208 12.9998 14.2833 12.9998 14V11C12.9998 10.7167 12.904 10.4792 12.7123 10.2875C12.5206 10.0958 12.2831 10 11.9998 10C11.7165 10 11.479 10.0958 11.2873 10.2875C11.0956 10.4792 10.9998 10.7167 10.9998 11V14C10.9998 14.2833 11.0956 14.5208 11.2873 14.7125C11.479 14.9042 11.7165 15 11.9998 15Z",fill:"#FF3B30"},null,-1))],Yp={key:4,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},Up=[ye(()=>c.createElementVNode("circle",{cx:"12",cy:"12",r:"11",stroke:"#C7C7CC","stroke-width":"2"},null,-1))],Xp={class:"flex flex-1 flex-col fm-pi-content-container gap-1 items-start justify-center p-0"},qp=c.defineComponent({__name:"FmProgressIndicator",props:{titleText:{type:String,required:!0},supportingText:{type:String,default:void 0},status:{type:String,default:"default"},orientation:{type:String,default:"horizontal"}},emits:["validate-step"],setup(n,{emit:t}){const e=n,i=c.computed(()=>a[e.status]),s=c.computed(()=>r[e.status]),o=c.computed(()=>l[e.orientation]),a={active:"text-fm-color-typo-primary",default:"text-fm-color-typo-secondary",error:"text-fm-color-typo-primary",completed:"text-fm-color-typo-primary",disabled:"text-fm-color-typo-disabled"},r={active:"bg-fm-color-primary",default:"bg-fm-color-neutral-gray-300",error:"bg-fm-color-neutral-gray-300",completed:"bg-fm-color-primary",disabled:"bg-fm-color-neutral-gray-300"},l={horizontal:"flex-col h-[18px] py-2 w-full",vertical:"h-[72px] px-2 w-[18px]"};return(d,h)=>{const f=c.resolveDirective("wave");return c.withDirectives((c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(`flex gap-1 fm-pi-item-container fm-pi-item-container--${n.orientation}`),onClick:h[0]||(h[0]=c.withModifiers(u=>t("validate-step"),["stop"]))},[c.createElementVNode("div",{class:c.normalizeClass(["gap-2 inline-flex items-start justify-start",o.value])},[c.createElementVNode("div",{class:c.normalizeClass(`self-stretch fm-pi-item-line fm-pi-item-line--${n.orientation} ${s.value} `)},null,2)],2),c.createElementVNode("div",Lp,[c.createElementVNode("div",null,[n.status==="default"?(c.openBlock(),c.createElementBlock("svg",$p,Np)):c.createCommentVNode("",!0),n.status==="active"?(c.openBlock(),c.createElementBlock("svg",Rp,Ip)):c.createCommentVNode("",!0),n.status==="completed"?(c.openBlock(),c.createElementBlock("svg",zp,Wp)):c.createCommentVNode("",!0),n.status==="error"?(c.openBlock(),c.createElementBlock("svg",Hp,jp)):c.createCommentVNode("",!0),n.status==="disabled"?(c.openBlock(),c.createElementBlock("svg",Yp,Up)):c.createCommentVNode("",!0)]),c.createElementVNode("div",Xp,[c.createElementVNode("span",{class:c.normalizeClass(["fm-typo-body-lg-400",i.value])},c.toDisplayString(n.titleText),3),c.createElementVNode("span",{class:c.normalizeClass(["fm-typo-body-sm-400 overflow-hidden text-ellipsis",n.status!=="disabled"?"text-fm-color-typo-secondary":"text-fm-color-typo-disabled"])},c.toDisplayString(n.supportingText),3)])])],2)),[[f]])}}}),Hg="",Ba=ot(qp,[["__scopeId","data-v-6b01e659"]]),Kp={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},Gp=["v-wave","disabled","onClick","onMousedown"],Zp=c.defineComponent({__name:"FmSegmentedButton",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=l=>{t("update:modelValue",l)},s=c.ref(null),o=l=>{s.value=l},a=l=>l.disabled||e.disabled,r=l=>JSON.stringify(l)===JSON.stringify(e.modelValue);return(l,d)=>(c.openBlock(),c.createElementBlock("div",Kp,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.items,(h,f)=>(c.openBlock(),c.createElementBlock("button",{key:f,"v-wave":a(h),class:c.normalizeClass(["border-r flex gap-8 grow hover:bg-fm-color-neutral-gray-200 items-center justify-center last:border-r-0 px-[11px] py-[7px]",{"bg-fm-color-system-warning-100 hover:bg-fm-color-system-warning-100":r(h),"hover:bg-fm-color-neutral-white cursor-not-allowed":a(h)}]),disabled:a(h),onClick:u=>i(h),onMousedown:u=>o(h),onMouseup:d[0]||(d[0]=u=>o(null)),onMouseleave:d[1]||(d[1]=u=>o(null))},[h.icon?(c.openBlock(),c.createBlock(W,{key:0,name:h.icon,size:"md",color:a(h)?"neutral-gray-200":r(h)?"primary":"",outline:JSON.stringify(s.value)!==JSON.stringify(h)&&!r(h)},null,8,["name","color","outline"])):c.createCommentVNode("",!0),h.label?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(["fm-typo-body-lg-700",[a(h)?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},c.toDisplayString(h.label),3)):c.createCommentVNode("",!0)],42,Gp))),128))]))}}),Jp={class:"flex"},Qp={key:0,class:"mt-8"},tm=c.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0}},emits:["onDismiss","onAction"],setup(n,{emit:t}){const e=n,i=c.computed(()=>{switch(e.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${e.variant}`)}}),s=c.computed(()=>e.title?{text:e.title,classes:"fm-typo-body-lg-700"}:{text:e.description,classes:""}),o=c.computed(()=>e.bgColor?Zn(e.bgColor)?{style:{backgroundColor:e.bgColor}}:{class:`bg-fm-color-${e.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),a=c.computed(()=>e.color?Zn(e.color)?{style:{color:e.color}}:{class:`text-fm-color-${e.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(r,l)=>(c.openBlock(),c.createElementBlock("div",c.mergeProps(o.value,{class:"fm-corner-radius-lg fm-snackbar px-24 py-16"}),[c.createElementVNode("div",Jp,[i.value.icon?(c.openBlock(),c.createBlock(W,{key:0,name:i.value.icon.name,color:e.color??i.value.icon.color,class:"mr-12"},null,8,["name","color"])):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(`${s.value.classes} grow ellipsis`)},c.toDisplayString(s.value.text),3),e.dismissable?(c.openBlock(),c.createBlock(W,{key:1,style:{"{ flex":"none}"},name:"close",class:"cursor-pointer",onClick:l[0]||(l[0]=()=>t("onDismiss"))})):c.createCommentVNode("",!0)]),e.title&&e.description?(c.openBlock(),c.createElementBlock("div",Qp,c.toDisplayString(e.description),1)):c.createCommentVNode("",!0),c.renderSlot(r.$slots,"actions",{},()=>[e.action?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0},a.value,{class:"mt-16 fm-typo-body-lg-700"}),[c.createElementVNode("span",{class:"cursor-pointer",onClick:l[1]||(l[1]=()=>t("onAction"))},c.toDisplayString(e.action),1)],16)):c.createCommentVNode("",!0)],!0)],16))}}),jg="",em=ot(tm,[["__scopeId","data-v-b6db34bb"]]),nm={},im={class:"flex-grow"};function sm(n,t){return c.openBlock(),c.createElementBlock("div",im)}const om=ot(nm,[["render",sm]]),am={class:"flex flex-col fm-time-input items-center"},rm=["value"],lm=c.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value","update:cycle"],setup(n,{emit:t}){const e=n,i=c.ref();function s(d){i.value&&(i.value.value=d)}c.watch(()=>e.modelValue,s);function o(){if(!i.value)return;const d=a(i.value.value);if(d==null||d>e.max||d<e.min){s(e.modelValue);return}t("update:model-value",d)}function a(d){return d&&/^\d+$/.test(d)?Number(d):null}function r(){t("update:model-value",a(e.modelValue)+1)}function l(){t("update:model-value",a(e.modelValue)-1)}return(d,h)=>(c.openBlock(),c.createElementBlock("div",am,[c.createElementVNode("div",{class:"fm-time-input__scroller",onClick:r},[c.createVNode(W,{name:"expand_less",size:"lg"})]),c.createElementVNode("input",{ref_key:"inputRef",ref:i,value:e.modelValue,onInput:o},null,40,rm),c.createElementVNode("div",{class:"fm-time-input__scroller",onClick:l},[c.createVNode(W,{name:"expand_more",size:"lg"})])]))}}),Yg="",Va=ot(lm,[["__scopeId","data-v-35e4eeb2"]]);var Tt=(n=>(n.AM="AM",n.PM="PM",n))(Tt||{});function Yt(n){return n.toString().padStart(2,"0")}const cm={class:"flex fm-time-input gap-16 items-center"},dm=c.createElementVNode("div",{class:"fm-typo-title-sm-700"}," : ",-1),hm={class:"fm-time-input-periods"},fm=["onClick"],Pa=c.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(n,{emit:t}){const e=n;function i(s){const o={hours:s.hours??e.modelValue.hours,minutes:s.minutes??e.modelValue.minutes,period:s.period??e.modelValue.period},a=e.modelValue.hours;(a===12&&o.hours===11||a===11&&o.hours===12)&&(o.period=e.modelValue.period===Tt.AM?Tt.PM:Tt.AM),o.hours>12?o.hours=1:o.hours<1&&(o.hours=12),o.minutes>59?o.minutes=0:o.minutes<0&&(o.minutes=59),t("update:model-value",o)}return(s,o)=>(c.openBlock(),c.createElementBlock("div",cm,[c.createVNode(Va,{"model-value":c.unref(Yt)(n.modelValue.hours),min:1,max:12,"onUpdate:modelValue":o[0]||(o[0]=a=>i({hours:a}))},null,8,["model-value"]),dm,c.createVNode(Va,{"model-value":c.unref(Yt)(n.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":o[1]||(o[1]=a=>i({minutes:a}))},null,8,["model-value"]),c.createElementVNode("div",hm,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(Tt),a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:c.normalizeClass([{"fm-time-input-period__selected":a===n.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:a})},c.toDisplayString(a),11,fm))),128))])]))}}),Ug="",um={class:"fm-time-picker"},pm={class:"flex gap-8"},mm={class:"flex flex-col",style:{width:"343px"}},gm=c.createElementVNode("div",{class:"fm-typo-body-xl-700 pt-12 px-12"}," Enter time ",-1),bm={class:"flex justify-center w-full"},ym={class:"flex justify-end pb-12"},_m=c.defineComponent({__name:"FmTimePicker",props:{modelValue:{type:[null,String],default:null}},emits:["update:model-value"],setup(n,{emit:t}){const e=n,i=c.ref(null),s=c.computed(()=>{if(!e.modelValue)return null;const{hours:p,minutes:m,period:g}=r(e.modelValue);return`${Yt(p)}:${Yt(m)} ${g}`});function o(){if(!i.value){t("update:model-value",null);return}const{hours:p,minutes:m,period:g}=i.value,b=a(p,m,g);t("update:model-value",b),h()}function a(p,m,g){let b=p;return g===Tt.PM?b=p===12?p:p+12:p===12&&(b=0),`${Yt(b)}:${Yt(m)}`}c.onMounted(()=>{e.modelValue&&(i.value=r(e.modelValue))}),c.watch(()=>e.modelValue,p=>{p&&(i.value=r(p))});function r(p){const[m,g,b]=l(p).split(":");return{hours:Number(m),minutes:Number(g),period:b}}function l(p){const[m,g]=p.split(":"),b=Number(m),y=Number(g),_=b>11?Tt.PM:Tt.AM;let w=b;return w===0?w=12:w>12&&(w-=12),`${Yt(w)}:${Yt(y)}:${_}`}const d=c.ref();function h(){var p;(p=d.value)==null||p.hide()}const f=c.ref(!1);function u(p){f.value=p}return(p,m)=>(c.openBlock(),c.createElementBlock("div",um,[c.createVNode(Wi,{ref_key:"dropdownRef",ref:d,onDropdownChanged:u},{"menu-button":c.withCtx(()=>[c.createVNode(Ca,null,{default:c.withCtx(()=>[c.createElementVNode("div",pm,[c.createVNode(W,{name:"schedule",outline:!f.value},null,8,["outline"]),c.createElementVNode("div",{class:c.normalizeClass(["grow",{"text-fm-color-typo-disabled":!s.value}])},c.toDisplayString(s.value??"HH:MM"),3)])]),_:1})]),"menu-content":c.withCtx(()=>[c.createElementVNode("div",mm,[gm,c.createElementVNode("div",bm,[c.createVNode(Pa,{"model-value":i.value??{hours:0,minutes:0,period:c.unref(Tt).AM},class:"py-16","onUpdate:modelValue":m[0]||(m[0]=g=>i.value=g)},null,8,["model-value"])]),c.createElementVNode("div",ym,[c.createVNode(Lt,{label:"Cancel",variant:"tertiary",onClick:h}),c.createVNode(Lt,{label:"Confirm",variant:"tertiary",onClick:o})])])]),_:1},512)]))}}),Xg="",Ke=Math.min,_e=Math.max,Wn=Math.round,Ut=n=>({x:n,y:n}),xm={left:"right",right:"left",bottom:"top",top:"bottom"},km={start:"end",end:"start"};function Hi(n,t,e){return _e(n,Ke(t,e))}function Ge(n,t){return typeof n=="function"?n(t):n}function le(n){return n.split("-")[0]}function Ze(n){return n.split("-")[1]}function Oa(n){return n==="x"?"y":"x"}function ji(n){return n==="y"?"height":"width"}function Hn(n){return["top","bottom"].includes(le(n))?"y":"x"}function Yi(n){return Oa(Hn(n))}function wm(n,t,e){e===void 0&&(e=!1);const i=Ze(n),s=Yi(n),o=ji(s);let a=s==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=jn(a)),[a,jn(a)]}function Cm(n){const t=jn(n);return[Ui(n),t,Ui(t)]}function Ui(n){return n.replace(/start|end/g,t=>km[t])}function Sm(n,t,e){const i=["left","right"],s=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(n){case"top":case"bottom":return e?t?s:i:t?i:s;case"left":case"right":return t?o:a;default:return[]}}function Mm(n,t,e,i){const s=Ze(n);let o=Sm(le(n),e==="start",i);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(Ui)))),o}function jn(n){return n.replace(/left|right|bottom|top/g,t=>xm[t])}function vm(n){return{top:0,right:0,bottom:0,left:0,...n}}function Ta(n){return typeof n!="number"?vm(n):{top:n,right:n,bottom:n,left:n}}function Yn(n){return{...n,top:n.y,left:n.x,right:n.x+n.width,bottom:n.y+n.height}}function Fa(n,t,e){let{reference:i,floating:s}=n;const o=Hn(t),a=Yi(t),r=ji(a),l=le(t),d=o==="y",h=i.x+i.width/2-s.width/2,f=i.y+i.height/2-s.height/2,u=i[r]/2-s[r]/2;let p;switch(l){case"top":p={x:h,y:i.y-s.height};break;case"bottom":p={x:h,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:f};break;case"left":p={x:i.x-s.width,y:f};break;default:p={x:i.x,y:i.y}}switch(Ze(t)){case"start":p[a]-=u*(e&&d?-1:1);break;case"end":p[a]+=u*(e&&d?-1:1);break}return p}const Dm=async(n,t,e)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:a}=e,r=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:n,floating:t,strategy:s}),{x:h,y:f}=Fa(d,i,l),u=i,p={},m=0;for(let g=0;g<r.length;g++){const{name:b,fn:y}=r[g],{x:_,y:w,data:x,reset:k}=await y({x:h,y:f,initialPlacement:i,placement:u,strategy:s,middlewareData:p,rects:d,platform:a,elements:{reference:n,floating:t}});if(h=_??h,f=w??f,p={...p,[b]:{...p[b],...x}},k&&m<=50){m++,typeof k=="object"&&(k.placement&&(u=k.placement),k.rects&&(d=k.rects===!0?await a.getElementRects({reference:n,floating:t,strategy:s}):k.rects),{x:h,y:f}=Fa(d,u,l)),g=-1;continue}}return{x:h,y:f,placement:u,strategy:s,middlewareData:p}};async function Aa(n,t){var e;t===void 0&&(t={});const{x:i,y:s,platform:o,rects:a,elements:r,strategy:l}=n,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:u=!1,padding:p=0}=Ge(t,n),m=Ta(p),b=r[u?f==="floating"?"reference":"floating":f],y=Yn(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(b)))==null||e?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(r.floating)),boundary:d,rootBoundary:h,strategy:l})),_=f==="floating"?{...a.floating,x:i,y:s}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(r.floating)),x=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},k=Yn(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:_,offsetParent:w,strategy:l}):_);return{top:(y.top-k.top+m.top)/x.y,bottom:(k.bottom-y.bottom+m.bottom)/x.y,left:(y.left-k.left+m.left)/x.x,right:(k.right-y.right+m.right)/x.x}}const Em=n=>({name:"arrow",options:n,async fn(t){const{x:e,y:i,placement:s,rects:o,platform:a,elements:r,middlewareData:l}=t,{element:d,padding:h=0}=Ge(n,t)||{};if(d==null)return{};const f=Ta(h),u={x:e,y:i},p=Yi(s),m=ji(p),g=await a.getDimensions(d),b=p==="y",y=b?"top":"left",_=b?"bottom":"right",w=b?"clientHeight":"clientWidth",x=o.reference[m]+o.reference[p]-u[p]-o.floating[m],k=u[p]-o.reference[p],M=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let v=M?M[w]:0;(!v||!await(a.isElement==null?void 0:a.isElement(M)))&&(v=r.floating[w]||o.floating[m]);const D=x/2-k/2,F=v/2-g[m]/2-1,T=Ke(f[y],F),P=Ke(f[_],F),L=T,X=v-g[m]-P,O=v/2-g[m]/2+D,S=Hi(L,O,X),C=!l.arrow&&Ze(s)!=null&&O!=S&&o.reference[m]/2-(O<L?T:P)-g[m]/2<0,E=C?O<L?O-L:O-X:0;return{[p]:u[p]+E,data:{[p]:S,centerOffset:O-S-E,...C&&{alignmentOffset:E}},reset:C}}}),Bm=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;const{placement:s,middlewareData:o,rects:a,initialPlacement:r,platform:l,elements:d}=t,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...b}=Ge(n,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};const y=le(s),_=le(r)===r,w=await(l.isRTL==null?void 0:l.isRTL(d.floating)),x=u||(_||!g?[jn(r)]:Cm(r));!u&&m!=="none"&&x.push(...Mm(r,g,m,w));const k=[r,...x],M=await Aa(t,b),v=[];let D=((i=o.flip)==null?void 0:i.overflows)||[];if(h&&v.push(M[y]),f){const L=wm(s,a,w);v.push(M[L[0]],M[L[1]])}if(D=[...D,{placement:s,overflows:v}],!v.every(L=>L<=0)){var F,T;const L=(((F=o.flip)==null?void 0:F.index)||0)+1,X=k[L];if(X)return{data:{index:L,overflows:D},reset:{placement:X}};let O=(T=D.filter(S=>S.overflows[0]<=0).sort((S,C)=>S.overflows[1]-C.overflows[1])[0])==null?void 0:T.placement;if(!O)switch(p){case"bestFit":{var P;const S=(P=D.map(C=>[C.placement,C.overflows.filter(E=>E>0).reduce((E,V)=>E+V,0)]).sort((C,E)=>C[1]-E[1])[0])==null?void 0:P[0];S&&(O=S);break}case"initialPlacement":O=r;break}if(s!==O)return{reset:{placement:O}}}return{}}}};async function Vm(n,t){const{placement:e,platform:i,elements:s}=n,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),a=le(e),r=Ze(e),l=Hn(e)==="y",d=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,f=Ge(t,n);let{mainAxis:u,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return r&&typeof m=="number"&&(p=r==="end"?m*-1:m),l?{x:p*h,y:u*d}:{x:u*d,y:p*h}}const Pm=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){const{x:e,y:i}=t,s=await Vm(t,n);return{x:e+s.x,y:i+s.y,data:s}}}},Om=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){const{x:e,y:i,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:r={fn:b=>{let{x:y,y:_}=b;return{x:y,y:_}}},...l}=Ge(n,t),d={x:e,y:i},h=await Aa(t,l),f=Hn(le(s)),u=Oa(f);let p=d[u],m=d[f];if(o){const b=u==="y"?"top":"left",y=u==="y"?"bottom":"right",_=p+h[b],w=p-h[y];p=Hi(_,p,w)}if(a){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",_=m+h[b],w=m-h[y];m=Hi(_,m,w)}const g=r.fn({...t,[u]:p,[f]:m});return{...g,data:{x:g.x-e,y:g.y-i}}}}};function Xt(n){return La(n)?(n.nodeName||"").toLowerCase():"#document"}function pt(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function qt(n){var t;return(t=(La(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function La(n){return n instanceof Node||n instanceof pt(n).Node}function Ft(n){return n instanceof Element||n instanceof pt(n).Element}function Ct(n){return n instanceof HTMLElement||n instanceof pt(n).HTMLElement}function $a(n){return typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof pt(n).ShadowRoot}function Je(n){const{overflow:t,overflowX:e,overflowY:i,display:s}=gt(n);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&!["inline","contents"].includes(s)}function Tm(n){return["table","td","th"].includes(Xt(n))}function Xi(n){const t=qi(),e=gt(n);return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(e.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(e.contain||"").includes(i))}function Fm(n){let t=xe(n);for(;Ct(t)&&!Un(t);){if(Xi(t))return t;t=xe(t)}return null}function qi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Un(n){return["html","body","#document"].includes(Xt(n))}function gt(n){return pt(n).getComputedStyle(n)}function Xn(n){return Ft(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function xe(n){if(Xt(n)==="html")return n;const t=n.assignedSlot||n.parentNode||$a(n)&&n.host||qt(n);return $a(t)?t.host:t}function Na(n){const t=xe(n);return Un(t)?n.ownerDocument?n.ownerDocument.body:n.body:Ct(t)&&Je(t)?t:Na(t)}function Ki(n,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);const s=Na(n),o=s===((i=n.ownerDocument)==null?void 0:i.body),a=pt(s);return o?t.concat(a,a.visualViewport||[],Je(s)?s:[],a.frameElement&&e?Ki(a.frameElement):[]):t.concat(s,Ki(s,[],e))}function Ra(n){const t=gt(n);let e=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=Ct(n),o=s?n.offsetWidth:e,a=s?n.offsetHeight:i,r=Wn(e)!==o||Wn(i)!==a;return r&&(e=o,i=a),{width:e,height:i,$:r}}function Ia(n){return Ft(n)?n:n.contextElement}function ke(n){const t=Ia(n);if(!Ct(t))return Ut(1);const e=t.getBoundingClientRect(),{width:i,height:s,$:o}=Ra(t);let a=(o?Wn(e.width):e.width)/i,r=(o?Wn(e.height):e.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!r||!Number.isFinite(r))&&(r=1),{x:a,y:r}}const Am=Ut(0);function za(n){const t=pt(n);return!qi()||!t.visualViewport?Am:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Lm(n,t,e){return t===void 0&&(t=!1),!e||t&&e!==pt(n)?!1:t}function Qe(n,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);const s=n.getBoundingClientRect(),o=Ia(n);let a=Ut(1);t&&(i?Ft(i)&&(a=ke(i)):a=ke(n));const r=Lm(o,e,i)?za(o):Ut(0);let l=(s.left+r.x)/a.x,d=(s.top+r.y)/a.y,h=s.width/a.x,f=s.height/a.y;if(o){const u=pt(o),p=i&&Ft(i)?pt(i):i;let m=u.frameElement;for(;m&&i&&p!==u;){const g=ke(m),b=m.getBoundingClientRect(),y=gt(m),_=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,w=b.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,d*=g.y,h*=g.x,f*=g.y,l+=_,d+=w,m=pt(m).frameElement}}return Yn({width:h,height:f,x:l,y:d})}function $m(n){let{rect:t,offsetParent:e,strategy:i}=n;const s=Ct(e),o=qt(e);if(e===o)return t;let a={scrollLeft:0,scrollTop:0},r=Ut(1);const l=Ut(0);if((s||!s&&i!=="fixed")&&((Xt(e)!=="body"||Je(o))&&(a=Xn(e)),Ct(e))){const d=Qe(e);r=ke(e),l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}return{width:t.width*r.x,height:t.height*r.y,x:t.x*r.x-a.scrollLeft*r.x+l.x,y:t.y*r.y-a.scrollTop*r.y+l.y}}function Nm(n){return Array.from(n.getClientRects())}function Wa(n){return Qe(qt(n)).left+Xn(n).scrollLeft}function Rm(n){const t=qt(n),e=Xn(n),i=n.ownerDocument.body,s=_e(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=_e(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-e.scrollLeft+Wa(n);const r=-e.scrollTop;return gt(i).direction==="rtl"&&(a+=_e(t.clientWidth,i.clientWidth)-s),{width:s,height:o,x:a,y:r}}function Im(n,t){const e=pt(n),i=qt(n),s=e.visualViewport;let o=i.clientWidth,a=i.clientHeight,r=0,l=0;if(s){o=s.width,a=s.height;const d=qi();(!d||d&&t==="fixed")&&(r=s.offsetLeft,l=s.offsetTop)}return{width:o,height:a,x:r,y:l}}function zm(n,t){const e=Qe(n,!0,t==="fixed"),i=e.top+n.clientTop,s=e.left+n.clientLeft,o=Ct(n)?ke(n):Ut(1),a=n.clientWidth*o.x,r=n.clientHeight*o.y,l=s*o.x,d=i*o.y;return{width:a,height:r,x:l,y:d}}function Ha(n,t,e){let i;if(t==="viewport")i=Im(n,e);else if(t==="document")i=Rm(qt(n));else if(Ft(t))i=zm(t,e);else{const s=za(n);i={...t,x:t.x-s.x,y:t.y-s.y}}return Yn(i)}function ja(n,t){const e=xe(n);return e===t||!Ft(e)||Un(e)?!1:gt(e).position==="fixed"||ja(e,t)}function Wm(n,t){const e=t.get(n);if(e)return e;let i=Ki(n,[],!1).filter(r=>Ft(r)&&Xt(r)!=="body"),s=null;const o=gt(n).position==="fixed";let a=o?xe(n):n;for(;Ft(a)&&!Un(a);){const r=gt(a),l=Xi(a);!l&&r.position==="fixed"&&(s=null),(o?!l&&!s:!l&&r.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Je(a)&&!l&&ja(n,a))?i=i.filter(h=>h!==a):s=r,a=xe(a)}return t.set(n,i),i}function Hm(n){let{element:t,boundary:e,rootBoundary:i,strategy:s}=n;const a=[...e==="clippingAncestors"?Wm(t,this._c):[].concat(e),i],r=a[0],l=a.reduce((d,h)=>{const f=Ha(t,h,s);return d.top=_e(f.top,d.top),d.right=Ke(f.right,d.right),d.bottom=Ke(f.bottom,d.bottom),d.left=_e(f.left,d.left),d},Ha(t,r,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function jm(n){return Ra(n)}function Ym(n,t,e){const i=Ct(t),s=qt(t),o=e==="fixed",a=Qe(n,!0,o,t);let r={scrollLeft:0,scrollTop:0};const l=Ut(0);if(i||!i&&!o)if((Xt(t)!=="body"||Je(s))&&(r=Xn(t)),i){const d=Qe(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&(l.x=Wa(s));return{x:a.left+r.scrollLeft-l.x,y:a.top+r.scrollTop-l.y,width:a.width,height:a.height}}function Ya(n,t){return!Ct(n)||gt(n).position==="fixed"?null:t?t(n):n.offsetParent}function Ua(n,t){const e=pt(n);if(!Ct(n))return e;let i=Ya(n,t);for(;i&&Tm(i)&>(i).position==="static";)i=Ya(i,t);return i&&(Xt(i)==="html"||Xt(i)==="body"&>(i).position==="static"&&!Xi(i))?e:i||Fm(n)||e}const Um=async function(n){let{reference:t,floating:e,strategy:i}=n;const s=this.getOffsetParent||Ua,o=this.getDimensions;return{reference:Ym(t,await s(e),i),floating:{x:0,y:0,...await o(e)}}};function Xm(n){return gt(n).direction==="rtl"}const qm={convertOffsetParentRelativeRectToViewportRelativeRect:$m,getDocumentElement:qt,getClippingRect:Hm,getOffsetParent:Ua,getElementRects:Um,getClientRects:Nm,getDimensions:jm,getScale:ke,isElement:Ft,isRTL:Xm},Km=(n,t,e)=>{const i=new Map,s={platform:qm,...e},o={...s.platform,_c:i};return Dm(n,t,{...s,platform:o})};function Gm(n){var t;return(t=n==null?void 0:n.$el)!=null?t:n}function Zm(n){return{name:"arrow",options:n,fn(t){const e=Gm(c.unref(n.element));return e==null?{}:Em({element:e,padding:n.padding}).fn(t)}}}const Jm={class:"px-2 py-0"},Qm={key:0,class:"fm-typo-body-xl-700"},tg={key:0,class:"content-start flex gap-0 px-2 py-0 self-stretch"},eg=c.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},beak:{default:"top"},hasArrow:{type:Boolean,default:!0},titleText:{default:"Title"},contentText:{},actionButtons:{}},setup(n){const t=n,e=c.ref(null),i=c.ref(null),s=c.ref(null),o=async()=>{var y,_,w,x;const{x:p,y:m,placement:g,middlewareData:b}=await Km(e.value,i.value,{placement:t.beak,middleware:[Pm(10),Bm(),Om({padding:5}),t.hasArrow?Zm({element:s.value,padding:10}):null]});if(Object.assign(i.value.style,{left:`${p}px`,top:`${m}px`}),t.hasArrow){const k={top:"bottom",right:"left",bottom:"top",left:"right"}[g.split("-")[0]];Object.assign(s.value.style,{left:((y=b.arrow)==null?void 0:y.x)!=null?`${(_=b.arrow)==null?void 0:_.x}px`:"",top:((w=b.arrow)==null?void 0:w.y)!=null?`${(x=b.arrow)==null?void 0:x.y}px`:"",right:"",bottom:"",background:t.variant==="rich"?"#FFF":"#1C1C1E",[k]:"-4px"})}},a=c.ref(!1),r=c.ref(0),l=c.ref(0),d=c.computed(()=>({...{plain:{color:"#FFF",background:"#1C1C1E",boxShadow:"0 2px 4px rgba(0, 0, 0, 0)"},rich:{background:"#FFF",boxShadow:"0px 8px 16px 0px rgba(199, 199, 204, 0.24)"}}[t.variant],display:a.value?"block":"none"})),h=()=>{clearTimeout(l.value),r.value=window.setTimeout(()=>{a.value=!0},500)},f=()=>{clearTimeout(r.value),l.value=window.setTimeout(()=>a.value=!1,1500)},u=()=>{clearTimeout(l.value),a.value=!0};return c.watchEffect(()=>{a.value?(o(),window.addEventListener("resize",o)):window.removeEventListener("resize",o)}),(p,m)=>(c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("div",{ref_key:"tooltipContainer",ref:e,class:"cursor-pointer flex items-center justify-center relative w-max",onMouseenter:h,onMouseleave:f},[c.renderSlot(p.$slots,"default")],544),c.createElementVNode("div",{ref_key:"tooltip",ref:i,class:"absolute box-border break-words left-0 max-w-xs px-4 py-3 rounded-2xl top-0 w-max whitespace-normal z-50",style:c.normalizeStyle(d.value),onMouseenter:u,onMouseleave:f},[c.createElementVNode("div",null,[c.createElementVNode("div",Jm,[p.variant=="rich"?(c.openBlock(),c.createElementBlock("div",Qm,c.toDisplayString(p.titleText),1)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(p.variant=="plain"?"fm-typo-body-sm-400":"fm-typo-body-md-400")},c.toDisplayString(p.contentText),3)]),p.variant=="rich"?(c.openBlock(),c.createElementBlock("div",tg,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(p.actionButtons,(g,b)=>(c.openBlock(),c.createElementBlock("div",{key:b},[c.createVNode(Lt,{variant:"tertiary",label:g.label,onClick:g.handler},null,8,["label","onClick"])]))),128))])):c.createCommentVNode("",!0)]),c.createElementVNode("div",{ref_key:"arrowEl",ref:s,class:"-rotate-45 absolute h-3 w-3"},null,512)],36)]))}}),Xa={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},ng=n=>"config"in n&&"globalProperties"in n.config,ig=n=>{let t;return n==="vue2"?t=!1:n==="vue3"?t=!0:t=ng(n),t?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},qa=n=>typeof n=="string"&&n!=="auto",Ka=(n,t)=>{n.dataset.vWaveBoundary=qa(t)?t:"true"},sg=({borderTopLeftRadius:n,borderTopRightRadius:t,borderBottomLeftRadius:e,borderBottomRightRadius:i},s)=>{const o=document.createElement(s);return o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.style.display="block",o.style.position="absolute",o.style.borderRadius=`${n} ${t} ${i} ${e}`,o.style.overflow="hidden",o.style.pointerEvents="none",o.style.webkitMaskImage="-webkit-radial-gradient(white, black)",o},og=(n,t,e,i)=>{const s=document.createElement("div");return s.style.position="absolute",s.style.width=`${e}px`,s.style.height=`${e}px`,s.style.top=`${t}px`,s.style.left=`${n}px`,s.style.background=i.color,s.style.borderRadius="50%",s.style.opacity=`${i.initialOpacity}`,s.style.transform="translate(-50%,-50%) scale(0)",s.style.transition=`transform ${i.duration}s ${i.easing}, opacity ${i.duration}s ${i.easing}`,s};function qn(n,t,e,i){const s=n-e,o=t-i;return Math.sqrt(s*s+o*o)}function ag(n,t,{width:e,height:i}){const s=qn(n,t,0,0),o=qn(n,t,e,0),a=qn(n,t,0,i),r=qn(n,t,e,i);return Math.max(s,o,a,r)}const rg=({x:n,y:t},{top:e,left:i})=>({x:n-i,y:t-e}),Gi="vWaveCountInternal";function lg(n){const t=Zi(n);Ga(n,t+1)}function cg(n){const t=Zi(n);Ga(n,t-1)}function Ga(n,t){n.dataset[Gi]=t.toString()}function Zi(n){var t;return parseInt((t=n.dataset[Gi])!==null&&t!==void 0?t:"0",10)}function dg(n){delete n.dataset[Gi]}const Ji=(n,t,e)=>{const i=t.getBoundingClientRect(),s=window.getComputedStyle(t),{x:o,y:a}=rg(n,i),r=2.05*ag(o,a,i),l=sg(s,e.tagName),d=og(o,a,r,e);lg(t);let h="";s.position==="static"&&(t.style.position&&(h=t.style.position),t.style.position="relative"),l.appendChild(d),t.appendChild(l);let f=!1;const u=b=>{typeof b<"u"&&(document.removeEventListener("pointerup",u),document.removeEventListener("pointercancel",u)),f?p():f=!0},p=()=>{d.style.transition=`opacity ${e.dissolveDuration}s linear`,d.style.opacity="0",setTimeout(()=>{l.remove(),cg(t),Zi(t)===0&&(dg(t),t.style.position=h)},e.dissolveDuration*1e3)};document.addEventListener("pointerup",u),document.addEventListener("pointercancel",u);const m=setTimeout(()=>{document.removeEventListener("pointercancel",g),requestAnimationFrame(()=>{d.style.transform="translate(-50%,-50%) scale(1)",d.style.opacity=`${e.finalOpacity}`,setTimeout(()=>u(),e.duration*1e3)})},e.cancellationPeriod),g=()=>{clearTimeout(m),l.remove(),document.removeEventListener("pointerup",u),document.removeEventListener("pointercancel",u),document.removeEventListener("pointercancel",g)};document.addEventListener("pointercancel",g)},tn=new WeakMap,Za=(n={},t="vue3")=>{const e=Object.assign(Object.assign({},Xa),n),i=ig(t),s=r=>{const l=r.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${l}"]`).forEach(h=>Ji(r,h,Object.assign(Object.assign({},e),tn.get(h))))},o={[i.mounted](r,{value:l={}}){var d;tn.set(r,l),Ka(r,(d=l&&l.trigger)!==null&&d!==void 0?d:e.trigger),r.addEventListener("pointerdown",h=>{if(tn.get(r)===!1)return;const f=Object.assign(Object.assign({},e),tn.get(r));if(f.trigger===!1)return Ji(h,r,f);if(qa(f.trigger))return;const u=r.querySelector('[data-v-wave-trigger="true"]');!u&&f.trigger===!0||u&&!h.composedPath().includes(u)||Ji(h,r,f)})},[i.updated](r,{value:l={}}){var d;tn.set(r,l),Ka(r,(d=l&&l.trigger)!==null&&d!==void 0?d:e.trigger)}},a={[i.mounted](r,{arg:l="true"}){r.dataset.vWaveTrigger=l,l!=="true"&&r.addEventListener("pointerdown",s)},[i.updated](r,{arg:l="true"}){r.dataset.vWaveTrigger=l,l==="true"?r.removeEventListener("pointerdown",s):r.addEventListener("pointerdown",s)}};return{wave:o,vWave:o,waveTrigger:a,vWaveTrigger:a}},hg={install(n,t={}){if(this.installed)return;this.installed=!0;const e=Object.assign(Object.assign({},Xa),t),{vWave:i,vWaveTrigger:s}=Za(e,n);n.directive(e.directive,i),n.directive(`${e.directive}-trigger`,s)},installed:!1,createLocalWaveDirective:Za},fg=n=>{n.use(hg,{})};N.FmBreadcrumb=er,N.FmButton=Lt,N.FmCard=ur,N.FmCardActions=pr,N.FmCardSection=mr,N.FmCardTitle=Qi,N.FmCheckbox=wa,N.FmDatePicker=Rf,N.FmDateRangePicker=Gf,N.FmDialog=Qf,N.FmField=Ca,N.FmForm=du,N.FmIcon=W,N.FmLineChart=Df,N.FmList=xp,N.FmListItem=wp,N.FmMenu=Wi,N.FmMenuItem=va,N.FmProgressIndicator=Ba,N.FmProgressIndicatorGroup=Ap,N.FmRadio=yu,N.FmRadioGroup=wu,N.FmSegmentedButton=Zp,N.FmSelect=Tu,N.FmSnackbar=em,N.FmSpacer=om,N.FmStepperField=ju,N.FmSwitch=ep,N.FmTextField=dp,N.FmTextarea=yp,N.FmTimeInput=Pa,N.FmTimePicker=_m,N.FmTooltip=eg,N.uiPlugin=fg,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|
|
25
|
+
`):n}function Yh(n,t){const{element:e,datasetIndex:i,index:s}=t,o=n.getDatasetMeta(i).controller,{label:a,value:r}=o.getLabelAndValue(s);return{chart:n,label:a,parsed:o.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:e}}function sa(n,t){const e=n.chart.ctx,{body:i,footer:s,title:o}=n,{boxWidth:a,boxHeight:r}=t,l=nt(t.bodyFont),d=nt(t.titleFont),h=nt(t.footerFont),f=o.length,u=s.length,p=i.length,m=rt(t.padding);let g=m.height,b=0,y=i.reduce((x,k)=>x+k.before.length+k.lines.length+k.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,f&&(g+=f*d.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),y){const x=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;g+=p*x+(y-p)*l.lineHeight+(y-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0;const w=function(x){b=Math.max(b,e.measureText(x).width+_)};return e.save(),e.font=d.string,j(n.title,w),e.font=l.string,j(n.beforeBody.concat(n.afterBody),w),_=t.displayColors?a+2+t.boxPadding:0,j(i,x=>{j(x.before,w),j(x.lines,w),j(x.after,w)}),_=0,e.font=h.string,j(n.footer,w),e.restore(),b+=m.width,{width:b,height:g}}function Uh(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function Xh(n,t,e,i){const{x:s,width:o}=i,a=e.caretSize+e.caretPadding;if(n==="left"&&s+o+a>t.width||n==="right"&&s-o-a<0)return!0}function qh(n,t,e,i){const{x:s,width:o}=e,{width:a,chartArea:{left:r,right:l}}=n;let d="center";return i==="center"?d=s<=(r+l)/2?"left":"right":s<=o/2?d="left":s>=a-o/2&&(d="right"),Xh(d,n,t,e)&&(d="center"),d}function oa(n,t,e){const i=e.yAlign||t.yAlign||Uh(n,e);return{xAlign:e.xAlign||t.xAlign||qh(n,t,e,i),yAlign:i}}function Kh(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Gh(n,t,e){let{y:i,height:s}=n;return t==="top"?i+=e:t==="bottom"?i-=s+e:i-=s/2,i}function aa(n,t,e,i){const{caretSize:s,caretPadding:o,cornerRadius:a}=n,{xAlign:r,yAlign:l}=e,d=s+o,{topLeft:h,topRight:f,bottomLeft:u,bottomRight:p}=ee(a);let m=Kh(t,r);const g=Gh(t,l,d);return l==="center"?r==="left"?m+=d:r==="right"&&(m-=d):r==="left"?m-=Math.max(h,u)+s:r==="right"&&(m+=Math.max(f,p)+s),{x:it(m,0,i.width-t.width),y:it(g,0,i.height-t.height)}}function Ln(n,t,e){const i=rt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function ra(n){return wt([],Ot(n))}function Zh(n,t,e){return Ht(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function la(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const ca={beforeTitle:Mt,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:Mt,beforeBody:Mt,beforeLabel:Mt,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return z(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.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(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Mt,afterBody:Mt,beforeFooter:Mt,footer:Mt,afterFooter:Mt};function ct(n,t,e,i){const s=n[t].call(e,i);return typeof s>"u"?ca[t].call(e,i):s}class Li extends Vt{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,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,o=new Zs(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Zh(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,s=ct(i,"beforeTitle",this,t),o=ct(i,"title",this,t),a=ct(i,"afterTitle",this,t);let r=[];return r=wt(r,Ot(s)),r=wt(r,Ot(o)),r=wt(r,Ot(a)),r}getBeforeBody(t,e){return ra(ct(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,s=[];return j(t,o=>{const a={before:[],lines:[],after:[]},r=la(i,o);wt(a.before,Ot(ct(r,"beforeLabel",this,o))),wt(a.lines,ct(r,"label",this,o)),wt(a.after,Ot(ct(r,"afterLabel",this,o))),s.push(a)}),s}getAfterBody(t,e){return ra(ct(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=ct(i,"beforeFooter",this,t),o=ct(i,"footer",this,t),a=ct(i,"afterFooter",this,t);let r=[];return r=wt(r,Ot(s)),r=wt(r,Ot(o)),r=wt(r,Ot(a)),r}_createItems(t){const e=this._active,i=this.chart.data,s=[],o=[],a=[];let r=[],l,d;for(l=0,d=e.length;l<d;++l)r.push(Yh(this.chart,e[l]));return t.filter&&(r=r.filter((h,f,u)=>t.filter(h,f,u,i))),t.itemSort&&(r=r.sort((h,f)=>t.itemSort(h,f,i))),j(r,h=>{const f=la(t.callbacks,h);s.push(ct(f,"labelColor",this,h)),o.push(ct(f,"labelPointStyle",this,h)),a.push(ct(f,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let o,a=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const r=Ye[i.position].call(this,s,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const l=this._size=sa(this,i),d=Object.assign({},r,l),h=oa(this.chart,i,d),f=aa(i,d,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const o=this.getCaretPosition(t,i,s);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:o}=this,{caretSize:a,cornerRadius:r}=i,{topLeft:l,topRight:d,bottomLeft:h,bottomRight:f}=ee(r),{x:u,y:p}=t,{width:m,height:g}=e;let b,y,_,w,x,k;return o==="center"?(x=p+g/2,s==="left"?(b=u,y=b-a,w=x+a,k=x-a):(b=u+m,y=b+a,w=x-a,k=x+a),_=b):(s==="left"?y=u+Math.max(l,h)+a:s==="right"?y=u+m-Math.max(d,f)-a:y=this.caretX,o==="top"?(w=p,x=w-a,b=y-a,_=y+a):(w=p+g,x=w+a,b=y+a,_=y-a),k=w),{x1:b,x2:y,x3:_,y1:w,y2:x,y3:k}}drawTitle(t,e,i){const s=this.title,o=s.length;let a,r,l;if(o){const d=ge(i.rtl,this.x,this.width);for(t.x=Ln(this,i.titleAlign,i),e.textAlign=d.textAlign(i.titleAlign),e.textBaseline="middle",a=nt(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(s[l],d.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,s,o){const a=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:l,boxWidth:d}=o,h=nt(o.bodyFont),f=Ln(this,"left",o),u=s.x(f),p=l<h.lineHeight?(h.lineHeight-l)/2:0,m=e.y+p;if(o.usePointStyle){const g={radius:Math.min(d,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},b=s.leftForLtr(u,d)+d/2,y=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,fi(t,g,b,y),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,fi(t,g,b,y)}else{t.lineWidth=I(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 g=s.leftForLtr(u,d),b=s.leftForLtr(s.xPlus(u,1),d-2),y=ee(a.borderRadius);Object.values(y).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Te(t,{x:g,y:m,w:d,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Te(t,{x:b,y:m+1,w:d-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,m,d,l),t.strokeRect(g,m,d,l),t.fillStyle=a.backgroundColor,t.fillRect(b,m+1,d-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:d,boxPadding:h}=i,f=nt(i.bodyFont);let u=f.lineHeight,p=0;const m=ge(i.rtl,this.x,this.width),g=function(D){e.fillText(D,m.x(t.x+p),t.y+u/2),t.y+=u+o},b=m.textAlign(a);let y,_,w,x,k,M,v;for(e.textAlign=a,e.textBaseline="middle",e.font=f.string,t.x=Ln(this,b,i),e.fillStyle=i.bodyColor,j(this.beforeBody,g),p=r&&b!=="right"?a==="center"?d/2+h:d+2+h:0,x=0,M=s.length;x<M;++x){for(y=s[x],_=this.labelTextColors[x],e.fillStyle=_,j(y.before,g),w=y.lines,r&&w.length&&(this._drawColorBox(e,t,x,m,i),u=Math.max(f.lineHeight,l)),k=0,v=w.length;k<v;++k)g(w[k]),u=f.lineHeight;j(y.after,g)}p=0,u=f.lineHeight,j(this.afterBody,g),t.y-=o}drawFooter(t,e,i){const s=this.footer,o=s.length;let a,r;if(o){const l=ge(i.rtl,this.x,this.width);for(t.x=Ln(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=nt(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(s[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:d,height:h}=i,{topLeft:f,topRight:u,bottomLeft:p,bottomRight:m}=ee(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(r+f,l),a==="top"&&this.drawCaret(t,e,i,s),e.lineTo(r+d-u,l),e.quadraticCurveTo(r+d,l,r+d,l+u),a==="center"&&o==="right"&&this.drawCaret(t,e,i,s),e.lineTo(r+d,l+h-m),e.quadraticCurveTo(r+d,l+h,r+d-m,l+h),a==="bottom"&&this.drawCaret(t,e,i,s),e.lineTo(r+p,l+h),e.quadraticCurveTo(r,l+h,r,l+h-p),a==="center"&&o==="left"&&this.drawCaret(t,e,i,s),e.lineTo(r,l+f),e.quadraticCurveTo(r,l,r+f,l),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,o=i&&i.y;if(s||o){const a=Ye[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=sa(this,t),l=Object.assign({},a,this._size),d=oa(e,t,l),h=aa(t,l,d,e);(s._to!==h.x||o._to!==h.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=rt(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,s,e),Ws(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Hs(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map(({datasetIndex:r,index:l})=>{const d=this.chart.getDatasetMeta(r);if(!d)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:d.data[l],index:l}}),o=!rn(i,s),a=this._positionChanged(s,e);(o||a)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,i),r=this._positionChanged(a,t),l=e||!rn(a,o)||r;return l&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return e;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:i,caretY:s,options:o}=this,a=Ye[o.position].call(this,t,e);return a!==!1&&(i!==a.x||s!==a.y)}}B(Li,"positioners",Ye);var Jh={id:"tooltip",_element:Li,positioners:Ye,afterInit(n,t,e){e&&(n.tooltip=new Li({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.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:(n,t)=>t.bodyFont.size,boxWidth:(n,t)=>t.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:ca},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Qh=Object.freeze({__proto__:null,Colors:hh,Decimation:mh,Filler:Ah,Legend:zh,SubTitle:jh,Title:Hh,Tooltip:Jh});const tf=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function ef(n,t,e,i){const s=n.indexOf(t);if(s===-1)return tf(n,t,e,i);const o=n.lastIndexOf(t);return s!==o?e:s}const nf=(n,t)=>n===null?null:it(Math.round(n),0,t);function da(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class $i extends re{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:s,label:o}of e)i[s]===o&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(z(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:ef(i,t,R(e,t),this._addedLabels),nf(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let a=t;a<=e;a++)s.push({value:a});return s}getLabelForValue(t){return da.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?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}}B($i,"id","category"),B($i,"defaults",{ticks:{callback:da}});function sf(n,t){const e=[],{bounds:s,step:o,min:a,max:r,precision:l,count:d,maxTicks:h,maxDigits:f,includeBounds:u}=n,p=o||1,m=h-1,{min:g,max:b}=t,y=!z(a),_=!z(r),w=!z(d),x=(b-g)/(f+1);let k=fs((b-g)/m/p)*p,M,v,D,F;if(k<1e-14&&!y&&!_)return[{value:g},{value:b}];F=Math.ceil(b/k)-Math.floor(g/k),F>m&&(k=fs(F*k/m/p)*p),z(l)||(M=Math.pow(10,l),k=Math.ceil(k*M)/M),s==="ticks"?(v=Math.floor(g/k)*k,D=Math.ceil(b/k)*k):(v=g,D=b),y&&_&&o&&Zr((r-a)/o,k/1e3)?(F=Math.round(Math.min((r-a)/k,h)),k=(r-a)/F,v=a,D=r):w?(v=y?a:v,D=_?r:D,F=d-1,k=(D-v)/F):(F=(D-v)/k,Ee(F,Math.round(F),k/1e3)?F=Math.round(F):F=Math.ceil(F));const T=Math.max(ps(k),ps(v));M=Math.pow(10,z(l)?T:l),v=Math.round(v*M)/M,D=Math.round(D*M)/M;let P=0;for(y&&(u&&v!==a?(e.push({value:a}),v<a&&P++,Ee(Math.round((v+P*k)*M)/M,a,ha(a,x,n))&&P++):v<a&&P++);P<F;++P){const L=Math.round((v+P*k)*M)/M;if(_&&L>r)break;e.push({value:L})}return _&&u&&D!==r?e.length&&Ee(e[e.length-1].value,r,ha(r,x,n))?e[e.length-1].value=r:e.push({value:r}):(!_||D===r)&&e.push({value:D}),e}function ha(n,t,{horizontal:e,minRotation:i}){const s=yt(i),o=(e?Math.sin(s):Math.cos(s))||.001,a=.75*t*(""+n).length;return Math.min(t/o,a)}class $n extends re{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 z(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:o}=this;const a=l=>s=e?s:l,r=l=>o=i?o:l;if(t){const l=xt(s),d=xt(o);l<0&&d<0?r(0):l>0&&d>0&&a(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,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:e.includeBounds!==!1},o=this._range||this,a=sf(s,o);return t.bounds==="ticks"&&us(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Pe(t,this.chart.options.locale,this.options.ticks.format)}}class Ni extends $n{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=J(t)?t:0,this.max=J(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=yt(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}B(Ni,"id","linear"),B(Ni,"defaults",{ticks:{callback:hn.formatters.numeric}});const Ue=n=>Math.floor(Wt(n)),le=(n,t)=>Math.pow(10,Ue(n)+t);function fa(n){return n/Math.pow(10,Ue(n))===1}function ua(n,t,e){const i=Math.pow(10,e),s=Math.floor(n/i);return Math.ceil(t/i)-s}function of(n,t){const e=t-n;let i=Ue(e);for(;ua(n,t,i)>10;)i++;for(;ua(n,t,i)<10;)i--;return Math.min(i,Ue(n))}function af(n,{min:t,max:e}){t=ft(n.min,t);const i=[],s=Ue(t);let o=of(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),l=s>o?Math.pow(10,s):0,d=Math.round((t-l)*a)/a,h=Math.floor((t-l)/r/10)*r*10;let f=Math.floor((d-h)/Math.pow(10,o)),u=ft(n.min,Math.round((l+h+f*Math.pow(10,o))*a)/a);for(;u<e;)i.push({value:u,major:fa(u),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,a=o>=0?1:a),u=Math.round((l+h+f*Math.pow(10,o))*a)/a;const p=ft(n.max,u);return i.push({value:p,major:fa(p),significand:f}),i}class Ri extends re{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=$n.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return J(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=J(t)?Math.max(0,t):null,this.max=J(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!J(this._userMin)&&(this.min=t===le(this.min,0)?le(this.min,-1):le(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const o=r=>i=t?i:r,a=r=>s=e?s:r;i===s&&(i<=0?(o(1),a(10)):(o(le(i,-1)),a(le(s,1)))),i<=0&&o(le(s,-1)),s<=0&&a(le(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=af(e,this);return t.bounds==="ticks"&&us(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Pe(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Wt(t),this._valueRange=Wt(this.max)-Wt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Wt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}B(Ri,"id","logarithmic"),B(Ri,"defaults",{ticks:{callback:hn.formatters.logarithmic,major:{enabled:!0}}});function Ii(n){const t=n.ticks;if(t.display&&n.display){const e=rt(t.backdropPadding);return R(t.font&&t.font.size,Q.font.size)+e.height}return 0}function rf(n,t,e){return e=q(e)?e:[e],{w:pl(n,t.string,e),h:e.length*t.lineHeight}}function pa(n,t,e,i,s){return n===i||n===s?{start:t-e/2,end:t+e/2}:n<i||n>s?{start:t-e,end:t}:{start:t,end:t+e}}function lf(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],s=[],o=n._pointLabels.length,a=n.options.pointLabels,r=a.centerPointLabels?K/o:0;for(let l=0;l<o;l++){const d=a.setContext(n.getPointLabelContext(l));s[l]=d.padding;const h=n.getPointPosition(l,n.drawingArea+s[l],r),f=nt(d.font),u=rf(n.ctx,f,n._pointLabels[l]);i[l]=u;const p=ut(n.getIndexAngle(l)+r),m=Math.round(si(p)),g=pa(m,h.x,u.w,0,180),b=pa(m,h.y,u.h,90,270);cf(e,t,p,g,b)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=ff(n,i,s)}function cf(n,t,e,i,s){const o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let r=0,l=0;i.start<t.l?(r=(t.l-i.start)/o,n.l=Math.min(n.l,t.l-r)):i.end>t.r&&(r=(i.end-t.r)/o,n.r=Math.max(n.r,t.r+r)),s.start<t.t?(l=(t.t-s.start)/a,n.t=Math.min(n.t,t.t-l)):s.end>t.b&&(l=(s.end-t.b)/a,n.b=Math.max(n.b,t.b+l))}function df(n,t,e){const i=n.drawingArea,{extra:s,additionalAngle:o,padding:a,size:r}=e,l=n.getPointPosition(t,i+s+a,o),d=Math.round(si(ut(l.angle+et))),h=mf(l.y,r.h,d),f=uf(d),u=pf(l.x,r.w,f);return{visible:!0,x:l.x,y:h,textAlign:f,left:u,top:h,right:u+r.w,bottom:h+r.h}}function hf(n,t){if(!t)return!0;const{left:e,top:i,right:s,bottom:o}=n;return!(Et({x:e,y:i},t)||Et({x:e,y:o},t)||Et({x:s,y:i},t)||Et({x:s,y:o},t))}function ff(n,t,e){const i=[],s=n._pointLabels.length,o=n.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:Ii(o)/2,additionalAngle:a?K/s:0};let d;for(let h=0;h<s;h++){l.padding=e[h],l.size=t[h];const f=df(n,h,l);i.push(f),r==="auto"&&(f.visible=hf(f,d),f.visible&&(d=f))}return i}function uf(n){return n===0||n===180?"center":n<180?"left":"right"}function pf(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function mf(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function gf(n,t,e){const{left:i,top:s,right:o,bottom:a}=e,{backdropColor:r}=t;if(!z(r)){const l=ee(t.borderRadius),d=rt(t.backdropPadding);n.fillStyle=r;const h=i-d.left,f=s-d.top,u=o-i+d.width,p=a-s+d.height;Object.values(l).some(m=>m!==0)?(n.beginPath(),Te(n,{x:h,y:f,w:u,h:p,radius:l}),n.fill()):n.fillRect(h,f,u,p)}}function bf(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let s=t-1;s>=0;s--){const o=n._pointLabelItems[s];if(!o.visible)continue;const a=i.setContext(n.getPointLabelContext(s));gf(e,a,o);const r=nt(a.font),{x:l,y:d,textAlign:h}=o;te(e,n._pointLabels[s],l,d+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function ma(n,t,e,i){const{ctx:s}=n;if(e)s.arc(n.xCenter,n.yCenter,t,0,G);else{let o=n.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let a=1;a<i;a++)o=n.getPointPosition(a,t),s.lineTo(o.x,o.y)}}function yf(n,t,e,i,s){const o=n.ctx,a=t.circular,{color:r,lineWidth:l}=t;!a&&!i||!r||!l||e<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),ma(n,e,a,i),o.closePath(),o.stroke(),o.restore())}function _f(n,t,e){return Ht(n,{label:e,index:t,type:"pointLabel"})}class Xe extends $n{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=rt(Ii(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=J(t)&&!isNaN(t)?t:0,this.max=J(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ii(this.options))}generateTickLabels(t){$n.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const s=U(this.options.pointLabels.callback,[e,i],this);return s||s===0?s:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?lf(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){const e=G/(this._pointLabels.length||1),i=this.options.startAngle||0;return ut(t*e+yt(i))}getDistanceFromCenterForValue(t){if(z(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(z(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 i=e[t];return _f(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const s=this.getIndexAngle(t)-et+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}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:i,right:s,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),ma(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:s,border:o}=e,a=this._pointLabels.length;let r,l,d;if(e.pointLabels.display&&bf(this,a),s.display&&this.ticks.forEach((h,f)=>{if(f!==0){l=this.getDistanceFromCenterForValue(h.value);const u=this.getContext(f),p=s.setContext(u),m=o.setContext(u);yf(this,p,l,a,m)}}),i.display){for(t.save(),r=a-1;r>=0;r--){const h=i.setContext(this.getPointLabelContext(r)),{color:f,lineWidth:u}=h;!u||!f||(t.lineWidth=u,t.strokeStyle=f,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),d=this.getPointPosition(r,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(d.x,d.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;const d=i.setContext(this.getContext(l)),h=nt(d.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),d.showLabelBackdrop){t.font=h.string,a=t.measureText(r.label).width,t.fillStyle=d.backdropColor;const f=rt(d.backdropPadding);t.fillRect(-a/2-f.left,-o-h.size/2-f.top,a+f.width,h.size+f.height)}te(t,r.label,0,-o,h,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),t.restore()}drawTitle(){}}B(Xe,"id","radialLinear"),B(Xe,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:hn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),B(Xe,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),B(Xe,"descriptors",{angleLines:{_fallback:"grid"}});const Nn={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}},dt=Object.keys(Nn);function ga(n,t){return n-t}function ba(n,t){if(z(t))return null;const e=n._adapter,{parser:i,round:s,isoWeekday:o}=n._parseOpts;let a=t;return typeof i=="function"&&(a=i(a)),J(a)||(a=typeof i=="string"?e.parse(a,i):e.parse(a)),a===null?null:(s&&(a=s==="week"&&(ue(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,s)),+a)}function ya(n,t,e,i){const s=dt.length;for(let o=dt.indexOf(n);o<s-1;++o){const a=Nn[dt[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(r*a.size))<=i)return dt[o]}return dt[s-1]}function xf(n,t,e,i,s){for(let o=dt.length-1;o>=dt.indexOf(e);o--){const a=dt[o];if(Nn[a].common&&n._adapter.diff(s,i,a)>=t-1)return a}return dt[e?dt.indexOf(e):0]}function kf(n){for(let t=dt.indexOf(n)+1,e=dt.length;t<e;++t)if(Nn[dt[t]].common)return dt[t]}function _a(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:s}=ai(e,t),o=e[i]>=t?e[i]:e[s];n[o]=!0}}function wf(n,t,e,i){const s=n._adapter,o=+s.startOf(t[0].value,i),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+s.add(r,1,i))l=e[r],l>=0&&(t[l].major=!0);return t}function xa(n,t,e){const i=[],s={},o=t.length;let a,r;for(a=0;a<o;++a)r=t[a],s[r]=a,i.push({value:r,major:!1});return o===0||!e?i:wf(n,i,s,e)}class qe extends re{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 i=t.time||(t.time={}),s=this._adapter=new Vc._date(t.adapters.date);s.init(e),ve(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:ba(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(d){!a&&!isNaN(d.min)&&(s=Math.min(s,d.min)),!r&&!isNaN(d.max)&&(o=Math.max(o,d.max))}(!a||!r)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=J(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),o=J(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,a=this.max,r=el(s,o,a);return this._unit=e.unit||(i.autoSkip?ya(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):xf(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:kf(this._unit),this.initOffsets(s),t.reverse&&r.reverse(),xa(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=it(e,0,a),i=it(i,0,a),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,o=s.time,a=o.unit||ya(o.minUnit,e,i,this._getLabelCapacity(e)),r=R(s.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,d=ue(l)||l===!0,h={};let f=e,u,p;if(d&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,d?"day":a),t.diff(i,e,a)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+a);const m=s.ticks.source==="data"&&this.getDataTimestamps();for(u=f,p=0;u<i;u=+t.add(u,r,a),p++)_a(h,u,m);return(u===i||s.bounds==="ticks"||p===1)&&_a(h,u,m),Object.keys(h).sort(ga).map(g=>+g)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const s=this.options.time.displayFormats,o=this._unit,a=e||s[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,s){const o=this.options,a=o.ticks.callback;if(a)return U(a,[t,e,i],this);const r=o.time.displayFormats,l=this._unit,d=this._majorUnit,h=l&&r[l],f=d&&r[d],u=i[e],p=d&&f&&u&&u.major;return this._adapter.format(t,s||(p?f:h))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,s=yt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(s),a=Math.sin(s),r=this._resolveTickFontOptions(0).size;return{w:i*o+r*a,h:i*a+r*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,xa(this,[t],this._majorUnit),s),a=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,i=s.length;e<i;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(ba(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ys(t.sort(ga))}}B(qe,"id","time"),B(qe,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Rn(n,t,e){let i=0,s=n.length-1,o,a,r,l;e?(t>=n[i].pos&&t<=n[s].pos&&({lo:i,hi:s}=Dt(n,"pos",t)),{pos:o,time:r}=n[i],{pos:a,time:l}=n[s]):(t>=n[i].time&&t<=n[s].time&&({lo:i,hi:s}=Dt(n,"time",t)),{time:o,pos:r}=n[i],{time:a,pos:l}=n[s]);const d=a-o;return d?r+(l-r)*(t-o)/d:r}class zi extends qe{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=Rn(e,this.min),this._tableRange=Rn(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],o=[];let a,r,l,d,h;for(a=0,r=t.length;a<r;++a)d=t[a],d>=e&&d<=i&&s.push(d);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,r=s.length;a<r;++a)h=s[a+1],l=s[a-1],d=s[a],Math.round((h+l)/2)!==d&&o.push({time:d,pos:a/(r-1)});return o}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Rn(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Rn(this._table,i*this._tableRange+this._minPos,!0)}}B(zi,"id","timeseries"),B(zi,"defaults",qe.defaults);var Cf=Object.freeze({__proto__:null,CategoryScale:$i,LinearScale:Ni,LogarithmicScale:Ri,RadialLinearScale:Xe,TimeScale:qe,TimeSeriesScale:zi});const Sf=[Bc,oh,Qh,Cf];Pt.register(...Sf);const Mf={class:"px-24 py-16"},vf={class:"flex flex-col gap-8"},Df={class:"fm-color-typo-primary fm-typo-body-lg-400"},Ef={class:"fm-color-typo-secondary fm-typo-body-md-400"},Bf={class:"px-6"},Vf=c.defineComponent({__name:"FmLine",props:{name:{},paragraph:{},datasets:{},xAxis:{}},setup(n){const t=n,e=c.ref(null);let i=null;c.watch([()=>t.xAxis,()=>t.datasets],()=>{i&&(i.data.datasets=t.datasets,i.data.labels=t.xAxis.categories,i.update())});function s(d,h){const f=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(d);if(f)return`rgba(${parseInt(f[1],16)},${parseInt(f[2],16)},${parseInt(f[3],16)},${h})`;if(d.startsWith("rgb")){const u=d.split(",");if(u.length===3)return[...u.slice(0,2),u[2].replace(")",`,${h})`)].join(",");if(u.length===4)return[...u.slice(0,3),`${h})`].join(",")}return""}function o(d){const h=getComputedStyle(document.documentElement).getPropertyValue(`--${d}`)||d;return h.startsWith("rgb")||h.startsWith("#")?h:null}function a({context:d,color:h}){const{ctx:f,chartArea:u}=d.chart;if(!u)return;const p=f==null?void 0:f.createLinearGradient(0,0,0,u.height);return p.addColorStop(0,s(h,.5)),p.addColorStop(1,s(h,0)),p}const r=c.computed(()=>({labels:t.xAxis.categories,datasets:t.datasets.map(d=>{const h=o(d.color)??"";return{...d,backgroundColor:h?f=>a({context:f,color:h}):"",borderColor:h,borderDash:d.dash?[5,5]:void 0,tension:.1}})}));function l(){e.value&&(i=new Pt(e.value,{type:"line",data:r.value,options:{plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},beginAtZero:!0},y:{grid:{display:!0},beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return c.onMounted(()=>{l()}),(d,h)=>(c.openBlock(),c.createElementBlock("div",Mf,[c.createElementVNode("div",vf,[c.createElementVNode("div",Df,c.toDisplayString(d.name),1),c.createElementVNode("div",Ef,c.toDisplayString(d.paragraph),1)]),c.createElementVNode("div",Bf,[c.createElementVNode("canvas",{ref_key:"canvas",ref:e},null,512)])]))}});var Pf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Of(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ka={exports:{}};(function(n,t){(function(e,i){n.exports=i()})(Pf,function(){var e=1e3,i=6e4,s=36e5,o="millisecond",a="second",r="minute",l="hour",d="day",h="week",f="month",u="quarter",p="year",m="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var S=["th","st","nd","rd"],C=O%100;return"["+O+(S[(C-20)%10]||S[C]||S[0])+"]"}},w=function(O,S,C){var E=String(O);return!E||E.length>=S?O:""+Array(S+1-E.length).join(C)+O},x={s:w,z:function(O){var S=-O.utcOffset(),C=Math.abs(S),E=Math.floor(C/60),V=C%60;return(S<=0?"+":"-")+w(E,2,"0")+":"+w(V,2,"0")},m:function O(S,C){if(S.date()<C.date())return-O(C,S);var E=12*(C.year()-S.year())+(C.month()-S.month()),V=S.clone().add(E,f),A=C-V<0,$=S.clone().add(E+(A?-1:1),f);return+(-(E+(C-V)/(A?V-$:$-V))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:f,y:p,w:h,d,D:m,h:l,m:r,s:a,ms:o,Q:u}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},k="en",M={};M[k]=_;var v="$isDayjsObject",D=function(O){return O instanceof L||!(!O||!O[v])},F=function O(S,C,E){var V;if(!S)return k;if(typeof S=="string"){var A=S.toLowerCase();M[A]&&(V=A),C&&(M[A]=C,V=A);var $=S.split("-");if(!V&&$.length>1)return O($[0])}else{var H=S.name;M[H]=S,V=H}return!E&&V&&(k=V),V||!E&&k},T=function(O,S){if(D(O))return O.clone();var C=typeof S=="object"?S:{};return C.date=O,C.args=arguments,new L(C)},P=x;P.l=F,P.i=D,P.w=function(O,S){return T(O,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var L=function(){function O(C){this.$L=F(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[v]=!0}var S=O.prototype;return S.parse=function(C){this.$d=function(E){var V=E.date,A=E.utc;if(V===null)return new Date(NaN);if(P.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var $=V.match(b);if($){var H=$[2]-1||0,Y=($[7]||"0").substring(0,3);return A?new Date(Date.UTC($[1],H,$[3]||1,$[4]||0,$[5]||0,$[6]||0,Y)):new Date($[1],H,$[3]||1,$[4]||0,$[5]||0,$[6]||0,Y)}}return new Date(V)}(C),this.init()},S.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},S.$utils=function(){return P},S.isValid=function(){return this.$d.toString()!==g},S.isSame=function(C,E){var V=T(C);return this.startOf(E)<=V&&V<=this.endOf(E)},S.isAfter=function(C,E){return T(C)<this.startOf(E)},S.isBefore=function(C,E){return this.endOf(E)<T(C)},S.$g=function(C,E,V){return P.u(C)?this[E]:this.set(V,C)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(C,E){var V=this,A=!!P.u(E)||E,$=P.p(C),H=function(he,ht){var Gt=P.w(V.$u?Date.UTC(V.$y,ht,he):new Date(V.$y,ht,he),V);return A?Gt:Gt.endOf(d)},Y=function(he,ht){return P.w(V.toDate()[he].apply(V.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ht)),V)},Z=this.$W,tt=this.$M,st=this.$D,bt="set"+(this.$u?"UTC":"");switch($){case p:return A?H(1,0):H(31,11);case f:return A?H(1,tt):H(0,tt+1);case h:var de=this.$locale().weekStart||0,en=(Z<de?Z+7:Z)-de;return H(A?st-en:st+(6-en),tt);case d:case m:return Y(bt+"Hours",0);case l:return Y(bt+"Minutes",1);case r:return Y(bt+"Seconds",2);case a:return Y(bt+"Milliseconds",3);default:return this.clone()}},S.endOf=function(C){return this.startOf(C,!1)},S.$set=function(C,E){var V,A=P.p(C),$="set"+(this.$u?"UTC":""),H=(V={},V[d]=$+"Date",V[m]=$+"Date",V[f]=$+"Month",V[p]=$+"FullYear",V[l]=$+"Hours",V[r]=$+"Minutes",V[a]=$+"Seconds",V[o]=$+"Milliseconds",V)[A],Y=A===d?this.$D+(E-this.$W):E;if(A===f||A===p){var Z=this.clone().set(m,1);Z.$d[H](Y),Z.init(),this.$d=Z.set(m,Math.min(this.$D,Z.daysInMonth())).$d}else H&&this.$d[H](Y);return this.init(),this},S.set=function(C,E){return this.clone().$set(C,E)},S.get=function(C){return this[P.p(C)]()},S.add=function(C,E){var V,A=this;C=Number(C);var $=P.p(E),H=function(tt){var st=T(A);return P.w(st.date(st.date()+Math.round(tt*C)),A)};if($===f)return this.set(f,this.$M+C);if($===p)return this.set(p,this.$y+C);if($===d)return H(1);if($===h)return H(7);var Y=(V={},V[r]=i,V[l]=s,V[a]=e,V)[$]||1,Z=this.$d.getTime()+C*Y;return P.w(Z,this)},S.subtract=function(C,E){return this.add(-1*C,E)},S.format=function(C){var E=this,V=this.$locale();if(!this.isValid())return V.invalidDate||g;var A=C||"YYYY-MM-DDTHH:mm:ssZ",$=P.z(this),H=this.$H,Y=this.$m,Z=this.$M,tt=V.weekdays,st=V.months,bt=V.meridiem,de=function(ht,Gt,nn,Gn){return ht&&(ht[Gt]||ht(E,A))||nn[Gt].slice(0,Gn)},en=function(ht){return P.s(H%12||12,ht,"0")},he=bt||function(ht,Gt,nn){var Gn=ht<12?"AM":"PM";return nn?Gn.toLowerCase():Gn};return A.replace(y,function(ht,Gt){return Gt||function(nn){switch(nn){case"YY":return String(E.$y).slice(-2);case"YYYY":return P.s(E.$y,4,"0");case"M":return Z+1;case"MM":return P.s(Z+1,2,"0");case"MMM":return de(V.monthsShort,Z,st,3);case"MMMM":return de(st,Z);case"D":return E.$D;case"DD":return P.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return de(V.weekdaysMin,E.$W,tt,2);case"ddd":return de(V.weekdaysShort,E.$W,tt,3);case"dddd":return tt[E.$W];case"H":return String(H);case"HH":return P.s(H,2,"0");case"h":return en(1);case"hh":return en(2);case"a":return he(H,Y,!0);case"A":return he(H,Y,!1);case"m":return String(Y);case"mm":return P.s(Y,2,"0");case"s":return String(E.$s);case"ss":return P.s(E.$s,2,"0");case"SSS":return P.s(E.$ms,3,"0");case"Z":return $}return null}(ht)||$.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(C,E,V){var A,$=this,H=P.p(E),Y=T(C),Z=(Y.utcOffset()-this.utcOffset())*i,tt=this-Y,st=function(){return P.m($,Y)};switch(H){case p:A=st()/12;break;case f:A=st();break;case u:A=st()/3;break;case h:A=(tt-Z)/6048e5;break;case d:A=(tt-Z)/864e5;break;case l:A=tt/s;break;case r:A=tt/i;break;case a:A=tt/e;break;default:A=tt}return V?A:P.a(A)},S.daysInMonth=function(){return this.endOf(f).$D},S.$locale=function(){return M[this.$L]},S.locale=function(C,E){if(!C)return this.$L;var V=this.clone(),A=F(C,E,!0);return A&&(V.$L=A),V},S.clone=function(){return P.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},O}(),X=L.prototype;return T.prototype=X,[["$ms",o],["$s",a],["$m",r],["$H",l],["$W",d],["$M",f],["$y",p],["$D",m]].forEach(function(O){X[O[1]]=function(S){return this.$g(S,O[0],O[1])}}),T.extend=function(O,S){return O.$i||(O(S,L,T),O.$i=!0),T},T.locale=F,T.isDayjs=D,T.unix=function(O){return T(1e3*O)},T.en=M[k],T.Ls=M,T.p={},T})})(ka);var Tf=ka.exports;const Tt=Of(Tf),Ff={class:"relative"},Af={class:"w-full"},Lf={class:"flex h-10 justify-between p-2"},$f={class:"fm-typo-body-lg-400"},Nf={class:"flex gap-1 items-center justify-center"},Rf={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},If=["onClick"],zf=c.defineComponent({__name:"FmDatePicker",props:{modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref([]),s=c.ref(null),o=c.ref(!1),a=c.ref(Tt()),r=c.ref(null),l=c.ref(null),d=g=>{s.value=g,t("update:modelValue",g.format("YYYY-MM-DD")),o.value=!1},h=()=>{i.value=[];const g=Tt(a.value).startOf("month"),b=g.endOf("month"),y=g.month();let _=g.startOf("week"),w=[];for(;_.isBefore(b.endOf("week"));)_.day()===0&&w.length>0&&(i.value.push(w),w=[]),w.push({date:_,isCurrentMonth:_.month()===y}),_=_.add(1,"day");w.length>0&&i.value.push(w)},f=()=>{e.disabled||(o.value=!o.value,requestAnimationFrame(()=>{var b;const g=(b=r.value)==null?void 0:b.getBoundingClientRect();l.value.style.top=`${g.height+4}px`,l.value.style.left="0px"}))},u=g=>{const b=g.path||g.composedPath();for(const y of b)if(y==r.value||y==l.value)return;o.value=!1},p=g=>{a.value=g?a.value.add(1,"month"):a.value.subtract(1,"month"),h()},m=c.computed(()=>Array.from(Array(7),(g,b)=>Tt().day(b).format("ddd")));return c.onMounted(()=>{window.addEventListener("click",u),h(),e.modelValue&&(s.value=Tt(e.modelValue,"YYYY-MM-DD"))}),c.onUnmounted(()=>{window.removeEventListener("click",u)}),(g,b)=>{var y;return c.openBlock(),c.createElementBlock("div",Ff,[c.createElementVNode("label",{ref_key:"buttonEl",ref:r,onClick:f},[g.label?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["fm-typo-body-lg-400 mb-4",[e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},c.toDisplayString(e.label),3)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(["fm-date-picker__container",{"fm-date-picker__container--opened":o.value,"fm-date-picker__container--disabled":e.disabled}])},[c.createElementVNode("div",{class:c.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},c.toDisplayString(((y=s.value)==null?void 0:y.format("D MMM YYYY"))??"DD MM YYYY"),3)],2)],512),c.createElementVNode("div",{ref_key:"dropdownEl",ref:l,class:c.normalizeClass(["absolute bg-fm-color-white fm-calendar gap-6 p-3 rounded-lg shadow-light-neutral-300 w-[360px]",[o.value?"block":"hidden"]])},[c.createElementVNode("div",Af,[c.createElementVNode("div",Lf,[c.createElementVNode("div",$f,c.toDisplayString(a.value.format("MMMM YYYY")),1),c.createElementVNode("div",Nf,[c.createVNode(W,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:b[0]||(b[0]=()=>p(!1))}),c.createVNode(W,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:b[1]||(b[1]=()=>p(!0))})])]),c.createElementVNode("div",null,[c.createElementVNode("div",Rf,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(m.value,_=>(c.openBlock(),c.createElementBlock("div",{key:_,class:"fm-calendar__cell"},c.toDisplayString(_),1))),128))]),c.createElementVNode("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(_,w)=>(c.openBlock(),c.createElementBlock("div",{key:w,class:"fm-calendar__row fm-typo-body-lg-400"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(_,x=>(c.openBlock(),c.createElementBlock("div",{key:x.date.date(),class:"fm-calendar__cell"},[x.isCurrentMonth?(c.openBlock(),c.createElementBlock("button",{key:0,class:c.normalizeClass(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":s.value===x.date}]),onClick:()=>d(x.date)},c.toDisplayString(x.date.date()),11,If)):c.createCommentVNode("",!0)]))),128))]))),128))])])])],2)])}}}),xg="",Wf=ot(zf,[["__scopeId","data-v-1722ccfe"]]),Hf=n=>(c.pushScopeId("data-v-fdf144e1"),n=n(),c.popScopeId(),n),jf={class:"flex gap-1 items-center relative w-full"},Yf=Hf(()=>c.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),Uf={class:"w-full"},Xf={class:"flex h-10 justify-between p-2"},qf={class:"fm-typo-body-lg-400"},Kf={class:"flex gap-1 items-center justify-center"},Gf={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},Zf=["onClick"],Jf=c.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref([]),s=c.ref({startDate:null,endDate:null}),o=c.ref(!1),a=c.ref(Tt()),r=c.ref(null),l=c.ref(null),d=c.ref(null),h=y=>{var _,w;if(s.value.startDate&&s.value.endDate){s.value={startDate:null,endDate:null},t("update:modelValue",{startDate:null,endDate:null});return}if(!s.value.startDate&&!s.value.endDate)s.value.startDate=y;else if(y.isBefore(s.value.startDate)){const x=s.value.startDate;s.value={startDate:y,endDate:x}}else s.value.endDate=y;t("update:modelValue",{startDate:(_=s.value.startDate)==null?void 0:_.format("YYYY-MM-DD"),endDate:(w=s.value.endDate)==null?void 0:w.format("YYYY-MM-DD")}),s.value.startDate&&s.value.endDate&&(o.value=!1)},f=()=>{i.value=[];const y=Tt(a.value).startOf("month"),_=y.endOf("month"),w=y.month();let x=y.startOf("week"),k=[];for(;x.isBefore(_.endOf("week"));)x.day()===0&&k.length>0&&(i.value.push(k),k=[]),k.push({date:x,isCurrentMonth:x.month()===w}),x=x.add(1,"day");k.length>0&&i.value.push(k)},u=()=>{e.disabled||(o.value=!o.value,requestAnimationFrame(()=>{var _;const y=(_=r.value)==null?void 0:_.getBoundingClientRect();d.value.style.top=`${y.height+4}px`,d.value.style.left="0px"}))},p=y=>{const _=y.path||y.composedPath();for(const w of _)if(w==r.value||w==l.value||w==d.value)return;o.value=!1},m=y=>{a.value=y?a.value.add(1,"month"):a.value.subtract(1,"month"),f()},g=c.computed(()=>Array.from(Array(7),(y,_)=>Tt().day(_).format("ddd"))),b=y=>{var _,w,x,k;return{"fm-calendar__cell__button--selected":((_=s.value.startDate)==null?void 0:_.isSame(y))&&!s.value.endDate||((w=s.value.endDate)==null?void 0:w.isSame(y))&&!s.value.startDate,"fm-calendar__cell__button--selected-start":((x=s.value.startDate)==null?void 0:x.isSame(y))&&s.value.endDate,"fm-calendar__cell__button--selected-end":((k=s.value.endDate)==null?void 0:k.isSame(y))&&s.value.startDate,"fm-calendar__cell__button--selected-between":s.value.startDate&&s.value.endDate&&y.isAfter(s.value.startDate)&&y.isBefore(s.value.endDate)}};return c.onMounted(()=>{var y;window.addEventListener("click",p),f(),(y=e.modelValue)!=null&&y.startDate&&e.modelValue.endDate&&(s.value={startDate:Tt(e.modelValue.startDate,"YYYY-MM-DD"),endDate:Tt(e.modelValue.endDate,"YYYY-MM-DD")})}),c.onUnmounted(()=>{window.removeEventListener("click",p)}),(y,_)=>{var w,x;return c.openBlock(),c.createElementBlock("div",jf,[c.createElementVNode("label",{ref_key:"startButtonEl",ref:r,class:"w-full",onClick:u},[c.createElementVNode("div",{class:c.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},c.toDisplayString(e.label),3),c.createElementVNode("div",{class:c.normalizeClass(["fm-date-picker__container",{"fm-date-picker__container--opened":o.value,"fm-date-picker__container--disabled":e.disabled}])},[c.createElementVNode("div",{class:c.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.value.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},c.toDisplayString(((w=s.value.startDate)==null?void 0:w.format("D MMM YYYY"))??"DD MM YYYY"),3)],2)],512),Yf,c.createElementVNode("label",{ref_key:"endButtonEl",ref:l,class:"w-full",onClick:u},[c.createElementVNode("div",{class:c.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},c.toDisplayString(e.label),3),c.createElementVNode("div",{class:c.normalizeClass(["fm-date-picker__container",{"fm-date-picker__container--opened":o.value,"fm-date-picker__container--disabled":e.disabled}])},[c.createElementVNode("div",{class:c.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.value.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},c.toDisplayString(((x=s.value.endDate)==null?void 0:x.format("D MMM YYYY"))??"DD MM YYYY"),3)],2)],512),c.createElementVNode("div",{ref_key:"dropdownEl",ref:d,class:c.normalizeClass(["absolute bg-fm-color-white fm-calendar gap-6 p-3 rounded-lg shadow-light-300 w-[360px]",[o.value?"block":"hidden"]])},[c.createElementVNode("div",Uf,[c.createElementVNode("div",Xf,[c.createElementVNode("div",qf,c.toDisplayString(a.value.format("MMMM YYYY")),1),c.createElementVNode("div",Kf,[c.createVNode(W,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:_[0]||(_[0]=()=>m(!1))}),c.createVNode(W,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:_[1]||(_[1]=()=>m(!0))})])]),c.createElementVNode("div",null,[c.createElementVNode("div",Gf,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(g.value,k=>(c.openBlock(),c.createElementBlock("div",{key:k,class:"fm-calendar__cell"},c.toDisplayString(k),1))),128))]),c.createElementVNode("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(k,M)=>(c.openBlock(),c.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-body-lg-400"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(k,v=>(c.openBlock(),c.createElementBlock("div",{key:v.date.date(),class:"fm-calendar__cell"},[v.isCurrentMonth?(c.openBlock(),c.createElementBlock("button",{key:0,class:c.normalizeClass(["fm-calendar__cell__button",b(v.date)]),onClick:()=>h(v.date)},c.toDisplayString(v.date.date()),11,Zf)):c.createCommentVNode("",!0)]))),128))]))),128))])])])],2)])}}}),kg="",Qf=ot(Jf,[["__scopeId","data-v-fdf144e1"]]),tu={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},eu={class:"flex gap-8 items-center sm:flex-col-reverse xs:flex-col-reverse"},nu=c.defineComponent({__name:"FmDialog",props:{modelValue:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},minWidth:{default:280},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(null),s=o=>{e.overlay&&i.value&&o.target===i.value&&t("update:modelValue",!1)};return(o,a)=>(c.openBlock(),c.createBlock(c.Transition,null,{default:c.withCtx(()=>[o.modelValue?(c.openBlock(),c.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:i,class:c.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":o.overlay}),onClick:a[1]||(a[1]=r=>s(r))},[c.createElementVNode("div",{class:c.normalizeClass(`fm-dialog min-w-[${o.minWidth}px]`)},[c.createElementVNode("div",tu,[c.renderSlot(o.$slots,"dialog-header"),o.closeButton?(c.openBlock(),c.createBlock(W,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:a[0]||(a[0]=r=>t("update:modelValue",!1))})):c.createCommentVNode("",!0)]),c.renderSlot(o.$slots,"dialog-content"),c.createElementVNode("div",eu,[c.renderSlot(o.$slots,"dialog-footer")])],2)],2)):c.createCommentVNode("",!0)]),_:3}))}}),wg="",iu={class:"fm-checkbox"},su={class:"fm-checkbox--wrapper"},ou={class:"fm-checkbox__input--container"},au=["checked","disabled","indeterminate"],ru={key:0,class:"fm-checkbox__label-container"},lu={class:"fm-typo-body-lg-400"},cu={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},wa=c.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:Boolean},label:{},sublabel:{default:""},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.computed(()=>e.indeterminate?"remove":e.modelValue?"check_small":"");function s(){e.disabled||t("update:modelValue",!e.modelValue)}return(o,a)=>(c.openBlock(),c.createElementBlock("div",iu,[c.createElementVNode("label",su,[c.createElementVNode("div",ou,[c.createElementVNode("input",{class:c.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":o.modelValue}),type:"checkbox",checked:e.modelValue,disabled:e.disabled,indeterminate:e.indeterminate,onClick:s},null,10,au),e.indeterminate||e.modelValue?(c.openBlock(),c.createBlock(W,{key:0,class:"fm-checkbox__input--checkmark",name:i.value,size:"md",color:"#FFFFFF"},null,8,["name"])):c.createCommentVNode("",!0)]),e.label?(c.openBlock(),c.createElementBlock("div",ru,[c.renderSlot(o.$slots,"label"),c.createElementVNode("div",lu,c.toDisplayString(e.label),1),e.sublabel?(c.openBlock(),c.createElementBlock("div",cu,c.toDisplayString(e.sublabel),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)])]))}}),Cg="",du={class:"w-full"},hu=c.defineComponent({__name:"FmField",props:{leadingIcon:{default:""},trailingIcon:{default:""},activeClass:{default:""},disabled:{type:Boolean,default:!1},iconColor:{default:"black"}},setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass({"fm-field":!0,"fm-field--disabled":t.disabled,activeClass:t.activeClass})},[c.createVNode(W,{name:t.leadingIcon,size:"md",color:t.disabled?"disabled":t.iconColor},null,8,["name","color"]),c.createElementVNode("div",du,[c.renderSlot(t.$slots,"default",{},void 0,!0)]),c.createVNode(W,{name:t.trailingIcon,size:"md",color:t.disabled?"disabled":t.iconColor},null,8,["name","color"])],2))}}),Sg="",Ca=ot(hu,[["__scopeId","data-v-fae4e7ce"]]),Sa=Symbol.for("fm:form"),Ma=Symbol.for("fm:radio-group"),fu=["onSubmit","onReset"],uu=c.defineComponent({__name:"FmForm",setup(n){const t=c.ref([]),e=c.ref(0),i=()=>{t.value.forEach(o=>{o.validate()})},s=()=>{t.value.forEach(o=>{o.resetValue(),o.resetValidation()})};return c.provide(Sa,{register({validate:o,resetValidation:a,resetValue:r}){return t.value.push({componentId:e.value,validate:o,resetValidation:a,resetValue:r}),e.value++},unregister(o){t.value.filter(a=>a.componentId!==o)}}),(o,a)=>(c.openBlock(),c.createElementBlock("form",{onSubmit:c.withModifiers(i,["prevent"]),onReset:c.withModifiers(s,["prevent"])},[c.renderSlot(o.$slots,"default")],40,fu))}}),pu={class:"fm-radio-btn"},mu={class:"fm-radio-btn__input--container"},gu=["value","disabled","checked"],bu={class:"py-8"},yu={class:"fm-typo-body-lg-400"},_u={key:0,class:"fm-typo-body-md-400 text-fm-color-typo-secondary"},xu=c.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(),s=c.inject(Ma,null),o=()=>{r.value||(s?s.updateValue(e.value):t("update:modelValue",e.value))},a=()=>{i.value&&s&&(i.value.checked=s.groupValue.value===e.value)};c.onMounted(()=>{s&&s.register(a)});const r=c.computed(()=>s?s.getDisabled():e.disabled);return(l,d)=>{const h=c.resolveDirective("wave");return c.openBlock(),c.createElementBlock("div",pu,[c.createElementVNode("label",{class:c.normalizeClass({"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":r.value,"cursor-pointer":!r.value}),onClick:o},[c.withDirectives((c.openBlock(),c.createElementBlock("div",mu,[c.createElementVNode("input",{ref_key:"inputEl",ref:i,class:"fm-radio-btn__input--btn",type:"radio",value:l.value,disabled:r.value,checked:l.value===l.modelValue},null,8,gu)])),[[h,!r.value]]),c.createElementVNode("div",bu,[c.renderSlot(l.$slots,"label",{},()=>[c.createElementVNode("div",yu,c.toDisplayString(l.label),1),l.sublabel?(c.openBlock(),c.createElementBlock("div",_u,c.toDisplayString(l.sublabel),1)):c.createCommentVNode("",!0)],!0)])],2)])}}}),Mg="",ku=ot(xu,[["__scopeId","data-v-94f94580"]]);function In(n,t,e,i=null,s=null){const o=c.ref(),a=c.inject(Sa,null),r=c.ref(!0),l=(d=s)=>{r.value=!0,t(),d&&typeof d=="function"&&d(),e("update:modelValue",i)};return c.onMounted(()=>{a&&(o.value=a.register({validate:n,resetValidation:t,resetValue:l}))}),c.onUnmounted(()=>{a&&a.unregister(o.value)}),{isPristine:r,resetValue:l}}function zn(n){const t=c.ref([]);function e(){const s=[];if(n.rules&&n.rules.length>0)for(const o of n.rules){const r=(typeof o=="function"?o:()=>o)(n.modelValue);r!==!0&&s.push(r)}return t.value=s,t.value}function i(){t.value=[]}return{validate:e,resetValidation:i,errorMessages:t}}const wu={class:"fm-text-field__helper-container fm-typo-body-sm-400 text-fm-color-typo-secondary"},Cu={key:0},Su={key:1},Mu=c.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},helperText:{default:""},disabled:{type:Boolean,default:!1},label:{},rules:{default:()=>[n=>!!n||"This field is required"]}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(),s=c.ref([]),o=()=>{i.value=null,s.value.forEach(h=>h())},{validate:a,errorMessages:r,resetValidation:l}=zn(e),{isPristine:d}=In(a,l,t,"",o);return c.provide(Ma,{groupValue:i,getDisabled:()=>e.disabled,register(h){s.value.push(h)},updateValue(h){i.value=h,s.value.forEach(f=>f()),t("update:modelValue",h)}}),c.watch(()=>e.modelValue,()=>{d.value=!1,i.value=e.modelValue,s.value.forEach(h=>h())}),(h,f)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass({"flex items-center gap-16 justify-start":h.inline})},[c.renderSlot(h.$slots,"default"),c.createElementVNode("div",wu,[c.unref(r).length===0?(c.openBlock(),c.createElementBlock("div",Cu,[c.renderSlot(h.$slots,"helper-text",{},()=>[c.createTextVNode(c.toDisplayString(h.helperText),1)])])):(c.openBlock(),c.createElementBlock("div",Su,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(r),u=>(c.openBlock(),c.createElementBlock("div",{key:u,class:"flex gap-4 items-center text-fm-color-typo-error"},[c.createVNode(W,{name:"error",color:"#FF3B30",size:"sm"}),c.createElementVNode("span",null,c.toDisplayString(u),1)]))),128))]))])],2))}});function vu(n){for(;n;){if(Du(n))return n;n=n.parentElement}return document.scrollingElement}function Du(n){if(!n||n.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(n);return t.overflowY==="scroll"||t.overflowY==="auto"&&n.scrollHeight>n.clientHeight}class Eu{constructor(t,e){B(this,"onScroll");B(this,"scrollParent");this.onScroll=e,this.scrollParent=vu(t)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const Bu={class:"relative"},Vu=c.defineComponent({__name:"FmMenu",props:{isOpen:{type:Boolean,default:!1},placement:{default:"bottom-left"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(n,{expose:t,emit:e}){const i=n,s=c.ref(!1),o=c.ref(null),a=c.ref(null);let r;t({show:()=>{s.value||(s.value=!0,e("dropdown-changed",s.value))},hide:()=>{s.value&&(s.value=!1,e("dropdown-changed",s.value))}});const l=()=>{i.disabled||(s.value=!s.value,d(),e("dropdown-changed",s.value))},d=()=>{requestAnimationFrame(()=>{var m,g;const u=(m=a.value)==null?void 0:m.getBoundingClientRect(),p=(g=o.value)==null?void 0:g.getBoundingClientRect();i.placement.includes("bottom")?a.value.style.top=`${p.bottom+4}px`:i.placement.includes("top")&&(a.value.style.top=`${p.top-u.height-4}px`),i.placement.includes("left")?a.value.style.left=`${p.left}px`:i.placement.includes("center")?a.value.style.left=`${p.left+p.width/2-u.width/2}px`:i.placement.includes("right")&&(a.value.style.left=`${p.right-u.width}px`)})},h=u=>{if(!s.value)return;const p=u.path||u.composedPath();for(const m of p)if(m==o.value||m==a.value)return;s.value=!1,e("dropdown-changed",s.value)},f=()=>{e("dropdown-changed",!1)};return c.watch(()=>i.isOpen,u=>s.value=u),c.onMounted(()=>{s.value=i.isOpen,window.addEventListener("click",h),r=new Eu(o.value,f),r.bindScroll()}),c.onUnmounted(()=>{window.removeEventListener("click",h),r.unbindScroll()}),(u,p)=>(c.openBlock(),c.createElementBlock("div",Bu,[c.createElementVNode("div",{ref_key:"buttonEl",ref:o,class:"fm-menu",onClick:l},[c.renderSlot(u.$slots,"menu-button",{},void 0,!0)],512),(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[c.createElementVNode("div",{ref_key:"dropdownEl",ref:a,class:c.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":s.value})},[c.renderSlot(u.$slots,"menu-content",{},void 0,!0)],2)]))]))}}),vg="",Wi=ot(Vu,[["__scopeId","data-v-d9e79ca4"]]),Pu={class:"fm-menu-item--left"},Ou={key:0,class:"fm-menu-item--right"},Tu=c.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dividerPlacement:{default:null}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=o=>{o.preventDefault(),!e.disabled&&t("update:modelValue",!e.modelValue)},s=()=>{t("update:modelValue",e.modelValue)};return(o,a)=>(c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("div",{class:c.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":o.modelValue&&!o.hasCheckbox,"fm-menu-item--disabled":o.disabled}),onClick:i},[c.createElementVNode("div",Pu,[!o.hasCheckbox&&o.icon?(c.openBlock(),c.createBlock(W,{key:0,name:o.icon,size:"md",color:o.disabled?"#C7C7CC":o.modelValue?"#FF7823":"#1C1C1E"},null,8,["name","color"])):c.createCommentVNode("",!0),o.hasCheckbox?(c.openBlock(),c.createBlock(wa,{key:1,"model-value":o.modelValue,name:"something",label:"",sublabel:"",value:"",indeterminate:!1,disabled:o.disabled,"onUpdate:modelValue":s,onClick:a[0]||(a[0]=r=>r.preventDefault())},null,8,["model-value","disabled"])):c.createCommentVNode("",!0),c.renderSlot(o.$slots,"label",{},()=>[c.createElementVNode("div",null,[c.createElementVNode("div",{class:c.normalizeClass(`fm-typo-body-lg-400 ${o.disabled?"fm-color-typo-disabled":"fm-color-typo-primary"}`)},c.toDisplayString(o.label),3),o.sublabel?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(`fm-typo-body-md-400 ${o.disabled?"fm-color-typo-disabled":"fm-color-typo-secondary"}`)},c.toDisplayString(o.sublabel),3)):c.createCommentVNode("",!0)])],!0)]),o.expandable?(c.openBlock(),c.createElementBlock("div",Ou,[c.createVNode(W,{name:"chevron_right",size:"md",color:o.disabled?"#C7C7CC":"#AEAEB2"},null,8,["color"])])):c.createCommentVNode("",!0)],2)]))}}),Dg="",va=ot(Tu,[["__scopeId","data-v-94ed27b3"]]),Fu={class:"w-[280px]"},Au=c.defineComponent({__name:"FmSelect",props:{modelValue:{},label:{},items:{},disabled:{type:Boolean,default:!1},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-left"},placeholder:{default:""}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(!1),s=(l,d)=>{if(e.multiselect){let h=[];l?h=[...c.toRaw(e.modelValue),d.value]:(h=[...e.modelValue],h=h.filter(f=>JSON.stringify(c.toRaw(f))!==JSON.stringify(d.value))),t("update:modelValue",h)}else i.value=!1,t("update:modelValue",d.value)},o=c.computed(()=>{const l=a.value.map(d=>d.label).join(", ");return l===""?e.placeholder:l}),a=c.computed(()=>e.multiselect?e.items.filter(l=>c.toRaw(e.modelValue).some(d=>r(d,l.value))):e.items.filter(l=>r(e.modelValue,l.value))),r=(l,d)=>JSON.stringify(l)===JSON.stringify(d);return(l,d)=>(c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("label",null,[c.renderSlot(l.$slots,"label",{},()=>[l.label?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["fm-typo-body-lg-400 mb-4",{"fm-typo-body-lg-400":!0,"text-fm-color-typo-primary":!l.disabled,"text-fm-color-typo-disabled":l.disabled}])},c.toDisplayString(l.label),3)):c.createCommentVNode("",!0)],!0)]),c.createVNode(Wi,{disabled:l.disabled,"is-open":i.value,placement:l.placement,onDropdownChanged:d[0]||(d[0]=h=>i.value=h)},{"menu-button":c.withCtx(()=>[c.createElementVNode("label",{class:c.normalizeClass([`${l.disabled?"cursor-not-allowed":"cursor-pointer"} fm-select`])},[c.createElementVNode("div",{class:c.normalizeClass({"fm-select__container":!0,"fm-select__container--expanded":i.value,"fm-select__container--disabled":l.disabled})},[c.createElementVNode("div",{class:c.normalizeClass({"fm-typo-body-lg-400 w-full h-full overflow-hidden text-ellipsis whitespace-nowrap":!0,"text-fm-color-typo-tertiary":!l.modelValue,"text-fm-color-typo-primary":!!l.modelValue})},c.toDisplayString(o.value),3),c.createVNode(W,{name:i.value?"expand_less":"expand_more",size:"md",color:l.disabled?"#C7C7CC":"black"},null,8,["name","color"])],2)],2)]),"menu-content":c.withCtx(()=>[c.createElementVNode("div",Fu,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.items,h=>(c.openBlock(),c.createBlock(va,{key:h.value,"has-checkbox":l.multiselect,label:h.label,value:h.value,"model-value":a.value.some(f=>r(f.value,h.value)),"onUpdate:modelValue":f=>s(f,h)},null,8,["has-checkbox","label","value","model-value","onUpdate:modelValue"]))),128))])]),_:1},8,["disabled","is-open","placement"])]))}}),Eg="",Lu=ot(Au,[["__scopeId","data-v-bf7b3ea7"]]),$u={class:"fm-stepper-field"},Nu={class:"fm-typo-body-lg-400 text-fm-color-typo-primary"},Ru={key:0},Iu=["inputMode","value","placeholder","required","readOnly"],zu={key:0},Wu={key:0,class:"fm-stepper-field__stepper__container"},Hu={key:0,class:"fm-stepper-field__helper-container fm-typo-body-sm-400 text-fm-color-typo-secondary"},ju={key:0},Yu={key:1},Uu=c.defineComponent({__name:"FmStepperField",props:{label:{default:""},modelValue:{},required:{type:Boolean},disabled:{type:Boolean},placeholder:{default:""},helperText:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},step:{default:1},min:{default:0},max:{},leadingIcon:{default:""},trailingIcon:{default:""},useGrouping:{type:Boolean,default:!0},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},rules:{default:()=>[]},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,{validate:i,errorMessages:s,resetValidation:o}=zn(e),{isPristine:a}=In(i,o,t,null),r=c.ref(null),l=c.ref(!1),d=c.ref(!0);let h;const f=c.ref(""),u=x=>{if(x!==""){const k=+x.replace(/,/g,"");return isNaN(k)?null:k}return null},p=x=>h.format(x),m=x=>x>e.max?e.max:x<e.min?e.min:x,g=(x,k)=>{x.preventDefault(),a.value=!1;let v=(u(f.value)??0)+k;v=m(v),d.value=i().length===0,f.value=p(v),b()},b=()=>{const x=u(f.value);t("update:modelValue",x)},y=()=>{const x=u(f.value);x&&(f.value=p(m(x))),d.value=i().length===0,l.value=!1,b()},_=()=>{var k;const x=u((k=r.value)==null?void 0:k.value);f.value=x!=null?p(x):""},w=x=>{if(![...Array(10).keys()].map(k=>k.toString()).includes(x.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(x.key)){x.preventDefault();return}};return c.watch(()=>e.modelValue,x=>{f.value=x!=null?p(x):"",d.value=i().length===0}),c.onMounted(()=>{h=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping}),f.value=e.modelValue!=null?p(e.modelValue):""}),(x,k)=>(c.openBlock(),c.createElementBlock("label",$u,[c.createElementVNode("div",Nu,[c.renderSlot(x.$slots,"label",{},()=>[c.createTextVNode(c.toDisplayString(x.label),1)],!0)]),c.createElementVNode("div",{class:c.normalizeClass({"fm-stepper-field__container":!0,"fm-stepper-field__container--focused":l.value,"fm-stepper-field__container--invalid":!d.value&&!!x.modelValue,"fm-stepper-field__container--valid":x.showValidBorder&&d.value&&!!x.modelValue})},[c.renderSlot(x.$slots,"prepend",{},()=>[x.prependText?(c.openBlock(),c.createElementBlock("div",Ru,c.toDisplayString(x.prependText),1)):c.createCommentVNode("",!0),x.leadingIcon?(c.openBlock(),c.createBlock(W,{key:1,name:x.leadingIcon,size:"md",color:x.disabled?"#C7C7CC":"#1C1C1E"},null,8,["name","color"])):c.createCommentVNode("",!0)],!0),c.createElementVNode("input",{ref_key:"inputEl",ref:r,class:"fm-stepper-field--input",type:"text",inputMode:x.inputmode,value:f.value,placeholder:x.placeholder,required:x.required,readOnly:x.readonly,onInput:_,onFocus:k[0]||(k[0]=()=>l.value=!0),onBlur:y,onKeydown:w},null,40,Iu),c.renderSlot(x.$slots,"append",{},()=>[c.createElementVNode("div",{class:c.normalizeClass({"mr-32":x.showSteppers})},[x.appendText?(c.openBlock(),c.createElementBlock("div",zu,c.toDisplayString(x.appendText),1)):c.createCommentVNode("",!0),x.trailingIcon?(c.openBlock(),c.createBlock(W,{key:1,name:x.trailingIcon,size:"md",color:x.disabled?"#C7C7CC":"#1C1C1E"},null,8,["name","color"])):c.createCommentVNode("",!0)],2)],!0),x.showSteppers?(c.openBlock(),c.createElementBlock("div",Wu,[c.createElementVNode("div",{class:"fm-stepper-field__stepper__item",onMousedown:k[1]||(k[1]=M=>g(M,x.step))},[c.createVNode(W,{name:"expand_less",size:"md",color:x.disabled?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32),c.createElementVNode("div",{class:"fm-stepper-field__stepper__item",onMousedown:k[2]||(k[2]=M=>g(M,-x.step))},[c.createVNode(W,{name:"expand_more",size:"md",color:x.disabled?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32)])):c.createCommentVNode("",!0)],2),x.helperText||c.unref(s).length>0?(c.openBlock(),c.createElementBlock("div",Hu,[c.unref(s).length===0?(c.openBlock(),c.createElementBlock("div",ju,[c.renderSlot(x.$slots,"helper-text",{},()=>[c.createTextVNode(c.toDisplayString(x.helperText),1)],!0)])):(c.openBlock(),c.createElementBlock("div",Yu,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(s),M=>(c.openBlock(),c.createElementBlock("div",{key:M,class:"flex gap-4 items-center text-fm-color-typo-error"},[c.createVNode(W,{name:"error",color:"#FF3B30",size:"sm"}),c.createElementVNode("span",null,c.toDisplayString(M),1)]))),128))]))])):c.createCommentVNode("",!0)]))}}),Bg="",Xu=ot(Uu,[["__scopeId","data-v-cb3498f4"]]),qu={class:"cursor-pointer fm-switch__container"},Ku={key:0},Gu={class:"fm-typo-body-lg-400"},Zu={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Ju={class:"fm-switch__input--container"},Qu=["checked","value","disabled"],tp={key:1},ep={class:"fm-typo-body-lg-400"},np={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},ip=c.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{},disabled:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=()=>{e.disabled||t("update:modelValue",!e.modelValue)};return(s,o)=>(c.openBlock(),c.createElementBlock("label",qu,[s.labelPlacement==="left"?(c.openBlock(),c.createElementBlock("div",Ku,[c.renderSlot(s.$slots,"label",{},void 0,!0),c.createElementVNode("div",Gu,c.toDisplayString(s.label),1),s.sublabel?(c.openBlock(),c.createElementBlock("div",Zu,c.toDisplayString(s.sublabel),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),c.createElementVNode("div",Ju,[c.createElementVNode("input",{checked:s.modelValue,class:"fm-switch__input--btn",type:"checkbox",value:s.value,disabled:s.disabled,onClick:i},null,8,Qu),c.createElementVNode("div",{class:c.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":s.showIcon})},[s.showIcon?(c.openBlock(),c.createBlock(W,{key:0,name:s.modelValue?"check":"close",size:"sm",color:s.disabled?"#C7C7CC":s.modelValue?"#1C1C1E":"#FFFFFF"},null,8,["name","color"])):c.createCommentVNode("",!0)],2)]),s.labelPlacement==="right"?(c.openBlock(),c.createElementBlock("div",tp,[c.createElementVNode("div",ep,c.toDisplayString(s.label),1),s.sublabel?(c.openBlock(),c.createElementBlock("div",np,c.toDisplayString(s.sublabel),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)]))}}),Vg="",sp=ot(ip,[["__scopeId","data-v-77ad1e00"]]),op={class:"fm-text-field"},ap={class:"fm-text-field--label"},rp={key:0},lp=["value","inputMode","type","placeholder","required","minlength","maxlength","disabled","readOnly"],cp={key:0},dp={key:0,class:"fm-text-field__helper-container fm-typo-body-sm-400 text-fm-color-typo-secondary"},hp={key:0},fp={key:1};var Da=(n=>(n.required="*",n.optional="(optional)",n))(Da||{});const up=c.defineComponent({__name:"FmTextField",props:{required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:""},helperText:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},leadingIcon:{default:()=>({name:"",color:""})},trailingIcon:{default:()=>({name:"",color:""})},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},label:{},modelValue:{},rules:{default:()=>[]}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(!1),{validate:s,errorMessages:o,resetValidation:a}=zn(e),{isPristine:r}=In(s,a,t,""),l=h=>{r.value=!1,h.target.value||a(),t("update:modelValue",h.target.value)};c.watch(()=>e.modelValue,()=>{r.value||s()});const d=c.computed(()=>o.value.length===0);return(h,f)=>(c.openBlock(),c.createElementBlock("label",op,[c.createElementVNode("div",null,[c.createElementVNode("div",ap,[c.renderSlot(h.$slots,"label"),c.createElementVNode("span",{class:c.normalizeClass({"fm-typo-body-lg-400":!0,"text-fm-color-typo-primary":!h.disabled,"text-fm-color-typo-disabled":h.disabled})},c.toDisplayString(h.label),3),h.labelMark!=="none"?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass({"fm-color-typo-tertiary fm-typo-body-md-400":h.labelMark==="optional","fm-color-typo-error fm-typo-body-lg-700":h.labelMark==="required"})},c.toDisplayString(Da[h.labelMark]),3)):c.createCommentVNode("",!0)])]),c.createElementVNode("div",{class:c.normalizeClass({"fm-text-field__container":!0,"fm-text-field__container--focused":i.value,"fm-text-field__container--invalid":!!h.modelValue&&!d.value,"fm-text-field__container--valid":h.showValidBorder&&h.showSuccess&&!!h.modelValue&&d.value,"fm-text-field__container--disabled":h.disabled})},[c.renderSlot(h.$slots,"prepend",{},()=>[h.prependText?(c.openBlock(),c.createElementBlock("div",rp,c.toDisplayString(h.prependText),1)):c.createCommentVNode("",!0),h.leadingIcon.name?(c.openBlock(),c.createBlock(W,{key:1,name:h.leadingIcon.name,size:"md",color:h.leadingIcon.color??(h.disabled?"#C7C7CC":"#1C1C1E")},null,8,["name","color"])):c.createCommentVNode("",!0)]),c.createElementVNode("input",{class:c.normalizeClass({"fm-text-field--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!h.disabled,"fm-color-typo-disabled":h.disabled}),value:h.modelValue,inputMode:h.inputmode,type:h.inputmode,placeholder:h.placeholder,required:h.required,minlength:h.minLength,maxlength:h.maxLength,disabled:h.disabled,readOnly:h.readonly,onInput:l,onFocus:f[0]||(f[0]=()=>i.value=!0),onBlur:f[1]||(f[1]=()=>i.value=!1)},null,42,lp),c.renderSlot(h.$slots,"append",{},()=>[h.appendText?(c.openBlock(),c.createElementBlock("div",cp,c.toDisplayString(h.appendText),1)):c.createCommentVNode("",!0),h.trailingIcon.name?(c.openBlock(),c.createBlock(W,{key:1,name:h.trailingIcon.name,size:"md",color:h.trailingIcon.color??(h.disabled?"#C7C7CC":"#1C1C1E")},null,8,["name","color"])):c.createCommentVNode("",!0)])],2),h.helperText||c.unref(o).length>0?(c.openBlock(),c.createElementBlock("div",dp,[c.unref(o).length===0?(c.openBlock(),c.createElementBlock("div",hp,[c.renderSlot(h.$slots,"helper-text",{},()=>[c.createTextVNode(c.toDisplayString(h.helperText),1)])])):(c.openBlock(),c.createElementBlock("div",fp,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(o),u=>(c.openBlock(),c.createElementBlock("div",{key:u,class:"flex gap-4 items-center text-fm-color-typo-error"},[c.createVNode(W,{name:"error",color:"#FF3B30",size:"sm"}),c.createElementVNode("span",null,c.toDisplayString(u),1)]))),128))])),c.createElementVNode("div",{class:c.normalizeClass({"fm-color-typo-disabled":h.disabled})},c.toDisplayString(h.maxLength?`${h.modelValue.length} / ${h.maxLength}`:""),3)])):c.createCommentVNode("",!0)]))}}),Pg="",pp={class:"fm-textarea"},mp={htmlFor:"{this.name}"},gp={class:"fm-textarea--label"},bp=["value","placeholder","required","minlength","maxlength","readOnly","disabled"],yp={key:0,class:"fm-color-typo-secondary fm-textarea__helper-container fm-typo-body-sm-400"},_p={key:0},xp={key:1};var Ea=(n=>(n.required="*",n.optional="(optional)",n))(Ea||{});const kp=c.defineComponent({__name:"FmTextarea",props:{label:{default:""},modelValue:{default:""},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:""},helperText:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=c.ref(!1),{validate:s,errorMessages:o,resetValidation:a}=zn(e),{isPristine:r}=In(s,a,t,""),l=h=>{r.value=!1,t("update:modelValue",h.target.value)},d=c.computed(()=>o.value.length===0);return c.watch(()=>e.modelValue,()=>{r.value||s()}),(h,f)=>(c.openBlock(),c.createElementBlock("div",pp,[c.createElementVNode("label",mp,[c.createElementVNode("div",gp,[c.renderSlot(h.$slots,"label"),c.createElementVNode("span",{class:c.normalizeClass({"fm-typo-body-lg-400":!0,"fm-color-typo-primary":!h.disabled,"fm-color-typo-disabled":h.disabled})},c.toDisplayString(h.label),3),h.labelMark!=="none"?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass({"fm-color-typo-tertiary fm-typo-body-md-400":h.labelMark==="optional","fm-color-typo-error fm-typo-body-lg-700":h.labelMark==="required"})},c.toDisplayString(Ea[h.labelMark]),3)):c.createCommentVNode("",!0)])]),c.createElementVNode("div",{class:c.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":i.value,"fm-textarea__container--invalid":!!h.modelValue&&!d.value,"fm-textarea__container--valid":h.showValidBorder&&h.showSuccess&&!!h.modelValue&&d.value,"fm-textarea__container--disabled":h.disabled})},[c.createElementVNode("textarea",{class:c.normalizeClass({"fm-textarea--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!h.disabled,"fm-color-typo-disabled":h.disabled}),value:h.modelValue,placeholder:h.placeholder,required:h.required,minlength:h.minLength,maxlength:h.maxLength,readOnly:h.readonly,disabled:h.disabled,onInput:l,onFocus:f[0]||(f[0]=()=>i.value=!0),onBlur:f[1]||(f[1]=()=>i.value=!1)},null,42,bp)],2),h.helperText||c.unref(o).length>0?(c.openBlock(),c.createElementBlock("div",yp,[c.unref(o).length===0?(c.openBlock(),c.createElementBlock("div",_p,[c.renderSlot(h.$slots,"helper-text",{},()=>[c.createTextVNode(c.toDisplayString(h.helperText),1)])])):(c.openBlock(),c.createElementBlock("div",xp,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(o),u=>(c.openBlock(),c.createElementBlock("div",{key:u,class:"flex gap-4 items-center text-fm-color-typo-error"},[c.createVNode(W,{name:"error",color:"#FF3B30",size:"sm"}),c.createElementVNode("span",null,c.toDisplayString(u),1)]))),128))])),c.createElementVNode("div",{class:c.normalizeClass({"fm-color-typo-disabled":h.disabled})},c.toDisplayString(h.maxLength?`${h.modelValue.length} / ${h.maxLength}`:""),3)])):c.createCommentVNode("",!0)]))}}),Og="",wp=c.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass({"fm-list--separator":t.separator,activeClass:t.activeClass})},[c.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),Tg="",Cp=ot(wp,[["__scopeId","data-v-884ba127"]]),Sp=c.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},activeClass:{default:""}},setup(n){const t=n;return(e,i)=>{const s=c.resolveDirective("wave");return c.withDirectives((c.openBlock(),c.createBlock(t.tag,{class:c.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":e.disabled,"cursor-pointer":e.clickable&&!e.disabled,"cursor-not-allowed":e.clickable&&e.disabled,activeClass:e.activeClass})},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["class"])),[[s,e.clickable&&!e.disabled]])}}}),Fg="",Mp=ot(Sp,[["__scopeId","data-v-f565b558"]]),vp={key:0,class:"h-6 relative w-6"},Dp=["data-progress"],Ep={key:1,class:"basis-0 flex-col gap-1 grow inline-flex items-start justify-start shrink"},Bp={class:"fm-typo-body-xl-700 self-stretch text-zinc-900"},Vp={class:"fm-typo-body-sm-400 self-stretch text-neutral-500"},Pp=c.defineComponent({__name:"FmProgressIndicatorMobile",props:{totalSteps:{type:Number,required:!0},currentStep:{type:Number,required:!0},titleText:{type:String,required:!0},supportingText:{type:String,default:void 0}},setup(n){const t=n,e=c.ref(null),i=c.computed(()=>`${t.currentStep/t.totalSteps*360}deg`),s=c.computed(()=>`${t.currentStep} of ${t.totalSteps}`),o=a=>{e.value.style.setProperty("--progress",a),e.value.setAttribute("content-text",s.value)};return c.onMounted(()=>{o(i.value)}),c.watch(i,async a=>{o(a)}),(a,r)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(`bg-white gap-3 inline-flex items-center justify-start px-4 py-2 shadow ${n.titleText?"w-full":"w-max"}`)},[n.titleText?(c.openBlock(),c.createElementBlock("div",vp,[c.createVNode(W,{class:"cursor-pointer",name:"close",outline:!0,size:"md",color:"text-fm-color-neutral-black"})])):c.createCommentVNode("",!0),c.createElementVNode("div",{ref_key:"progress",ref:e,class:"fm-progress","data-progress":i.value},null,8,Dp),n.titleText?(c.openBlock(),c.createElementBlock("div",Ep,[c.createElementVNode("div",Bp,c.toDisplayString(n.titleText),1),c.createElementVNode("div",Vp,c.toDisplayString(n.supportingText),1)])):c.createCommentVNode("",!0)],2))}}),Ag="",Op={class:"flex gap-2 items-start justify-end p-0 self-stretch"},Tp={key:0,class:"bg-white flex flex-col gap-5 p-6 w-1/3"},Fp={class:"lg:hidden md:hidden"},Ap={key:0,class:c.normalizeClass("fm-pi-form--mobile")},Lp={class:"bg-white flex gap-10 p-6"},$p={class:"flex gap-2 items-start justify-end p-0 self-stretch"},Np=c.defineComponent({__name:"FmProgressIndicatorGroup",props:{orientation:{type:String,default:"horizontal"},steps:{type:Array,required:!0},nextButtonLabel:{type:String,default:"Next"},previousButtonLabel:{type:String,default:"Back"},submitButtonLabel:{type:String,default:"Submit"}},setup(n){const t=n,e=c.ref([...t.steps]),i=c.computed(()=>e.value.length),s=c.ref(0),o=c.computed(()=>e.value[s.value]);c.onMounted(()=>{for(let f=0;f<i.value;f++)e.value[f].status=f===0?"active":"default"}),c.watch(s,async(f,u)=>{if(u!=i.value)if(f<i.value)e.value[f].status="active";else{const p=e.value[u].submitForm;p&&e.value.filter(g=>g.status==="error").length===0&&(s.value=0,p())}});const a=c.computed(()=>o.value.validateStep),r=c.computed(()=>{const f=o.value.validateStep;return f?f():!0}),l=f=>{a.value?r.value?(o.value.status="completed",s.value=f):o.value.status="error":d(f)},d=f=>{o.value.status="completed",s.value=f},h=c.computed(()=>{const f=o.value.validateStep;return f?!f():!1});return(f,u)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:c.normalizeClass(`hidden md:block lg:block container--${n.orientation}`)},[c.createElementVNode("div",{class:c.normalizeClass(`flex justify-start fm-pi-container--${n.orientation}`)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.value,(p,m)=>(c.openBlock(),c.createBlock(Ba,{key:m,orientation:n.orientation,"title-text":p.titleText,"supporting-text":p.supportingText,status:p.status,onValidateStep:g=>l(m)},null,8,["orientation","title-text","supporting-text","status","onValidateStep"]))),128))],2),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(Object.keys(f.$slots),p=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:p},[`step${s.value+1}`===p?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(`flex fm-pi-form--${n.orientation}`)},[c.createElementVNode("div",{class:c.normalizeClass(`bg-white flex flex-col gap-10 p-6 ${f.$slots.card?"w-2/3":"w-full"}`)},[c.createElementVNode("form",{class:"flex flex-col gap-2 p-0 self-stretch",onSubmit:u[1]||(u[1]=c.withModifiers(m=>l(s.value+1),["prevent"]))},[c.renderSlot(f.$slots,p,{class:"gap-0 items-start p-0 self-stretch"}),c.createElementVNode("div",Op,[p!="step1"?(c.openBlock(),c.createBlock($t,{key:0,type:"button",label:n.previousButtonLabel,variant:"tertiary",onClick:u[0]||(u[0]=c.withModifiers(m=>l(s.value-1),["stop"]))},null,8,["label"])):c.createCommentVNode("",!0),c.createVNode($t,{variant:"primary",disabled:h.value,label:s.value!=e.value.length-1?n.nextButtonLabel:n.submitButtonLabel,type:"submit"},null,8,["disabled","label"])])],32)],2),f.$slots.card?(c.openBlock(),c.createElementBlock("div",Tp,[c.renderSlot(f.$slots,"card")])):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0)],64))),128))],2),c.createElementVNode("div",Fp,[c.createVNode(Pp,{"title-text":o.value.titleText,"supporting-text":o.value.supportingText,"total-steps":i.value,"current-step":s.value+1},null,8,["title-text","supporting-text","total-steps","current-step"]),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(Object.keys(f.$slots),p=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:p},[`step${s.value+1}`===p?(c.openBlock(),c.createElementBlock("div",Ap,[c.createElementVNode("div",Lp,[c.createElementVNode("form",{class:"flex flex-col gap-2 p-0 self-stretch w-full",onSubmit:u[3]||(u[3]=c.withModifiers(m=>l(s.value+1),["prevent"]))},[c.renderSlot(f.$slots,p,{class:"gap-0 items-start p-0 self-stretch"}),c.createElementVNode("div",$p,[p!="step1"?(c.openBlock(),c.createBlock($t,{key:0,type:"button",label:n.previousButtonLabel,variant:"tertiary",onClick:u[2]||(u[2]=c.withModifiers(m=>l(s.value-1),["stop"]))},null,8,["label"])):c.createCommentVNode("",!0),c.createVNode($t,{variant:"primary",disabled:h.value,label:s.value!=e.value.length-1?n.nextButtonLabel:n.submitButtonLabel,type:"submit"},null,8,["disabled","label"])])],32)])])):c.createCommentVNode("",!0)],64))),128))])],64))}}),Lg="",ye=n=>(c.pushScopeId("data-v-6b01e659"),n=n(),c.popScopeId(),n),Rp={class:"flex gap-3 hover:cursor-pointer items-start pl-1 pr-5 py-0 self-stretch"},Ip={key:0,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},zp=[ye(()=>c.createElementVNode("circle",{cx:"12",cy:"12",r:"11",stroke:"#AEAEB2","stroke-width":"2"},null,-1))],Wp={key:1,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},Hp=[ye(()=>c.createElementVNode("circle",{cx:"12",cy:"12",r:"10",fill:"#FF7823",stroke:"#FF7823","stroke-width":"4"},null,-1))],jp={key:2,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},Yp=[ye(()=>c.createElementVNode("path",{d:"M9.9998 13.6L15.8998 7.70005C16.0831 7.51672 16.3165 7.42505 16.5998 7.42505C16.8831 7.42505 17.1165 7.51672 17.2998 7.70005C17.4831 7.88338 17.5748 8.11672 17.5748 8.40005C17.5748 8.68338 17.4831 8.91672 17.2998 9.10005L10.6998 15.7C10.4998 15.9 10.2665 16 9.9998 16C9.73314 16 9.4998 15.9 9.2998 15.7L6.6998 13.1C6.51647 12.9167 6.4248 12.6834 6.4248 12.4C6.4248 12.1167 6.51647 11.8834 6.6998 11.7C6.88314 11.5167 7.11647 11.425 7.3998 11.425C7.68314 11.425 7.91647 11.5167 8.0998 11.7L9.9998 13.6Z",fill:"#FF7823"},null,-1)),ye(()=>c.createElementVNode("path",{d:"M1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12Z",stroke:"#FF7823","stroke-width":"2"},null,-1))],Up={key:3,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},Xp=[ye(()=>c.createElementVNode("path",{d:"M2.72479 21C2.54146 21 2.37479 20.9542 2.22479 20.8625C2.07479 20.7708 1.95812 20.65 1.87479 20.5C1.79146 20.35 1.74562 20.1875 1.73729 20.0125C1.72896 19.8375 1.77479 19.6667 1.87479 19.5L11.1248 3.5C11.2248 3.33333 11.354 3.20833 11.5123 3.125C11.6706 3.04167 11.8331 3 11.9998 3C12.1665 3 12.329 3.04167 12.4873 3.125C12.6456 3.20833 12.7748 3.33333 12.8748 3.5L22.1248 19.5C22.2248 19.6667 22.2706 19.8375 22.2623 20.0125C22.254 20.1875 22.2081 20.35 22.1248 20.5C22.0415 20.65 21.9248 20.7708 21.7748 20.8625C21.6248 20.9542 21.4581 21 21.2748 21H2.72479ZM4.44979 19H19.5498L11.9998 6L4.44979 19ZM11.9998 18C12.2831 18 12.5206 17.9042 12.7123 17.7125C12.904 17.5208 12.9998 17.2833 12.9998 17C12.9998 16.7167 12.904 16.4792 12.7123 16.2875C12.5206 16.0958 12.2831 16 11.9998 16C11.7165 16 11.479 16.0958 11.2873 16.2875C11.0956 16.4792 10.9998 16.7167 10.9998 17C10.9998 17.2833 11.0956 17.5208 11.2873 17.7125C11.479 17.9042 11.7165 18 11.9998 18ZM11.9998 15C12.2831 15 12.5206 14.9042 12.7123 14.7125C12.904 14.5208 12.9998 14.2833 12.9998 14V11C12.9998 10.7167 12.904 10.4792 12.7123 10.2875C12.5206 10.0958 12.2831 10 11.9998 10C11.7165 10 11.479 10.0958 11.2873 10.2875C11.0956 10.4792 10.9998 10.7167 10.9998 11V14C10.9998 14.2833 11.0956 14.5208 11.2873 14.7125C11.479 14.9042 11.7165 15 11.9998 15Z",fill:"#FF3B30"},null,-1))],qp={key:4,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},Kp=[ye(()=>c.createElementVNode("circle",{cx:"12",cy:"12",r:"11",stroke:"#C7C7CC","stroke-width":"2"},null,-1))],Gp={class:"flex flex-1 flex-col fm-pi-content-container gap-1 items-start justify-center p-0"},Zp=c.defineComponent({__name:"FmProgressIndicator",props:{titleText:{type:String,required:!0},supportingText:{type:String,default:void 0},status:{type:String,default:"default"},orientation:{type:String,default:"horizontal"}},emits:["validate-step"],setup(n,{emit:t}){const e=n,i=c.computed(()=>a[e.status]),s=c.computed(()=>r[e.status]),o=c.computed(()=>l[e.orientation]),a={active:"text-fm-color-typo-primary",default:"text-fm-color-typo-secondary",error:"text-fm-color-typo-primary",completed:"text-fm-color-typo-primary",disabled:"text-fm-color-typo-disabled"},r={active:"bg-fm-color-primary",default:"bg-fm-color-neutral-gray-300",error:"bg-fm-color-neutral-gray-300",completed:"bg-fm-color-primary",disabled:"bg-fm-color-neutral-gray-300"},l={horizontal:"flex-col h-[18px] py-2 w-full",vertical:"h-[72px] px-2 w-[18px]"};return(d,h)=>{const f=c.resolveDirective("wave");return c.withDirectives((c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(`flex gap-1 fm-pi-item-container fm-pi-item-container--${n.orientation}`),onClick:h[0]||(h[0]=c.withModifiers(u=>t("validate-step"),["stop"]))},[c.createElementVNode("div",{class:c.normalizeClass(["gap-2 inline-flex items-start justify-start",o.value])},[c.createElementVNode("div",{class:c.normalizeClass(`self-stretch fm-pi-item-line fm-pi-item-line--${n.orientation} ${s.value} `)},null,2)],2),c.createElementVNode("div",Rp,[c.createElementVNode("div",null,[n.status==="default"?(c.openBlock(),c.createElementBlock("svg",Ip,zp)):c.createCommentVNode("",!0),n.status==="active"?(c.openBlock(),c.createElementBlock("svg",Wp,Hp)):c.createCommentVNode("",!0),n.status==="completed"?(c.openBlock(),c.createElementBlock("svg",jp,Yp)):c.createCommentVNode("",!0),n.status==="error"?(c.openBlock(),c.createElementBlock("svg",Up,Xp)):c.createCommentVNode("",!0),n.status==="disabled"?(c.openBlock(),c.createElementBlock("svg",qp,Kp)):c.createCommentVNode("",!0)]),c.createElementVNode("div",Gp,[c.createElementVNode("span",{class:c.normalizeClass(["fm-typo-body-lg-400",i.value])},c.toDisplayString(n.titleText),3),c.createElementVNode("span",{class:c.normalizeClass(["fm-typo-body-sm-400 overflow-hidden text-ellipsis",n.status!=="disabled"?"text-fm-color-typo-secondary":"text-fm-color-typo-disabled"])},c.toDisplayString(n.supportingText),3)])])],2)),[[f]])}}}),Hg="",Ba=ot(Zp,[["__scopeId","data-v-6b01e659"]]),Jp={class:"flex"},Qp={key:0,class:"mt-8"},tm=c.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0}},emits:["onDismiss","onAction"],setup(n,{emit:t}){const e=n,i=c.computed(()=>{switch(e.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${e.variant}`)}}),s=c.computed(()=>e.title?{text:e.title,classes:"fm-typo-body-lg-700"}:{text:e.description,classes:""}),o=c.computed(()=>e.bgColor?Zn(e.bgColor)?{style:{backgroundColor:e.bgColor}}:{class:`bg-fm-color-${e.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),a=c.computed(()=>e.color?Zn(e.color)?{style:{color:e.color}}:{class:`text-fm-color-${e.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(r,l)=>(c.openBlock(),c.createElementBlock("div",c.mergeProps(o.value,{class:"fm-corner-radius-lg fm-snackbar px-24 py-16"}),[c.createElementVNode("div",Jp,[i.value.icon?(c.openBlock(),c.createBlock(W,{key:0,name:i.value.icon.name,color:e.color??i.value.icon.color,class:"mr-12"},null,8,["name","color"])):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(`${s.value.classes} grow ellipsis`)},c.toDisplayString(s.value.text),3),e.dismissable?(c.openBlock(),c.createBlock(W,{key:1,style:{"{ flex":"none}"},name:"close",class:"cursor-pointer",onClick:l[0]||(l[0]=()=>t("onDismiss"))})):c.createCommentVNode("",!0)]),e.title&&e.description?(c.openBlock(),c.createElementBlock("div",Qp,c.toDisplayString(e.description),1)):c.createCommentVNode("",!0),c.renderSlot(r.$slots,"actions",{},()=>[e.action?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0},a.value,{class:"mt-16 fm-typo-body-lg-700"}),[c.createElementVNode("span",{class:"cursor-pointer",onClick:l[1]||(l[1]=()=>t("onAction"))},c.toDisplayString(e.action),1)],16)):c.createCommentVNode("",!0)],!0)],16))}}),jg="",em=ot(tm,[["__scopeId","data-v-b6db34bb"]]),nm={},im={class:"flex-grow"};function sm(n,t){return c.openBlock(),c.createElementBlock("div",im)}const om=ot(nm,[["render",sm]]),am={class:"flex flex-col fm-time-input items-center"},rm=["value"],lm=c.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value","update:cycle"],setup(n,{emit:t}){const e=n,i=c.ref();function s(d){i.value&&(i.value.value=d)}c.watch(()=>e.modelValue,s);function o(){if(!i.value)return;const d=a(i.value.value);if(d==null||d>e.max||d<e.min){s(e.modelValue);return}t("update:model-value",d)}function a(d){return d&&/^\d+$/.test(d)?Number(d):null}function r(){t("update:model-value",a(e.modelValue)+1)}function l(){t("update:model-value",a(e.modelValue)-1)}return(d,h)=>(c.openBlock(),c.createElementBlock("div",am,[c.createElementVNode("div",{class:"fm-time-input__scroller",onClick:r},[c.createVNode(W,{name:"expand_less",size:"lg"})]),c.createElementVNode("input",{ref_key:"inputRef",ref:i,value:e.modelValue,onInput:o},null,40,rm),c.createElementVNode("div",{class:"fm-time-input__scroller",onClick:l},[c.createVNode(W,{name:"expand_more",size:"lg"})])]))}}),Yg="",Va=ot(lm,[["__scopeId","data-v-35e4eeb2"]]);var Ft=(n=>(n.AM="AM",n.PM="PM",n))(Ft||{});function Ut(n){return n.toString().padStart(2,"0")}const cm={class:"flex fm-time-input gap-16 items-center"},dm=c.createElementVNode("div",{class:"fm-typo-title-sm-700"}," : ",-1),hm={class:"fm-time-input-periods"},fm=["onClick"],Pa=c.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(n,{emit:t}){const e=n;function i(s){const o={hours:s.hours??e.modelValue.hours,minutes:s.minutes??e.modelValue.minutes,period:s.period??e.modelValue.period},a=e.modelValue.hours;(a===12&&o.hours===11||a===11&&o.hours===12)&&(o.period=e.modelValue.period===Ft.AM?Ft.PM:Ft.AM),o.hours>12?o.hours=1:o.hours<1&&(o.hours=12),o.minutes>59?o.minutes=0:o.minutes<0&&(o.minutes=59),t("update:model-value",o)}return(s,o)=>(c.openBlock(),c.createElementBlock("div",cm,[c.createVNode(Va,{"model-value":c.unref(Ut)(n.modelValue.hours),min:1,max:12,"onUpdate:modelValue":o[0]||(o[0]=a=>i({hours:a}))},null,8,["model-value"]),dm,c.createVNode(Va,{"model-value":c.unref(Ut)(n.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":o[1]||(o[1]=a=>i({minutes:a}))},null,8,["model-value"]),c.createElementVNode("div",hm,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(Ft),a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:c.normalizeClass([{"fm-time-input-period__selected":a===n.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:a})},c.toDisplayString(a),11,fm))),128))])]))}}),Ug="",um={class:"fm-time-picker"},pm={class:"flex gap-8"},mm={class:"flex flex-col",style:{width:"343px"}},gm=c.createElementVNode("div",{class:"fm-typo-body-xl-700 pt-12 px-12"}," Enter time ",-1),bm={class:"flex justify-center w-full"},ym={class:"flex justify-end pb-12"},_m=c.defineComponent({__name:"FmTimePicker",props:{modelValue:{type:[null,String],default:null}},emits:["update:model-value"],setup(n,{emit:t}){const e=n,i=c.ref(null),s=c.computed(()=>{if(!e.modelValue)return null;const{hours:p,minutes:m,period:g}=r(e.modelValue);return`${Ut(p)}:${Ut(m)} ${g}`});function o(){if(!i.value){t("update:model-value",null);return}const{hours:p,minutes:m,period:g}=i.value,b=a(p,m,g);t("update:model-value",b),h()}function a(p,m,g){let b=p;return g===Ft.PM?b=p===12?p:p+12:p===12&&(b=0),`${Ut(b)}:${Ut(m)}`}c.onMounted(()=>{e.modelValue&&(i.value=r(e.modelValue))}),c.watch(()=>e.modelValue,p=>{p&&(i.value=r(p))});function r(p){const[m,g,b]=l(p).split(":");return{hours:Number(m),minutes:Number(g),period:b}}function l(p){const[m,g]=p.split(":"),b=Number(m),y=Number(g),_=b>11?Ft.PM:Ft.AM;let w=b;return w===0?w=12:w>12&&(w-=12),`${Ut(w)}:${Ut(y)}:${_}`}const d=c.ref();function h(){var p;(p=d.value)==null||p.hide()}const f=c.ref(!1);function u(p){f.value=p}return(p,m)=>(c.openBlock(),c.createElementBlock("div",um,[c.createVNode(Wi,{ref_key:"dropdownRef",ref:d,onDropdownChanged:u},{"menu-button":c.withCtx(()=>[c.createVNode(Ca,null,{default:c.withCtx(()=>[c.createElementVNode("div",pm,[c.createVNode(W,{name:"schedule",outline:!f.value},null,8,["outline"]),c.createElementVNode("div",{class:c.normalizeClass(["grow",{"text-fm-color-typo-disabled":!s.value}])},c.toDisplayString(s.value??"HH:MM"),3)])]),_:1})]),"menu-content":c.withCtx(()=>[c.createElementVNode("div",mm,[gm,c.createElementVNode("div",bm,[c.createVNode(Pa,{"model-value":i.value??{hours:0,minutes:0,period:c.unref(Ft).AM},class:"py-16","onUpdate:modelValue":m[0]||(m[0]=g=>i.value=g)},null,8,["model-value"])]),c.createElementVNode("div",ym,[c.createVNode($t,{label:"Cancel",variant:"tertiary",onClick:h}),c.createVNode($t,{label:"Confirm",variant:"tertiary",onClick:o})])])]),_:1},512)]))}}),Xg="",Ke=Math.min,_e=Math.max,Wn=Math.round,Xt=n=>({x:n,y:n}),xm={left:"right",right:"left",bottom:"top",top:"bottom"},km={start:"end",end:"start"};function Hi(n,t,e){return _e(n,Ke(t,e))}function Ge(n,t){return typeof n=="function"?n(t):n}function ce(n){return n.split("-")[0]}function Ze(n){return n.split("-")[1]}function Oa(n){return n==="x"?"y":"x"}function ji(n){return n==="y"?"height":"width"}function Hn(n){return["top","bottom"].includes(ce(n))?"y":"x"}function Yi(n){return Oa(Hn(n))}function wm(n,t,e){e===void 0&&(e=!1);const i=Ze(n),s=Yi(n),o=ji(s);let a=s==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=jn(a)),[a,jn(a)]}function Cm(n){const t=jn(n);return[Ui(n),t,Ui(t)]}function Ui(n){return n.replace(/start|end/g,t=>km[t])}function Sm(n,t,e){const i=["left","right"],s=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(n){case"top":case"bottom":return e?t?s:i:t?i:s;case"left":case"right":return t?o:a;default:return[]}}function Mm(n,t,e,i){const s=Ze(n);let o=Sm(ce(n),e==="start",i);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(Ui)))),o}function jn(n){return n.replace(/left|right|bottom|top/g,t=>xm[t])}function vm(n){return{top:0,right:0,bottom:0,left:0,...n}}function Ta(n){return typeof n!="number"?vm(n):{top:n,right:n,bottom:n,left:n}}function Yn(n){return{...n,top:n.y,left:n.x,right:n.x+n.width,bottom:n.y+n.height}}function Fa(n,t,e){let{reference:i,floating:s}=n;const o=Hn(t),a=Yi(t),r=ji(a),l=ce(t),d=o==="y",h=i.x+i.width/2-s.width/2,f=i.y+i.height/2-s.height/2,u=i[r]/2-s[r]/2;let p;switch(l){case"top":p={x:h,y:i.y-s.height};break;case"bottom":p={x:h,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:f};break;case"left":p={x:i.x-s.width,y:f};break;default:p={x:i.x,y:i.y}}switch(Ze(t)){case"start":p[a]-=u*(e&&d?-1:1);break;case"end":p[a]+=u*(e&&d?-1:1);break}return p}const Dm=async(n,t,e)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:a}=e,r=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:n,floating:t,strategy:s}),{x:h,y:f}=Fa(d,i,l),u=i,p={},m=0;for(let g=0;g<r.length;g++){const{name:b,fn:y}=r[g],{x:_,y:w,data:x,reset:k}=await y({x:h,y:f,initialPlacement:i,placement:u,strategy:s,middlewareData:p,rects:d,platform:a,elements:{reference:n,floating:t}});if(h=_??h,f=w??f,p={...p,[b]:{...p[b],...x}},k&&m<=50){m++,typeof k=="object"&&(k.placement&&(u=k.placement),k.rects&&(d=k.rects===!0?await a.getElementRects({reference:n,floating:t,strategy:s}):k.rects),{x:h,y:f}=Fa(d,u,l)),g=-1;continue}}return{x:h,y:f,placement:u,strategy:s,middlewareData:p}};async function Aa(n,t){var e;t===void 0&&(t={});const{x:i,y:s,platform:o,rects:a,elements:r,strategy:l}=n,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:u=!1,padding:p=0}=Ge(t,n),m=Ta(p),b=r[u?f==="floating"?"reference":"floating":f],y=Yn(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(b)))==null||e?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(r.floating)),boundary:d,rootBoundary:h,strategy:l})),_=f==="floating"?{...a.floating,x:i,y:s}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(r.floating)),x=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},k=Yn(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:_,offsetParent:w,strategy:l}):_);return{top:(y.top-k.top+m.top)/x.y,bottom:(k.bottom-y.bottom+m.bottom)/x.y,left:(y.left-k.left+m.left)/x.x,right:(k.right-y.right+m.right)/x.x}}const Em=n=>({name:"arrow",options:n,async fn(t){const{x:e,y:i,placement:s,rects:o,platform:a,elements:r,middlewareData:l}=t,{element:d,padding:h=0}=Ge(n,t)||{};if(d==null)return{};const f=Ta(h),u={x:e,y:i},p=Yi(s),m=ji(p),g=await a.getDimensions(d),b=p==="y",y=b?"top":"left",_=b?"bottom":"right",w=b?"clientHeight":"clientWidth",x=o.reference[m]+o.reference[p]-u[p]-o.floating[m],k=u[p]-o.reference[p],M=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let v=M?M[w]:0;(!v||!await(a.isElement==null?void 0:a.isElement(M)))&&(v=r.floating[w]||o.floating[m]);const D=x/2-k/2,F=v/2-g[m]/2-1,T=Ke(f[y],F),P=Ke(f[_],F),L=T,X=v-g[m]-P,O=v/2-g[m]/2+D,S=Hi(L,O,X),C=!l.arrow&&Ze(s)!=null&&O!=S&&o.reference[m]/2-(O<L?T:P)-g[m]/2<0,E=C?O<L?O-L:O-X:0;return{[p]:u[p]+E,data:{[p]:S,centerOffset:O-S-E,...C&&{alignmentOffset:E}},reset:C}}}),Bm=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;const{placement:s,middlewareData:o,rects:a,initialPlacement:r,platform:l,elements:d}=t,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...b}=Ge(n,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};const y=ce(s),_=ce(r)===r,w=await(l.isRTL==null?void 0:l.isRTL(d.floating)),x=u||(_||!g?[jn(r)]:Cm(r));!u&&m!=="none"&&x.push(...Mm(r,g,m,w));const k=[r,...x],M=await Aa(t,b),v=[];let D=((i=o.flip)==null?void 0:i.overflows)||[];if(h&&v.push(M[y]),f){const L=wm(s,a,w);v.push(M[L[0]],M[L[1]])}if(D=[...D,{placement:s,overflows:v}],!v.every(L=>L<=0)){var F,T;const L=(((F=o.flip)==null?void 0:F.index)||0)+1,X=k[L];if(X)return{data:{index:L,overflows:D},reset:{placement:X}};let O=(T=D.filter(S=>S.overflows[0]<=0).sort((S,C)=>S.overflows[1]-C.overflows[1])[0])==null?void 0:T.placement;if(!O)switch(p){case"bestFit":{var P;const S=(P=D.map(C=>[C.placement,C.overflows.filter(E=>E>0).reduce((E,V)=>E+V,0)]).sort((C,E)=>C[1]-E[1])[0])==null?void 0:P[0];S&&(O=S);break}case"initialPlacement":O=r;break}if(s!==O)return{reset:{placement:O}}}return{}}}};async function Vm(n,t){const{placement:e,platform:i,elements:s}=n,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),a=ce(e),r=Ze(e),l=Hn(e)==="y",d=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,f=Ge(t,n);let{mainAxis:u,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return r&&typeof m=="number"&&(p=r==="end"?m*-1:m),l?{x:p*h,y:u*d}:{x:u*d,y:p*h}}const Pm=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){const{x:e,y:i}=t,s=await Vm(t,n);return{x:e+s.x,y:i+s.y,data:s}}}},Om=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){const{x:e,y:i,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:r={fn:b=>{let{x:y,y:_}=b;return{x:y,y:_}}},...l}=Ge(n,t),d={x:e,y:i},h=await Aa(t,l),f=Hn(ce(s)),u=Oa(f);let p=d[u],m=d[f];if(o){const b=u==="y"?"top":"left",y=u==="y"?"bottom":"right",_=p+h[b],w=p-h[y];p=Hi(_,p,w)}if(a){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",_=m+h[b],w=m-h[y];m=Hi(_,m,w)}const g=r.fn({...t,[u]:p,[f]:m});return{...g,data:{x:g.x-e,y:g.y-i}}}}};function qt(n){return La(n)?(n.nodeName||"").toLowerCase():"#document"}function pt(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function Kt(n){var t;return(t=(La(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function La(n){return n instanceof Node||n instanceof pt(n).Node}function At(n){return n instanceof Element||n instanceof pt(n).Element}function Ct(n){return n instanceof HTMLElement||n instanceof pt(n).HTMLElement}function $a(n){return typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof pt(n).ShadowRoot}function Je(n){const{overflow:t,overflowX:e,overflowY:i,display:s}=gt(n);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&!["inline","contents"].includes(s)}function Tm(n){return["table","td","th"].includes(qt(n))}function Xi(n){const t=qi(),e=gt(n);return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(e.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(e.contain||"").includes(i))}function Fm(n){let t=xe(n);for(;Ct(t)&&!Un(t);){if(Xi(t))return t;t=xe(t)}return null}function qi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Un(n){return["html","body","#document"].includes(qt(n))}function gt(n){return pt(n).getComputedStyle(n)}function Xn(n){return At(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function xe(n){if(qt(n)==="html")return n;const t=n.assignedSlot||n.parentNode||$a(n)&&n.host||Kt(n);return $a(t)?t.host:t}function Na(n){const t=xe(n);return Un(t)?n.ownerDocument?n.ownerDocument.body:n.body:Ct(t)&&Je(t)?t:Na(t)}function Ki(n,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);const s=Na(n),o=s===((i=n.ownerDocument)==null?void 0:i.body),a=pt(s);return o?t.concat(a,a.visualViewport||[],Je(s)?s:[],a.frameElement&&e?Ki(a.frameElement):[]):t.concat(s,Ki(s,[],e))}function Ra(n){const t=gt(n);let e=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=Ct(n),o=s?n.offsetWidth:e,a=s?n.offsetHeight:i,r=Wn(e)!==o||Wn(i)!==a;return r&&(e=o,i=a),{width:e,height:i,$:r}}function Ia(n){return At(n)?n:n.contextElement}function ke(n){const t=Ia(n);if(!Ct(t))return Xt(1);const e=t.getBoundingClientRect(),{width:i,height:s,$:o}=Ra(t);let a=(o?Wn(e.width):e.width)/i,r=(o?Wn(e.height):e.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!r||!Number.isFinite(r))&&(r=1),{x:a,y:r}}const Am=Xt(0);function za(n){const t=pt(n);return!qi()||!t.visualViewport?Am:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Lm(n,t,e){return t===void 0&&(t=!1),!e||t&&e!==pt(n)?!1:t}function Qe(n,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);const s=n.getBoundingClientRect(),o=Ia(n);let a=Xt(1);t&&(i?At(i)&&(a=ke(i)):a=ke(n));const r=Lm(o,e,i)?za(o):Xt(0);let l=(s.left+r.x)/a.x,d=(s.top+r.y)/a.y,h=s.width/a.x,f=s.height/a.y;if(o){const u=pt(o),p=i&&At(i)?pt(i):i;let m=u.frameElement;for(;m&&i&&p!==u;){const g=ke(m),b=m.getBoundingClientRect(),y=gt(m),_=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,w=b.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,d*=g.y,h*=g.x,f*=g.y,l+=_,d+=w,m=pt(m).frameElement}}return Yn({width:h,height:f,x:l,y:d})}function $m(n){let{rect:t,offsetParent:e,strategy:i}=n;const s=Ct(e),o=Kt(e);if(e===o)return t;let a={scrollLeft:0,scrollTop:0},r=Xt(1);const l=Xt(0);if((s||!s&&i!=="fixed")&&((qt(e)!=="body"||Je(o))&&(a=Xn(e)),Ct(e))){const d=Qe(e);r=ke(e),l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}return{width:t.width*r.x,height:t.height*r.y,x:t.x*r.x-a.scrollLeft*r.x+l.x,y:t.y*r.y-a.scrollTop*r.y+l.y}}function Nm(n){return Array.from(n.getClientRects())}function Wa(n){return Qe(Kt(n)).left+Xn(n).scrollLeft}function Rm(n){const t=Kt(n),e=Xn(n),i=n.ownerDocument.body,s=_e(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=_e(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-e.scrollLeft+Wa(n);const r=-e.scrollTop;return gt(i).direction==="rtl"&&(a+=_e(t.clientWidth,i.clientWidth)-s),{width:s,height:o,x:a,y:r}}function Im(n,t){const e=pt(n),i=Kt(n),s=e.visualViewport;let o=i.clientWidth,a=i.clientHeight,r=0,l=0;if(s){o=s.width,a=s.height;const d=qi();(!d||d&&t==="fixed")&&(r=s.offsetLeft,l=s.offsetTop)}return{width:o,height:a,x:r,y:l}}function zm(n,t){const e=Qe(n,!0,t==="fixed"),i=e.top+n.clientTop,s=e.left+n.clientLeft,o=Ct(n)?ke(n):Xt(1),a=n.clientWidth*o.x,r=n.clientHeight*o.y,l=s*o.x,d=i*o.y;return{width:a,height:r,x:l,y:d}}function Ha(n,t,e){let i;if(t==="viewport")i=Im(n,e);else if(t==="document")i=Rm(Kt(n));else if(At(t))i=zm(t,e);else{const s=za(n);i={...t,x:t.x-s.x,y:t.y-s.y}}return Yn(i)}function ja(n,t){const e=xe(n);return e===t||!At(e)||Un(e)?!1:gt(e).position==="fixed"||ja(e,t)}function Wm(n,t){const e=t.get(n);if(e)return e;let i=Ki(n,[],!1).filter(r=>At(r)&&qt(r)!=="body"),s=null;const o=gt(n).position==="fixed";let a=o?xe(n):n;for(;At(a)&&!Un(a);){const r=gt(a),l=Xi(a);!l&&r.position==="fixed"&&(s=null),(o?!l&&!s:!l&&r.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Je(a)&&!l&&ja(n,a))?i=i.filter(h=>h!==a):s=r,a=xe(a)}return t.set(n,i),i}function Hm(n){let{element:t,boundary:e,rootBoundary:i,strategy:s}=n;const a=[...e==="clippingAncestors"?Wm(t,this._c):[].concat(e),i],r=a[0],l=a.reduce((d,h)=>{const f=Ha(t,h,s);return d.top=_e(f.top,d.top),d.right=Ke(f.right,d.right),d.bottom=Ke(f.bottom,d.bottom),d.left=_e(f.left,d.left),d},Ha(t,r,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function jm(n){return Ra(n)}function Ym(n,t,e){const i=Ct(t),s=Kt(t),o=e==="fixed",a=Qe(n,!0,o,t);let r={scrollLeft:0,scrollTop:0};const l=Xt(0);if(i||!i&&!o)if((qt(t)!=="body"||Je(s))&&(r=Xn(t)),i){const d=Qe(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&(l.x=Wa(s));return{x:a.left+r.scrollLeft-l.x,y:a.top+r.scrollTop-l.y,width:a.width,height:a.height}}function Ya(n,t){return!Ct(n)||gt(n).position==="fixed"?null:t?t(n):n.offsetParent}function Ua(n,t){const e=pt(n);if(!Ct(n))return e;let i=Ya(n,t);for(;i&&Tm(i)&>(i).position==="static";)i=Ya(i,t);return i&&(qt(i)==="html"||qt(i)==="body"&>(i).position==="static"&&!Xi(i))?e:i||Fm(n)||e}const Um=async function(n){let{reference:t,floating:e,strategy:i}=n;const s=this.getOffsetParent||Ua,o=this.getDimensions;return{reference:Ym(t,await s(e),i),floating:{x:0,y:0,...await o(e)}}};function Xm(n){return gt(n).direction==="rtl"}const qm={convertOffsetParentRelativeRectToViewportRelativeRect:$m,getDocumentElement:Kt,getClippingRect:Hm,getOffsetParent:Ua,getElementRects:Um,getClientRects:Nm,getDimensions:jm,getScale:ke,isElement:At,isRTL:Xm},Km=(n,t,e)=>{const i=new Map,s={platform:qm,...e},o={...s.platform,_c:i};return Dm(n,t,{...s,platform:o})};function Gm(n){var t;return(t=n==null?void 0:n.$el)!=null?t:n}function Zm(n){return{name:"arrow",options:n,fn(t){const e=Gm(c.unref(n.element));return e==null?{}:Em({element:e,padding:n.padding}).fn(t)}}}const Jm={class:"px-2 py-0"},Qm={key:0,class:"fm-typo-body-xl-700"},tg={key:0,class:"content-start flex gap-0 px-2 py-0 self-stretch"},eg=c.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},beak:{default:"top"},hasArrow:{type:Boolean,default:!0},titleText:{default:"Title"},contentText:{},actionButtons:{}},setup(n){const t=n,e=c.ref(null),i=c.ref(null),s=c.ref(null),o=async()=>{var y,_,w,x;const{x:p,y:m,placement:g,middlewareData:b}=await Km(e.value,i.value,{placement:t.beak,middleware:[Pm(10),Bm(),Om({padding:5}),t.hasArrow?Zm({element:s.value,padding:10}):null]});if(Object.assign(i.value.style,{left:`${p}px`,top:`${m}px`}),t.hasArrow){const k={top:"bottom",right:"left",bottom:"top",left:"right"}[g.split("-")[0]];Object.assign(s.value.style,{left:((y=b.arrow)==null?void 0:y.x)!=null?`${(_=b.arrow)==null?void 0:_.x}px`:"",top:((w=b.arrow)==null?void 0:w.y)!=null?`${(x=b.arrow)==null?void 0:x.y}px`:"",right:"",bottom:"",background:t.variant==="rich"?"#FFF":"#1C1C1E",[k]:"-4px"})}},a=c.ref(!1),r=c.ref(0),l=c.ref(0),d=c.computed(()=>({...{plain:{color:"#FFF",background:"#1C1C1E",boxShadow:"0 2px 4px rgba(0, 0, 0, 0)"},rich:{background:"#FFF",boxShadow:"0px 8px 16px 0px rgba(199, 199, 204, 0.24)"}}[t.variant],display:a.value?"block":"none"})),h=()=>{clearTimeout(l.value),r.value=window.setTimeout(()=>{a.value=!0},500)},f=()=>{clearTimeout(r.value),l.value=window.setTimeout(()=>a.value=!1,1500)},u=()=>{clearTimeout(l.value),a.value=!0};return c.watchEffect(()=>{a.value?(o(),window.addEventListener("resize",o)):window.removeEventListener("resize",o)}),(p,m)=>(c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("div",{ref_key:"tooltipContainer",ref:e,class:"cursor-pointer flex items-center justify-center relative w-max",onMouseenter:h,onMouseleave:f},[c.renderSlot(p.$slots,"default")],544),c.createElementVNode("div",{ref_key:"tooltip",ref:i,class:"absolute box-border break-words left-0 max-w-xs px-4 py-3 rounded-2xl top-0 w-max whitespace-normal z-50",style:c.normalizeStyle(d.value),onMouseenter:u,onMouseleave:f},[c.createElementVNode("div",null,[c.createElementVNode("div",Jm,[p.variant=="rich"?(c.openBlock(),c.createElementBlock("div",Qm,c.toDisplayString(p.titleText),1)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(p.variant=="plain"?"fm-typo-body-sm-400":"fm-typo-body-md-400")},c.toDisplayString(p.contentText),3)]),p.variant=="rich"?(c.openBlock(),c.createElementBlock("div",tg,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(p.actionButtons,(g,b)=>(c.openBlock(),c.createElementBlock("div",{key:b},[c.createVNode($t,{variant:"tertiary",label:g.label,onClick:g.handler},null,8,["label","onClick"])]))),128))])):c.createCommentVNode("",!0)]),c.createElementVNode("div",{ref_key:"arrowEl",ref:s,class:"-rotate-45 absolute h-3 w-3"},null,512)],36)]))}}),Xa={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},ng=n=>"config"in n&&"globalProperties"in n.config,ig=n=>{let t;return n==="vue2"?t=!1:n==="vue3"?t=!0:t=ng(n),t?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},qa=n=>typeof n=="string"&&n!=="auto",Ka=(n,t)=>{n.dataset.vWaveBoundary=qa(t)?t:"true"},sg=({borderTopLeftRadius:n,borderTopRightRadius:t,borderBottomLeftRadius:e,borderBottomRightRadius:i},s)=>{const o=document.createElement(s);return o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.style.display="block",o.style.position="absolute",o.style.borderRadius=`${n} ${t} ${i} ${e}`,o.style.overflow="hidden",o.style.pointerEvents="none",o.style.webkitMaskImage="-webkit-radial-gradient(white, black)",o},og=(n,t,e,i)=>{const s=document.createElement("div");return s.style.position="absolute",s.style.width=`${e}px`,s.style.height=`${e}px`,s.style.top=`${t}px`,s.style.left=`${n}px`,s.style.background=i.color,s.style.borderRadius="50%",s.style.opacity=`${i.initialOpacity}`,s.style.transform="translate(-50%,-50%) scale(0)",s.style.transition=`transform ${i.duration}s ${i.easing}, opacity ${i.duration}s ${i.easing}`,s};function qn(n,t,e,i){const s=n-e,o=t-i;return Math.sqrt(s*s+o*o)}function ag(n,t,{width:e,height:i}){const s=qn(n,t,0,0),o=qn(n,t,e,0),a=qn(n,t,0,i),r=qn(n,t,e,i);return Math.max(s,o,a,r)}const rg=({x:n,y:t},{top:e,left:i})=>({x:n-i,y:t-e}),Gi="vWaveCountInternal";function lg(n){const t=Zi(n);Ga(n,t+1)}function cg(n){const t=Zi(n);Ga(n,t-1)}function Ga(n,t){n.dataset[Gi]=t.toString()}function Zi(n){var t;return parseInt((t=n.dataset[Gi])!==null&&t!==void 0?t:"0",10)}function dg(n){delete n.dataset[Gi]}const Ji=(n,t,e)=>{const i=t.getBoundingClientRect(),s=window.getComputedStyle(t),{x:o,y:a}=rg(n,i),r=2.05*ag(o,a,i),l=sg(s,e.tagName),d=og(o,a,r,e);lg(t);let h="";s.position==="static"&&(t.style.position&&(h=t.style.position),t.style.position="relative"),l.appendChild(d),t.appendChild(l);let f=!1;const u=b=>{typeof b<"u"&&(document.removeEventListener("pointerup",u),document.removeEventListener("pointercancel",u)),f?p():f=!0},p=()=>{d.style.transition=`opacity ${e.dissolveDuration}s linear`,d.style.opacity="0",setTimeout(()=>{l.remove(),cg(t),Zi(t)===0&&(dg(t),t.style.position=h)},e.dissolveDuration*1e3)};document.addEventListener("pointerup",u),document.addEventListener("pointercancel",u);const m=setTimeout(()=>{document.removeEventListener("pointercancel",g),requestAnimationFrame(()=>{d.style.transform="translate(-50%,-50%) scale(1)",d.style.opacity=`${e.finalOpacity}`,setTimeout(()=>u(),e.duration*1e3)})},e.cancellationPeriod),g=()=>{clearTimeout(m),l.remove(),document.removeEventListener("pointerup",u),document.removeEventListener("pointercancel",u),document.removeEventListener("pointercancel",g)};document.addEventListener("pointercancel",g)},tn=new WeakMap,Za=(n={},t="vue3")=>{const e=Object.assign(Object.assign({},Xa),n),i=ig(t),s=r=>{const l=r.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${l}"]`).forEach(h=>Ji(r,h,Object.assign(Object.assign({},e),tn.get(h))))},o={[i.mounted](r,{value:l={}}){var d;tn.set(r,l),Ka(r,(d=l&&l.trigger)!==null&&d!==void 0?d:e.trigger),r.addEventListener("pointerdown",h=>{if(tn.get(r)===!1)return;const f=Object.assign(Object.assign({},e),tn.get(r));if(f.trigger===!1)return Ji(h,r,f);if(qa(f.trigger))return;const u=r.querySelector('[data-v-wave-trigger="true"]');!u&&f.trigger===!0||u&&!h.composedPath().includes(u)||Ji(h,r,f)})},[i.updated](r,{value:l={}}){var d;tn.set(r,l),Ka(r,(d=l&&l.trigger)!==null&&d!==void 0?d:e.trigger)}},a={[i.mounted](r,{arg:l="true"}){r.dataset.vWaveTrigger=l,l!=="true"&&r.addEventListener("pointerdown",s)},[i.updated](r,{arg:l="true"}){r.dataset.vWaveTrigger=l,l==="true"?r.removeEventListener("pointerdown",s):r.addEventListener("pointerdown",s)}};return{wave:o,vWave:o,waveTrigger:a,vWaveTrigger:a}},hg={install(n,t={}){if(this.installed)return;this.installed=!0;const e=Object.assign(Object.assign({},Xa),t),{vWave:i,vWaveTrigger:s}=Za(e,n);n.directive(e.directive,i),n.directive(`${e.directive}-trigger`,s)},installed:!1,createLocalWaveDirective:Za},fg=n=>{n.use(hg,{})};N.FmBreadcrumb=er,N.FmButton=$t,N.FmButtonGroup=ur,N.FmCard=gr,N.FmCardActions=br,N.FmCardSection=yr,N.FmCardTitle=Qi,N.FmCheckbox=wa,N.FmDatePicker=Wf,N.FmDateRangePicker=Qf,N.FmDialog=nu,N.FmField=Ca,N.FmForm=uu,N.FmIcon=W,N.FmLineChart=Vf,N.FmList=Cp,N.FmListItem=Mp,N.FmMenu=Wi,N.FmMenuItem=va,N.FmProgressIndicator=Ba,N.FmProgressIndicatorGroup=Np,N.FmRadio=ku,N.FmRadioGroup=Mu,N.FmSelect=Lu,N.FmSnackbar=em,N.FmSpacer=om,N.FmStepperField=Xu,N.FmSwitch=sp,N.FmTextField=up,N.FmTextarea=kp,N.FmTimeInput=Pa,N.FmTimePicker=_m,N.FmTooltip=eg,N.uiPlugin=fg,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|